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
This commit is contained in:
Shane McGovern
2026-08-02 23:16:10 +01:00
parent 5348ba1c65
commit 1f3aa4e111
+2 -1
View File
@@ -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)