Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
23 lines
1.1 KiB
Plaintext
23 lines
1.1 KiB
Plaintext
void main()
|
|
{
|
|
object oPC = GetEnteringObject();
|
|
int iLuck = d2(1);
|
|
|
|
if (iLuck == 1)
|
|
{
|
|
int iDamage = GetMaxHitPoints(oPC);
|
|
int nDamageAmount = FloatToInt(0.75 * iDamage);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamageAmount, DAMAGE_TYPE_PIERCING), oPC);
|
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_SPIKE_TRAP), GetLocation(GetEnteringObject()));
|
|
CreateObject(OBJECT_TYPE_PLACEABLE, "plc_bloodstain", GetLocation(oPC), TRUE);
|
|
CreateObject(OBJECT_TYPE_PLACEABLE, "ty_custom2", GetLocation(oPC), TRUE);
|
|
}
|
|
else
|
|
{
|
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_SPIKE_TRAP), GetLocation(GetEnteringObject()));
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), GetEnteringObject());
|
|
CreateObject(OBJECT_TYPE_PLACEABLE, "plc_bloodstain", GetLocation(oPC), TRUE);
|
|
CreateObject(OBJECT_TYPE_PLACEABLE, "ty_custom2", GetLocation(oPC), TRUE);
|
|
}
|
|
}
|