Describes different saving throw types. They are used in two ways:
- Defining bonuses or penalties to saving throws;
- Parameters on saving throw functions to specify specific saving throw types:
- WillSave, FortitudeSave, ReflexSave, GetReflexAdjustedDamage
- Note: If called from a spell script with a valid UserType, it applies an invisible "SAVING_THROW_TYPE_SPELLS" for the purposes of this saving throw type (and Spellcraft bonuses vs. spells).
- Note 2: Some of the SAVING_THROW_TYPE_* constants used in these functions mean you get a "Immune" response from them for instance a SAVING_THROW_TYPE_TRAP when you have IMMUNITY_TYPE_TRAP. See list below for details. See issues with MySavingThrow since it throws out the "Immune" return value.
Adding Values
Previously SAVING_THROW_TYPE_PARALYSIS did not exist but was used in the engine for the Assassin Death Attack. 1.89.8193.37 adds the ability to use this and other user modded saving throws in item properties, effects and in the saving throw functions.
Prior to this version you can manually use the SAVING_THROW_TYPE_PARALYSIS yourself but only in effects/saving throw functions.
Constants
Constant
|
Value
|
Description
|
SAVING_THROW_TYPE_ACID
|
6
|
Specifies saving throws against acid.
|
|
SAVING_THROW_TYPE_ALL
|
0
|
Specifies all types of saving throws. Note that SAVING_THROW_TYPE_NONE mirrors this value, since it is what the saving throw functions use.
|
|
SAVING_THROW_TYPE_CHAOS
|
19
|
Specifies saving throws against chaos effects.
|
|
SAVING_THROW_TYPE_COLD
|
12
|
Specifies saving throws against cold based effects.
|
|
SAVING_THROW_TYPE_DEATH
|
11
|
Specifies saving throws against death effects.
The saving throw bonuses are applied but the immunity isn't properly checked unless the target is casting a spell at the same time, due to a bug in the engine.
|
|
SAVING_THROW_TYPE_DISEASE
|
3
|
Specifies saving throws against disease.
If used in saving throw functions it will return immune if they have IMMUNITY_TYPE_DISEASE.
|
|
SAVING_THROW_TYPE_DIVINE
|
13
|
Specifies saving throws against divine effects.
|
|
SAVING_THROW_TYPE_ELECTRICITY
|
8
|
Specifies saving throws against electrical based effects.
|
|
SAVING_THROW_TYPE_EVIL
|
17
|
Specifies saving throws against evil effects.
|
|
SAVING_THROW_TYPE_FEAR
|
4
|
Specifies saving throws against fear.
If used in saving throw functions it will return immune if they have IMMUNITY_TYPE_FEAR or IMMUNITY_TYPE_MIND_SPELLS.
|
|
SAVING_THROW_TYPE_FIRE
|
7
|
Specifies saving throws against fire.
|
|
SAVING_THROW_TYPE_GOOD
|
16
|
Specifies saving throws against good effects.
|
|
SAVING_THROW_TYPE_LAW
|
18
|
Specifies saving throws against law effects.
|
|
SAVING_THROW_TYPE_MIND_SPELLS
|
1
|
Specifies saving throws against mind affecting spells.
If used in saving throw functions it will return immune if they have IMMUNITY_TYPE_MIND_SPELLS.
|
|
SAVING_THROW_TYPE_NEGATIVE
|
10
|
Specifies saving throws against negative effects.
|
|
SAVING_THROW_TYPE_NONE
|
0
|
Specifies no saving throw type.
|
|
SAVING_THROW_TYPE_PARALYSIS
|
20
|
Specifies saving throws against paralysis; noting this is not used in any default game spells (instead EffectParalyze is usually considered a mind effect when saves are done).
The engine only uses it for Death Attack saving throws for the Assassin. 1.89.8193.37 opened up saving throw types to allow additional ones in item properties and effects, allowing this to be used fully and new saving throw types to be added.
|
|
SAVING_THROW_TYPE_POISON
|
2
|
Specifies saving throws against poison.
If used in saving throw functions it will return immune if they have IMMUNITY_TYPE_POISON.
|
|
SAVING_THROW_TYPE_POSITIVE
|
9
|
Specifies saving throws against positive effects.
|
|
SAVING_THROW_TYPE_SONIC
|
5
|
Specifies saving throws against sound based effects.
|
|
SAVING_THROW_TYPE_SPELL
|
15
|
Specifies saving throws against spells.
Note: This will be automatically applied, on top of any other choice for FortitudeSave, ReflexSave and WillSave, if the script running is from a spell and the UserType is set to 1.
|
|
SAVING_THROW_TYPE_TRAP
|
14
|
Specifies saving throws against trap type effects.
If used in saving throw functions it will return immune if they have IMMUNITY_TYPE_TRAP.
|
|
Known Bugs
See remarks about the Death saving throw type above, it is buggy when used for immunities.
Version
This function was updated in 1.89.8193.37 of NWN:EE. Added pre-existing SAVING_THROW_TYPE_PARALYSIS to nwscript.nss plus ability to add more saving throw types in 2da files.
See Also