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:
@@ -20,56 +20,73 @@
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
|
||||
|
||||
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
|
||||
effect eStun = EffectStunned();
|
||||
effect eVisAcid = EffectVisualEffect(VFX_IMP_ACID_S);
|
||||
effect eVisElec = EffectVisualEffect(VFX_IMP_LIGHTNING_M);
|
||||
effect eVisStun = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eStun, eVisStun);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
object aoeCreator = GetAreaOfEffectCreator();
|
||||
|
||||
effect eStun = EffectStunned();
|
||||
effect eVisAcid = EffectVisualEffect(VFX_IMP_ACID_S);
|
||||
effect eVisElec = EffectVisualEffect(VFX_IMP_LIGHTNING_M);
|
||||
effect eVisStun = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eStun, eVisStun);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
float fDelay;
|
||||
|
||||
int CasterLvl = PRCGetCasterLevel(GetAreaOfEffectCreator());
|
||||
int nPenetr = SPGetPenetrAOE(GetAreaOfEffectCreator(),CasterLvl);
|
||||
|
||||
|
||||
int CasterLvl = PRCGetCasterLevel(aoeCreator);
|
||||
int nPenetr = SPGetPenetrAOE(aoeCreator, CasterLvl);
|
||||
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE);
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
int nDamage = d6(6);
|
||||
nDamage += SpellDamagePerDice(GetAreaOfEffectCreator(), 6);
|
||||
effect eElec = PRCEffectDamage(oTarget, nDamage, ChangedElementalDamage(GetAreaOfEffectCreator(), DAMAGE_TYPE_ELECTRICAL));
|
||||
// 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_STORM_OF_VENGEANCE)))
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF, "ExtraordinarySpellAim_" + sTargetID, TRUE);
|
||||
// Target is excluded, skip to next
|
||||
oTarget = GetNextInPersistentObject(OBJECT_SELF, OBJECT_TYPE_CREATURE);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
int nDamage = d6(6);
|
||||
nDamage += SpellDamagePerDice(aoeCreator, 6);
|
||||
effect eElec = PRCEffectDamage(oTarget, nDamage, ChangedElementalDamage(aoeCreator, DAMAGE_TYPE_ELECTRICAL));
|
||||
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, GetAreaOfEffectCreator()))
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, aoeCreator))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_STORM_OF_VENGEANCE));
|
||||
SignalEvent(oTarget, EventSpellCastAt(aoeCreator, SPELL_STORM_OF_VENGEANCE));
|
||||
//Make an SR Check
|
||||
fDelay = PRCGetRandomDelay(0.5, 2.0);
|
||||
if(PRCDoResistSpell(GetAreaOfEffectCreator(), oTarget,nPenetr, fDelay) == 0)
|
||||
if(PRCDoResistSpell(aoeCreator, oTarget,nPenetr, fDelay) == 0)
|
||||
{
|
||||
int nDC = PRCGetSaveDC(oTarget,GetAreaOfEffectCreator());
|
||||
int nDC = PRCGetSaveDC(oTarget, aoeCreator);
|
||||
int nAcid = d6(3);
|
||||
nAcid += SpellDamagePerDice(GetAreaOfEffectCreator(), 3);
|
||||
nAcid += SpellDamagePerDice(aoeCreator, 3);
|
||||
// Acid Sheath adds +1 damage per die to acid descriptor spells
|
||||
if (GetHasDescriptor(SPELL_STORM_OF_VENGEANCE, DESCRIPTOR_ACID) && GetHasSpellEffect(SPELL_MESTILS_ACID_SHEATH, GetAreaOfEffectCreator()))
|
||||
if (GetHasDescriptor(SPELL_STORM_OF_VENGEANCE, DESCRIPTOR_ACID) && GetHasSpellEffect(SPELL_MESTILS_ACID_SHEATH, aoeCreator))
|
||||
nAcid += 3;
|
||||
effect eAcid = PRCEffectDamage(oTarget, nAcid, DAMAGE_TYPE_ACID);
|
||||
|
||||
//Make a saving throw check
|
||||
// * if the saving throw is made they still suffer acid damage.
|
||||
// * if they fail the saving throw, they suffer Electrical damage too
|
||||
if(PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, (nDC), SAVING_THROW_TYPE_ELECTRICITY, GetAreaOfEffectCreator(), fDelay))
|
||||
if(PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, (nDC), SAVING_THROW_TYPE_ELECTRICITY, aoeCreator, fDelay))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVisAcid, oTarget));
|
||||
@@ -94,9 +111,7 @@ SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION);
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the integer used to hold the spells spell school
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the integer used to hold the spells spell school
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user