2026/05/07 Update
Hospitaler had incorrect epic bonus feat progression Hospitaler had incorrect bonus feat list. Hospitaler was missing Ride from its skill list. Runecaster had incorrect epic bonus feat progression Runecaster had incorrect bonus feat list. Warmage Edge should work with magic staves. Added PRC_RETH_DEKALA_AURA_HOSTILE_ONLY switch and modified Vilefire aura to use it. Spells that use DoCone() should now respect Mastery of Shaping. Removed Hospitaler from list of classes that use the Fighter Bonus Feat list. ExtraordinarySpellAim() now handles persistent AoEs Acid Fog, Blade Barrier, Creeping Doom, Grease, Incindiary Cloud, Wall of Fire, Wall of Frost, Prismatic Wall, Prismatic Sphere, Sleet Storm and Spike Growth now respect Extraordinary Spell Aim.
This commit is contained in:
@@ -13,22 +13,19 @@
|
||||
//:: Created On: May 17, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003
|
||||
#include "prc_inc_spells"
|
||||
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION);
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION);
|
||||
|
||||
//Declare major variables
|
||||
int nDamage;
|
||||
effect eDam;
|
||||
effect eVis = EffectVisualEffect(VFX_COM_BLOOD_REG_RED);
|
||||
object aoeCreator = GetAreaOfEffectCreator();
|
||||
object oTarget = GetEnteringObject();
|
||||
string sConstant1 = "NW_SPELL_CONSTANT_CREEPING_DOOM1" + ObjectToString(GetAreaOfEffectCreator());
|
||||
string sConstant2 = "NW_SPELL_CONSTANT_CREEPING_DOOM2" + ObjectToString(GetAreaOfEffectCreator());
|
||||
@@ -44,7 +41,7 @@ SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION);
|
||||
// When the caster is no longer there, all functions calling
|
||||
// GetAreaOfEffectCreator will fail. Its better to remove the barrier then
|
||||
//--------------------------------------------------------------------------
|
||||
if (!GetIsObjectValid(GetAreaOfEffectCreator()))
|
||||
if (!GetIsObjectValid(aoeCreator))
|
||||
{
|
||||
DestroyObject(OBJECT_SELF);
|
||||
return;
|
||||
@@ -55,26 +52,39 @@ SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION);
|
||||
oTarget = GetFirstInPersistentObject();
|
||||
while(GetIsObjectValid(oTarget) && nDamCount < 1000)
|
||||
{
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator()))
|
||||
// Check Extraordinary Spell Aim
|
||||
if(GetIsObjectValid(aoeCreator) && GetHasFeat(FEAT_EXTRAORDINARY_SPELL_AIM, aoeCreator))
|
||||
{
|
||||
string sTargetID = ObjectToString(oTarget);
|
||||
if(!GetLocalInt(OBJECT_SELF, "ExtraordinarySpellAim_" + sTargetID))
|
||||
{
|
||||
if(GetIsFriend(oTarget, aoeCreator))
|
||||
{
|
||||
if(GetIsSkillSuccessful(aoeCreator, SKILL_SPELLCRAFT, 25 + PRCGetSpellLevel(aoeCreator, SPELL_CREEPING_DOOM)))
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF, "ExtraordinarySpellAim_" + sTargetID, TRUE);
|
||||
// Target is excluded, skip to next
|
||||
oTarget = GetNextInPersistentObject(OBJECT_SELF, OBJECT_TYPE_CREATURE);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, aoeCreator))
|
||||
{
|
||||
fDelay = PRCGetRandomDelay(1.0, 2.2);
|
||||
//------------------------------------------------------------------
|
||||
// According to the book, SR Does not count against creeping doom
|
||||
//------------------------------------------------------------------
|
||||
//Spell resistance check
|
||||
// if(!PRCDoResistSpell(GetAreaOfEffectCreator(), oTarget, fDelay))
|
||||
// {
|
||||
SignalEvent(oTarget,EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_CREEPING_DOOM, FALSE));
|
||||
//Roll Damage
|
||||
nDamage = d6(nSwarm);
|
||||
nDamage += SpellDamagePerDice(GetAreaOfEffectCreator(), nSwarm);
|
||||
//Set Damage Effect with the modified damage
|
||||
eDam = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_PIERCING);
|
||||
//Apply damage and visuals
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
nDamCount = nDamCount + nDamage;
|
||||
// }
|
||||
|
||||
SignalEvent(oTarget,EventSpellCastAt(aoeCreator, SPELL_CREEPING_DOOM, FALSE));
|
||||
//Roll Damage
|
||||
nDamage = d6(nSwarm);
|
||||
nDamage += SpellDamagePerDice(aoeCreator, nSwarm);
|
||||
//Set Damage Effect with the modified damage
|
||||
eDam = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_PIERCING);
|
||||
//Apply damage and visuals
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
nDamCount = nDamCount + nDamage;
|
||||
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextInPersistentObject();
|
||||
@@ -90,7 +100,7 @@ SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION);
|
||||
SetLocalInt(OBJECT_SELF, sConstant2, nDamCount);
|
||||
}
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the local integer storing the spellschool name
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the local integer storing the spellschool name
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user