Added Force Missiles spell

Added Force Missiles spell. Fixed Shadowcaster Marker feat check. Updated Witchwwod step to grant immunity to Vine Mine & Spike Growth.  Updated release archive.
This commit is contained in:
Jaysyn904 2024-05-23 07:45:01 -04:00
parent 87065fd7bb
commit fb88c718bd
20 changed files with 39686 additions and 39452 deletions

BIN
Release/PRC8_20240522.7z Normal file

Binary file not shown.

@ -2481,7 +2481,7 @@
2477 ResistEnergyCold **** **** **** **** **** ****
2478 ResistEnergyElec **** **** **** **** **** ****
2479 ResistEnergyAcid **** **** **** **** **** ****
2480 ResistEnergySonic **** **** **** **** **** ****
2480 SPELL_FORCE_MISSILES prc_scr_995 **** **** **** **** ****
2481 SYMBOL_OF_DEATH prc_scr_967 prc_scr_967 **** **** **** ****
2482 SYMBOL_OF_FEAR prc_scr_968 prc_scr_968 **** **** **** ****
2483 SYMBOL_OF_STUNING prc_scr_969 prc_scr_969 **** **** **** ****

@ -2481,7 +2481,7 @@
2477 ResistEnergyCold **** 1 1 1 **** 0
2478 ResistEnergyElec **** 1 1 1 **** 0
2479 ResistEnergyAcid **** 1 1 1 **** 0
2480 ResistEnergySonic **** 1 1 1 **** 0
2480 SPELL_FORCE_MISSILES 995 1 0 0 4 0
2481 SYMBOL_OF_DEATH 967 1 1 0 8 0
2482 SYMBOL_OF_FEAR 968 1 1 0 6 0
2483 SYMBOL_OF_STUNING 969 1 1 0 7 0

@ -996,7 +996,7 @@
992 Greater_Resistance 16790119 7 4 21000 3457 1 1 1 iss_gr_resis
993 Superior_Resistance 16790122 11 6 49500 3458 0 0 1 iss_sup_resis
994 Faerie_Fire 16793699 1 1 750 2924 0 1 1 iss_faerie_fire
995 **** **** **** **** **** **** **** **** **** ****
995 SPELL_FORCE_MISSILES 16790488 12 4 21000 2480 0 1 1 iss_X1LesMis
996 **** **** **** **** **** **** **** **** **** ****
997 **** **** **** **** **** **** **** **** **** ****
998 **** **** **** **** **** **** **** **** **** ****

