63 lines
1.6 KiB
Plaintext
63 lines
1.6 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Isaacs Lesser Missile Storm
|
|
//:: x0_s0_MissStorm1
|
|
//:: Copyright (c) 2001 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
Up to 10 missiles, each doing 1d6 damage to all
|
|
targets in area.
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Brent
|
|
//:: Created On: July 31, 2002
|
|
//:://////////////////////////////////////////////
|
|
//:: Last Updated By:
|
|
|
|
#include "ke_spell_factor"
|
|
|
|
#include "X0_I0_SPELLS"
|
|
#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;
|
|
}
|
|
|
|
int nDamage = GetCasterLevel(OBJECT_SELF) +5 ; // * 2
|
|
if (nDamage > 40)
|
|
nDamage = 40;
|
|
|
|
//starting the grand circus of importing and converting back and forth //
|
|
|
|
float fDamage = IntToFloat(nDamage);
|
|
|
|
// multiplaying damage with fFactor //
|
|
|
|
float fFactor = CalculateFactor();
|
|
|
|
fDamage = fDamage * fFactor;
|
|
|
|
// converting the float damage back to INT damage so we can use it again //
|
|
|
|
int nDamage2 = FloatToInt(fDamage);
|
|
|
|
// Done and remember to change nDamage with nDamage2 below :) //
|
|
|
|
|
|
|
|
// End of Spell Cast Hook
|
|
|
|
//SpawnScriptDebugger(); 503
|
|
DoMissileStorm(nDamage2, 40, GetSpellId(), 503,VFX_IMP_LIGHTNING_S ,DAMAGE_TYPE_ELECTRICAL, TRUE, TRUE );
|
|
}
|