EffectDamageDecrease(int, int)

Returns a new effect object.

effect EffectDamageDecrease(
    int nPenalty,
    int nDamageType = DAMAGE_TYPE_*
);

Parameters

nPenalty

The penalty to apply (Positive integer)

nDamageType

The damage type of the damage decrease (Default: DAMAGE_TYPE_*)


Description

This constructor makes a new effect that reduces the amount of damage you do of type (Specefied by the penalty and damage type parameters)

Damage of X type only matters if the target already does damage of that type, where it will then decrease the damage done of that type (An Firey sword, +4 fire damage, will only do +2 fire damage if the DAMAGE_TYPE_ constant is FIRE), although, as it says below, the penalty will be applied even if they do no damage of that type.

Strangely enough, when you apply a damage penalty of a cirtain type and the creature doesn't do any damage of that type already (EG: Acid penalty, but none of thier weapons do acid damage) it has: "0 Acid Damage" in the combat information box. The effect is still applied to damage rolls, but the information is incorrect in-game in this circumstance.



Remarks

Constructors are special methods that return a new instance of an object. In NWN Script each effect that you can place on an object has it’s own constructor that creates a new instance of the specified effect. This effect object can then be used in an ApplyEffectToObject() Command. See Effect Constructor for more details.


Version

1.22

See Also

functions: EffectAttackDecrease | EffectAttackIncrease | EffectDamageIncrease | EffectDamageResistance
categories: Effects Functions
constants: DAMAGE_TYPE_* Constants


 author: Michael Nork, editor: Jasperre
 Send comments on this topic.