@ -30,3 +30,4 @@
26 Otilukes_Resilient_Sphere 16829196 V 4 3676
27 Shelgarns_Persistent_Blade 3739 V 1 534
28 Shield 57 A 1 417
29 SPELL_FORCE_MISSILES 16790488 V 4 2480

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -63,7 +63,7 @@ int PerformJump(object oPC, location lLoc, int bDoKnockDown = TRUE)
bCanFly = FALSE;
// Height restriction on jumping
if (GetHeight(GetLocation(oPC), lLoc) > 20.0 && !bCanFly)
if (GetHeight(GetLocation(oPC), lLoc) > 8.0 && !bCanFly)
{
SendMessageToPC(oPC, "The target location is too high to jump to. Please pick a lower target.");
return FALSE;

@ -1351,6 +1351,7 @@ const int SPELL_ETERNAL_SLEEP = 0;
const int SPELL_GREATER_BESTOW_CURSE = 0;
const int SPELL_FAERIE_FIRE = 2924;
const int SPELL_MASS_AID = 2853;
const int SPELL_FORCE_MISSILES = 2480;
const int SPELL_SYMBOL_OF_DEATH = 2481;
const int SPELL_SYMBOL_OF_FEAR = 2482;
const int SPELL_SYMBOL_OF_STUNING = 2483;

@ -6,6 +6,11 @@
#include "inv_inc_invfunc"
#include "inv_invokehook"
// int SPELL_VINE_MINE_ENTANGLE = 530;
// int SPELL_VINE_MINE_HAMPER_MOVEMENT = 531;
void main()
{
@ -18,18 +23,24 @@ void main()
object oCaster = OBJECT_SELF;
int CasterLvl = GetInvokerLevel(OBJECT_SELF, GetInvokingClass());
object oTarget = PRCGetSpellTargetObject();
effect eWeb = EffectImmunity(IMMUNITY_TYPE_ENTANGLE);
effect eVis = EffectVisualEffect(VFX_IMP_MAGIC_PROTECTION);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
effect eLink = EffectLinkEffects(eWeb, eDur);
int nDuration = CasterLvl;
effect eWeb = EffectImmunity(IMMUNITY_TYPE_ENTANGLE);
effect eVMEntagle = EffectSpellImmunity(SPELL_VINE_MINE_ENTANGLE);
effect eVMHamper = EffectSpellImmunity(SPELL_VINE_MINE_HAMPER_MOVEMENT);
effect eSpikeGrowth = EffectSpellImmunity(SPELL_SPIKE_GROWTH);
effect eVis = EffectVisualEffect(VFX_IMP_MAGIC_PROTECTION);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
effect eLink = EffectLinkEffects(eWeb, eDur);
eLink = EffectLinkEffects(eLink, eVMHamper);
eLink = EffectLinkEffects(eLink, eVMEntagle);
eLink = EffectLinkEffects(eLink, eSpikeGrowth);
int nDuration = CasterLvl;
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, INVOKE_WITCHWOOD_STEP, FALSE));
//Apply VFX impact and immunity effect
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(24),TRUE,-1,CasterLvl);
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(24), TRUE, -1, CasterLvl);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -2323,48 +2323,48 @@ int MysticTheurgeMarkerFeats()
// Check for divine, arcane, and shadow marker feats
nMysticDivine = GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_ARCHIVIST)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_BLACKGUARD)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_BLIGHTER)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_CLERIC)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_DOMIEL)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_DRUID)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_FAVOURED_SOUL)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_HEALER)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_JUSTICEWW)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_KNIGHT_CHALICE)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_KNIGHT_MIDDLECIRCLE)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_NENTYAR_HUNTER)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_OCULAR)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_PALADIN)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_RANGER)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_OASHAMAN)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_SOHEI)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_SOL)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_SPSHAMAN)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_UR_PRIEST)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_VASSAL);
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_BLACKGUARD)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_BLIGHTER)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_CLERIC)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_DOMIEL)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_DRUID)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_FAVOURED_SOUL)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_HEALER)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_JUSTICEWW)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_KNIGHT_CHALICE)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_KNIGHT_MIDDLECIRCLE)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_NENTYAR_HUNTER)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_OCULAR)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_PALADIN)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_RANGER)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_OASHAMAN)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_SOHEI)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_SOL)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_SPSHAMAN)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_UR_PRIEST)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_VASSAL);
nMysticArcane = GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_FEY)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_ABERRATION)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_MONSTROUS)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_OUTSIDER)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_SHAPECHANGER)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_ASSASSIN)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_BARD)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_BEGUILER)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_CELEBRANT_SHARESS)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_CULTIST_PEAK)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_DNECRO)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_DUSKBLADE)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_HARPER)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_HEXBLADE)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_KNIGHT_WEAVE)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_SHADOWLORD)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_SORCERER)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_SUBLIME_CHORD)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_SUEL_ARCHANAMACH)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_WARMAGE)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_WIZARD);
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_ABERRATION)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_MONSTROUS)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_OUTSIDER)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_SHAPECHANGER)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_ASSASSIN)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_BARD)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_BEGUILER)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_CELEBRANT_SHARESS)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_CULTIST_PEAK)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_DNECRO)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_DUSKBLADE)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_HARPER)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_HEXBLADE)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_KNIGHT_WEAVE)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_SHADOWLORD)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_SORCERER)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_SUBLIME_CHORD)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_SUEL_ARCHANAMACH)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_WARMAGE)
+ GetHasFeat(FEAT_MYSTIC_THEURGE_SPELLCASTING_WIZARD);
nMysticShadow = GetHasFeat(FEAT_MYSTICTHEURGE_MYSTERY_SHADOWCASTER)
+ GetHasFeat(FEAT_MYSTICTHEURGE_MYSTERY_SHADOWSMITH);
@ -2372,13 +2372,15 @@ int MysticTheurgeMarkerFeats()
int totalMarkerFeats = nMysticDivine + nMysticArcane + nMysticShadow;
// Check if the character has chosen a valid combination of marker feats
if (totalMarkerFeats > 2 || (nMysticDivine > 1 && nMysticArcane > 1)) {
if ((totalMarkerFeats > 2) || (nMysticDivine > 1) || (nMysticArcane > 1) || (nMysticShadow > 1))
{
FloatingTextStringOnCreature("A Mystic Theurge may only advance two different types of spellcasting.", OBJECT_SELF, FALSE);
FloatingTextStringOnCreature("Please reselect your feats.", OBJECT_SELF, FALSE);
return TRUE;
}
if (nMysticDivine < 1 || nMysticArcane < 1 || nMysticShadow < 1) {
if (totalMarkerFeats < 2)
{
FloatingTextStringOnCreature("A Mystic Theurge must pick two spellcasting classes to advance at first level.", OBJECT_SELF, FALSE);
FloatingTextStringOnCreature("Please reselect your feats.", OBJECT_SELF, FALSE);
return TRUE;

@ -17,7 +17,7 @@ void DoJump(object oPC, location lTarget, int bDoKnockdown)
string sMessage = "You cannot jump through a closed door.";
oTarget = GetFirstObjectInShape(SHAPE_SPELLCYLINDER, fDistance, lTarget, TRUE, OBJECT_TYPE_DOOR,vSource);
oTarget = GetFirstObjectInShape(SHAPE_SPELLCYLINDER, fDistance, lTarget, TRUE, OBJECT_TYPE_DOOR, vSource);
//:: Check if the first object found is a door.
while (oTarget != OBJECT_INVALID)

Binary file not shown.

@ -4728,6 +4728,31 @@ effects, you gain a +10 resistance bonus on saving throws
(or Charisma checks, in the case of effects such as charm
person) to resist commands that would cause you to leave
your current position.</entry>
<entry id="13272" lang="en" sex="m">Force Missiles</entry>
<entry id="13273" lang="en" sex="m">Evocation [Force]
Level: Sorcerer 4, Wizard 4,
Components: V, S,
Casting Time: 1 Standard Action
Range: Medium (100 ft. + 10 ft./level)
Target: Up to four creatures, no two of which are more than 30 ft. apart
Duration: Instantaneous
Saving Throw: None
Spell Resistance: Yes
Sparking bolts of blue magic, like giant magic missiles, streak from your
outstretched hand to strike your foes and explode in sparkling bursts.
You create powerful missiles of magical force, each of which darts from your
fingertips and unerringly strikes its target, dealing 2d6 points of damage.
The missile then explodes in a burst of force that deals half this amount of
damage to any creatures adjacent to the primary target.
The missile strikes unerringly, even if the target is in melee or has anything
less than total cover or concealment. A caster cannot single out specific parts
of a creature.
You gain one missile for every four caster levels. Extra missiles distribute
themsleves amongst your enemies evenly.</entry>
<entry id="16409" lang="en" sex="m">62</entry>
<entry id="16410" lang="en" sex="m">63</entry>
<entry id="16411" lang="en" sex="m">64</entry>

Binary file not shown.

@ -0,0 +1,194 @@
//::///////////////////////////////////////////////
//:: Force Missiles
//:: sp_forcemissiles
//:: Copyright (c) 2022 PRC
//:://////////////////////////////////////////////
/*/
Force Missiles
(Spell Compendium, p. 98)
Evocation [Force]
Level: Sorcerer 4, Wizard 4,
Components: V, S,
Casting Time: 1 Standard Action
Range: Medium (100 ft. + 10 ft./level)
Target: Up to four creatures, no two of which are more than 30 ft. apart
Duration: Instantaneous
Saving Throw: None
Spell Resistance: Yes
Sparking bolts of blue magic, like giant magic missiles, streak from your
outstretched hand to strike your foes and explode in sparkling bursts.
You create powerful missiles of magical force, each of which darts from your
fingertips and unerringly strikes its target, dealing 2d6 points of damage.
The missile then explodes in a burst of force that deals half this amount of
damage to any creatures adjacent to the primary target.
The missile strikes unerringly, even if the target is in melee or has anything
less than total cover or concealment. A caster cannot single out specific parts
of a creature.
You gain one missile for every four caster levels. You can make more than one
missile strike a single target, if desired. However,you must designate targets
before rolling for spell resistance or damage.
/*/
//:://////////////////////////////////////////////
//:: Created By: Tsurani Nevericy
//:: Created On: 05/15/2024
//:://////////////////////////////////////////////
//:: Last Updated By: Tsurani Nevericy
//:: Last Updated On: 05/15/2024
//:://////////////////////////////////////////////
#include "prc_sp_func"
#include "prc_inc_spells"
#include "x2_inc_spellhook"
void SendMissileBomb(object oCaster, object oTarget, float fDelay=0.0, float fTime=0.0)
{
int nMetaMagic = PRCGetMetaMagicFeat();
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MIRV), oTarget);
location lLoc = GetLocation(oTarget);
object oLoop = GetFirstObjectInShape(SHAPE_SPHERE, 5.0, lLoc, TRUE);
while (GetIsObjectValid(oLoop))
{
SignalEvent(oLoop, EventSpellCastAt(oCaster, PRCGetSpellId()));
if (oLoop == oTarget)
{
int nDam = d6(2);
if (nMetaMagic == METAMAGIC_MAXIMIZE)
nDam = 12;
if (nMetaMagic == METAMAGIC_EMPOWER)
nDam += nDam/2;
DelayCommand(fTime, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDam, DAMAGE_TYPE_MAGICAL), oLoop));
DelayCommand(fTime, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_IMP_MAGBLUE, FALSE, 4.0f), oLoop));
}
else if (!PRCDoResistSpell(oCaster, oLoop, FloatToInt(fDelay)))
{
int nDam = d6(1);
if (nMetaMagic == METAMAGIC_MAXIMIZE)
nDam = 6;
if (nMetaMagic == METAMAGIC_EMPOWER)
nDam += nDam/2;
DelayCommand(fTime, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDam, DAMAGE_TYPE_MAGICAL), oLoop));
DelayCommand(fTime, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_IMP_MAGBLUE), oLoop));
}
oLoop = GetNextObjectInShape(SHAPE_SPHERE, 5.0, lLoc, TRUE);
}
}
//Implements the spell impact, put code here
// if called in many places, return TRUE if
// stored charges should be decreased
// eg. touch attack hits
//
// Variables passed may be changed if necessary
int DoSpell(object oCaster, object oTarget, int nCasterLevel, int nEvent)
{
int nMetaMagic = PRCGetMetaMagicFeat();
int nSaveDC = PRCGetSaveDC(oTarget, oCaster);
int nPenetr = nCasterLevel + SPGetPenetr();
int i;
int nTargets;
int nCnt = 1;
float fDist, fDelay, fDelay2, fTime;
if (nCasterLevel > 40) nCasterLevel = 40;
int nMissiles = nCasterLevel/4;
if (nMissiles < 1) nMissiles = 1;
location lTarget = PRCGetSpellTargetLocation();
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 9.144, lTarget, TRUE, OBJECT_TYPE_CREATURE);
while (GetIsObjectValid(oTarget))
{
if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, oCaster) && oTarget != oCaster)
{
nTargets++;
}
oTarget = GetNextObjectInShape(SHAPE_SPHERE, 9.144, lTarget, TRUE, OBJECT_TYPE_CREATURE);
}
if (!nTargets)
return FALSE;
int nExtraMissiles = nMissiles / nTargets;
if (nExtraMissiles <= 0)
nExtraMissiles = 1;
int nRemainder = 0;
if (nTargets > nMissiles) nTargets = nMissiles;
nRemainder = nMissiles % nTargets;
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 9.144, lTarget, TRUE, OBJECT_TYPE_CREATURE);
while (GetIsObjectValid(oTarget) && nCnt <= nTargets)
{
if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, oCaster) && oTarget != oCaster)
{
if (!PRCDoResistSpell(oCaster, oTarget, FloatToInt(fDelay)))
{
int i;
for (i=1; i <= nExtraMissiles + nRemainder; i++)
{
fDist = GetDistanceBetween(oCaster, oTarget);
fDelay = fDist/(3.0 * log(fDist) + 2.0);
fTime = fDelay;
fDelay2 += 0.1;
fTime += fDelay2;
DelayCommand(fDelay2, SendMissileBomb(oCaster, oTarget, fDelay, fTime));
}
}
else
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MIRV), oTarget);
}
nCnt++;
nRemainder = 0;
}
oTarget = GetNextObjectInShape(SHAPE_SPHERE, 9.144, lTarget, TRUE, OBJECT_TYPE_CREATURE);
}
return TRUE;
}
void main()
{
object oCaster = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
int nCasterLevel = PRCGetCasterLevel(oCaster);
int i;
int nTargets;
int nCnt = 1;
float fDist, fDelay, fDelay2, fTime;
PRCSetSchool(GetSpellSchool(PRCGetSpellId()));
if (!X2PreSpellCastCode()) return;
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, nEvent);
}
else
{
if(nEvent & PRC_SPELL_EVENT_ATTACK)
{
if(DoSpell(oCaster, oTarget, nCasterLevel, nEvent))
DecrementSpellCharges(oCaster);
}
}
PRCSetSchool();
}
//::///////////////////////////////////////////////////////////////////