Browse Source

Display correct Armor Class in Char Panel (#5443)

In the hit calculation for a monster hitting a player, the player level is used, which equates to the player always having a 2 * clvl increase to what is displayed in the character panel. This adds it in.
pull/5464/head
KPhoenix 3 years ago committed by GitHub
parent
commit
8c3ced3cb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Source/panels/charpanel.cpp

2
Source/panels/charpanel.cpp

@ -172,7 +172,7 @@ PanelEntry panelEntries[] = {
[]() { return StyledText { UiFlags::ColorWhite, FormatInteger(MyPlayer->_pGold) }; } },
{ N_("Armor class"), { RightColumnLabelX, 163 }, 57, RightColumnLabelWidth,
[]() { return StyledText { GetValueColor(MyPlayer->_pIBonusAC), StrCat(MyPlayer->GetArmor()) }; } },
[]() { return StyledText { GetValueColor(MyPlayer->_pIBonusAC), StrCat(MyPlayer->GetArmor() + MyPlayer->_pLevel * 2) }; } },
{ N_("To hit"), { RightColumnLabelX, 191 }, 57, RightColumnLabelWidth,
[]() { return StyledText { GetValueColor(MyPlayer->_pIBonusToHit), StrCat(MyPlayer->InvBody[INVLOC_HAND_LEFT]._itype == ItemType::Bow ? MyPlayer->GetRangedToHit() : MyPlayer->GetMeleeToHit(), "%") }; } },
{ N_("Damage"), { RightColumnLabelX, 219 }, 57, RightColumnLabelWidth,

Loading…
Cancel
Save