Initial upload.
Adding base PRC 4.19a files to repository.
This commit is contained in:
94
trunk/spells/x0_s0_bigby2.nss
Normal file
94
trunk/spells/x0_s0_bigby2.nss
Normal file
@@ -0,0 +1,94 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bigby's Forceful Hand
|
||||
//:: [x0_s0_bigby2]
|
||||
//:: Copyright (c) 2002 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
dazed vs strength check (+14 on strength check); Target knocked down.
|
||||
Target dazed down for 1 round per level of caster
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Brent
|
||||
//:: Created On: September 7, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Andrew Nobbs May 01, 2003
|
||||
|
||||
//:: altered by mr_bumpkin Dec 4, 2003 for prc stuff
|
||||
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_inc_combmove"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION);
|
||||
/*
|
||||
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 oTarget = PRCGetSpellTargetObject();
|
||||
int CasterLvl = PRCGetCasterLevel(OBJECT_SELF);
|
||||
int nDuration = CasterLvl;
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
//Check for metamagic extend
|
||||
if (CheckMetaMagic(nMetaMagic, METAMAGIC_EXTEND)) //Duration is +100%
|
||||
{
|
||||
nDuration = nDuration * 2;
|
||||
}
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
// Apply the impact effect
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_BIGBYS_FORCEFUL_HAND);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, 460, TRUE));
|
||||
if(!PRCDoResistSpell(OBJECT_SELF, oTarget,CasterLvl+ SPGetPenetr()))
|
||||
{
|
||||
|
||||
int nCasterRoll = d20(1) + 14;
|
||||
int nTargetRoll = d20(1) + GetAbilityModifier(ABILITY_STRENGTH, oTarget) + PRCGetSizeModifier(oTarget);
|
||||
// * bullrush succesful, knockdown target for duration of spell
|
||||
if (nCasterRoll >= nTargetRoll)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
|
||||
effect eKnockdown = EffectDazed();
|
||||
effect eKnockdown2 = EffectKnockdown();
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
//Link effects
|
||||
effect eLink = EffectLinkEffects(eKnockdown, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eKnockdown2);
|
||||
//Apply the penalty
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration),TRUE,-1,CasterLvl);
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget, RoundsToSeconds(nDuration),FALSE);
|
||||
// * Bull Rush succesful
|
||||
FloatingTextStrRefOnCreature(8966,OBJECT_SELF, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
FloatingTextStrRefOnCreature(8967,OBJECT_SELF, FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Erasing the variable used to store the spell's spell school
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user