generated from Jaysyn/ModuleTemplate
38 lines
890 B
Plaintext
38 lines
890 B
Plaintext
#include "NW_I0_SPELLS"
|
|
#include "prc_inc_spells"
|
|
|
|
void main()
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
object oPC = GetFirstPC();
|
|
int nDam = GetCurrentHitPoints(oPC);
|
|
effect eDam;
|
|
|
|
// Ensure the player can actually die from drowning
|
|
if (nDam == 1) nDam = 2;
|
|
|
|
while(GetIsObjectValid(oPC))
|
|
{
|
|
if(GetArea(oPC) == OBJECT_SELF)
|
|
{
|
|
if (GetTag(GetItemInSlot(INVENTORY_SLOT_HEAD, oPC)) != "HelmOfAir")
|
|
{
|
|
//Make a fortitude save
|
|
if(!PRCMySavingThrow(SAVING_THROW_FORT, oPC, 20))
|
|
{
|
|
nDam = FloatToInt(nDam * 0.9);
|
|
eDam = EffectDamage(nDam, DAMAGE_TYPE_BLUDGEONING);
|
|
//Apply the VFX impact and damage effect
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oPC);
|
|
|
|
}
|
|
}
|
|
}
|
|
oPC = GetNextPC();
|
|
}
|
|
}
|