Added "removed" folder
This commit is contained in:
119
_removed/x0_s0_bigby4.nss
Normal file
119
_removed/x0_s0_bigby4.nss
Normal file
@@ -0,0 +1,119 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bigby's Clenched Fist
|
||||
//:: [x0_s0_bigby4]
|
||||
//:: Copyright (c) 2002 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Does an attack EACH ROUND for 1 round/level.
|
||||
If the attack hits does
|
||||
1d8 +12 points of damage
|
||||
|
||||
Any creature struck must make a FORT save or
|
||||
be stunned for one round.
|
||||
|
||||
GZ, Oct 15 2003:
|
||||
Changed how this spell works by adding duration
|
||||
tracking based on the VFX added to the character.
|
||||
Makes the spell dispellable and solves some other
|
||||
issues with wrong spell DCs, checks, etc.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Brent
|
||||
//:: Created On: September 7, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Georg Zoeller October 15, 2003
|
||||
|
||||
#include "70_inc_spells"
|
||||
#include "x2_inc_spellhook"
|
||||
#include "x2_i0_spells"
|
||||
|
||||
void RunHandImpact(object oTarget, object oCaster, int nSpellID, int nMeta)
|
||||
{
|
||||
//--------------------------------------------------------------------------
|
||||
// Check if the spell has expired (check also removes effects)
|
||||
//--------------------------------------------------------------------------
|
||||
if (GZGetDelayedSpellEffectsExpired(nSpellID,oTarget,oCaster))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int nCasterModifiers = GetCasterAbilityModifier(oCaster) + GetCasterLevel(oCaster)/2;
|
||||
int nCasterRoll = d20(1) + nCasterModifiers + 11 + -1;
|
||||
int nTargetRoll = GetAC(oTarget);
|
||||
if (nCasterRoll >= nTargetRoll)
|
||||
{
|
||||
int nDC = GetLocalInt(oTarget,"XP2_L_SPELL_SAVE_DC_" + IntToString (nSpellID));
|
||||
|
||||
int nDam = MaximizeOrEmpower(8, 1, nMeta, 6);
|
||||
effect eDam = EffectDamage(nDam, DAMAGE_TYPE_BLUDGEONING);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_ACID_L);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
|
||||
if (!MySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_SPELL, oCaster))
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectStunned(), oTarget, RoundsToSeconds(1));
|
||||
}
|
||||
|
||||
DelayCommand(6.0,RunHandImpact(oTarget,oCaster,nSpellID,nMeta));
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
spellsDeclareMajorVariables();
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// This spell no longer stacks. If there is one hand, that's enough
|
||||
//--------------------------------------------------------------------------
|
||||
if (GetHasSpellEffect(spell.Id,spell.Target) || GetHasSpellEffect(SPELL_BIGBYS_CRUSHING_HAND,spell.Target))
|
||||
{
|
||||
FloatingTextStrRefOnCreature(100775,spell.Caster,FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
int nDuration = 10;
|
||||
if (spell.Meta == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration * 2;
|
||||
}
|
||||
|
||||
if(spellsIsTarget(spell.Target, SPELL_TARGET_SINGLETARGET, spell.Caster))
|
||||
{
|
||||
SignalEvent(spell.Target, EventSpellCastAt(spell.Caster, spell.Id, TRUE));
|
||||
int nResult = MyResistSpell(spell.Caster, spell.Target);
|
||||
|
||||
if(nResult == 0)
|
||||
{
|
||||
int nCasterModifier = GetCasterAbilityModifier(spell.Caster);
|
||||
effect eHand = EffectVisualEffect(VFX_DUR_BIGBYS_CLENCHED_FIST);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHand, spell.Target, RoundsToSeconds(nDuration));
|
||||
|
||||
//----------------------------------------------------------
|
||||
// GZ: 2003-Oct-15
|
||||
// Save the current save DC on the character because
|
||||
// GetSpellSaveDC won't work when delayed
|
||||
//----------------------------------------------------------
|
||||
SetLocalInt(spell.Target,"XP2_L_SPELL_SAVE_DC_" + IntToString (spell.Id), spell.DC);
|
||||
|
||||
RunHandImpact(spell.Target,spell.Caster, spell.Id, spell.Meta);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user