mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-12 16:31:05 +02:00
cc43bd77d2
story2.lua pushed the demo battle straight onto the stack, skipping the flash + wipe that every other wild battle gets. InitWildBattle calls DoBattleTransitionAndInitBattleVariables unconditionally (core.asm:6699) -- there is no BATTLE_TYPE_OLD_MAN or BATTLE_TYPE_PIKACHU special case -- so the old-man tutorial and Oak's Pikachu catch get the wipe like any other wild battle, same as every scripted trainer. Commands.old_man_demo already routed the Viridian old man's tutorial catch through OverworldState:pushBattle for exactly this reason; the fallback it used for a pushBattle-less overworld (ctx.overworld and ctx.overworld.pushBattle then ... else game.stack:push(battle)) was duplicated verbatim in Commands .start_battle and would have been a third copy in story2.lua, so it's pulled into one Commands.pushBattle(ctx, battle) helper instead, used by all three call sites; the fallback branch now logs a warning rather than silently dropping the transition and battle-theme start.