Hi, as the title says.
What i want to do is to use the rule of weapon finesse that is described in the Complete arcane book that allows you to treat touch spells as light weapons, using your Dex modifier in melee touch attacks.
I was thinking on doing something like this:
int nTouchAttackRoll;
if (GetHasFeat(42)) //If haves Weapon Finnesse
nTouchAttackRoll = TouchAttackRanged(oTarget);
else
nTouchAttackRoll = TouchAttackMelee(oTarget);
The problem with this is that it will be using the bonuses from Ranged touch attack feats instead of the melee ones. I know that the function allows you add a Bonus to the touch attack roll and i possibly could add the Melee touch attack feats there but the problem is that there would be a unwanted stacking with the Ranged touch attack feats.
//Like TouchAttackMelee, but includes proper DEX modifier if the caller has Weapon Finesse.
void EnhancedTouchAttackMelee(object oTarget, int bDisplayFeedback = TRUE, int nBonus = 0)
{
object oPC = OBJECT_SELF;
if (GetHasFeat(FEAT_WEAPON_FINESSE, oPC, TRUE) == TRUE)
{
int nDIFF = GetAbilityModifier(ABILITY_DEXTERITY, oPC) - GetAbilityModifier(ABILITY_STRENGTH, oPC);
if (nDIFF > 0) nBonus = nBonus + nDIFF;
}
TouchAttackMelee(oTarget, bDisplayFeedback, nBonus);
}
2 Likes
Thanks, that’s will work perfectly, i modified it a bit since Weapon Finesse only applies if your Dex mod is higher than your Str mod and also i needed the result of the touch roll.
int EnhancedTouchAttackMelee(object oTarget, int bDisplayFeedback = TRUE, int nBonus = 0)
{
object oPC = OBJECT_SELF;
int nDexMod = GetAbilityModifier(ABILITY_DEXTERITY, oPC);
int nStrMod = GetAbilityModifier(ABILITY_STRENGTH, oPC);
if (GetHasFeat(FEAT_WEAPON_FINESSE, oPC) && nDexMod > nStrMod)
{
int nDIFF = nDexMod - nStrMod;
if (nDIFF > 0) nBonus = nBonus + nDIFF;
}
return TouchAttackMelee(oTarget, bDisplayFeedback, nBonus);
}
That’s already implied in the nDIFF > 0. It can’t be more than 0 if Dex is not more than Str
1 Like