Added "Removed Files" folder
Added "Removed Files" folder in case we needed to review any of them.
This commit is contained in:
82
_module/_removed files/nw_s0_destruc.nss
Normal file
82
_module/_removed files/nw_s0_destruc.nss
Normal file
@@ -0,0 +1,82 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Destruction
|
||||
//:: NW_S0_Destruc
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
The target creature is destroyed if it fails a
|
||||
Fort save, otherwise it takes 10d6 damage.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Aug 13, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "x2_inc_spellhook"
|
||||
#include "epicdc_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
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 oTarget = GetSpellTargetObject();
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nDamage;
|
||||
int nCasterLevel = GetCasterLevel(OBJECT_SELF)/2;
|
||||
effect eSlay = EffectDeath();
|
||||
effect eDam;
|
||||
effect eVis = EffectVisualEffect(234);
|
||||
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_DESTRUCTION));
|
||||
//Make SR check
|
||||
if(!MyResistSpell(OBJECT_SELF, oTarget))
|
||||
{
|
||||
//Make a saving throw check
|
||||
//This spell is no longer a Death Effect They make a save or die.
|
||||
if(!/*Fort Save*/ MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC()))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eSlay, oTarget);
|
||||
}
|
||||
else
|
||||
{
|
||||
nDamage = d8(1) * nCasterLevel;
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nDamage = 8 * nCasterLevel;//Damage is at max
|
||||
}
|
||||
else if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||
{
|
||||
nDamage = nDamage + (nDamage/2); //Damage/Healing is +50%
|
||||
}
|
||||
//Set damage effect
|
||||
eDam = EffectDamage(nDamage, DAMAGE_TYPE_DIVINE);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
}
|
||||
//Apply VFX impact
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user