diff --git a/TemplePlus/feat.cpp b/TemplePlus/feat.cpp index bf5e7277b..04b6c7d42 100644 --- a/TemplePlus/feat.cpp +++ b/TemplePlus/feat.cpp @@ -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 @@ -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 diff --git a/TemplePlus/python/python_integration_feat.cpp b/TemplePlus/python/python_integration_feat.cpp index 2d100a740..680072d97 100644 --- a/TemplePlus/python/python_integration_feat.cpp +++ b/TemplePlus/python/python_integration_feat.cpp @@ -1,6 +1,7 @@ #include "stdafx.h" #include "python_integration_feat.h" #include "python_object.h" +#include PythonFeatIntegration pyFeatIntegration; @@ -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(featId)); + featId = ElfHash::Hash(featName); + } + auto featEntry = mScripts.find(featId); if (featEntry == mScripts.end()) return false; diff --git a/tpdata/tpmes/feat.mes b/tpdata/tpmes/feat.mes index 2ba34e40d..0c7b46477 100644 --- a/tpdata/tpmes/feat.mes +++ b/tpdata/tpmes/feat.mes @@ -1,3 +1,4 @@ +{216}{Improved Shield Bash} {340}{Improved Sunder} {649}{None} {650}{Exotic Weapon Proficiency} @@ -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.} @@ -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 {} diff --git a/tpdata/tprules/feat_properties.tab b/tpdata/tprules/feat_properties.tab index b1a75b4d2..72153acdd 100644 --- a/tpdata/tprules/feat_properties.tab +++ b/tpdata/tprules/feat_properties.tab @@ -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