more buggies CLOSES #960, CLOSES #961, CLOSES #968, CLOSES #995, CLOSES #1006, CLOSES #1009, CLOSES #1013, CLOSES #1021, CLOSES #1031, CLOSES #1044, CLOSES #1049, CLOSES #1050, CLOSES #1045,,

This commit is contained in:
bryanthaboi
2026-08-10 17:06:24 -04:00
parent 7fa758602a
commit c3855cebec
20 changed files with 1837 additions and 70 deletions
+8 -6
View File
@@ -2,8 +2,8 @@
-- flashes back and forth with the evolved form, speeding up, then the
-- new form appears with its cry and the congratulations text.
-- pokered engine/movie/evolution.asm (Evolution_CheckForCancel) polls the
-- joypad during the flash: holding B aborts the evolution -- the mon keeps
-- its species and _StoppedEvolvingText ("Huh? MON stopped evolving!")
-- joypad during the flash: a fresh B press aborts the evolution -- the mon
-- keeps its species and _StoppedEvolvingText ("Huh? MON stopped evolving!")
-- prints. Two kinds are exempt: trade evolutions, which evos_moves.asm
-- routes past the poll entirely (wLinkState == LINK_STATE_TRADING, #213),
-- and stone evolutions, where the B press is read but thrown away because
@@ -47,6 +47,8 @@ function EvolutionState:sgbPalettes(game)
end
local FLASH_FRAMES = 220
-- evolution.asm EvolveMon delays 80 frames before .animLoop, polling nothing (#968, #1031)
local CANCEL_GRACE_FRAMES = 80
local function frontSprite(game, species, mon)
local path, trueColor = require("src.pokemon.Sprites").path(
@@ -83,10 +85,10 @@ function EvolutionState:update(dt)
self.t = self.t + 1
if self.done then return end
local game = self.game
-- evos_moves.asm EvolveMon: each flash iteration polls hJoyHeld and, for
-- a cancelable evolution, aborts when B is held -- the mon keeps its
-- species (Evolution.apply never runs) and _StoppedEvolvingText prints.
if self.cancelable and game.input:isDown("b") then
-- evolution.asm Evolution_CheckForCancel reads hJoy5, a fresh edge rather
-- than a hold, so B held from the level-up box must not cancel (#968, #1031)
if self.cancelable and self.t > CANCEL_GRACE_FRAMES
and game.input:wasPressed("b") then
self.done = true
self.canceled = true
local TextBox = require("src.render.TextBox")