Modified Bigby's
Posted: Sat Jul 03, 2004 8:46 pm
Hmm, I noticed that bigby's equations are a bit muffed up from what they're supposed to be in pnp, mostly for grapple purposes, the bullrush equations seem to be all right, but the forceful hand is just supposed to do bullrushing every round, so I've done some code rewriting, both to fix the severly messed bioware equations for grapple, and to take into account that grapple from the hand is a round by round event as is the bullrush of the forceful hand. I've also added a few lines for constants for the expanded size modifier list thats in the CEP for colossal and gargantuan creatures.
On Orls request I'm posting these, they haven't been thoroughly bugtested, but the modifications aren't too big, regardless I'm posting them if someone wants to give them a try feel free.
in x0_i0_spells
The primary changes in this code are the rolls for the target, bioware's default wasn't giving the target creature his d20 roll as per grappling rules (pg 137 of 3e phb) and the size modifiers have been adjusted in the x0_i0_spells as well to take into account larger or smaller creatures bonuses. In some cases (grasping hand I believe) the target creature was not even receiving his attack bonus for his grapple roll, that and his d20 roll were giving bigby's spell a massive advantage.
As it is intended now it should last for the duration of the spell but be required to do grapple rolls vs the opponent on a round by round basis, this idea was swiped from the crushing hand code which was doing just that for stun purposes.
Hopefully these changes will institute a bit more balance to the spells, as having massive ancient dragons laid out by a bigby's seemed to be a bit odd for me and spurred me to check the equations for the code. Also checks have been instituted in each spell to test for paralysis immunity and to apply cutscene immobilize, this was instituted in crushing hand I believe but not in the grasping, immunity to paralysis should have no effect on a physical grappling situation, so that has been instituted as well.
HerMyT[/code]
On Orls request I'm posting these, they haven't been thoroughly bugtested, but the modifications aren't too big, regardless I'm posting them if someone wants to give them a try feel free.
Code: Select all
//::///////////////////////////////////////////////
//:: 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
#include "x0_i0_spells"
#include "x2_i0_spells"
#include "x2_inc_spellhook"
int nSpellID = 460;
void BullRushCheck(object oTarget, object oCaster)
{
//--------------------------------------------------------------------------
// Check if the spell has expired (check also removes effects)
//--------------------------------------------------------------------------
if (GZGetDelayedSpellEffectsExpired(nSpellID,oTarget,oCaster))
{
return;
}
int nDuration = 1;
int nCasterModifier = GetCasterAbilityModifier(OBJECT_SELF);
int nCasterRoll;
int nTargetRoll;
nCasterRoll = d20(1) + 14;
nTargetRoll = d20(1) + GetSizeModifier(oTarget) + GetAbilityModifier(ABILITY_STRENGTH);
if (nCasterRoll >= nTargetRoll)
{
// Hold the target paralyzed
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);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget, RoundsToSeconds(nDuration));
// * Bull Rush succesful
FloatingTextStrRefOnCreature(8966,OBJECT_SELF, FALSE);
}
else
{
FloatingTextStrRefOnCreature(8967,OBJECT_SELF, FALSE);
}
DelayCommand(6.0, BullRushCheck(oTarget, oCaster));
}
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 oTarget = GetSpellTargetObject();
int nDuration = GetCasterLevel(OBJECT_SELF);
int nMetaMagic = GetMetaMagicFeat();
//Check for metamagic extend
if (nMetaMagic == METAMAGIC_EXTEND) //Duration is +100%
{
nDuration = nDuration * 2;
}
if(!GetIsReactionTypeFriendly(oTarget))
{
// Apply the impact effect
effect eImpact = EffectVisualEffect(VFX_IMP_BIGBYS_FORCEFUL_HAND);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget);
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, 460, TRUE));
if(!MyResistSpell(OBJECT_SELF, oTarget))
{
effect eHand = EffectVisualEffect(VFX_DUR_BIGBYS_CRUSHING_HAND);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHand, oTarget, RoundsToSeconds(nDuration));
BullRushCheck(oTarget, OBJECT_SELF);
}
}
}
Code: Select all
//::///////////////////////////////////////////////
//:: Bigby's Grasping Hand
//:: [x0_s0_bigby3]
//:: Copyright (c) 2002 Bioware Corp.
//:://////////////////////////////////////////////
/*
make an attack roll. If succesful target is held for 1 round/level
*/
//:://////////////////////////////////////////////
//:: Created By: Brent
//:: Created On: September 7, 2002
//:://////////////////////////////////////////////
//:: VFX Pass By:
#include "x0_i0_spells"
#include "x2_i0_spells"
#include "x2_inc_spellhook"
int nSpellID = 461;
void GrappleCheck(object oTarget, object oCaster)
{
//--------------------------------------------------------------------------
// Check if the spell has expired (check also removes effects)
//--------------------------------------------------------------------------
if (GZGetDelayedSpellEffectsExpired(nSpellID,oTarget,oCaster))
{
return;
}
int nDuration = 1;
int nCasterModifier = GetCasterAbilityModifier(OBJECT_SELF);
int nCasterRoll;
int nTargetRoll;
nCasterRoll = d20(1) + nCasterModifier
+ GetCasterLevel(OBJECT_SELF) + 10 + 4;
nTargetRoll = d20(1) + GetSizeModifier(oTarget) + GetBaseAttackBonus(oTarget)
+ GetAbilityModifier(ABILITY_STRENGTH);
if (nCasterRoll >= nTargetRoll)
{
// Hold the target paralyzed
effect eKnockdown = EffectParalyze();
if (GetIsImmune(oTarget, EFFECT_TYPE_PARALYZE))
{
eKnockdown = EffectCutsceneImmobilize();
}
effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
effect eLink = EffectLinkEffects(eKnockdown, eDur);
eLink = EffectLinkEffects(eVis, eLink);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
eLink, oTarget,
RoundsToSeconds(nDuration));
FloatingTextStrRefOnCreature(2478, OBJECT_SELF);
}
else
{
FloatingTextStrRefOnCreature(83309, OBJECT_SELF);
}
DelayCommand(6.0, GrappleCheck(oTarget, oCaster));
}
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 oTarget = GetSpellTargetObject();
int nDuration = GetCasterLevel(OBJECT_SELF);
int nMetaMagic = GetMetaMagicFeat();
effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
//Check for metamagic extend
if (nMetaMagic == METAMAGIC_EXTEND) //Duration is +100%
{
nDuration = nDuration * 2;
}
if(!GetIsReactionTypeFriendly(oTarget))
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, 461, TRUE));
// Check spell resistance
if(!MyResistSpell(OBJECT_SELF, oTarget))
{
// Check caster ability vs. target's AC
int nCasterModifier = GetCasterAbilityModifier(OBJECT_SELF);
int nCasterRoll = d20(1)
+ nCasterModifier
+ GetCasterLevel(OBJECT_SELF) + 10 + -1;
int nTargetRoll = GetAC(oTarget);
// * grapple HIT succesful,
if (nCasterRoll >= nTargetRoll)
{
effect eHand = EffectVisualEffect(VFX_DUR_BIGBYS_GRASPING_HAND);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
eHand, oTarget,
RoundsToSeconds(nDuration));
GrappleCheck(oTarget, OBJECT_SELF);/*
// * now must make a GRAPPLE check to
// * hold target for duration of spell
// * check caster ability vs. target's size & strength
nCasterRoll = d20(1) + nCasterModifier
+ GetCasterLevel(OBJECT_SELF) + 10 +4;
nTargetRoll = d20(1) + GetSizeModifier(oTarget)
+ GetAbilityModifier(ABILITY_STRENGTH);
if (nCasterRoll >= nTargetRoll)
{
// Hold the target paralyzed
effect eKnockdown = EffectParalyze();
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
effect eHand = EffectVisualEffect(VFX_DUR_BIGBYS_GRASPING_HAND);
effect eLink = EffectLinkEffects(eKnockdown, eDur);
eLink = EffectLinkEffects(eHand, eLink);
eLink = EffectLinkEffects(eVis, eLink);
if (GetIsImmune(oTarget, EFFECT_TYPE_PARALYZE) == FALSE)
{
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
eLink, oTarget,
RoundsToSeconds(nDuration));
// ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
// eVis, oTarget,RoundsToSeconds(nDuration));
FloatingTextStrRefOnCreature(2478, OBJECT_SELF);
}
}
else
{
FloatingTextStrRefOnCreature(83309, OBJECT_SELF);
}*/
}
}
}
}
Code: Select all
//::///////////////////////////////////////////////
//:: Bigby's Crushing Hand
//:: [x0_s0_bigby5]
//:: Copyright (c) 2002 Bioware Corp.
//:://////////////////////////////////////////////
/*
Similar to Bigby's Grasping Hand.
If Grapple succesful then will hold the opponent and do 2d6 + 12 points
of damage EACH round for 1 round/level
// Mark B's famous advice:
// Note: if the target is dead during one of these second-long heartbeats,
// the DelayCommand doesn't get run again, and the whole package goes away.
// Do NOT attempt to put more than two parameters on the delay command. They
// may all end up on the stack, and that's all bad. 60 x 2 = 120.
*/
//:://////////////////////////////////////////////
//:: Created By: Brent
//:: Created On: September 7, 2002
//:://////////////////////////////////////////////
//:: VFX Pass By:
#include "x0_i0_spells"
#include "x2_inc_spellhook"
#include "x2_i0_spells"
int nSpellID = 463;
void RunHandImpact(object oTarget, object oCaster)
{
//--------------------------------------------------------------------------
// Check if the spell has expired (check also removes effects)
//--------------------------------------------------------------------------
if (GZGetDelayedSpellEffectsExpired(nSpellID,oTarget,oCaster))
{
return;
}
int nDam = MaximizeOrEmpower(6,2,GetMetaMagicFeat(), 12);
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);
DelayCommand(6.0f,RunHandImpact(oTarget,oCaster));
}
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
object oTarget = GetSpellTargetObject();
//--------------------------------------------------------------------------
// This spell no longer stacks. If there is one hand, that's enough
//--------------------------------------------------------------------------
if (GetHasSpellEffect(nSpellID,oTarget) || GetHasSpellEffect(462,oTarget) )
{
FloatingTextStrRefOnCreature(100775,OBJECT_SELF,FALSE);
return;
}
int nDuration = GetCasterLevel(OBJECT_SELF);
int nMetaMagic = GetMetaMagicFeat();
//Check for metamagic extend
if (nMetaMagic == METAMAGIC_EXTEND) //Duration is +100%
{
nDuration = nDuration * 2;
}
if(!GetIsReactionTypeFriendly(oTarget))
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_BIGBYS_CRUSHING_HAND, TRUE));
//SR
if(!MyResistSpell(OBJECT_SELF, oTarget))
{
int nCasterModifier = GetCasterAbilityModifier(OBJECT_SELF);
int nCasterRoll = d20(1)
+ nCasterModifier
+ GetCasterLevel(OBJECT_SELF) + 12 + -1;
int nTargetRoll = GetAC(oTarget);
// * grapple HIT succesful,
if (nCasterRoll >= nTargetRoll)
{
// * now must make a GRAPPLE check
// * hold target for duration of spell
nCasterRoll = d20(1) + nCasterModifier
+ GetCasterLevel(OBJECT_SELF) + 12 + 4;
nTargetRoll = /*NEED GetBaseAttackBonus*/
d20(1) + GetBaseAttackBonus(oTarget) + GetSizeModifier(oTarget)
+ GetAbilityModifier(ABILITY_STRENGTH);
if (nCasterRoll >= nTargetRoll)
{
effect eKnockdown = EffectParalyze();
// creatures immune to paralzation are still prevented from moving
if (GetIsImmune(oTarget, EFFECT_TYPE_PARALYZE))
{
eKnockdown = EffectCutsceneImmobilize();
}
effect eHand = EffectVisualEffect(VFX_DUR_BIGBYS_CRUSHING_HAND);
effect eLink = EffectLinkEffects(eKnockdown, eHand);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
eLink, oTarget,
RoundsToSeconds(nDuration));
object oSelf = OBJECT_SELF;
RunHandImpact(oTarget, oSelf);
FloatingTextStrRefOnCreature(2478, OBJECT_SELF);
}
else
{
FloatingTextStrRefOnCreature(83309, OBJECT_SELF);
}
}
}
}
}
in x0_i0_spells
Code: Select all
int GetSizeModifier(object oCreature)
{
int nSize = GetCreatureSize(oCreature);
int nModifier = 0;
switch (nSize)
{
case CREATURE_SIZE_TINY: nModifier = -8; break;
case CREATURE_SIZE_SMALL: nModifier = -4; break;
case CREATURE_SIZE_MEDIUM: nModifier = 0; break;
case CREATURE_SIZE_LARGE: nModifier = 4; break;
case CREATURE_SIZE_HUGE: nModifier = 8; break;
case 20: nModifier = -16; break; //fine
case 21: nModifier = -12; break; //diminutive
case 22: nModifier = 12; break; //gargantuan
case 23: nModifier = 16; break; //colossal
}
return nModifier;
}
As it is intended now it should last for the duration of the spell but be required to do grapple rolls vs the opponent on a round by round basis, this idea was swiped from the crushing hand code which was doing just that for stun purposes.
Hopefully these changes will institute a bit more balance to the spells, as having massive ancient dragons laid out by a bigby's seemed to be a bit odd for me and spurred me to check the equations for the code. Also checks have been instituted in each spell to test for paralysis immunity and to apply cutscene immobilize, this was instituted in crushing hand I believe but not in the grasping, immunity to paralysis should have no effect on a physical grappling situation, so that has been instituted as well.
HerMyT[/code]