20 lines
487 B
Plaintext
20 lines
487 B
Plaintext
|
// 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);
|
||
|
}
|