Saving-throw effects on damage
ScriptSavingThrowEffect · signed byte, sign-extended to 16 bits; sixth damage operand of
Damage characters
Scripts · Saving-throw categories
When a character succeeds at the saving throw chosen by the saving-throw category, this operand says what happens to the damage: it is halved or cancelled. Without a successful saving throw, the operand has no effect.1
typedef enum ScriptSavingThrowEffect {
SCRIPT_SAVING_THROW_EFFECT_HALVE_0 = 0, /* Damage is shifted right by one bit. */
SCRIPT_SAVING_THROW_EFFECT_HALVE_1 = 1, /* Same operation as value 0. */
SCRIPT_SAVING_THROW_EFFECT_NEGATE = 3 /* Damage becomes 0. */
} ScriptSavingThrowEffect;
Any other value, including 2 and negative values, leaves the damage unchanged.
The reference scripts use value 0 in 26 damage instructions, all of which attempt a saving throw, and value 3 in 138. In 137 of those 138, no saving throw is attempted, so the value has no effect; in the last one, a saving throw can cancel the damage.
Sources
Locations refer to the game executable reference.