From d4dc72d0f4989417dcbcd1b789db1d41dc32d6c9 Mon Sep 17 00:00:00 2001 From: thibautbus <310327033+thibautbus@users.noreply.github.com> Date: Tue, 11 Aug 2026 11:55:41 +0200 Subject: [PATCH] Fix the old-man demo bag to show 1 Poke Ball in Yellow, 50 in Red/Blue Confirmed against pokeyellow's engine/battle/core.asm: the Viridian old man's demo and Oak's Pikachu catch share the same canned one-item bag (SimulatedInputBattleItemList), quantity 1 -- pokered's equivalent (OldManItemList, old man only, no Pikachu battle type) is quantity 50. The port hardcoded x50 for both versions. --- src/battle/BattleState.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/battle/BattleState.lua b/src/battle/BattleState.lua index 6cee785a..fc9480a3 100644 --- a/src/battle/BattleState.lua +++ b/src/battle/BattleState.lua @@ -2194,8 +2194,14 @@ function BattleState:openOldManBag() self.afterQueue = "menu" self:ui(function() local list + -- The canned one-item bag (POKE_BALL, neither reading from the real + -- inventory) differs by version: pokered's OldManItemList (core.asm + -- :2212-2214) is quantity 50; pokeyellow's SimulatedInputBattleItemList + -- (core.asm:2316-2319), shared by both the Viridian old man's demo and + -- Oak's Pikachu catch, dropped that to quantity 1. + local qty = require("src.core.GameVersion").isYellow() and "x1" or "x50" list = ListMenu.new(game, "ITEMS", { - { value = "POKE_BALL", label = Strings("POKé BALL"), right = "x50" }, + { value = "POKE_BALL", label = Strings("POKé BALL"), right = qty }, }, { script = function(l) l.scriptTimer = (l.scriptTimer or 0) + 1