Battledale_PRC8/_module/nss/jw_zen_trap2trig.nss

20 lines
487 B
Plaintext
Raw Permalink Normal View History

// if trap is trigerred, turn OFF the associated trigger
void main()
{
object oPC=GetEnteringObject();
int nReflex=ReflexSave(oPC,32,SAVING_THROW_TYPE_TRAP);
int nHP=GetCurrentHitPoints(oPC);
nHP=nHP-d6();
if (nReflex==0)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectDeath(TRUE,TRUE),oPC);
}
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_DEATH_L),oPC);
SetLocalInt(GetObjectByTag(GetTag(OBJECT_SELF)+"t"),"trapped",FALSE);
DestroyObject(OBJECT_SELF);
}