EffectMissChance(int, int)

Creates a miss chance effect.

effect EffectMissChance(
    int nPercentage,
    int nMissChanceType = MISS_CHANCE_TYPE_NORMAL
);

Parameters

nPercentage

1-100 inclusive

nMissChanceType

MISS_CHANCE_TYPE_* (Default: MISS_CHANCE_TYPE_NORMAL)


Description

Returns a new effect object used to determine the miss chance of hitting a particular target. For example, casting a Displacement spell on a target gives it full concealment, thus a 50% miss chance (meaning all attacks have a 50% chance of missing even on a successful attack roll). Applying this effect to a creature grants that creature the miss chance protection.

Returns an effect of type EFFECT_TYPE_INVALIDEFFECT if nPercentage < 1 or nPercentage > 100.



Version

1.30

See Also

categories: Effects Functions
constants: EFFECT_TYPE_* Constants | MISS_CHANCE_TYPE_* Constants


 author: John Shuell, editor: Lilac Soul, additional contributor(s): Lilac Soul
 Send comments on this topic.