pokeemerald/data/scripts/battle_pike.inc

255 lines
9.6 KiB
PHP
Raw Normal View History

BattleFrontier_BattlePikeRoomNormal_MapScripts_2C3E1B: @ 82C3E1B
map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattlePikeRoom_OnTransition
map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePikeRoom_OnWarp
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRoom_OnTransition: @ 82C3E25
2019-11-29 08:00:19 +01:00
pike_setroomobjects
pike_getroomtype
2019-10-05 16:52:48 +02:00
switch VAR_RESULT
2019-12-09 08:10:42 +01:00
case PIKE_ROOM_SINGLE_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_SetOneObjectRoomPos
case PIKE_ROOM_HEAL_FULL, BattleFrontier_BattlePikeRoomNormal_EventScript_SetOneObjectRoomPos
case PIKE_ROOM_NPC, BattleFrontier_BattlePikeRoomNormal_EventScript_SetNPCRoomObjPos
case PIKE_ROOM_STATUS, BattleFrontier_BattlePikeRoomNormal_EventScript_SetTwoObjectRoomPos
case PIKE_ROOM_HEAL_PART, BattleFrontier_BattlePikeRoomNormal_EventScript_SetOneObjectRoomPos
case PIKE_ROOM_DOUBLE_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_SetDoubleBattleObjPos
case PIKE_ROOM_HARD_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_SetTwoObjectRoomPos
case PIKE_ROOM_BRAIN, BattleFrontier_BattlePikeRoomNormal_EventScript_SetBrainRoomObjPos
2019-10-05 16:52:48 +02:00
end
2019-09-27 18:22:58 +02:00
2019-12-09 08:10:42 +01:00
BattleFrontier_BattlePikeRoomNormal_EventScript_SetDoubleBattleObjPos:: @ 82C3E93
2019-10-05 16:52:48 +02:00
setobjectxyperm 1, 2, 5
setobjectxyperm 2, 6, 5
end
2019-09-27 18:22:58 +02:00
2019-12-09 08:10:42 +01:00
BattleFrontier_BattlePikeRoomNormal_EventScript_SetTwoObjectRoomPos:: @ 82C3EA2
2019-10-05 16:52:48 +02:00
setobjectxyperm 1, 4, 4
setobjectxyperm 2, 3, 4
end
2019-09-27 18:22:58 +02:00
2019-12-09 08:10:42 +01:00
BattleFrontier_BattlePikeRoomNormal_EventScript_SetOneObjectRoomPos:: @ 82C3EB1
2019-10-05 16:52:48 +02:00
setobjectxyperm 1, 4, 4
setobjectxyperm 2, 0, 0
end
2019-09-27 18:22:58 +02:00
2019-12-09 08:10:42 +01:00
BattleFrontier_BattlePikeRoomNormal_EventScript_SetNPCRoomObjPos:: @ 82C3EC0
2019-10-05 16:52:48 +02:00
setobjectxyperm 1, 5, 5
setobjectxyperm 2, 0, 0
end
2019-09-27 18:22:58 +02:00
2019-12-09 08:10:42 +01:00
BattleFrontier_BattlePikeRoomNormal_EventScript_SetBrainRoomObjPos:: @ 82C3ECF
2019-10-05 16:52:48 +02:00
setobjectxyperm 1, 4, 3
setobjectxyperm 2, 4, 4
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRoom_OnWarp: @ 82C3EDE
2019-12-09 08:10:42 +01:00
map_script_2 VAR_TEMP_4, 0, BattleFrontier_BattlePikeRoomNormal_EventScript_InitRoomObjects
2019-10-05 16:52:48 +02:00
.2byte 0
2019-09-27 18:22:58 +02:00
2019-12-09 08:10:42 +01:00
BattleFrontier_BattlePikeRoomNormal_EventScript_InitRoomObjects:: @ 82C3EE8
setvar VAR_OBJ_GFX_ID_1, OBJ_EVENT_GFX_LINK_RECEPTIONIST
setvar VAR_OBJ_GFX_ID_0, OBJ_EVENT_GFX_LINK_RECEPTIONIST
2019-11-29 08:00:19 +01:00
pike_getroomtype
compare VAR_RESULT, PIKE_ROOM_STATUS
2019-12-09 08:10:42 +01:00
goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom
compare VAR_RESULT, PIKE_ROOM_HARD_BATTLE
2019-12-09 08:10:42 +01:00
goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom
compare VAR_RESULT, PIKE_ROOM_DOUBLE_BATTLE
2019-12-09 08:10:42 +01:00
goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom
compare VAR_RESULT, PIKE_ROOM_BRAIN
2019-12-09 08:10:42 +01:00
goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_InitBrainRoomObjects
hideobjectat 2, MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL
2019-10-05 16:52:48 +02:00
setvar VAR_TEMP_4, 1
turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH
2019-10-05 16:52:48 +02:00
end
2019-09-27 18:22:58 +02:00
2019-12-09 08:10:42 +01:00
BattleFrontier_BattlePikeRoomNormal_EventScript_InitTwoObjectRoom:: @ 82C3F35
2019-10-05 16:52:48 +02:00
setvar VAR_TEMP_4, 1
turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH
2019-10-05 16:52:48 +02:00
end
2019-09-27 18:22:58 +02:00
2019-12-09 08:10:42 +01:00
BattleFrontier_BattlePikeRoomNormal_EventScript_InitBrainRoomObjects:: @ 82C3F3F
2019-10-05 16:52:48 +02:00
setvar VAR_TEMP_4, 1
turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH
2019-12-09 08:10:42 +01:00
hideobjectat 1, MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL @ Pike Queen hidden initially
2019-10-05 16:52:48 +02:00
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeThreePathRoom_EventScript_LeftRoomWarp:: @ 82C3F4E
setvar VAR_0x8007, PIKE_ROOM_LEFT
goto BattleFrontier_BattlePikeThreePathRoom_EventScript_RoomWarp
2019-10-05 16:52:48 +02:00
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeThreePathRoom_EventScript_CenterRoomWarp:: @ 82C3F59
setvar VAR_0x8007, PIKE_ROOM_CENTER
goto BattleFrontier_BattlePikeThreePathRoom_EventScript_RoomWarp
2019-10-05 16:52:48 +02:00
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeThreePathRoom_EventScript_RightRoomWarp:: @ 82C3F64
setvar VAR_0x8007, PIKE_ROOM_RIGHT
goto BattleFrontier_BattlePikeThreePathRoom_EventScript_RoomWarp
2019-10-05 16:52:48 +02:00
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeThreePathRoom_EventScript_RoomWarp:: @ 82C3F6F
2019-11-29 08:00:19 +01:00
pike_get PIKE_DATA_WIN_STREAK
2019-10-05 16:52:48 +02:00
addvar VAR_RESULT, 1
2019-11-29 08:00:19 +01:00
pike_set PIKE_DATA_WIN_STREAK, VAR_RESULT
2019-11-24 22:58:40 +01:00
frontier_get FRONTIER_DATA_BATTLE_NUM
2019-10-05 16:52:48 +02:00
addvar VAR_RESULT, 1
2019-11-24 22:58:40 +01:00
frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT
2019-11-29 08:00:19 +01:00
pike_setnextroom
pike_getroomtype
2019-10-05 16:52:48 +02:00
switch VAR_RESULT
case PIKE_ROOM_SINGLE_BATTLE, BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpNPCRoom
case PIKE_ROOM_HEAL_FULL, BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpNPCRoom
case PIKE_ROOM_NPC, BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpNPCRoom
case PIKE_ROOM_STATUS, BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpNPCRoom
case PIKE_ROOM_HEAL_PART, BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpNPCRoom
case PIKE_ROOM_WILD_MONS, BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpWildMonRoom
case PIKE_ROOM_HARD_BATTLE, BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpNPCRoom
case PIKE_ROOM_DOUBLE_BATTLE, BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpNPCRoom
case PIKE_ROOM_BRAIN, BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpNPCRoom
end
BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpNPCRoom:: @ 82C4030
2019-11-26 02:00:04 +01:00
applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoom_Movement_HidePlayer
2019-10-05 16:52:48 +02:00
waitmovement 0
call BattleFrontier_BattlePike_EventScript_CloseCurtain
warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL, 255, 4, 7
2019-10-05 16:52:48 +02:00
waitstate
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpWildMonRoom:: @ 82C4049
2019-11-26 02:00:04 +01:00
applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoom_Movement_HidePlayer
2019-10-05 16:52:48 +02:00
waitmovement 0
call BattleFrontier_BattlePike_EventScript_CloseCurtain
warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_WILD_MONS, 255, 4, 19
2019-10-05 16:52:48 +02:00
waitstate
end
2019-09-27 18:22:58 +02:00
2019-12-09 08:10:42 +01:00
BattleFrontier_BattlePikeThreePathRoom_EventScript_SetEnteredRoom:: @ 82C4062
2019-10-05 16:52:48 +02:00
setvar VAR_TEMP_3, 1
setvar VAR_TEMP_2, 1
end
2019-09-27 18:22:58 +02:00
2019-12-09 08:10:42 +01:00
BattleFrontier_BattlePikeThreePathRoom_EventScript_NoTurningBack:: @ 82C406D
2019-10-05 16:52:48 +02:00
setvar VAR_TEMP_3, 0
setvar VAR_TEMP_2, 0
lockall
msgbox BattleFrontier_BattlePike_Text_PathBlockedNoTurningBack, MSGBOX_DEFAULT
2019-10-05 16:52:48 +02:00
closemessage
end
2019-09-27 18:22:58 +02:00
2019-12-09 08:10:42 +01:00
BattleFrontier_BattlePikeRoomNormal_EventScript_SetEnteredRoom:: @ 82C4082
2019-10-05 16:52:48 +02:00
setvar VAR_TEMP_3, 1
setvar VAR_TEMP_2, 1
end
2019-09-27 18:22:58 +02:00
2019-12-09 08:10:42 +01:00
BattleFrontier_BattlePikeRoomNormal_EventScript_NoTurningBack:: @ 82C408D
2019-10-05 16:52:48 +02:00
setvar VAR_TEMP_3, 0
setvar VAR_TEMP_2, 0
lockall
msgbox BattleFrontier_BattlePike_Text_PathBlockedNoTurningBack, MSGBOX_DEFAULT
2019-10-05 16:52:48 +02:00
closemessage
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRoomNormal_EventScript_Exit:: @ 82C40A2
2019-11-29 08:00:19 +01:00
pike_ispartyfullhealth
compare VAR_RESULT, TRUE
call_if_eq BattleFrontier_BattlePikeRoom_EventScript_DisableHealing
compare VAR_RESULT, TRUE
call_if_ne BattleFrontier_BattlePikeRoom_EventScript_EnableHealing
2019-11-29 08:00:19 +01:00
pike_get PIKE_DATA_WIN_STREAK
2019-10-05 16:52:48 +02:00
addvar VAR_RESULT, 1
2019-11-29 08:00:19 +01:00
pike_set PIKE_DATA_WIN_STREAK, VAR_RESULT
2019-11-24 22:58:40 +01:00
frontier_get FRONTIER_DATA_BATTLE_NUM
2019-10-05 16:52:48 +02:00
addvar VAR_RESULT, 1
2019-11-24 22:58:40 +01:00
frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT
2019-11-29 08:00:19 +01:00
pike_isfinalroom
compare VAR_RESULT, TRUE
call_if_eq BattleFrontier_BattlePikeRoom_EventScript_WarpToFinalRoom
compare VAR_RESULT, FALSE
call_if_eq BattleFrontier_BattlePikeRoom_EventScript_WarpToThreePathRoom
2019-10-05 16:52:48 +02:00
waitstate
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRoom_EventScript_DisableHealing:: @ 82C4128
2019-11-29 08:00:19 +01:00
pike_nohealing TRUE
2019-10-05 16:52:48 +02:00
return
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRoom_EventScript_EnableHealing:: @ 82C4136
2019-11-29 08:00:19 +01:00
pike_nohealing FALSE
2019-10-05 16:52:48 +02:00
return
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRoom_EventScript_WarpToFinalRoom:: @ 82C4144
2019-11-26 02:00:04 +01:00
applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoom_Movement_HidePlayer
2019-10-05 16:52:48 +02:00
waitmovement 0
call BattleFrontier_BattlePike_EventScript_CloseCurtain
warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_FINAL, 255, 2, 7
2019-10-05 16:52:48 +02:00
return
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRoom_EventScript_WarpToThreePathRoom:: @ 82C415C
2019-11-26 02:00:04 +01:00
applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoom_Movement_HidePlayer
2019-10-05 16:52:48 +02:00
waitmovement 0
call BattleFrontier_BattlePike_EventScript_CloseCurtain
2019-10-05 16:52:48 +02:00
warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_THREE_PATH_ROOM, 255, 6, 10
return
2019-09-27 18:22:58 +02:00
2019-12-09 08:10:42 +01:00
BattleFrontier_BattlePikeRoomWildMons_EventScript_Exit:: @ 82C4174
2019-11-29 08:00:19 +01:00
pike_exitwildmonroom
pike_ispartyfullhealth
compare VAR_RESULT, TRUE
call_if_eq BattleFrontier_BattlePikeRoom_EventScript_DisableHealing
compare VAR_RESULT, TRUE
call_if_ne BattleFrontier_BattlePikeRoom_EventScript_EnableHealing
2019-11-29 08:00:19 +01:00
pike_get PIKE_DATA_WIN_STREAK
2019-10-05 16:52:48 +02:00
addvar VAR_RESULT, 1
2019-11-29 08:00:19 +01:00
pike_set PIKE_DATA_WIN_STREAK, VAR_RESULT
2019-11-24 22:58:40 +01:00
frontier_get FRONTIER_DATA_BATTLE_NUM
2019-10-05 16:52:48 +02:00
addvar VAR_RESULT, 1
2019-11-24 22:58:40 +01:00
frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT
2019-11-29 08:00:19 +01:00
pike_isfinalroom
compare VAR_RESULT, TRUE
call_if_eq BattleFrontier_BattlePikeRoom_EventScript_WarpToFinalRoom
compare VAR_RESULT, FALSE
call_if_eq BattleFrontier_BattlePikeRoom_EventScript_WarpToThreePathRoom
2019-10-05 16:52:48 +02:00
waitstate
end
2019-09-27 18:22:58 +02:00
2019-12-09 08:10:42 +01:00
BattleFrontier_BattlePikeRoomWildMons_EventScript_SetEnteredRoom:: @ 82C4202
2019-10-05 16:52:48 +02:00
setvar VAR_TEMP_3, 1
setvar VAR_TEMP_2, 1
end
2019-09-27 18:22:58 +02:00
2019-12-09 08:10:42 +01:00
BattleFrontier_BattlePikeRoomWildMons_EventScript_NoTurningBack:: @ 82C420D
2019-10-05 16:52:48 +02:00
setvar VAR_TEMP_3, 0
setvar VAR_TEMP_2, 0
lockall
msgbox BattleFrontier_BattlePike_Text_PathBlockedNoTurningBack, MSGBOX_DEFAULT
2019-10-05 16:52:48 +02:00
closemessage
end
2019-09-27 18:22:58 +02:00
2019-10-07 02:04:30 +02:00
BattleFrontier_BattlePike_EventScript_Retire:: @ 82C4222
2019-11-24 22:58:40 +01:00
frontier_set FRONTIER_DATA_CHALLENGE_STATUS CHALLENGE_STATUS_LOST
2019-10-05 16:52:48 +02:00
warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 255, 5, 6
waitstate
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRoom_OnResume: @ 82C423E
2019-12-09 08:10:42 +01:00
setorcopyvar VAR_0x8006, VAR_RESULT @ Save VAR_RESULT from being overwritten
2019-11-24 22:58:40 +01:00
frontier_get FRONTIER_DATA_CHALLENGE_STATUS
compare VAR_RESULT, CHALLENGE_STATUS_PAUSED
2019-12-09 08:10:42 +01:00
goto_if_eq BattleFrontier_BattlePikeThreePathRoom_EventScript_EndOnResume
2019-11-24 22:58:40 +01:00
compare VAR_RESULT, CHALLENGE_STATUS_SAVING
2019-12-09 08:10:42 +01:00
goto_if_eq BattleFrontier_BattlePikeThreePathRoom_EventScript_EndOnResume
call BattleFrontier_BattlePikeRoom_EventScript_ResetSketchedMoves
2019-12-09 08:10:42 +01:00
BattleFrontier_BattlePikeThreePathRoom_EventScript_EndOnResume:: @ 82C426B
2019-10-05 16:52:48 +02:00
setorcopyvar VAR_RESULT, VAR_0x8006
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRoom_EventScript_ResetSketchedMoves:: @ 82C4271
frontier_resetsketch
2019-10-05 16:52:48 +02:00
return
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRoom_Movement_HidePlayer: @ 82C427A
2019-10-05 16:52:48 +02:00
set_invisible
step_end