NWN2Wiki
No edit summary
AGhost 7 (talk | contribs)
(added bug details)
Tags: Visual edit apiedit
Line 4: Line 4:
 
// NOTE! You *must* use the DAMAGE_BONUS_* constants! Using other values may
 
// NOTE! You *must* use the DAMAGE_BONUS_* constants! Using other values may
 
// result in odd behaviour.
 
// result in odd behaviour.
effect EffectDamageIncrease(int nBonus, int nDamageType=DAMAGE_TYPE_MAGICAL);
+
effect EffectDamageIncrease(int nBonus, int nDamageType=DAMAGE_TYPE_MAGICAL, int nVersusRace = -1);
 
NWN2 also has a paramater for racial type which comes after nDamageType. By default, it is set to -1, however if you want a specific damage increase against a specific race it's the place to enter a RACIAL_TYPE constant.
   
  +
== Bug Notes ==
NWN2 also has a paramater for racial type which comes after nDamageType. By default, it is set to -1, however if you want a specific damage increase against a specific race it's the place to enter a RACIAL_TYPE constant.
 
  +
The effect is used for several abilities in the game such as Epic Divine Might and Divine Favor. It is well known that these abilities ignore immunities and will multiply on critical hits. It is not the case for all damage types. The function is also highly unpredictable if you apply more than one bonus of different damage type simultaneously. It is however, safe to apply multiple bonuses of the same damage type simultaneously.
   
 
{{ScriptFunction}}
 
{{ScriptFunction}}

Revision as of 21:00, 26 February 2015

// Create a Damage Increase effect
// - nBonus: DAMAGE_BONUS_*
// - nDamageType: DAMAGE_TYPE_*
// NOTE! You *must* use the DAMAGE_BONUS_* constants! Using other values may
//       result in odd behaviour.
effect EffectDamageIncrease(int nBonus, int nDamageType=DAMAGE_TYPE_MAGICAL, int nVersusRace = -1);

NWN2 also has a paramater for racial type which comes after nDamageType. By default, it is set to -1, however if you want a specific damage increase against a specific race it's the place to enter a RACIAL_TYPE constant.

Bug Notes

The effect is used for several abilities in the game such as Epic Divine Might and Divine Favor. It is well known that these abilities ignore immunities and will multiply on critical hits. It is not the case for all damage types. The function is also highly unpredictable if you apply more than one bonus of different damage type simultaneously. It is however, safe to apply multiple bonuses of the same damage type simultaneously.