Skip to content

Commit

Permalink
Merge pull request #392 from doug1234/BlackguardDM
Browse files Browse the repository at this point in the history
Blackguards can now use Divine Might issue #372.
  • Loading branch information
doug1234 authored May 14, 2020
2 parents 501f69a + 2007aac commit b81c021
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions TemplePlus/feat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -829,10 +829,10 @@ uint32_t LegacyFeatSystem::FeatPrereqsCheck(objHndl objHnd, feat_enums featIdx,
auto clericLvl = objects.StatLevelGet(objHnd, stat_level_cleric);
auto clericTurnLvl = clericLvl + (classCodeBeingLevelledUp == stat_level_cleric) - 0;

auto otherTurnLvl = max(0, d20Sys.D20QueryPython(objHnd, "Turn Undead Level"));
auto otherTurnLvl = max(0, d20Sys.D20QueryPython(objHnd, "Turn Undead Level", 0, classCodeBeingLevelledUp));
otherTurnLvl += max(0, d20Sys.D20QueryPython(objHnd, "Turn Undead Level", 1, classCodeBeingLevelledUp));

auto highestTurnLvl = clericTurnLvl + paladinTurnLvl + otherTurnLvl;


if (featIdx == FEAT_TURN_UNDEAD){
if (!(critterAlignment & ALIGNMENT_EVIL || critterAlignment == (ALIGNMENT_CHAOTIC | ALIGNMENT_LAWFUL)))// TODO: is this a bug??? might be harmless mistake, might be deliberate
Expand Down
Binary file modified tpdata/co8infra.dat
Binary file not shown.
Binary file modified tpdata/kotbfixes.dat
Binary file not shown.
Binary file modified tpdata/tpgamefiles.dat
Binary file not shown.
5 changes: 4 additions & 1 deletion tpdatasrc/tpgamefiles/scr/tpModifiers/blackguard.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ def BlackguardSneakAttackDice(attachee, args, evt_obj):
return 0

def BlackguardRebukeUndeadLevel(attachee, args, evt_obj):
level_up = 0
if evt_obj.data1 != 1: # rebuke undead
return 0
blg_lvl = attachee.stat_level_get(classEnum)
if evt_obj.data2 == classEnum: #class leveling up (0 if not called on level up)
level_up = 1
blg_lvl = attachee.stat_level_get(classEnum) + level_up
if blg_lvl < 3:
return 0
evt_obj.return_val += blg_lvl - 2
Expand Down

0 comments on commit b81c021

Please sign in to comment.