Army Unfallen should affect the caster.
Army Unfallen should affect the caster. Removed old backup files.
This commit is contained in:
parent
c3fde2ebba
commit
dd56af35e2
1
.gitignore
vendored
1
.gitignore
vendored
@ -163,3 +163,4 @@ nwn/nwnprc/trunk/makefile.temp
|
||||
nwn/nwnprc/trunk/makefile.temp
|
||||
/Release
|
||||
/Notes/Class Expansion
|
||||
/old_backup
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -11,6 +11,105 @@
|
||||
#include "nw_i0_generic"
|
||||
|
||||
void main()
|
||||
{
|
||||
// Set up the spell school context
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION);
|
||||
|
||||
// Standard pre-cast check
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if caster can cast the spell
|
||||
if (GetCanCastSpell(OBJECT_SELF, SPELL_EPIC_ARMY_UN))
|
||||
{
|
||||
int nAlly = 0;
|
||||
int nBLD;
|
||||
int nX;
|
||||
|
||||
// Prepare visual effects
|
||||
effect eVis = EffectVisualEffect(VFX_FNF_LOS_HOLY_10);
|
||||
effect eVis2 = EffectVisualEffect(VFX_FNF_PWSTUN);
|
||||
effect eVis3 = EffectVisualEffect(VFX_IMP_HEALING_G);
|
||||
effect eRez, eHeal, eLink, eBLD;
|
||||
|
||||
// === Handle caster (OBJECT_SELF) first ===
|
||||
nX = GetMaxHitPoints(OBJECT_SELF) - GetCurrentHitPoints(OBJECT_SELF);
|
||||
if (nX < 0) nX = 0;
|
||||
|
||||
if (nX && !MatchNonliving(MyPRCGetRacialType(OBJECT_SELF)))
|
||||
{
|
||||
eRez = EffectResurrection();
|
||||
eHeal = EffectHeal(nX);
|
||||
eLink = EffectLinkEffects(eHeal, eVis);
|
||||
eLink = EffectLinkEffects(eLink, eVis2);
|
||||
eLink = EffectLinkEffects(eLink, eVis3);
|
||||
|
||||
if (GetIsDead(OBJECT_SELF))
|
||||
{
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eRez, OBJECT_SELF);
|
||||
ExecuteScript("prc_pw_armyunfall", OBJECT_SELF);
|
||||
|
||||
if (GetPRCSwitch(PRC_PW_DEATH_TRACKING) && GetIsPC(OBJECT_SELF))
|
||||
SetPersistantLocalInt(OBJECT_SELF, "persist_dead", FALSE);
|
||||
}
|
||||
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eLink, OBJECT_SELF);
|
||||
nAlly++;
|
||||
}
|
||||
|
||||
// === Handle other allies in faction ===
|
||||
object oTarget = GetFirstFactionMember(OBJECT_SELF, FALSE);
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
if (oTarget != OBJECT_SELF)
|
||||
{
|
||||
nX = GetMaxHitPoints(oTarget) - GetCurrentHitPoints(oTarget);
|
||||
if (nX < 0) nX = 0;
|
||||
|
||||
if (nX && !MatchNonliving(MyPRCGetRacialType(oTarget)))
|
||||
{
|
||||
eRez = EffectResurrection();
|
||||
eHeal = EffectHeal(nX);
|
||||
eLink = EffectLinkEffects(eHeal, eVis);
|
||||
eLink = EffectLinkEffects(eLink, eVis2);
|
||||
eLink = EffectLinkEffects(eLink, eVis3);
|
||||
|
||||
if (GetIsDead(oTarget))
|
||||
{
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eRez, oTarget);
|
||||
ExecuteScript("prc_pw_armyunfall", oTarget);
|
||||
|
||||
if (GetPRCSwitch(PRC_PW_DEATH_TRACKING) && GetIsPC(oTarget))
|
||||
SetPersistantLocalInt(oTarget, "persist_dead", FALSE);
|
||||
}
|
||||
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eLink, oTarget);
|
||||
nAlly++;
|
||||
}
|
||||
}
|
||||
|
||||
oTarget = GetNextFactionMember(OBJECT_SELF, FALSE);
|
||||
}
|
||||
|
||||
// === Apply backlash damage if enabled ===
|
||||
if (GetPRCSwitch(PRC_EPIC_BACKLASH_DAMAGE) == TRUE)
|
||||
{
|
||||
nBLD = d6(nAlly);
|
||||
eBLD = EffectDamage(nBLD);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eBLD, OBJECT_SELF);
|
||||
}
|
||||
}
|
||||
|
||||
// Clean up spell school variable
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
}
|
||||
|
||||
|
||||
/* void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION);
|
||||
@ -64,4 +163,4 @@ void main()
|
||||
}
|
||||
}
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
}
|
||||
} */
|
Loading…
x
Reference in New Issue
Block a user