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:
@@ -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