EffectTurnResistanceDecrease(int)
Create a Turn Resistance Decrease effect that can make creatures more susceptible to turning.
effect EffectTurnResistanceDecrease( int nHitDice );
Parameters
nHitDice
a positive number representing the number of hit dice for the decrease
Description
Returns a new effect object that when applied to a target will decrease their resistance to turning as if they were nHitDice in lower levels.
The limit of nHitDice is unknown.
The target this effect is applied to must be a creature for it to work. The target this effect is applied to must be a creature for it to work.
Remarks
This changes the value returned by GetTurnResistanceHD(), which is added to the creature's hide bonus to turn resistance, and is called in the turn undead script. This lowers te value.
It is similar to the bonuses you can put onto a creatures hide, however, it is obviously going to stack with them also and decrease them. It should be possible to decrease turn resistance of those even without any.
The basis of knowing what this means is: If I am a 5HD undead monster, with a -1 to my turn resistance, I act as if I was a 4HD undead monster, thus easier to turn.
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 1 turn resistance damage to a target void main() { // This is the Object to apply the effect to. object oTarget = OBJECT_SELF; // Create the effect to apply effect eTurnDec = EffectTurnResistanceDecrease(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, eTurnDec, oTarget); }
See Also
functions: | EffectTurnResistanceIncrease | GetTurnResistanceHD |
categories: | Effects Functions | Spells Functions |
author: John Shuell, editor: Jasperre, additional contributor(s): Jasperre