forked from Jaysyn/PRC8
Updated Release Archive. Fixed Mage-killer prereqs. Removed old LETO & ConvoCC related files. Added organized spell scroll store. Fixed Gloura spellbook. Various TLK fixes. Reorganized Repo. Removed invalid user folders. Added DocGen back in.
116 lines
4.1 KiB
Plaintext
116 lines
4.1 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: HellFire
|
|
/*Hellfire
|
|
Evocation [Evil]
|
|
Level: Diabolic 4
|
|
Components: V, S
|
|
Casting Time: 1 action
|
|
Range: Close (25 ft. + 5 ft./2 levels)
|
|
Area: 5-ft.-radius spread
|
|
Duration: Instantaneous
|
|
Saving Throw: None
|
|
Spell Resistance: Yes
|
|
|
|
The caster creates a small explosion of
|
|
brimstone and fire that deals 3d6
|
|
points of special diabolic fire damage.
|
|
The diabolic flames are not subject to
|
|
being reduced by protection from ele-
|
|
ments (fire), fire shield (chill shield), or
|
|
similar magic.
|
|
*/
|
|
//:: Copyright (c) 2001 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Noel Borstad
|
|
//:: Created On: Oct 18 , 2000
|
|
//:://////////////////////////////////////////////
|
|
//:: Last Updated By: Preston Watamaniuk, On: April 6, 2001
|
|
//:: Last Updated By: AidanScanlan, On: April 11, 2001
|
|
//:: Last Updated By: Preston Watamaniuk, On: May 25, 2001
|
|
//:: Last Modified By: Sir Attilla
|
|
|
|
//Fixed a missing VFX constant bug.
|
|
//Aaon Graywolf - Jan 8, 2004
|
|
|
|
#include "prc_alterations"
|
|
#include "x2_inc_spellhook"
|
|
|
|
void main()
|
|
{
|
|
|
|
/*
|
|
Spellcast Hook Code
|
|
Added 2003-06-20 by Georg
|
|
If you want to make changes to all spells,
|
|
check x2_inc_spellhook.nss to find out more
|
|
|
|
*/
|
|
|
|
if (!X2PreSpellCastCode())
|
|
{
|
|
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
|
return;
|
|
}
|
|
|
|
// End of Spell Cast Hook
|
|
|
|
|
|
//Declare major variables
|
|
object oCaster = OBJECT_SELF;
|
|
int nCasterLvl = 15;
|
|
int nMetaMagic = PRCGetMetaMagicFeat();
|
|
int nDamage;
|
|
float fDelay;
|
|
effect eExplode = EffectVisualEffect(806);
|
|
effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M);
|
|
effect eDam;
|
|
//Get the spell target location as opposed to the spell target.
|
|
location lTarget = PRCGetSpellTargetLocation();
|
|
//Limit Caster level for the purposes of damage
|
|
if (nCasterLvl > 10)
|
|
{
|
|
nCasterLvl = 10;
|
|
}
|
|
//Apply the fireball explosion at the location captured above.
|
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget);
|
|
//Declare the spell shape, size and the location. Capture the first target object in the shape.
|
|
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
|
//Cycle through the targets within the spell shape until an invalid object is captured.
|
|
while (GetIsObjectValid(oTarget))
|
|
{
|
|
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF))
|
|
{
|
|
//Get the distance between the explosion and the target to calculate delay
|
|
fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20;
|
|
if (!PRCDoResistSpell(OBJECT_SELF, oTarget, nCasterLvl))
|
|
{
|
|
//Roll damage for each target
|
|
nDamage = d6(3);
|
|
//Resolve metamagic
|
|
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
|
{
|
|
nDamage = 6 * nCasterLvl;
|
|
}
|
|
else if (nMetaMagic == METAMAGIC_EMPOWER)
|
|
{
|
|
nDamage = nDamage + nDamage / 2;
|
|
}
|
|
//Set the damage effect
|
|
eDam = EffectDamage(nDamage, DAMAGE_TYPE_DIVINE);
|
|
if(nDamage > 0)
|
|
{
|
|
// Apply effects to the currently selected target.
|
|
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
|
//This visual effect is applied to the target object not the location as above. This visual effect
|
|
//represents the flame that erupts on the target not on the ground.
|
|
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
|
}
|
|
}
|
|
}
|
|
//Select the next target within the spell shape.
|
|
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_SMALL, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
|
}
|
|
}
|
|
|