2026/04/03
Summon Undead now uses PRCGetSpellId(). Ectoplasmic Enhancement now doesn't quit after testing a non-undead. Warmage no longer has infinite casts of Disrupt Undead. Crushing Despair now respects Mind Immunity. Incendiary Cloud now uses MyFirstObjectInShape() and MyNextObjectInShape(). Tweaked prc_s_spellb.nss to always pass oPC to GetSlotCount() since the function is OBJECT_INVALID by default. Tweaked prc_prereq.nss to always pass oPC to GetSlotCount() since the function is OBJECT_INVALID by default. Form of Doom's Fear Aura now respects Mind Immunity and Fear Immunity. Dread Necromancer's Fear Aura now respects Mind Immunity. Summon Undead skeletons not how the correct resistances. Enlighted Fist & Dragon Disciple can now qualify for Improved Spell Resistance. Cerebremancer can now take Bane Magic.
This commit is contained in:
@@ -294,3 +294,27 @@
|
|||||||
290 FocusedSpellPenetrTra 3135 1 2 0
|
290 FocusedSpellPenetrTra 3135 1 2 0
|
||||||
291 Feat_Ignore_Material_Components 2597 1 2 0
|
291 Feat_Ignore_Material_Components 2597 1 2 0
|
||||||
292 FEAT_TENACIOUSMAGIC 2961 1 2 0
|
292 FEAT_TENACIOUSMAGIC 2961 1 2 0
|
||||||
|
293 Bane_Magic_Aberration 23556 0 -1 0
|
||||||
|
294 Bane_Magic_Animal 23557 0 -1 0
|
||||||
|
295 Bane_Magic_Beast 23558 0 -1 0
|
||||||
|
296 Bane_Magic_Construct 23559 0 -1 0
|
||||||
|
297 Bane_Magic_Dragon 23560 0 -1 0
|
||||||
|
298 Bane_Magic_Dwarf 23561 0 -1 0
|
||||||
|
299 Bane_Magic_Elemental 23562 0 -1 0
|
||||||
|
300 Bane_Magic_Elf 23563 0 -1 0
|
||||||
|
301 Bane_Magic_Fey 23564 0 -1 0
|
||||||
|
302 Bane_Magic_Giant 23565 0 -1 0
|
||||||
|
303 Bane_Magic_Gnome 23566 0 -1 0
|
||||||
|
304 Bane_Magic_HalfElf 23567 0 -1 0
|
||||||
|
305 Bane_Magic_Halfling 23568 0 -1 0
|
||||||
|
306 Bane_Magic_HalfOrc 23569 0 -1 0
|
||||||
|
307 Bane_Magic_Human 23570 0 -1 0
|
||||||
|
308 Bane_Magic_Humanoid_Goblinoid 23571 0 -1 0
|
||||||
|
309 Bane_Magic_Humanoid_Monstrous 23572 0 -1 0
|
||||||
|
310 Bane_Magic_Humanoid_Orc 23573 0 -1 0
|
||||||
|
311 Bane_Magic_Humanoid_Reptilian 23574 0 -1 0
|
||||||
|
312 Bane_Magic_Magical_Beast 23575 0 -1 0
|
||||||
|
313 Bane_Magic_Outsider 23576 0 -1 0
|
||||||
|
314 Bane_Magic_Shapechanger 23577 0 -1 0
|
||||||
|
315 Bane_Magic_Undead 23578 0 -1 0
|
||||||
|
316 Bane_Magic_Vermin 23579 0 -1 0
|
||||||
|
|||||||
@@ -700,7 +700,7 @@
|
|||||||
696 FEAT_EPIC_IMPROVED_COMBAT_CASTING 8497 8498 ife_X2ImComCast **** **** **** **** **** **** **** **** 7 **** 0 0 1 **** **** **** **** 1 **** **** **** **** **** **** **** **** 1 25 **** **** FEAT_EPIC_IMPROVED_COMBAT_CASTING 4 **** **** **** **** **** 1 1
|
696 FEAT_EPIC_IMPROVED_COMBAT_CASTING 8497 8498 ife_X2ImComCast **** **** **** **** **** **** **** **** 7 **** 0 0 1 **** **** **** **** 1 **** **** **** **** **** **** **** **** 1 25 **** **** FEAT_EPIC_IMPROVED_COMBAT_CASTING 4 **** **** **** **** **** 1 1
|
||||||
697 FEAT_EPIC_IMPROVED_KI_STRIKE_4 8499 8500 ife_X2ImKiStrk4 **** **** **** **** 21 **** **** **** 344 **** 0 0 0 **** **** **** 698 1 **** **** **** **** **** **** **** **** **** **** **** **** FEAT_EPIC_IMPROVED_KI_STRIKE_4 1 **** **** **** **** **** 1 1
|
697 FEAT_EPIC_IMPROVED_KI_STRIKE_4 8499 8500 ife_X2ImKiStrk4 **** **** **** **** 21 **** **** **** 344 **** 0 0 0 **** **** **** 698 1 **** **** **** **** **** **** **** **** **** **** **** **** FEAT_EPIC_IMPROVED_KI_STRIKE_4 1 **** **** **** **** **** 1 1
|
||||||
698 FEAT_EPIC_IMPROVED_KI_STRIKE_5 8501 83388 ife_X2ImKiStrk5 **** **** **** **** **** **** **** **** 697 **** 0 0 0 **** **** **** **** 1 **** **** **** **** **** **** **** **** **** **** **** **** FEAT_EPIC_IMPROVED_KI_STRIKE_5 1 **** **** **** **** **** 1 1
|
698 FEAT_EPIC_IMPROVED_KI_STRIKE_5 8501 83388 ife_X2ImKiStrk5 **** **** **** **** **** **** **** **** 697 **** 0 0 0 **** **** **** **** 1 **** **** **** **** **** **** **** **** **** **** **** **** FEAT_EPIC_IMPROVED_KI_STRIKE_5 1 **** **** **** **** **** 1 1
|
||||||
699 FEAT_EPIC_IMPROVED_SPELL_RESISTANCE_1 8503 8504 ife_X2ImSpRis1 **** **** **** **** **** **** **** **** 215 **** 0 0 0 **** **** **** 700 1 **** **** **** **** **** **** **** **** **** **** **** **** FEAT_EPIC_IMPROVED_SPELL_RESISTANCE_1 4 **** **** **** **** **** 1 1
|
699 FEAT_EPIC_IMPROVED_SPELL_RESISTANCE_1 8503 8504 ife_X2ImSpRis1 **** **** **** **** **** **** **** **** **** **** 0 0 0 **** **** **** 700 1 **** **** **** 215 4393 4149 **** **** **** **** **** **** FEAT_EPIC_IMPROVED_SPELL_RESISTANCE_1 4 **** **** **** **** **** 1 1
|
||||||
700 FEAT_EPIC_IMPROVED_SPELL_RESISTANCE_2 8505 8504 ife_X2ImSpRis1 **** **** **** **** **** **** **** **** 699 **** 0 0 0 **** **** **** 701 1 **** **** **** **** **** **** **** **** **** **** **** **** FEAT_EPIC_IMPROVED_SPELL_RESISTANCE_2 4 **** **** **** **** **** 1 1
|
700 FEAT_EPIC_IMPROVED_SPELL_RESISTANCE_2 8505 8504 ife_X2ImSpRis1 **** **** **** **** **** **** **** **** 699 **** 0 0 0 **** **** **** 701 1 **** **** **** **** **** **** **** **** **** **** **** **** FEAT_EPIC_IMPROVED_SPELL_RESISTANCE_2 4 **** **** **** **** **** 1 1
|
||||||
701 FEAT_EPIC_IMPROVED_SPELL_RESISTANCE_3 8507 8504 ife_X2ImSpRis1 **** **** **** **** **** **** **** **** 700 **** 0 0 0 **** **** **** 702 1 **** **** **** **** **** **** **** **** **** **** **** **** FEAT_EPIC_IMPROVED_SPELL_RESISTANCE_3 4 **** **** **** **** **** 1 1
|
701 FEAT_EPIC_IMPROVED_SPELL_RESISTANCE_3 8507 8504 ife_X2ImSpRis1 **** **** **** **** **** **** **** **** 700 **** 0 0 0 **** **** **** 702 1 **** **** **** **** **** **** **** **** **** **** **** **** FEAT_EPIC_IMPROVED_SPELL_RESISTANCE_3 4 **** **** **** **** **** 1 1
|
||||||
702 FEAT_EPIC_IMPROVED_SPELL_RESISTANCE_4 8509 8504 ife_X2ImSpRis1 **** **** **** **** **** **** **** **** 701 **** 0 0 0 **** **** **** 703 1 **** **** **** **** **** **** **** **** **** **** **** **** FEAT_EPIC_IMPROVED_SPELL_RESISTANCE_4 4 **** **** **** **** **** 1 1
|
702 FEAT_EPIC_IMPROVED_SPELL_RESISTANCE_4 8509 8504 ife_X2ImSpRis1 **** **** **** **** **** **** **** **** 701 **** 0 0 0 **** **** **** 703 1 **** **** **** **** **** **** **** **** **** **** **** **** FEAT_EPIC_IMPROVED_SPELL_RESISTANCE_4 4 **** **** **** **** **** 1 1
|
||||||
|
|||||||
@@ -38,4 +38,4 @@
|
|||||||
34 16988450 Resist_16/- 16 2.1
|
34 16988450 Resist_16/- 16 2.1
|
||||||
35 16988451 Resist_17/ 17 2.4
|
35 16988451 Resist_17/ 17 2.4
|
||||||
36 16988452 Resist_18/- 18 2.7
|
36 16988452 Resist_18/- 18 2.7
|
||||||
37 16988453 Resist_19/-- 19 3.0
|
37 16988453 Resist_19/- 19 3.0
|
||||||
|
|||||||
@@ -840,6 +840,3 @@ int GetCadenceCount(object oTrueSpeaker)
|
|||||||
// Return total
|
// Return total
|
||||||
return nCount;
|
return nCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
void main (){}
|
|
||||||
Binary file not shown.
Binary file not shown.
@@ -79,7 +79,7 @@ void main()
|
|||||||
{
|
{
|
||||||
SignalEvent(oTarget, EventSpellCastAt(oCreator, SPELLABILITY_AURA_FEAR));
|
SignalEvent(oTarget, EventSpellCastAt(oCreator, SPELLABILITY_AURA_FEAR));
|
||||||
|
|
||||||
if (!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_FEAR))
|
if (!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_FEAR) && !GetIsImmune(oTarget, IMMUNITY_TYPE_FEAR) && !GetIsImmune(oTarget, IMMUNITY_TYPE_MIND_SPELLS))
|
||||||
{
|
{
|
||||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
|
||||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||||
|
|||||||
@@ -258,8 +258,8 @@ void main()
|
|||||||
int nAbilityScore = GetAbilityScoreForClass(nClass, oPC);
|
int nAbilityScore = GetAbilityScoreForClass(nClass, oPC);
|
||||||
int nClassLevel = GetLevelByPosition(i, oPC);
|
int nClassLevel = GetLevelByPosition(i, oPC);
|
||||||
if(nClassLevel
|
if(nClassLevel
|
||||||
&& (GetSlotCount(nClassLevel, 0, nAbilityScore, nClass)
|
&& (GetSlotCount(nClassLevel, 0, nAbilityScore, nClass, oPC)
|
||||||
|| GetSlotCount(nClassLevel, 1, nAbilityScore, nClass)))
|
|| GetSlotCount(nClassLevel, 1, nAbilityScore, nClass, oPC)))
|
||||||
{
|
{
|
||||||
string sClassName = GetStringByStrRef(StringToInt(Get2DACache("classes", "Name", nClass)));
|
string sClassName = GetStringByStrRef(StringToInt(Get2DACache("classes", "Name", nClass)));
|
||||||
GenerateSpellsMemorizedCache(nClass, oPC);
|
GenerateSpellsMemorizedCache(nClass, oPC);
|
||||||
@@ -291,7 +291,7 @@ void main()
|
|||||||
{
|
{
|
||||||
// for every spell level, determine the slot count, and if it is non-zero add a choice
|
// for every spell level, determine the slot count, and if it is non-zero add a choice
|
||||||
// we do not break out of the loop on an empty slot count, because of bonus slot counts from items there might be gaps
|
// we do not break out of the loop on an empty slot count, because of bonus slot counts from items there might be gaps
|
||||||
if(GetSlotCount(nCasterLevel, nSpellSlotLevel, nAbilityScore, nClass))
|
if(GetSlotCount(nCasterLevel, nSpellSlotLevel, nAbilityScore, nClass, oPC))
|
||||||
{
|
{
|
||||||
AddChoice(sChoiceSpellLevel +IntToString(nSpellSlotLevel), nSpellSlotLevel, oPC);
|
AddChoice(sChoiceSpellLevel +IntToString(nSpellSlotLevel), nSpellSlotLevel, oPC);
|
||||||
nChoiceAdded = TRUE;
|
nChoiceAdded = TRUE;
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ void main()
|
|||||||
//Fire cast spell at event for the specified target
|
//Fire cast spell at event for the specified target
|
||||||
SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELLABILITY_AURA_FEAR));
|
SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELLABILITY_AURA_FEAR));
|
||||||
//Make a saving throw check
|
//Make a saving throw check
|
||||||
if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_FEAR) && !GetIsImmune(oTarget, IMMUNITY_TYPE_FEAR))
|
if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_FEAR) && !GetIsImmune(oTarget, IMMUNITY_TYPE_FEAR) && !GetIsImmune(oTarget, IMMUNITY_TYPE_MIND_SPELLS))
|
||||||
{
|
{
|
||||||
//Apply the VFX impact and effects
|
//Apply the VFX impact and effects
|
||||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectShaken(), oTarget, RoundsToSeconds(GetLevelByClass(CLASS_TYPE_DREAD_NECROMANCER, GetAreaOfEffectCreator())));
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectShaken(), oTarget, RoundsToSeconds(GetLevelByClass(CLASS_TYPE_DREAD_NECROMANCER, GetAreaOfEffectCreator())));
|
||||||
|
|||||||
@@ -1877,7 +1877,7 @@ void main()
|
|||||||
|
|
||||||
for(nSpellLevel = 0; nSpellLevel <= 9; nSpellLevel++)
|
for(nSpellLevel = 0; nSpellLevel <= 9; nSpellLevel++)
|
||||||
{
|
{
|
||||||
int nSlots = GetSlotCount(nLevel, nSpellLevel, nAbility, nClass);
|
int nSlots = GetSlotCount(nLevel, nSpellLevel, nAbility, nClass, oPC);
|
||||||
if(nSlots > 0)
|
if(nSlots > 0)
|
||||||
{
|
{
|
||||||
SetLocalInt(oPC, "PRC_AllSpell"+IntToString(nSpellLevel), 0);
|
SetLocalInt(oPC, "PRC_AllSpell"+IntToString(nSpellLevel), 0);
|
||||||
@@ -1928,7 +1928,7 @@ void main()
|
|||||||
|
|
||||||
for(nSpellLevel = 0; nSpellLevel <= 9; nSpellLevel++)
|
for(nSpellLevel = 0; nSpellLevel <= 9; nSpellLevel++)
|
||||||
{
|
{
|
||||||
int nSlots = GetSlotCount(nLevel, nSpellLevel, nAbility, nClass);
|
int nSlots = GetSlotCount(nLevel, nSpellLevel, nAbility, nClass, oPC);
|
||||||
if(nSlots > 0)
|
if(nSlots > 0)
|
||||||
{
|
{
|
||||||
SetLocalInt(oPC, "PRC_AllSpell"+IntToString(nSpellLevel), 0);
|
SetLocalInt(oPC, "PRC_AllSpell"+IntToString(nSpellLevel), 0);
|
||||||
|
|||||||
@@ -12,13 +12,9 @@
|
|||||||
//:: Created On: Feb 28, 2002
|
//:: Created On: Feb 28, 2002
|
||||||
//:://////////////////////////////////////////////
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
//:: modified by mr_bumpkin Dec 4, 2003
|
//:: modified by mr_bumpkin Dec 4, 2003
|
||||||
#include "prc_inc_spells"
|
#include "prc_inc_spells"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||||
|
|||||||
@@ -54,7 +54,8 @@ SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION);
|
|||||||
int EleDmg = GetLocalInt(OBJECT_SELF, "IC_Damage");
|
int EleDmg = GetLocalInt(OBJECT_SELF, "IC_Damage");
|
||||||
|
|
||||||
|
|
||||||
oTarget = GetFirstInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
//oTarget = GetFirstInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||||
|
oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF), FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||||
//Declare the spell shape, size and the location.
|
//Declare the spell shape, size and the location.
|
||||||
while(GetIsObjectValid(oTarget))
|
while(GetIsObjectValid(oTarget))
|
||||||
{
|
{
|
||||||
@@ -91,7 +92,8 @@ SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION);
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Select the next target within the spell shape.
|
//Select the next target within the spell shape.
|
||||||
oTarget = GetNextInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
//oTarget = GetNextInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||||
|
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF), FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ void main()
|
|||||||
|
|
||||||
while(GetIsObjectValid(oTarget))
|
while(GetIsObjectValid(oTarget))
|
||||||
{
|
{
|
||||||
if(!PRCDoResistSpell(oPC, oTarget, nCasterLvl + SPGetPenetr()))
|
if(!PRCDoResistSpell(oPC, oTarget, nCasterLvl + SPGetPenetr())&& !GetIsImmune(oTarget, IMMUNITY_TYPE_MIND_SPELLS))
|
||||||
{
|
{
|
||||||
//Save
|
//Save
|
||||||
if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS))
|
if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS))
|
||||||
|
|||||||
@@ -46,12 +46,120 @@ Created: 7/6/07
|
|||||||
//:://////////////////////////////////////////////
|
//:://////////////////////////////////////////////
|
||||||
|
|
||||||
#include "prc_inc_sp_tch"
|
#include "prc_inc_sp_tch"
|
||||||
|
#include "prc_sp_func"
|
||||||
|
|
||||||
|
int DoSpell(object oCaster, object oTarget, int nCasterLevel)
|
||||||
|
{
|
||||||
|
int nSpell = GetSpellId();
|
||||||
|
int nBeam;
|
||||||
|
int nDam;
|
||||||
|
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||||
|
int nTouch = PRCDoRangedTouchAttack(oTarget);
|
||||||
|
int nType = MyPRCGetRacialType(oTarget);
|
||||||
|
|
||||||
|
if(nSpell == SPELL_DISRUPT_UNDEAD)
|
||||||
|
{
|
||||||
|
nBeam = VFX_BEAM_HOLY;
|
||||||
|
nDam = d6(1);
|
||||||
|
nDam += SpellDamagePerDice(oCaster, 1);
|
||||||
|
if(nMetaMagic & METAMAGIC_MAXIMIZE) nDam = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(nSpell == SPELL_GREATER_DISRUPT_UNDEAD)
|
||||||
|
{
|
||||||
|
nBeam = VFX_BEAM_BLACK;
|
||||||
|
nDam = d6(3);
|
||||||
|
nDam += SpellDamagePerDice(oCaster, 3);
|
||||||
|
if(nMetaMagic & METAMAGIC_MAXIMIZE) nDam = 18;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(nMetaMagic & METAMAGIC_EMPOWER) nDam += (nDam/2);
|
||||||
|
|
||||||
|
//Beam that acts accordingly
|
||||||
|
effect eVis = EffectBeam(nBeam, oCaster, BODY_NODE_HAND, !nTouch);
|
||||||
|
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||||
|
|
||||||
|
if(nTouch)
|
||||||
|
{
|
||||||
|
if(nType == RACIAL_TYPE_UNDEAD
|
||||||
|
|| (GetHasFeat(FEAT_TOMB_TAINTED_SOUL, oTarget) && GetAlignmentGoodEvil(oTarget) != ALIGNMENT_GOOD))
|
||||||
|
{
|
||||||
|
if(!PRCDoResistSpell(oCaster, oTarget, nCasterLevel + SPGetPenetr()))
|
||||||
|
{
|
||||||
|
if(nSpell == SPELL_GREATER_DISRUPT_UNDEAD)
|
||||||
|
{
|
||||||
|
//Get hp before damage
|
||||||
|
int nHP = GetCurrentHitPoints(oTarget);
|
||||||
|
|
||||||
|
//Apply Damage
|
||||||
|
SPApplyEffectToObject(DURATION_TYPE_INSTANT, PRCEffectDamage(oTarget, nDam, DAMAGE_TYPE_POSITIVE), oTarget);
|
||||||
|
|
||||||
|
//if enough to kill target, bounce
|
||||||
|
if(nDam >= nHP)
|
||||||
|
{
|
||||||
|
location lLoc = GetLocation(oTarget);
|
||||||
|
object oTarget2 = MyFirstObjectInShape(SHAPE_SPHERE, FeetToMeters(15.0), lLoc, TRUE);
|
||||||
|
|
||||||
|
while(GetIsObjectValid(oTarget2))
|
||||||
|
{
|
||||||
|
//Undead, enemy, and not the original target
|
||||||
|
if((GetRacialType(oTarget2) == RACIAL_TYPE_UNDEAD || (GetHasFeat(FEAT_TOMB_TAINTED_SOUL, oTarget2) && GetAlignmentGoodEvil(oTarget2) != ALIGNMENT_GOOD)
|
||||||
|
&& GetIsEnemy(oTarget2, oCaster) && (oTarget != oTarget2)))
|
||||||
|
{
|
||||||
|
//Black beam, origin chest of previous target
|
||||||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectBeam(VFX_BEAM_BLACK, oTarget, BODY_NODE_CHEST), oTarget2);
|
||||||
|
SPApplyEffectToObject(DURATION_TYPE_INSTANT, PRCEffectDamage(oTarget, nDam/2, DAMAGE_TYPE_POSITIVE), oTarget2);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
oTarget2 = MyNextObjectInShape(SHAPE_SPHERE, FeetToMeters(15.0), lLoc, TRUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else SPApplyEffectToObject(DURATION_TYPE_INSTANT, PRCEffectDamage(oTarget, nDam, DAMAGE_TYPE_POSITIVE), oTarget);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nTouch; // return TRUE if spell charges should be decremented
|
||||||
|
}
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
if (!X2PreSpellCastCode()) return;
|
||||||
|
PRCSetSchool(SPELL_SCHOOL_NECROMANCY);
|
||||||
|
object oCaster = OBJECT_SELF;
|
||||||
|
object oTarget = PRCGetSpellTargetObject();
|
||||||
|
int nCasterLevel = PRCGetCasterLevel(oCaster);
|
||||||
|
int nEvent = GetLocalInt(oCaster, PRC_SPELL_EVENT); //use bitwise & to extract flags
|
||||||
|
if(!nEvent) //normal cast
|
||||||
|
{
|
||||||
|
if(GetLocalInt(oCaster, PRC_SPELL_HOLD) && oCaster == oTarget)
|
||||||
|
{ //holding the charge, casting spell on self
|
||||||
|
SetLocalSpellVariables(oCaster, 1); //change 1 to number of charges
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
DoSpell(oCaster, oTarget, nCasterLevel);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(nEvent & PRC_SPELL_EVENT_ATTACK)
|
||||||
|
{
|
||||||
|
if(DoSpell(oCaster, oTarget, nCasterLevel))
|
||||||
|
DecrementSpellCharges(oCaster);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
PRCSetSchool();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #include "prc_inc_sp_tch"
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
object oPC = OBJECT_SELF;
|
object oPC = OBJECT_SELF;
|
||||||
object oTarget = PRCGetSpellTargetObject();
|
object oTarget = PRCGetSpellTargetObject();
|
||||||
int nSpell = GetSpellId();
|
int nSpell = PRCGetSpellId();
|
||||||
int nCasterLvl = PRCGetCasterLevel(oPC);
|
int nCasterLvl = PRCGetCasterLevel(oPC);
|
||||||
int nBeam;
|
int nBeam;
|
||||||
int nDam;
|
int nDam;
|
||||||
@@ -124,4 +232,4 @@ void main()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
PRCSetSchool();
|
PRCSetSchool();
|
||||||
}
|
} */
|
||||||
@@ -49,6 +49,37 @@ void main()
|
|||||||
|
|
||||||
//loop
|
//loop
|
||||||
while(GetIsObjectValid(oTarget))
|
while(GetIsObjectValid(oTarget))
|
||||||
|
{
|
||||||
|
nRace = MyPRCGetRacialType(oTarget);
|
||||||
|
//Check for incorporeal undead
|
||||||
|
if(nRace == RACIAL_TYPE_UNDEAD)
|
||||||
|
{
|
||||||
|
if(GetIsIncorporeal(oTarget))
|
||||||
|
{
|
||||||
|
// Apply effects to valid target
|
||||||
|
effect eLink = EffectACIncrease(nBonus, AC_DEFLECTION_BONUS);
|
||||||
|
eLink = EffectLinkEffects(eLink, EffectTurnResistanceIncrease(nBonus + 1));
|
||||||
|
eLink = EffectLinkEffects(eLink, EffectTemporaryHitpoints(d8(1) + nBonus - 1));
|
||||||
|
eLink = EffectLinkEffects(eLink, EffectAttackIncrease(nBonus));
|
||||||
|
eLink = EffectLinkEffects(eLink, EffectVisualEffect(VFX_DUR_PARALYZED));
|
||||||
|
|
||||||
|
//Apply for 1 day
|
||||||
|
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(24));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SendMessageToPC(oPC, "Target creature is not incorporeal.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SendMessageToPC(oPC, "Target creature is not undead.");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Always advance to next target
|
||||||
|
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lLoc, FALSE, OBJECT_TYPE_CREATURE);
|
||||||
|
}
|
||||||
|
/* while(GetIsObjectValid(oTarget))
|
||||||
{
|
{
|
||||||
nRace = MyPRCGetRacialType(oTarget);
|
nRace = MyPRCGetRacialType(oTarget);
|
||||||
//Check for incorporeal undead
|
//Check for incorporeal undead
|
||||||
@@ -74,10 +105,10 @@ void main()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
SendMessageToPC(oPC, "Target creature is not undead.");
|
SendMessageToPC(oPC, "Target creature is not undead.");
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lLoc, FALSE, OBJECT_TYPE_CREATURE);
|
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lLoc, FALSE, OBJECT_TYPE_CREATURE);
|
||||||
}
|
} */
|
||||||
//SPEvilShift(oPC);
|
//SPEvilShift(oPC);
|
||||||
PRCSetSchool();
|
PRCSetSchool();
|
||||||
}
|
}
|
||||||
@@ -22,7 +22,7 @@ void main()
|
|||||||
|
|
||||||
//Declare major variables
|
//Declare major variables
|
||||||
object oCaster = OBJECT_SELF;
|
object oCaster = OBJECT_SELF;
|
||||||
int nSpellID = GetSpellId();
|
int nSpellID = PRCGetSpellId();
|
||||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||||
int nFNF_Effect;
|
int nFNF_Effect;
|
||||||
string sSummon;
|
string sSummon;
|
||||||
|
|||||||
Reference in New Issue
Block a user