WoR_PRC8/_module/nss/vg_water_exit.nss

23 lines
684 B
Plaintext
Raw Permalink Normal View History

2025-04-03 11:49:34 -04:00
void Water_Exit(object oPC)
{
// Loop through effects on PC and remove movement rate decreases
effect eSlow = GetFirstEffect(oPC);
while(GetIsEffectValid(eSlow))
{
if(GetEffectType(eSlow) == EFFECT_TYPE_MOVEMENT_SPEED_DECREASE)
{
RemoveEffect(oPC, eSlow);
}
eSlow = GetNextEffect(oPC);
}
// Mark the PC as not being under water now
SetLocalInt(oPC, "UNDERWATER", 0);
// The following will reset all counters, DCs, etc in case they fall in the trap again
// Set the Drowning Round to zero
SetLocalInt(oPC, "ROUND", 0);
// Reset the DC of holding their breath
SetLocalInt(oPC, "DC", 0);
// Reset the Drown counter
SetLocalInt(oPC, "DROWN", 0);
}