// Does a Will Save check for the given DC
// - oCreature
// - nDC: Difficulty check
// - nSaveType: SAVING_THROW_TYPE_*
// - oSaveVersus
// Returns: SAVING_THROW_CHECK_FAILED, or 0 if the saving throw roll failed       
// Returns: SAVING_THROW_SUCCEEDED, or 1, if the saving throw roll succeeded    
// Returns: SAVING_THROW_CHECK_IMMUNE, or 2, if the target was immune to the save type specified
// Note: If used within an Area of Effect Object Script (OnEnter, OnExit, OnHeartbeat), you MUST pass
// GetAreaOfEffectCreator() into oSaveVersus!!
int WillSave(object oCreature, int nDC, int nSaveType=SAVING_THROW_TYPE_NONE, object oSaveVersus=OBJECT_SELF);


Note[edit | edit source]

The return value on a successful save:

SAVING_THROW_SUCCEEDED

does not compile properly, with the compiler returning the message:

ERROR: VARIABLE DEFINED WITHOUT TYPE

The correct return value is:

SAVING_THROW_CHECK_SUCCEEDED

which is the same return value for success of FortitudeSave and ReflexSave.

Community content is available under CC-BY-SA unless otherwise noted.