BartjeD wrote...
This is the code that deals with the Spell Immunity and Spell Absorption effects. (decrease levels left etc..)
I think this is what you need but I can also PM you the entire function if you want. (it might bloat the page)
http://pastebin.com/VbL3Lk97 - probably copy this into a script from the raw paste so it'll read better![]()
You'll notice what I'm doing with the loop here, reading out the structure of the applied effects and using that as data for the function to see what should happen. This doesn't work for items though because items don't apply an effect on the player that will be returned this way (immunity: death or immunity: magic missile) - Instead you need to work around that as you can see at the bottom by detecting an item property on an equipped item.
Using the same kind of loop I can change an effect that is applied through an effect applying wrapper function. So I can tell it to switch damage cold to damage type fire, or not to apply to friendly target, or don't kill anyone or apply half damage as fire and half as cold etc.. Endless possibilities and it means I won't have to recode every spell with all these options. I can just do that through the effect applying wrapper instead from a central location.
We have that code currently online as well but the feats to use it still need to be added into the 2da, such as a mage's damage substitution or a High Arcana ability that allows you to not hurt friendlies that are in your spells and AOE's.
It's also quite a pickle to balance because a Frost Mage has the ability to ignore resistances with his Cold Spells but if he was to take Damage Subsitution Cold then he could suddenly be doing cold damage with a lot of spells (flame arrow etc..) which would then logically also have to ignore all resistances.
----
If you're interested I've also coded a Counterspelling system using the spell hook which works real neat. It allows both PC's and NPC's to do exactly as described in standard PnP for counterspelling. You can even counter dispels with other dispel spells.
It's also tested and online already but again - the feats to use it still need to be added. Much balance considerations to make on that. (Mastery Counterspelling for example turns back all counterspelled spells - that could be murderous)
Hi BartjeD,
Thanks for showing me your code. That is big! ... And probably a little more than I was after at this stage ... let alone your counterspelling work as well.
In the meanwhile, I have confirmed that simply by adding my homebrew gaze effect as a line in the spells.2da
It is good to know how the immunity checks work though ...
Lance.
Modifié par Lance Botelle, 08 octobre 2011 - 08:04 .





Retour en haut







