Initial Commit
Initial Commit
This commit is contained in:
51
_module/nss/phoenix_death.nss
Normal file
51
_module/nss/phoenix_death.nss
Normal file
@@ -0,0 +1,51 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name x2_def_ondeath
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Default OnDeath script
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Keith Warner
|
||||
//:: Created On: June 11/03
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void PhoenixBlast(float fDelay, int nRaised)
|
||||
{
|
||||
ExecuteScript("anc_phoenix_expl", OBJECT_SELF);
|
||||
if (GetLocalInt(OBJECT_SELF, "Raised") != nRaised) return;
|
||||
DelayCommand(fDelay, PhoenixBlast(fDelay, nRaised));
|
||||
}
|
||||
|
||||
#include "hench_i0_ai"
|
||||
void PhoenixResurrection()
|
||||
{
|
||||
SetIsDestroyable(FALSE, TRUE, TRUE);
|
||||
int nHeal;
|
||||
int nRaised = GetLocalInt(OBJECT_SELF, "Raised");
|
||||
if (nRaised == 0) nHeal = 2 * GetMaxHitPoints() / 3;
|
||||
else nHeal = GetMaxHitPoints() / 3;
|
||||
SetLocalInt(OBJECT_SELF, "Raised", nRaised+1);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectResurrection(), OBJECT_SELF);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(nHeal), OBJECT_SELF);
|
||||
ClearAllActions();
|
||||
ExecuteScript("anc_phoenix_expl", OBJECT_SELF);
|
||||
HenchDetermineCombatRound();
|
||||
|
||||
//A fire blast every 2 rounds after the first resurrection and every round after the second one
|
||||
if (nRaised == 0) DelayCommand(12.0, PhoenixBlast(12.0, 1));
|
||||
if (nRaised == 1) DelayCommand(6.0, PhoenixBlast(6.0, 2));
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
if (GetLocalInt(OBJECT_SELF, "Raised") < 2)
|
||||
{
|
||||
DelayCommand(4.0, PhoenixResurrection());
|
||||
return;
|
||||
}
|
||||
else SetLocalInt(OBJECT_SELF, "Raised", 3);
|
||||
|
||||
if(GetLocalInt(OBJECT_SELF, "X4_VANILLA_AI") == TRUE) ExecuteScript("nw_c2_default7_c", OBJECT_SELF);
|
||||
else ExecuteScript("nw_c2_default7", OBJECT_SELF);
|
||||
}
|
||||
Reference in New Issue
Block a user