From 8c3ced3cb6804a00b592c73d594ca96bac9be136 Mon Sep 17 00:00:00 2001 From: KPhoenix <68359262+kphoenix137@users.noreply.github.com> Date: Wed, 2 Nov 2022 05:09:31 -0400 Subject: [PATCH] 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. --- Source/panels/charpanel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/panels/charpanel.cpp b/Source/panels/charpanel.cpp index f42572706..74e7d8a18 100644 --- a/Source/panels/charpanel.cpp +++ b/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,