mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-12 00:10:56 +02:00
Fix champion rival walk-out route
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
+10
-15
@@ -1067,23 +1067,18 @@ local championsRoomRivalScript = {
|
||||
{ "show_text", "_ChampionsRoomOakComeWithMeText" }, -- 23
|
||||
{ "move_npc", 2, "up", 2 }, -- 24 OakExitChampionsRoomMovement
|
||||
{ "hide_object", "CHAMPIONS_ROOM", "CHAMPIONSROOM_OAK" }, -- 25
|
||||
-- ChampionsRoomPlayerFollowsOakScript / WalkToHallOfFame_RLEMovement
|
||||
-- (PAD_UP 4, PAD_LEFT 1): the player walks out after Oak instead of the
|
||||
-- screen just fading on the spot (#704). The entrance walk leaves the
|
||||
-- player at (4,3) and both north-wall warps sit on row 0, so the original
|
||||
-- only ever spends three of those simulated steps -- CheckWarpsNoCollision
|
||||
-- takes the HALL_OF_FAME warp the moment the walk lands on (4,0) and the
|
||||
-- trailing UP/LEFT are dropped. Scripted steps ignore collision here just
|
||||
-- as they do in the original (CollisionCheckOnLand skips its checks while
|
||||
-- wSimulatedJoypadStatesIndex is non-zero), so stepping through the
|
||||
-- rival's cell at (4,2) is the ported behavior, not a clip. Re-reported
|
||||
-- as a clip in #847 and re-checked against home/overworld.asm
|
||||
-- CollisionCheckOnLand, which is still the authority: do not "fix" it.
|
||||
{ "move_player", "up", 3 }, -- 26
|
||||
-- ChampionsRoomPlayerFollowsOakScript / WalkToHallOfFame_RLEMovement.
|
||||
-- The player walks out after Oak instead of the screen just fading on the
|
||||
-- spot (#704). Route one tile right before walking north so the player
|
||||
-- reaches the north-wall HALL_OF_FAME warp without sharing the rival's
|
||||
-- (4,2) cell. The original simulated movement bypasses entity collision,
|
||||
-- but this scene should not visibly walk through the defeated rival.
|
||||
{ "move_player", "right", 1 }, -- 26
|
||||
{ "move_player", "up", 3 }, -- 27
|
||||
-- hand the induction off to the HALL_OF_FAME room (consumed by its
|
||||
-- onEnter), then warp up into it (destWarp 1 lands at (4,7) facing up)
|
||||
{ "set_field", "pendingHallOfFame", true }, -- 27
|
||||
{ "warp", "HALL_OF_FAME", 4, 7, "up" }, -- 28
|
||||
{ "set_field", "pendingHallOfFame", true }, -- 28
|
||||
{ "warp", "HALL_OF_FAME", 4, 7, "up" }, -- 29
|
||||
}
|
||||
|
||||
M.CHAMPIONS_ROOM = {
|
||||
|
||||
@@ -195,7 +195,7 @@ return function(game)
|
||||
ow:queueScript(slice, { npc = rival })
|
||||
|
||||
local startY = ow.player.cellY
|
||||
local minY, walkShot = startY, false
|
||||
local minY, walkShot, sharedCell = startY, false, false
|
||||
local hof
|
||||
for i = 1, 5000 do
|
||||
local top = game.stack:top()
|
||||
@@ -205,8 +205,9 @@ return function(game)
|
||||
end
|
||||
local w = game.overworld
|
||||
if w and w.map and w.map.id == "CHAMPIONS_ROOM" then
|
||||
local y = w.player.cellY
|
||||
local x, y = w.player.cellX, w.player.cellY
|
||||
if y < minY then minY = y end
|
||||
if x == rival.cellX and y == rival.cellY then sharedCell = true end
|
||||
if y <= 2 and not walkShot then
|
||||
walkShot = U.shot(game, DIR .. "/hof704_follows_oak.png")
|
||||
end
|
||||
@@ -215,6 +216,7 @@ return function(game)
|
||||
end
|
||||
check("the player walked out of the room before the warp (#704)",
|
||||
minY < startY)
|
||||
check("the player routed around the rival", not sharedCell)
|
||||
check("walk-out screenshot", walkShot)
|
||||
check("the induction started", hof ~= nil)
|
||||
if not hof then
|
||||
|
||||
@@ -60,6 +60,17 @@ for _, r in ipairs(rows) do
|
||||
end
|
||||
check(not hasRecord, "CHAMPIONS_ROOM rival script no longer calls record_hall_of_fame")
|
||||
|
||||
-- The post-battle walk takes the right-hand detour before heading north, so
|
||||
-- the player does not visibly pass through the rival at (4,2).
|
||||
local route = {}
|
||||
for _, r in ipairs(rows) do
|
||||
if r[1] == "move_player" then route[#route + 1] = r end
|
||||
end
|
||||
eq(route[#route - 1] and route[#route - 1][2], "right",
|
||||
"walk-out route first moves right around the rival")
|
||||
eq(route[#route] and route[#route][2], "up",
|
||||
"walk-out route then heads north to Hall of Fame")
|
||||
|
||||
-- (3) Commands.face_player_dir sets the player's facing
|
||||
local Commands = require("src.script.Commands")
|
||||
check(type(Commands.face_player_dir) == "function", "Commands.face_player_dir is a function")
|
||||
|
||||
Reference in New Issue
Block a user