tumbledemerald-legacy/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc
2022-05-19 17:14:13 +00:00

57 lines
2.1 KiB
PHP

.set LOCALID_ATTENDANT, 1
BattleFrontier_BattleTowerCorridor_MapScripts::
map_script MAP_SCRIPT_ON_LOAD, BattleFrontier_BattleTowerCorridor_OnLoad
map_script MAP_SCRIPT_ON_FRAME_TABLE, BattleFrontier_BattleTowerCorridor_OnFrame
.byte 0
BattleFrontier_BattleTowerCorridor_OnLoad:
goto_if_eq VAR_0x8006, 1, BattleFrontier_BattleTowerCorridor_EventScript_OpenFarDoor
setmetatile 12, 0, METATILE_BattleFrontier_CorridorOpenDoor_Top, FALSE
setmetatile 12, 1, METATILE_BattleFrontier_CorridorOpenDoor_Bottom, FALSE
end
BattleFrontier_BattleTowerCorridor_EventScript_OpenFarDoor::
setmetatile 15, 0, METATILE_BattleFrontier_CorridorOpenDoor_Top, FALSE
setmetatile 15, 1, METATILE_BattleFrontier_CorridorOpenDoor_Bottom, FALSE
end
BattleFrontier_BattleTowerCorridor_OnFrame:
map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattleTowerCorridor_EventScript_EnterCorridor
.2byte 0
BattleFrontier_BattleTowerCorridor_EventScript_EnterCorridor::
setvar VAR_TEMP_0, 1
goto_if_eq VAR_0x8006, 1, BattleFrontier_BattleTowerCorridor_EventScript_WalkToFarDoor
applymovement LOCALID_ATTENDANT, BattleFrontier_BattleTowerCorridor_Movement_AttendantWalkToDoor
applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerCorridor_Movement_PlayerWalkToDoor
waitmovement 0
goto BattleFrontier_BattleTowerCorridor_EventScript_WarpToBattleRoom
BattleFrontier_BattleTowerCorridor_EventScript_WalkToFarDoor::
applymovement LOCALID_ATTENDANT, BattleFrontier_BattleTowerCorridor_Movement_AttendantWalkToFarDoor
applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleTowerCorridor_Movement_PlayerWalkToFarDoor
waitmovement 0
BattleFrontier_BattleTowerCorridor_EventScript_WarpToBattleRoom::
setvar VAR_TEMP_0, 0
warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_BATTLE_ROOM, 4, 8
waitstate
end
BattleFrontier_BattleTowerCorridor_Movement_PlayerWalkToFarDoor:
walk_right
BattleFrontier_BattleTowerCorridor_Movement_AttendantWalkToFarDoor:
walk_right
walk_right
BattleFrontier_BattleTowerCorridor_Movement_PlayerWalkToDoor:
walk_right
BattleFrontier_BattleTowerCorridor_Movement_AttendantWalkToDoor:
walk_right
walk_right
walk_right
walk_up
set_invisible
step_end