Files
gen1recomp/docs
Shane McGovern 89c7959c70 fix(game3): gate the warp-cell walkable repair on the metatile behavior
Collision.installWarps force-marked every map-header warp cell walkable. That
is right for the outdoor MB_WARP_DOOR tiles extract can leave solid, but it also
opened cells that only carry a dead warp event. PalletTown_PlayersHouse_1F has
one at (3,9): the wall tile directly left of the door mat, mid 26, coll 1,
behavior 0x00 MB_NORMAL. pret never lets the player stand there, so the warp
never fires; the forced COLL_DOOR let the player walk out of the house through
the wall and land in PalletTown.

The repair now fires only when the behavior is unreadable (tileset attrs stopped
before that mid, so Collision.behavior returns nil) or is a behavior pret would
actually warp on. Collision.isWarpMetatileBehavior covers 0x60-0x6F plus 0x71,
matching field_control_avatar.c: the arrow warps (TryArrowWarp), the directional
stair warps (IsDirectionalStairWarpMetatileBehavior), and everything
IsWarpMetatileBehavior accepts (cave door, ladder, fall warp, regular warp,
Lavaridge 1F warp, warp door, escalators, union-room warp).

Warp indexing is unchanged: a dead warp on a wall is still registered, only the
grid write is gated.

tests/engine/firered_house_wall_warp_bug2297.lua is ROM-free: it embeds the pret
13x10 map.bin grid and the `building` metatile attributes, translates them with
the real ScriptingCollision.fromCell, binds the real Versions.WARPS table, and
asserts the wall stays solid, the four warp cells still behave, the repair still
applies for unreadable attrs and live warp behaviors, and an exhaustive
0x00-0xFF table pins the predicate. It fails 6 checks against the pre-fix file.

luajit tests/run_engine.lua: 585/585 suites passed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-19 09:19:26 +01:00
..
2026-08-24 07:52:05 -04:00
2026-08-28 10:14:44 -04:00
ios
2026-07-30 16:03:35 -04:00
2026-08-28 10:14:44 -04:00
2026-09-18 17:19:05 -04:00
2026-09-18 07:53:42 -04:00
2026-09-16 16:42:59 -04:00
2026-08-21 14:38:54 -04:00
2026-08-18 14:19:42 -04:00