pokeemerald/data/scripts/battle_pike.inc

313 lines
11 KiB
PHP
Raw Normal View History

2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRandomRoom1_MapScripts_2C3E1B: @ 82C3E1B
2019-10-05 16:52:48 +02:00
map_script MAP_SCRIPT_ON_TRANSITION, BattleFrontier_BattlePikeRandomRoom1_MapScript1_2C3E25
map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, BattleFrontier_BattlePikeRandomRoom1_MapScript2_2C3EDE
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRandomRoom1_MapScript1_2C3E25: @ 82C3E25
2019-10-07 02:04:30 +02:00
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_UP_ROOM_OBJECTS
2019-10-05 16:52:48 +02:00
special CallBattlePikeFunction
2019-10-07 02:04:30 +02:00
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_ROOM_TYPE
2019-10-05 16:52:48 +02:00
special CallBattlePikeFunction
switch VAR_RESULT
case 0, BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3EB1
case 1, BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3EB1
case 2, BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3EC0
case 3, BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3EA2
case 4, BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3EB1
case 7, BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3E93
case 6, BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3EA2
case 8, BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3ECF
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3E93:: @ 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
BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3EA2:: @ 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
BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3EB1:: @ 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
BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3EC0:: @ 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
BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3ECF:: @ 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_BattlePikeRandomRoom1_MapScript2_2C3EDE: @ 82C3EDE
2019-10-05 16:52:48 +02:00
map_script_2 VAR_TEMP_4, 0, BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3EE8
.2byte 0
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3EE8:: @ 82C3EE8
2019-10-05 16:52:48 +02:00
setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_LINK_RECEPTIONIST
setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_LINK_RECEPTIONIST
2019-10-07 02:04:30 +02:00
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_ROOM_TYPE
2019-10-05 16:52:48 +02:00
special CallBattlePikeFunction
compare VAR_RESULT, 3
goto_if_eq BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3F35
compare VAR_RESULT, 6
goto_if_eq BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3F35
compare VAR_RESULT, 7
goto_if_eq BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3F35
compare VAR_RESULT, 8
goto_if_eq BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3F3F
hideobjectat 2, MAP_BATTLE_FRONTIER_BATTLE_PIKE_RANDOM_ROOM1
setvar VAR_TEMP_4, 1
turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3F35:: @ 82C3F35
2019-10-05 16:52:48 +02:00
setvar VAR_TEMP_4, 1
turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRandomRoom1_EventScript_2C3F3F:: @ 82C3F3F
2019-10-05 16:52:48 +02:00
setvar VAR_TEMP_4, 1
turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
hideobjectat 1, MAP_BATTLE_FRONTIER_BATTLE_PIKE_RANDOM_ROOM1
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeThreePathRoom_EventScript_2C3F4E:: @ 82C3F4E
2019-10-05 16:52:48 +02:00
setvar VAR_0x8007, 0
goto BattleFrontier_BattlePikeThreePathRoom_EventScript_2C3F6F
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeThreePathRoom_EventScript_2C3F59:: @ 82C3F59
2019-10-05 16:52:48 +02:00
setvar VAR_0x8007, 1
goto BattleFrontier_BattlePikeThreePathRoom_EventScript_2C3F6F
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeThreePathRoom_EventScript_2C3F64:: @ 82C3F64
2019-10-05 16:52:48 +02:00
setvar VAR_0x8007, 2
goto BattleFrontier_BattlePikeThreePathRoom_EventScript_2C3F6F
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeThreePathRoom_EventScript_2C3F6F:: @ 82C3F6F
2019-10-07 02:04:30 +02:00
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_DATA
2019-10-05 16:52:48 +02:00
setvar VAR_0x8005, 1
special CallBattlePikeFunction
addvar VAR_RESULT, 1
2019-10-07 02:04:30 +02:00
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_DATA
2019-10-05 16:52:48 +02:00
setvar VAR_0x8005, 1
copyvar VAR_0x8006, VAR_RESULT
special CallBattlePikeFunction
2019-11-10 02:40:25 +01:00
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_1
2019-10-05 16:52:48 +02:00
setvar VAR_0x8005, 2
special CallFrontierUtilFunc
addvar VAR_RESULT, 1
2019-11-10 02:40:25 +01:00
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_2
2019-10-05 16:52:48 +02:00
setvar VAR_0x8005, 2
copyvar VAR_0x8006, VAR_RESULT
special CallFrontierUtilFunc
2019-10-07 02:04:30 +02:00
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_ROOM_TYPE
2019-10-05 16:52:48 +02:00
special CallBattlePikeFunction
2019-10-07 02:04:30 +02:00
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_ROOM_TYPE
2019-10-05 16:52:48 +02:00
special CallBattlePikeFunction
switch VAR_RESULT
case 0, BattleFrontier_BattlePikeThreePathRoom_EventScript_2C4030
case 1, BattleFrontier_BattlePikeThreePathRoom_EventScript_2C4030
case 2, BattleFrontier_BattlePikeThreePathRoom_EventScript_2C4030
case 3, BattleFrontier_BattlePikeThreePathRoom_EventScript_2C4030
case 4, BattleFrontier_BattlePikeThreePathRoom_EventScript_2C4030
case 5, BattleFrontier_BattlePikeThreePathRoom_EventScript_2C4049
case 6, BattleFrontier_BattlePikeThreePathRoom_EventScript_2C4030
case 7, BattleFrontier_BattlePikeThreePathRoom_EventScript_2C4030
case 8, BattleFrontier_BattlePikeThreePathRoom_EventScript_2C4030
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeThreePathRoom_EventScript_2C4030:: @ 82C4030
2019-10-05 16:52:48 +02:00
applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeThreePathRoom_Movement_2C427A
waitmovement 0
call BattleFrontier_BattlePikeThreePathRoom_EventScript_25BB49
warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_RANDOM_ROOM1, 255, 4, 7
waitstate
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeThreePathRoom_EventScript_2C4049:: @ 82C4049
2019-10-05 16:52:48 +02:00
applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeThreePathRoom_Movement_2C427A
waitmovement 0
call BattleFrontier_BattlePikeThreePathRoom_EventScript_25BB49
warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_RANDOM_ROOM3, 255, 4, 19
waitstate
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeThreePathRoom_EventScript_2C4062:: @ 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
BattleFrontier_BattlePikeThreePathRoom_EventScript_2C406D:: @ 82C406D
2019-10-05 16:52:48 +02:00
setvar VAR_TEMP_3, 0
setvar VAR_TEMP_2, 0
lockall
msgbox BattleFrontier_BattlePikeThreePathRoom_Text_25CE36, MSGBOX_DEFAULT
closemessage
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRandomRoom1_EventScript_2C4082:: @ 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
BattleFrontier_BattlePikeRandomRoom1_EventScript_2C408D:: @ 82C408D
2019-10-05 16:52:48 +02:00
setvar VAR_TEMP_3, 0
setvar VAR_TEMP_2, 0
lockall
msgbox BattleFrontier_BattlePikeRandomRoom1_Text_25CE36, MSGBOX_DEFAULT
closemessage
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRandomRoom1_EventScript_2C40A2:: @ 82C40A2
2019-10-07 02:04:30 +02:00
setvar VAR_0x8004, BATTLE_PIKE_FUNC_CAN_PARTY_BE_HEALED
2019-10-05 16:52:48 +02:00
special CallBattlePikeFunction
compare VAR_RESULT, 1
call_if_eq BattleFrontier_BattlePikeRandomRoom1_EventScript_2C4128
compare VAR_RESULT, 1
call_if_ne BattleFrontier_BattlePikeRandomRoom1_EventScript_2C4136
2019-10-07 02:04:30 +02:00
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_DATA
2019-10-05 16:52:48 +02:00
setvar VAR_0x8005, 1
special CallBattlePikeFunction
addvar VAR_RESULT, 1
2019-10-07 02:04:30 +02:00
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_DATA
2019-10-05 16:52:48 +02:00
setvar VAR_0x8005, 1
copyvar VAR_0x8006, VAR_RESULT
special CallBattlePikeFunction
2019-11-10 02:40:25 +01:00
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_1
2019-10-05 16:52:48 +02:00
setvar VAR_0x8005, 2
special CallFrontierUtilFunc
addvar VAR_RESULT, 1
2019-11-10 02:40:25 +01:00
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_2
2019-10-05 16:52:48 +02:00
setvar VAR_0x8005, 2
copyvar VAR_0x8006, VAR_RESULT
special CallFrontierUtilFunc
2019-10-07 02:04:30 +02:00
setvar VAR_0x8004, BATTLE_PIKE_FUNC_IN_FINAL_ROOM
2019-10-05 16:52:48 +02:00
special CallBattlePikeFunction
compare VAR_RESULT, 1
call_if_eq BattleFrontier_BattlePikeRandomRoom1_EventScript_2C4144
compare VAR_RESULT, 0
call_if_eq BattleFrontier_BattlePikeRandomRoom1_EventScript_2C415C
waitstate
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRandomRoom1_EventScript_2C4128:: @ 82C4128
BattleFrontier_BattlePikeRandomRoom3_EventScript_2C4128:: @ 82C4128
2019-10-07 02:04:30 +02:00
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_HEALING_ROOMS_DISABLED
2019-10-05 16:52:48 +02:00
setvar VAR_0x8005, 1
special CallBattlePikeFunction
return
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRandomRoom1_EventScript_2C4136:: @ 82C4136
BattleFrontier_BattlePikeRandomRoom3_EventScript_2C4136:: @ 82C4136
2019-10-07 02:04:30 +02:00
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_HEALING_ROOMS_DISABLED
2019-10-05 16:52:48 +02:00
setvar VAR_0x8005, 0
special CallBattlePikeFunction
return
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRandomRoom1_EventScript_2C4144:: @ 82C4144
BattleFrontier_BattlePikeRandomRoom3_EventScript_2C4144:: @ 82C4144
2019-10-05 16:52:48 +02:00
applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeRandomRoom1_Movement_2C427A
waitmovement 0
call BattleFrontier_BattlePikeRandomRoom1_EventScript_25BB49
warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_RANDOM_ROOM2, 255, 2, 7
return
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRandomRoom1_EventScript_2C415C:: @ 82C415C
BattleFrontier_BattlePikeRandomRoom3_EventScript_2C415C:: @ 82C415C
2019-10-05 16:52:48 +02:00
applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeRandomRoom1_Movement_2C427A
waitmovement 0
call BattleFrontier_BattlePikeRandomRoom1_EventScript_25BB49
warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_THREE_PATH_ROOM, 255, 6, 10
return
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRandomRoom3_EventScript_2C4174:: @ 82C4174
2019-10-07 02:04:30 +02:00
setvar VAR_0x8004,BATTLE_PIKE_FUNC_7
2019-10-05 16:52:48 +02:00
special CallBattlePikeFunction
2019-10-07 02:04:30 +02:00
setvar VAR_0x8004, BATTLE_PIKE_FUNC_CAN_PARTY_BE_HEALED
2019-10-05 16:52:48 +02:00
special CallBattlePikeFunction
compare VAR_RESULT, 1
call_if_eq BattleFrontier_BattlePikeRandomRoom3_EventScript_2C4128
compare VAR_RESULT, 1
call_if_ne BattleFrontier_BattlePikeRandomRoom3_EventScript_2C4136
2019-10-07 02:04:30 +02:00
setvar VAR_0x8004, BATTLE_PIKE_FUNC_GET_DATA
2019-10-05 16:52:48 +02:00
setvar VAR_0x8005, 1
special CallBattlePikeFunction
addvar VAR_RESULT, 1
2019-10-07 02:04:30 +02:00
setvar VAR_0x8004, BATTLE_PIKE_FUNC_SET_DATA
2019-10-05 16:52:48 +02:00
setvar VAR_0x8005, 1
copyvar VAR_0x8006, VAR_RESULT
special CallBattlePikeFunction
2019-11-10 02:40:25 +01:00
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_1
2019-10-05 16:52:48 +02:00
setvar VAR_0x8005, 2
special CallFrontierUtilFunc
addvar VAR_RESULT, 1
2019-11-10 02:40:25 +01:00
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_2
2019-10-05 16:52:48 +02:00
setvar VAR_0x8005, 2
copyvar VAR_0x8006, VAR_RESULT
special CallFrontierUtilFunc
2019-10-07 02:04:30 +02:00
setvar VAR_0x8004, BATTLE_PIKE_FUNC_IN_FINAL_ROOM
2019-10-05 16:52:48 +02:00
special CallBattlePikeFunction
compare VAR_RESULT, 1
call_if_eq BattleFrontier_BattlePikeRandomRoom3_EventScript_2C4144
compare VAR_RESULT, 0
call_if_eq BattleFrontier_BattlePikeRandomRoom3_EventScript_2C415C
waitstate
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRandomRoom3_EventScript_2C4202:: @ 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
BattleFrontier_BattlePikeRandomRoom3_EventScript_2C420D:: @ 82C420D
2019-10-05 16:52:48 +02:00
setvar VAR_TEMP_3, 0
setvar VAR_TEMP_2, 0
lockall
msgbox BattleFrontier_BattlePikeRandomRoom3_Text_25CE36, MSGBOX_DEFAULT
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-10 02:40:25 +01:00
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_2
2019-10-05 16:52:48 +02:00
setvar VAR_0x8005, 0
setvar VAR_0x8006, 4
special CallFrontierUtilFunc
warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 255, 5, 6
waitstate
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRandomRoom1_MapScript1_2C423E: @ 82C423E
BattleFrontier_BattlePikeThreePathRoom_MapScript1_2C423E: @ 82C423E
2019-10-05 16:52:48 +02:00
setorcopyvar VAR_0x8006, VAR_RESULT
2019-11-10 02:40:25 +01:00
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_1
2019-10-05 16:52:48 +02:00
setvar VAR_0x8005, 0
special CallFrontierUtilFunc
compare VAR_RESULT, 2
goto_if_eq BattleFrontier_BattlePikeThreePathRoom_EventScript_2C426B
compare VAR_RESULT, 1
goto_if_eq BattleFrontier_BattlePikeThreePathRoom_EventScript_2C426B
call BattleFrontier_BattlePikeThreePathRoom_EventScript_2C4271
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeThreePathRoom_EventScript_2C426B:: @ 82C426B
2019-10-05 16:52:48 +02:00
setorcopyvar VAR_RESULT, VAR_0x8006
end
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRandomRoom3_EventScript_2C4271:: @ 82C4271
BattleFrontier_BattlePikeThreePathRoom_EventScript_2C4271:: @ 82C4271
2019-11-10 02:40:25 +01:00
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_21
2019-10-05 16:52:48 +02:00
special CallFrontierUtilFunc
return
2019-09-27 18:22:58 +02:00
BattleFrontier_BattlePikeRandomRoom1_Movement_2C427A: @ 82C427A
BattleFrontier_BattlePikeThreePathRoom_Movement_2C427A: @ 82C427A
2019-10-05 16:52:48 +02:00
set_invisible
step_end