Difference between revisions of "ResistSpell"
(cleaned up diction, added links ~~~~)
|Line 34:||Line 34:|
This spell , and spell (.., the effects EffectSpellImmunity, EffectSpellResistanceIncrease, EffectSpellLevelAbsorptionapproprate item properties) . See seperate descriptions for exact effects.
Revision as of 21:49, 15 April 2013
Performs a spell resistance check between the caster and the target.
Caster of the spell.
Target of the spell.
* Return value if oCaster or oTarget is an invalid object: FALSE
* Return value if spell cast is not a player spell: - 1
* Return value if spell resisted: 1
* Return value if spell resisted via magic immunity: 2
* Return value if spell resisted via spell absorption: 3
Bioware uses MyResistSpell() for spells that use this, to apply appropriate effects for the return value. It is a good idea to use this wrapper function instead of this directly. The Bioware function only returns 1 or 0.
This function checks spell resistance, globes, and spell immunity (i.e., the effects EffectSpellImmunity, EffectSpellResistanceIncrease, EffectSpellLevelAbsorption or approprate item properties) if the spell cast is a PC spell as defined in spells.2da. See seperate descriptions for exact effects.
Never use this function for non-player spells (as defined in spells.2da), it merely returns -1, as it would for a non-spell-script.
This function should never be used except in a spell script. It may not work correctly elsewhere, as mantles and globes use the spell's level to stop the spell or decrease the amount of a given spell mantle's power (as well as the caster level of oCaster, of course).
1.64: Fixed problem with ResistSpell() scripting command not working correctly when used with Cleric Domain spells and sub-radial spells in combination with spell absorption effects.
author: Jody Fletcher, editor: Jasperre, additional contributor(s): Jasperre