sovereignx/data/scripts/battle_pike.inc

256 lines
9.1 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 17:22:58 +01:00
BattleFrontier_BattlePikeRoom_OnTransition: @ 82C3E25
battlepike_setroomobjects
battlepike_getroomtype
2019-10-05 15:52:48 +01:00
switch VAR_RESULT
case PIKE_ROOM_SINGLE_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_2C3EB1
case PIKE_ROOM_HEAL_FULL, BattleFrontier_BattlePikeRoomNormal_EventScript_2C3EB1
case PIKE_ROOM_NPC, BattleFrontier_BattlePikeRoomNormal_EventScript_2C3EC0
case PIKE_ROOM_STATUS, BattleFrontier_BattlePikeRoomNormal_EventScript_2C3EA2
case PIKE_ROOM_HEAL_PART, BattleFrontier_BattlePikeRoomNormal_EventScript_2C3EB1
case PIKE_ROOM_DOUBLE_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_2C3E93
case PIKE_ROOM_HARD_BATTLE, BattleFrontier_BattlePikeRoomNormal_EventScript_2C3EA2
case PIKE_ROOM_BRAIN, BattleFrontier_BattlePikeRoomNormal_EventScript_2C3ECF
2019-10-05 15:52:48 +01:00
end
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeRoomNormal_EventScript_2C3E93:: @ 82C3E93
2019-10-05 15:52:48 +01:00
setobjectxyperm 1, 2, 5
setobjectxyperm 2, 6, 5
end
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeRoomNormal_EventScript_2C3EA2:: @ 82C3EA2
2019-10-05 15:52:48 +01:00
setobjectxyperm 1, 4, 4
setobjectxyperm 2, 3, 4
end
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeRoomNormal_EventScript_2C3EB1:: @ 82C3EB1
2019-10-05 15:52:48 +01:00
setobjectxyperm 1, 4, 4
setobjectxyperm 2, 0, 0
end
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeRoomNormal_EventScript_2C3EC0:: @ 82C3EC0
2019-10-05 15:52:48 +01:00
setobjectxyperm 1, 5, 5
setobjectxyperm 2, 0, 0
end
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeRoomNormal_EventScript_2C3ECF:: @ 82C3ECF
2019-10-05 15:52:48 +01:00
setobjectxyperm 1, 4, 3
setobjectxyperm 2, 4, 4
end
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeRoom_OnWarp: @ 82C3EDE
map_script_2 VAR_TEMP_4, 0, BattleFrontier_BattlePikeRoomNormal_EventScript_EnterRoom
2019-10-05 15:52:48 +01:00
.2byte 0
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeRoomNormal_EventScript_EnterRoom:: @ 82C3EE8
2019-10-05 15:52:48 +01:00
setvar VAR_OBJ_GFX_ID_1, EVENT_OBJ_GFX_LINK_RECEPTIONIST
setvar VAR_OBJ_GFX_ID_0, EVENT_OBJ_GFX_LINK_RECEPTIONIST
battlepike_getroomtype
compare VAR_RESULT, PIKE_ROOM_STATUS
goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_2C3F35
compare VAR_RESULT, PIKE_ROOM_HARD_BATTLE
goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_2C3F35
compare VAR_RESULT, PIKE_ROOM_DOUBLE_BATTLE
goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_2C3F35
compare VAR_RESULT, PIKE_ROOM_BRAIN
goto_if_eq BattleFrontier_BattlePikeRoomNormal_EventScript_2C3F3F
hideobjectat 2, MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL
2019-10-05 15:52:48 +01:00
setvar VAR_TEMP_4, 1
turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeRoomNormal_EventScript_2C3F35:: @ 82C3F35
2019-10-05 15:52:48 +01:00
setvar VAR_TEMP_4, 1
turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
end
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeRoomNormal_EventScript_2C3F3F:: @ 82C3F3F
2019-10-05 15:52:48 +01:00
setvar VAR_TEMP_4, 1
turnobject EVENT_OBJ_ID_PLAYER, DIR_NORTH
hideobjectat 1, MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL
2019-10-05 15:52:48 +01:00
end
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeThreePathRoom_EventScript_LeftRoomWarp:: @ 82C3F4E
setvar VAR_0x8007, PIKE_ROOM_LEFT
goto BattleFrontier_BattlePikeThreePathRoom_EventScript_RoomWarp
2019-10-05 15:52:48 +01:00
end
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeThreePathRoom_EventScript_CenterRoomWarp:: @ 82C3F59
setvar VAR_0x8007, PIKE_ROOM_CENTER
goto BattleFrontier_BattlePikeThreePathRoom_EventScript_RoomWarp
2019-10-05 15:52:48 +01:00
end
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeThreePathRoom_EventScript_RightRoomWarp:: @ 82C3F64
setvar VAR_0x8007, PIKE_ROOM_RIGHT
goto BattleFrontier_BattlePikeThreePathRoom_EventScript_RoomWarp
2019-10-05 15:52:48 +01:00
end
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeThreePathRoom_EventScript_RoomWarp:: @ 82C3F6F
battlepike_getstreak
2019-10-05 15:52:48 +01:00
addvar VAR_RESULT, 1
battlepike_setstreak VAR_RESULT
frontier_getbattlenum
2019-10-05 15:52:48 +01:00
addvar VAR_RESULT, 1
frontier_setbattlenum VAR_RESULT
battlepike_setnextroom
battlepike_getroomtype
2019-10-05 15:52:48 +01: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
applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeRoom_Movement_HidePlayer
2019-10-05 15:52:48 +01:00
waitmovement 0
call BattleFrontier_BattlePike_EventScript_CloseCurtain
warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL, 255, 4, 7
2019-10-05 15:52:48 +01:00
waitstate
end
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpWildMonRoom:: @ 82C4049
applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeRoom_Movement_HidePlayer
2019-10-05 15:52:48 +01:00
waitmovement 0
call BattleFrontier_BattlePike_EventScript_CloseCurtain
warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_WILD_MONS, 255, 4, 19
2019-10-05 15:52:48 +01:00
waitstate
end
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeThreePathRoom_EventScript_2C4062:: @ 82C4062
2019-10-05 15:52:48 +01:00
setvar VAR_TEMP_3, 1
setvar VAR_TEMP_2, 1
end
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeThreePathRoom_EventScript_2C406D:: @ 82C406D
2019-10-05 15:52:48 +01:00
setvar VAR_TEMP_3, 0
setvar VAR_TEMP_2, 0
lockall
msgbox BattleFrontier_BattlePike_Text_PathBlockedNoTurningBack, MSGBOX_DEFAULT
2019-10-05 15:52:48 +01:00
closemessage
end
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeRoomNormal_EventScript_2C4082:: @ 82C4082
2019-10-05 15:52:48 +01:00
setvar VAR_TEMP_3, 1
setvar VAR_TEMP_2, 1
end
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeRoomNormal_EventScript_2C408D:: @ 82C408D
2019-10-05 15:52:48 +01:00
setvar VAR_TEMP_3, 0
setvar VAR_TEMP_2, 0
lockall
msgbox BattleFrontier_BattlePike_Text_PathBlockedNoTurningBack, MSGBOX_DEFAULT
2019-10-05 15:52:48 +01:00
closemessage
end
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeRoomNormal_EventScript_Exit:: @ 82C40A2
battlepike_ispartyfullhealth
compare VAR_RESULT, TRUE
call_if_eq BattleFrontier_BattlePikeRoom_EventScript_DisableHealing
compare VAR_RESULT, TRUE
call_if_ne BattleFrontier_BattlePikeRoom_EventScript_EnableHealing
battlepike_getstreak
2019-10-05 15:52:48 +01:00
addvar VAR_RESULT, 1
battlepike_setstreak VAR_RESULT
frontier_getbattlenum
2019-10-05 15:52:48 +01:00
addvar VAR_RESULT, 1
frontier_setbattlenum VAR_RESULT
battlepike_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 15:52:48 +01:00
waitstate
end
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeRoom_EventScript_DisableHealing:: @ 82C4128
battlepike_nohealing TRUE
2019-10-05 15:52:48 +01:00
return
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeRoom_EventScript_EnableHealing:: @ 82C4136
battlepike_nohealing FALSE
2019-10-05 15:52:48 +01:00
return
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeRoom_EventScript_WarpToFinalRoom:: @ 82C4144
applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeRoom_Movement_HidePlayer
2019-10-05 15:52:48 +01:00
waitmovement 0
call BattleFrontier_BattlePike_EventScript_CloseCurtain
warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_FINAL, 255, 2, 7
2019-10-05 15:52:48 +01:00
return
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeRoom_EventScript_WarpToThreePathRoom:: @ 82C415C
applymovement EVENT_OBJ_ID_PLAYER, BattleFrontier_BattlePikeRoom_Movement_HidePlayer
2019-10-05 15:52:48 +01:00
waitmovement 0
call BattleFrontier_BattlePike_EventScript_CloseCurtain
2019-10-05 15:52:48 +01:00
warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_THREE_PATH_ROOM, 255, 6, 10
return
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeRoomWildMons_EventScript_2C4174:: @ 82C4174
setvar VAR_0x8004, BATTLE_PIKE_FUNC_7
2019-10-05 15:52:48 +01:00
special CallBattlePikeFunction
battlepike_ispartyfullhealth
compare VAR_RESULT, TRUE
call_if_eq BattleFrontier_BattlePikeRoom_EventScript_DisableHealing
compare VAR_RESULT, TRUE
call_if_ne BattleFrontier_BattlePikeRoom_EventScript_EnableHealing
battlepike_getstreak
2019-10-05 15:52:48 +01:00
addvar VAR_RESULT, 1
battlepike_setstreak VAR_RESULT
frontier_getbattlenum
2019-10-05 15:52:48 +01:00
addvar VAR_RESULT, 1
frontier_setbattlenum VAR_RESULT
battlepike_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 15:52:48 +01:00
waitstate
end
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeRoomWildMons_EventScript_2C4202:: @ 82C4202
2019-10-05 15:52:48 +01:00
setvar VAR_TEMP_3, 1
setvar VAR_TEMP_2, 1
end
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeRoomWildMons_EventScript_2C420D:: @ 82C420D
2019-10-05 15:52:48 +01:00
setvar VAR_TEMP_3, 0
setvar VAR_TEMP_2, 0
lockall
msgbox BattleFrontier_BattlePike_Text_PathBlockedNoTurningBack, MSGBOX_DEFAULT
2019-10-05 15:52:48 +01:00
closemessage
end
2019-09-27 17:22:58 +01:00
2019-10-07 01:04:30 +01:00
BattleFrontier_BattlePike_EventScript_Retire:: @ 82C4222
frontier_setchallengestatus CHALLENGE_STATUS_LOST
2019-10-05 15:52:48 +01:00
warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 255, 5, 6
waitstate
end
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeRoom_OnResume: @ 82C423E
2019-10-05 15:52:48 +01:00
setorcopyvar VAR_0x8006, VAR_RESULT
frontier_getchallengestatus
2019-10-05 15:52:48 +01:00
compare VAR_RESULT, 2
goto_if_eq BattleFrontier_BattlePikeThreePathRoom_EventScript_2C426B
compare VAR_RESULT, 1
goto_if_eq BattleFrontier_BattlePikeThreePathRoom_EventScript_2C426B
call BattleFrontier_BattlePikeRoom_EventScript_ResetSketchedMoves
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeThreePathRoom_EventScript_2C426B:: @ 82C426B
2019-10-05 15:52:48 +01:00
setorcopyvar VAR_RESULT, VAR_0x8006
end
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeRoom_EventScript_ResetSketchedMoves:: @ 82C4271
frontier_resetsketch
2019-10-05 15:52:48 +01:00
return
2019-09-27 17:22:58 +01:00
BattleFrontier_BattlePikeRoom_Movement_HidePlayer: @ 82C427A
2019-10-05 15:52:48 +01:00
set_invisible
step_end