EffectSavingThrowIncrease(int, int, int)
Create a Saving Throw Increase effect to raise one Saving Throw type.
effect EffectSavingThrowIncrease( int nSave, int nValue, int nSaveType = SAVING_THROW_TYPE_ALL );
Parameters
nSave
The Saving Throw to affect, as defined by the SAVING_THROW_* constants group.
nValue
The amount to raise the saving throw(s) by.
nSaveType
The type of resistance this effect applies to as defined by the SAVING_THROW_TYPE_* constants group. (Default: SAVING_THROW_TYPE_ALL)
Description
Returns a new effect object that when applied to a target will raise the nSave Saving Throw by nValue amount when resisting anything that falls under the nSaveType definition.
Only direct save changes (SAVING_THROW_TYPE_ALL), change the values returned by GetWillSavingThrow(), GetFortitudeSavingThrow() and GetReflexSavingThrow(). The different save types are only used when you try FortSave(), WillSave() and ReflexSave() or GetReflexAdjustedDamage(), with the correct saving throw type.
The limit of nValus is unknown.
The target this effect is applied to must be a creature for it to work (even though placeables/doors have saves). This effect cannot be applied instantly, only temporarily or permanently.
Remarks
Note: nSave and nSaveType are defined by similarly named constant groups and should not be confused.
This will stack with, or decrease with even, any other effects of its type or penalties on items. It will merely cancel out with similar Increases in spell saves - of course, if the parameters for nSave and nSaveType are not matched, nothing will be affected.
It is impossible to see on a character sheet any changes to your saves except direct ones using SAVING_THROW_TYPE_ALL, to your will, fortitude or reflex.
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 separately via. looping valid effects on the target (GetFirst/NextEffect()). See the Effect Tutorial for more details.
Version
1.62
Example
// Sample code for applying 5 bonus to reflex saves against fire, // to a target void main() { // This is the Object to apply the effect to. object oTarget = OBJECT_SELF; // Create the effect to apply effect eSaveInc = EffectSavingThrowIncrease(SAVING_THROW_REFLEX, 5, SAVING_THROW_TYPE_FIRE); // Create the visual portion of the effect. This is instantly // applied and not persistent with whether or not we have the // above effect. effect eVis = EffectVisualEffect(VFX_IMP_HEAD_HOLY); // Apply the visual effect to the target ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); // Apply the effect to the object ApplyEffectToObject(DURATION_TYPE_PERMANENT, eSaveInc, oTarget); }
See Also
categories: | Effects Functions | Saving Throw Functions |
constants: | SAVING_THROW_* Constants | SAVING_THROW_TYPE_* Constants |
author: John Shuell, editors: Jasperre, Mistress, additional contributor: Jasperre