Skip to content

Commit

Permalink
Merge pull request #759 from doug1234/ShieldBash
Browse files Browse the repository at this point in the history
Added Improved Shield Bash feat
  • Loading branch information
doug1234 authored Feb 17, 2024
2 parents c37667a + 2bbd7ce commit 46d16cd
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions TemplePlus/feat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1104,6 +1104,7 @@ char* LegacyFeatSystem::GetFeatDescription(feat_enums feat)
MesLine mesLine(5000 + feat);

if (feat >= FEAT_NONE
|| feat == FEAT_IMPROVED_SHIELD_BASH
|| feat == FEAT_IMPROVED_DISARM
|| feat == FEAT_GREATER_WEAPON_SPECIALIZATION
|| feat == FEAT_IMPROVED_SUNDER
Expand All @@ -1126,7 +1127,9 @@ char* LegacyFeatSystem::GetFeatPrereqDescription(feat_enums feat)
MesLine mesLineFeatDesc(10000 + feat);
MesLine mesLineNone(9998);
MesHandle * mesHnd = feats.featMes;

if (feat >= FEAT_NONE
|| feat == FEAT_IMPROVED_SHIELD_BASH
|| feat == FEAT_IMPROVED_DISARM
|| feat == FEAT_GREATER_WEAPON_SPECIALIZATION
|| feat == FEAT_IMPROVED_SUNDER
Expand Down
6 changes: 6 additions & 0 deletions TemplePlus/python/python_integration_feat.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "stdafx.h"
#include "python_integration_feat.h"
#include "python_object.h"
#include <infrastructure/elfhash.h>

PythonFeatIntegration pyFeatIntegration;

Expand All @@ -10,6 +11,11 @@ PythonFeatIntegration::PythonFeatIntegration()

bool PythonFeatIntegration::CheckPrereq(int featId, objHndl handle, Stat classCodeBeingLevelledUp, Stat abilityScoreBeingIncreased)
{
if (featId < NUM_FEATS) {
auto featName = feats.GetFeatName(static_cast<feat_enums>(featId));
featId = ElfHash::Hash(featName);
}

auto featEntry = mScripts.find(featId);
if (featEntry == mScripts.end())
return false;
Expand Down
3 changes: 3 additions & 0 deletions tpdata/tpmes/feat.mes
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{216}{Improved Shield Bash}
{340}{Improved Sunder}
{649}{None}
{650}{Exotic Weapon Proficiency}
Expand Down Expand Up @@ -105,6 +106,7 @@
{5064} Greater Two Weapon Fighting {You get a third attack with your off-hand weapon, albeit at a -10 penalty.}
{5137} Greater Weapon Specialization{You gain another +2 bonus on all damage rolls you make using the selected weapon, on top of the one from Weapon Specialization.}
{5211} Improved Disarm{You do not provoke an attack of opportunity when you attempt to disarm an opponent, nor does the opponent have a chance to disarm you. You also gain a +4 bonus on the opposed attack roll you make to disarm your opponent.}
{5216} Improved Shield Bash {When you perform a shield bash, you may still apply the shield's shield bonus to your AC.}
{5340} Improved Sunder{When you strike at an object held by an opponent, you do not provoke an attack of opportunity. You also gain a +4 bonus on the attack roll.}
{5658} Diamond Body {You are immune to all poisons.}
{5659} Abundant Step {You can slip magically between spaces, as if using the spell dimension door, once per day. To use this ability you must be wearing a Monk's Belt.}
Expand Down Expand Up @@ -203,6 +205,7 @@
{10064}Greater Two Weapon Fighting {Dex 19, Improved Two-Weapon Fighting, Two-Weapon Fighting, base attack bonus +11.}
{10137} Greater Weapon Specialization {Weapon Specialization + Greater Weapon Focus w/ selected weapon, fighter level 12th}
{10211} Improved Disarm {Int 13, Combat Expertise.}
{10216} Improved Shield Bash {Shield Proficiency.}
{10339} Stunning Fist {Dex 13, Wis 13, Improved Unarmed Strike, base attack bonus +8.}
{10340} Improved Sunder {Str 13, Power Attack.}
{10658} Diamond Body {}
Expand Down
2 changes: 1 addition & 1 deletion tpdata/tprules/feat_properties.tab
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
213 Improved Grapple 18 1 13 1220 1 -1 -1 0 0 0 0 0 0 0 0 0 0
214 Improved Initiative 16 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
215 Improved Overrun 18 0 13 1268 1 -1 -1 0 0 0 0 0 0 0 0 0 0
216 Improved Shield Bash 18 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
216 Improved Shield Bash 16 1278 1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0
217 Improved Trip 144 3 13 1013 1 -1 -1 0 0 0 0 0 0 0 0 0 0
218 Improved Two-Weapon Fighting 16 1345 1 266 6 -1 -1 0 0 0 0 0 0 0 0 0 0
219 Improved Turning 0 -3 1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0
Expand Down

0 comments on commit 46d16cd

Please sign in to comment.