Spider Car Unleashed

CLOSES #1483, CLOSES #1610, CLOSES #1615, CLOSES #1646, CLOSES #1649, CLOSES #1651, CLOSES #1653, CLOSES #1656, CLOSES #1683, CLOSES #1685, CLOSES #1686, CLOSES #1687, CLOSES #1688, CLOSES #1689, CLOSES #1690, CLOSES #1693, CLOSES #1694, CLOSES #1695, CLOSES #1696, CLOSES #1702, CLOSES #1704, CLOSES #1705, CLOSES #1706, CLOSES #1707, CLOSES #1708, CLOSES #1710, CLOSES #1711, CLOSES #1712, CLOSES #1713, CLOSES #1716, CLOSES #1717, CLOSES #1718, CLOSES #1719, CLOSES #1720, CLOSES #1721, CLOSES #1725, CLOSES #1732, CLOSES #1745, CLOSES #1748, CLOSES #1749, CLOSES #1751, CLOSES #1754
This commit is contained in:
bryanthaboi
2026-08-24 07:52:05 -04:00
parent f895293217
commit 1905261c5b
180 changed files with 19567 additions and 1556 deletions
+37 -25
View File
@@ -66,6 +66,7 @@ local function gameWith(opts)
_VermilionCitySailor1YouNeedATicketText =
"You need a ticket\nto get aboard.",
_VermilionCitySailor1ShipSetSailText = "The ship set sail.",
_VermilionCitySailor1WelcomeToSSAnneText = "Welcome to S.S.\nANNE!",
_SSAnneCaptainsRoomRubCaptainsBackText = "Rub-rub...",
_SSAnneCaptainsRoomCaptainIFeelMuchBetterText = "I feel better!",
_SSAnneCaptainsRoomCaptainReceivedHM01Text = "Got HM01!",
@@ -143,25 +144,36 @@ do
check(#pushed == 0, "no spurious dialog off the check")
end
-- Sailor talk after ship left: ShipSetSail branch (row script).
-- Sailor talk: once she has sailed he only reports it gone, and before
-- that an A press is the plain greeting, never the ticket check (#1651).
-- scripts/VermilionCity.asm:158-198
do
local ScriptRunner = require("src.script.ScriptRunner")
local game = gameWith({ flags = { EVENT_SS_ANNE_LEFT = true } })
local rows = city.talk.TEXT_VERMILIONCITY_SAILOR1
local runner = ScriptRunner.new(game, nil)
runner:run(rows, {})
local guard = 0
while runner:isRunning() and guard < 200 do
guard = guard + 1
if game.stack and game._pushed then
local box = game._pushed[#game._pushed]
if box and box.done then box.done() end
end
runner:update()
end
local last = game._pushed[#game._pushed]
eq(last and last.text, "The ship set sail.",
local talk = city.talk.TEXT_VERMILIONCITY_SAILOR1
local game, pushed = gameWith({ flags = { EVENT_SS_ANNE_LEFT = true } })
talk(game, owWith({}), nil, function() end)
eq(pushed[#pushed] and pushed[#pushed].text, "The ship set sail.",
"talk after ship left shows ShipSetSail")
game, pushed = gameWith({})
local ow = owWith({})
ow.player.cellX, ow.player.cellY, ow.player.facing = 18, 30, "right"
talk(game, ow, nil, function() end)
eq(pushed[#pushed] and pushed[#pushed].text, "Welcome to S.S.\nANNE!",
"facing him from the west is the plain greeting, no ticket check")
game, pushed = gameWith({})
ow = owWith({})
ow.player.cellX, ow.player.cellY, ow.player.facing = 19, 29, "down"
talk(game, ow, nil, function() end)
eq(pushed[#pushed] and pushed[#pushed].text, "Welcome to S.S.\nANNE!",
"talking from in front of him is the plain greeting too")
game, pushed = gameWith({})
ow = owWith({})
ow.player.cellX, ow.player.cellY, ow.player.facing = 19, 31, "up"
talk(game, ow, nil, function() end)
eq(pushed[#pushed] and pushed[#pushed].text, "Welcome to S.S.\nANNE!",
"and from behind him")
end
-- Departure cutscene: Music_Surfing + EVENT_SS_ANNE_LEFT via Flags.set.
@@ -180,22 +192,22 @@ do
check(ow._queued ~= nil, "departure queues the sail-away script")
-- #360: the surf override must NOT ride into Vermilion City, and she
-- sails west block by block
local kept, horns, slid, underPlayer = false, 0, 0, false
local kept, horns, sails, shuffled, faced = false, 0, 0, 0, false
for _, row in ipairs(ow._queued or {}) do
if row[1] == "play_music" and row[3] and row[3].keep then kept = true end
if row[1] == "play_sound" and row[2] == "SS_Anne_Horn" then
horns = horns + 1
end
if row[1] == "replace_block" then
slid = slid + 1
if row[2] == 7 and row[3] == 1 then underPlayer = true end
end
if row[1] == "ss_anne_departs" then sails = sails + 1 end
if row[1] == "replace_block" then shuffled = shuffled + 1 end
if row[1] == "face_player_dir" and row[2] == "down" then faced = true end
end
eq(kept, false, "departure lets VERMILION_CITY's own theme take the warp")
eq(horns, 2, "the horn blows before and after she sails")
check(slid > 8, "she sails west block by block instead of vanishing")
-- scripts/VermilionDock.asm:182-203 (#1211)
eq(underPlayer, true, "the gangway block under the player is erased too")
eq(sails, 1, "she slides west as one animation, not a block shuffle")
eq(shuffled, 0, "and no hull block is stamped across the dock any more")
-- scripts/VermilionDock.asm:50 (#1689)
eq(faced, true, "he keeps facing down until he walks out")
end
-- Captain rub jingle: play_once Music_PkmnHealed sits after the rub text.