mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-17 19:24:01 +02:00
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:
@@ -203,7 +203,8 @@ function SummaryMenu:draw()
|
|||||||
local mdef = data.moves[mv.id]
|
local mdef = data.moves[mv.id]
|
||||||
Font.draw(mdef.name, 16, y)
|
Font.draw(mdef.name, 16, y)
|
||||||
Font.draw(Strings("PP"), 88, y + 8)
|
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
|
else
|
||||||
Font.draw("-", 16, y)
|
Font.draw("-", 16, y)
|
||||||
Font.draw("--", 112, y + 8)
|
Font.draw("--", 112, y + 8)
|
||||||
|
|||||||
Reference in New Issue
Block a user