SpellAbsorptionLimitedCheck(object, object, int, int, int, int)
Does a spell absorption check that checks limited (eg Spell Mantle)
int SpellAbsorptionLimitedCheck(
object oTarget,
object oCaster,
int nSpellId = -1,
int nSpellSchool=-1,
int nSpellLevel=-1,
int bRemoveLevels=TRUE,
int bFeedback=TRUE
);
Parameters
- oTarget
- Target of the check
- oCaster
- Caster performing the check against oTarget
- nSpellId
- The spell ID to use if other variables are not set. If -1 it will attempt to be auto-detected. (default: -1)
- nSpellSchool
- The spell school to check for. If -1 uses nSpellId's spell school. (default: -1)
- nSpellLevel
- The spell level. If -1 uses nSpellId's spell level (given the casters last spell cast class) (default: -1)
- bRemoveLevels
- If TRUE this removes spell levels from the effect that would stop it (and remove it if 0 or less remain), but if FALSE they will not be removed. (default: TRUE)
- bFeedback
- If TRUE displays feedback automatically, FALSE it suppresses it. (default: TRUE)
Description
Does a spell absorption check that checks limited (eg Spell Mantle) by default (bRemoveLevels) it also removes the levels of spells used up in the check.
Returns: TRUE if the target absorbs oCasters spell, FALSE if failed or an error occurred.
Remarks
This along with the sister functions SpellXXX functions allow you to do part of ResistSpell as required, even outside of a proper spell script.
nSpellId defaults to GetSpellId, nSpellSchool defaults to the spell school of nSpellId, nSpellLevel defaults to the level of the spell that is related to GetLastSpellCastClass (defaulting to Innate if there is a mismatch) in case you want to manipulate the values.
Version
This function was added in 1.89.8193.37 of NWN:EE.
Example
See Also
| functions: |
GetSpellResistance, GetCasterLevel, GetSpellId, ResistSpell, SpellResistanceCheck, SpellImmunityCheck, SpellAbsorptionUnlimitedCheck |