GetCasterAbilityModifier
From NWN Lexicon
Contents |
[edit] GetCasterAbilityModifier(object)
Returns the modifier from the ability score that matters for this caster.
int GetCasterAbilityModifier( object oCaster );
[edit] Parameters
oCaster
The object you want the ability score modifier for.
[edit] Description
Returns the modifier from the ability score that matters for this caster.
[edit] Remarks
This function has a very limited scope. It only tests oCaster for the wizard class. The return value is only concerned with the Charisma and Intelligence abilities.
See the example section for more details.
[edit] Requirements
#include " x0_i0_spells "
[edit] Version
???
[edit] Example
// Function source code from x0_i0_spells. int GetCasterAbilityModifier(object oCaster) { int nClass = GetLevelByClass(CLASS_TYPE_WIZARD, oCaster); int nAbility; if (nClass > 0) { nAbility = ABILITY_INTELLIGENCE; } else nAbility = ABILITY_CHARISMA; return GetAbilityModifier(nAbility, oCaster); }
[edit] See Also
functions: |
author: Mistress