EffectCurse(int, int, int, int, int, int)

Create a Curse effect.

effect EffectCurse(
    int nStrMod = 1,
    int nDexMod = 1,
    int nConMod = 1,
    int nIntMod = 1,
    int nWisMod = 1,
    int nChaMod = 1
);

Parameters

nStrMod

strength modifier (Default: 1)

nDexMod

dexterity modifier (Default: 1)

nConMod

constitution modifier (Default: 1)

nIntMod

intelligence modifier (Default: 1)

nWisMod

wisdom modifier (Default: 1)

nChaMod

charisma modifier (Default: 1)


Description

Returns a new effect object that when applied to a target will reduce their ability scores by the amounts given in the parameters.

It is unknown (although likely) that curses do not stack, or at least the peanlties from more then 1 curse together, as how EffectAbilityDecrease.

A value of 0 should mean just no decrease in that ability. If all are 0, it is likely to return an invalid effect.

The target this effect is applied to must be a creature for it to work. This effect cannot be applied instantly, only temporarily or permanently.



Remarks

Modifiers should be given in positive amounts, the script will apply them negatively.

Effect functions are Constructors, which are special methods that help construct effect "objects". You can declare and link effects, and apply them using an ApplyEffectToObject() Command. Once applied, each effect can be got seperately via. looping valid effects on the target (GetFirst/NextEffect()). See the Effect Tutorial for more details.


Version

1.62

Example

// Sample code for applying a Curse of 1 of every stat to a target

void main()
{
    // This is the Object to apply the effect to.
    object oTarget = OBJECT_SELF;

    // Create the effect to apply
    effect eCurse = EffectCurse(1, 1, 1, 1, 1, 1);

    // Create the visual portion of the effect. This is instantly
    // applied and not persistant with wether or not we have the
    // above effect.
    effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);

    // Apply the visual effect to the target
    ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
    // Apply the effect to the object   
    ApplyEffectToObject(DURATION_TYPE_PERMANENT, eCurse, oTarget);
}

See Also

categories: Effects Functions


 author: John Shuell, editor: Jasperre, additional contributor(s): Jasperre