RATDOG/_module/nss/dungmon_onhb.nss
Jaysyn904 2e30722043 Level One rework
Revamped Level One: North & Level One: Central to be as close to PnP as possible.  Added Level One: Latrene 3 area.  Added efreeti appearance from CEP3.  Revamped efreeti bottle to be like PnP (no wishes, yet)
2023-09-23 22:02:32 -04:00

46 lines
1.3 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Name x2_def_heartbeat
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Gelatinous Cube Heartbeat
*/
//:://////////////////////////////////////////////
//:: Created By: Georg Zoeller
//:: Created On: Sept 16/03
//:://////////////////////////////////////////////
#include "x0_i0_spells"
#include "x2_i0_spells"
void main()
{
// execute default AI
ExecuteScript("nw_c2_default1", OBJECT_SELF);
// Cube additions
// * Only on the first heartbeat, destroy the creature's personal space
if (!GetLocalInt(OBJECT_SELF,"X2_L_GCUBE_SETUP"))
{
effect eGhost = EffectCutsceneGhost();
eGhost = SupernaturalEffect(eGhost);
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eGhost,OBJECT_SELF);
SetLocalInt(OBJECT_SELF,"X2_L_GCUBE_SETUP",TRUE) ;
}
object oVictim = GetFirstObjectInShape(SHAPE_CUBE,4.0f,GetLocation(OBJECT_SELF),TRUE, OBJECT_TYPE_CREATURE);
while (GetIsObjectValid(oVictim))
{
if (spellsIsTarget(oVictim,SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF) && oVictim != OBJECT_SELF)
{
EngulfAndDamage(oVictim,OBJECT_SELF);
}
oVictim = GetNextObjectInShape(SHAPE_CUBE,4.0f,GetLocation(OBJECT_SELF),TRUE, OBJECT_TYPE_CREATURE);
}
}