View Full Version : Resists
I'm working on some code for spell resists. As of right now, I have a very crude version, that does the following:
- Checks against resist based on level, NPC/Client (NPC's resist easier), and spell resist bonus.
- Has a 6-level limit on mobs you can land spells on.
- Subtracts damage from a DD-only spell, completely resists all other spells upon a successful resist (it's easier to resist a DD-only)
My two problems are:
- I can't figure out how to declare resist type from spdat.eff
- I can't figure out how to declare MR/FR/CR/PR/DR of the mob/player.
I'd really appreciate any help with this, and if I can figure these out, I'm writing up a much more advanced version.
Lurker_005
05-22-2002, 09:14 AM
A Sugestion on the level limit.
Make it adjust the chance to resist percentage instead of just cutting it off. Also it should be a bit higher for higher level players than say level 10 players.
Sudo math to display the basic idea, perhaps just modify the resist chance to near 100%
level limit=6+casterlevel/(adjustment vlaue, 6 perhaps)
chance to resist modifier=level differance/level limit
You gain a +5 bonus to your roll for each level you have on the target.
You gain a -10 modifier to your roll for each level your target has on you.
Resistable spells will be auto-resisted by NPC's 7 levels above the caster, but not players.
More than 10 levels above the target will not accumulate additional bonus.
More than 6 levels below target will not accumulate additional penalties (for PCvsPC)
Lurker_005
05-22-2002, 11:24 AM
That doesn't sound bad, but the limit of only 7 levels above you still bothers me at the high end of the game.
Casters level 58 can't cast on npc's level 65, and noone can cast on level 70npc's
Granted this does assume an EQ live level setup...
actally it can get LOW but it wont be zero chance. i once hit a lvl 40 when i was lvl 9 and other way lvl 2 4 etc ( low lvl ) when i was lvl 40 50s sometimes resists my cast spell.
I'll put a roof on the 7-level limit thing, so it doesn't count levels above 60 (aka, once you hit L54, you always have a chance to land spells)
Lyenu X`Arie
05-24-2002, 02:23 AM
Once the new patch on test server comes out we have a 100% correct version of the SPDat struct for it. In the spell struct there is a property called "ResistType", you'll have to look into it mor ebut it says what the resist is for that spell. should help you out =)
Excellent. If that's coming up, I'm gonna write the real code with some ghost variables.
One question just:
Are you going to add resist variables to PC's? They're on NPC's and items, but they're not declared for clients anywhere I can see.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.