From 1f3aa4e11182d2d75e4f22e3f769beede50927f2 Mon Sep 17 00:00:00 2001 From: Shane McGovern Date: Sun, 2 Aug 2026 23:16:10 +0100 Subject: [PATCH] Fix PP UP max PP not shown on stats/summary screen The SummaryMenu (pause menu stats screen and in-battle stats screen) displayed the base PP from the move definition as the max value, ignoring PP Up bonuses. After using a PP UP, the screen would show e.g. 6/5 instead of 6/6. Fix: calculate maxPP with the PP Up bonus (basePP + ppUps * basePP/5), matching the formula used everywhere else -- battle fight menus, ETHER restore, Pokemon Center heal, link protocol, and save editor. Fixes #641 --- src/ui/SummaryMenu.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ui/SummaryMenu.lua b/src/ui/SummaryMenu.lua index c7e7e361..6ff9f8c8 100644 --- a/src/ui/SummaryMenu.lua +++ b/src/ui/SummaryMenu.lua @@ -203,7 +203,8 @@ function SummaryMenu:draw() local mdef = data.moves[mv.id] Font.draw(mdef.name, 16, y) Font.draw(Strings("PP"), 88, y + 8) - Font.draw(("%2d/%2d"):format(mv.pp, mdef.pp), 112, y + 8) + local maxPP = mdef.pp + (mv.ppUps or 0) * math.floor(mdef.pp / 5) + Font.draw(("%2d/%2d"):format(mv.pp, maxPP), 112, y + 8) else Font.draw("-", 16, y) Font.draw("--", 112, y + 8)