245 lines
8.9 KiB
PHP
Raw Normal View History

2017-11-09 19:21:31 -06:00
FallarborTown_BattleTentBattleRoom_MapScripts:: @ 8200899
map_script MAP_SCRIPT_ON_TRANSITION, FallarborTown_BattleTentBattleRoom_OnTransition
2019-12-15 00:55:21 -05:00
map_script MAP_SCRIPT_ON_FRAME_TABLE, FallarborTown_BattleTentBattleRoom_OnFrame
map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, FallarborTown_BattleTentBattleRoom_OnWarp
2017-11-09 19:21:31 -06:00
.byte 0
2019-12-15 00:55:21 -05:00
@ On this map the player (OBJ_EVENT_ID_PLAYER) is hidden
@ The player is represented instead by object event 1, which has the gfx id VAR_OBJ_GFX_ID_1
@ The opponent is represented by object event 3, which has the gfx id VAR_OBJ_GFX_ID_0
FallarborTown_BattleTentBattleRoom_OnTransition: @ 82008A9
2019-12-15 00:55:21 -05:00
call FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfx
2017-11-09 19:21:31 -06:00
end
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfx:: @ 82008AF
2017-11-09 19:21:31 -06:00
checkplayergender
compare VAR_RESULT, MALE
2019-12-15 00:55:21 -05:00
goto_if_eq FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfxMale
compare VAR_RESULT, FEMALE
2019-12-15 00:55:21 -05:00
goto_if_eq FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfxFemale
2017-11-09 19:21:31 -06:00
return
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfxMale:: @ 82008C7
setvar VAR_OBJ_GFX_ID_1, OBJ_EVENT_GFX_RIVAL_BRENDAN_NORMAL
setvar VAR_OBJ_GFX_ID_0, OBJ_EVENT_GFX_RIVAL_BRENDAN_NORMAL
2017-11-09 19:21:31 -06:00
return
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_EventScript_SetPlayerGfxFemale:: @ 82008D2
setvar VAR_OBJ_GFX_ID_1, OBJ_EVENT_GFX_RIVAL_MAY_NORMAL
setvar VAR_OBJ_GFX_ID_0, OBJ_EVENT_GFX_RIVAL_MAY_NORMAL
2017-11-09 19:21:31 -06:00
return
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_OnFrame: @ 82008DD
map_script_2 VAR_TEMP_0, 0, FallarborTown_BattleTentBattleRoom_EventScript_EnterRoom
2017-11-09 19:21:31 -06:00
.2byte 0
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_EventScript_EnterRoom:: @ 82008E7
2017-11-09 19:21:31 -06:00
lockall
showobjectat 1, MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM
2019-12-15 00:55:21 -05:00
applymovement 1, FallarborTown_BattleTentBattleRoom_Movement_PlayerEnter
2017-11-09 19:21:31 -06:00
waitmovement 0
2019-11-24 16:58:40 -05:00
frontier_get FRONTIER_DATA_BATTLE_NUM
compare VAR_RESULT, 0
2019-12-15 00:55:21 -05:00
goto_if_ne FallarborTown_BattleTentBattleRoom_EventScript_ResumeChallenge
FallarborTown_BattleTentBattleRoom_EventScript_NextOpponentEnter:: @ 820090F
2019-11-28 22:46:39 -05:00
tower_setopponent
2017-11-09 19:21:31 -06:00
addobject 3
2019-12-15 00:55:21 -05:00
applymovement 3, FallarborTown_BattleTentBattleRoom_Movement_OpponentEnter
2017-11-09 19:21:31 -06:00
waitmovement 0
2019-12-15 00:55:21 -05:00
applymovement 2, FallarborTown_BattleTentBattleRoom_Movement_AttendantJump
2017-11-09 19:21:31 -06:00
playse SE_W187
waitse
waitmovement 0
2019-11-26 17:20:08 -05:00
msgbox BattleFrontier_BattleArenaBattleRoom_Text_SetKOTourneyBegin, MSGBOX_DEFAULT
2019-12-02 14:49:22 -05:00
battletent_getopponentintro
msgbox gStringVar4, MSGBOX_DEFAULT
2017-11-09 19:21:31 -06:00
waitmessage
2019-11-26 17:20:08 -05:00
call BattleFrontier_BattleArenaBattleRoom_EventScript_DoArenaBattle
2017-11-09 19:21:31 -06:00
switch VAR_RESULT
2019-12-15 00:55:21 -05:00
case 1, FallarborTown_BattleTentBattleRoom_EventScript_DefeatedOpponent
applymovement 2, FallarborTown_BattleTentBattleRoom_Movement_AttendantJump
2017-11-09 19:21:31 -06:00
playse SE_W173
waitse
waitmovement 0
2019-12-02 14:49:22 -05:00
fallarbortent_getopponentname
2019-11-26 17:20:08 -05:00
msgbox BattleFrontier_BattleArenaBattleRoom_Text_WinnerIsOpponent, MSGBOX_DEFAULT
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_EventScript_WarpToLobbyLost:: @ 820097E
2019-11-24 16:58:40 -05:00
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST
2018-04-29 14:21:59 +02:00
special LoadPlayerParty
warp MAP_FALLARBOR_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6
2017-11-09 19:21:31 -06:00
waitstate
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_EventScript_DefeatedOpponent:: @ 820099C
applymovement 2, FallarborTown_BattleTentBattleRoom_Movement_AttendantJump
2017-11-09 19:21:31 -06:00
playse SE_BAN
waitse
waitmovement 0
2019-11-26 17:20:08 -05:00
msgbox BattleFrontier_BattleArenaBattleRoom_Text_WinnerIsPlayer, MSGBOX_DEFAULT
2017-11-09 19:21:31 -06:00
closemessage
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_EventScript_IncrementBattleNum:: @ 82009B3
2019-11-24 16:58:40 -05:00
frontier_get FRONTIER_DATA_BATTLE_NUM
2017-11-09 19:21:31 -06:00
addvar VAR_RESULT, 1
2019-11-24 16:58:40 -05:00
frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT
2017-11-09 19:21:31 -06:00
switch VAR_RESULT
2019-12-15 00:55:21 -05:00
case 3, FallarborTown_BattleTentBattleRoom_EventScript_WarpToLobbyWon
applymovement 3, FallarborTown_BattleTentBattleRoom_Movement_OpponentExit
2017-11-09 19:21:31 -06:00
waitmovement 0
removeobject 3
2019-12-15 00:55:21 -05:00
applymovement 2, FallarborTown_BattleTentBattleRoom_Movement_AttendantApproachPlayer
2017-11-09 19:21:31 -06:00
waitmovement 0
2019-12-15 00:55:21 -05:00
applymovement 1, FallarborTown_BattleTentBattleRoom_Movement_PlayerFaceAttendant
2017-11-09 19:21:31 -06:00
waitmovement 0
2019-11-26 17:20:08 -05:00
msgbox BattleFrontier_BattleArenaBattleRoom_Text_MonsWillBeRestored, MSGBOX_DEFAULT
2018-04-29 14:21:59 +02:00
special LoadPlayerParty
special SavePlayerParty
2019-11-24 16:58:40 -05:00
frontier_setpartyorder FRONTIER_PARTY_SIZE
2017-12-21 23:46:19 -08:00
playfanfare MUS_ME_ASA
2017-11-09 19:21:31 -06:00
waitfanfare
2017-12-16 00:08:23 +01:00
special HealPlayerParty
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_EventScript_AskContinueChallenge:: @ 8200A2A
2019-11-24 16:58:40 -05:00
frontier_get FRONTIER_DATA_BATTLE_NUM
compare VAR_RESULT, 1
2019-12-15 00:55:21 -05:00
call_if_eq FallarborTown_BattleTentBattleRoom_EventScript_ReadyFor2ndOpponent
compare VAR_RESULT, 2
2019-12-15 00:55:21 -05:00
call_if_eq FallarborTown_BattleTentBattleRoom_EventScript_ReadyFor3rdOpponent
2019-09-19 00:56:51 -04:00
multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, 1
2017-11-09 19:21:31 -06:00
switch VAR_RESULT
2019-12-15 00:55:21 -05:00
case 0, FallarborTown_BattleTentBattleRoom_EventScript_ContinueChallenge
case 1, FallarborTown_BattleTentBattleRoom_EventScript_AskPauseChallenge
case 2, FallarborTown_BattleTentBattleRoom_EventScript_AskRetireChallenge
2017-11-09 19:21:31 -06:00
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_EventScript_AskPauseChallenge:: @ 8200A78
2019-11-26 17:20:08 -05:00
msgbox BattleFrontier_BattleArenaBattleRoom_Text_SaveAndShutDown, MSGBOX_YESNO
2017-11-09 19:21:31 -06:00
switch VAR_RESULT
2019-12-15 00:55:21 -05:00
case NO, FallarborTown_BattleTentBattleRoom_EventScript_AskContinueChallenge
case YES, FallarborTown_BattleTentBattleRoom_EventScript_PauseChallenge
case MULTI_B_PRESSED, FallarborTown_BattleTentBattleRoom_EventScript_AskContinueChallenge
2017-11-09 19:21:31 -06:00
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_EventScript_AskRetireChallenge:: @ 8200AA6
2019-11-26 17:20:08 -05:00
message BattleFrontier_BattleArenaBattleRoom_Text_RetireFromChallenge
2017-11-09 19:21:31 -06:00
waitmessage
2019-09-19 00:56:51 -04:00
multichoicedefault 20, 8, MULTI_YESNO, 1, 0
2017-11-09 19:21:31 -06:00
switch VAR_RESULT
2019-12-15 00:55:21 -05:00
case 1, FallarborTown_BattleTentBattleRoom_EventScript_AskContinueChallenge
case 0, FallarborTown_BattleTentBattleRoom_EventScript_WarpToLobbyLost
case MULTI_B_PRESSED, FallarborTown_BattleTentBattleRoom_EventScript_AskContinueChallenge
2017-11-09 19:21:31 -06:00
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_EventScript_ContinueChallenge:: @ 8200AD8
2017-11-09 19:21:31 -06:00
closemessage
2019-12-15 00:55:21 -05:00
applymovement 2, FallarborTown_BattleTentBattleRoom_Movement_AttendantReturnToPos
2017-11-09 19:21:31 -06:00
waitmovement 0
2019-12-15 00:55:21 -05:00
applymovement 1, FallarborTown_BattleTentBattleRoom_Movement_PlayerFaceBattle
2017-11-09 19:21:31 -06:00
waitmovement 0
2019-12-15 00:55:21 -05:00
goto FallarborTown_BattleTentBattleRoom_EventScript_NextOpponentEnter
2017-11-09 19:21:31 -06:00
waitstate
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_EventScript_WarpToLobbyWon:: @ 8200AF3
2017-11-09 19:21:31 -06:00
delay 60
2019-11-24 16:58:40 -05:00
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON
2018-04-29 14:21:59 +02:00
special LoadPlayerParty
warp MAP_FALLARBOR_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6
2017-11-09 19:21:31 -06:00
waitstate
2019-12-15 00:55:21 -05:00
@ Unreachable code block? The flow into the next block also doesnt make sense
2019-11-28 22:46:39 -05:00
arena_get ARENA_DATA_WIN_STREAK
2019-11-24 16:58:40 -05:00
compare VAR_RESULT, MAX_STREAK
2019-12-15 00:55:21 -05:00
goto_if_eq FallarborTown_BattleTentBattleRoom_EventScript_IncrementBattleNum
2017-11-09 19:21:31 -06:00
addvar VAR_RESULT, 1
2019-11-28 22:46:39 -05:00
arena_set ARENA_DATA_WIN_STREAK, VAR_RESULT
2019-12-15 00:55:21 -05:00
@ See above
FallarborTown_BattleTentBattleRoom_EventScript_ReadyFor2ndOpponent:: @ 8200B43
2019-11-26 17:20:08 -05:00
message BattleFrontier_BattleArenaBattleRoom_Text_ReadyFor2ndOpponent
2017-11-09 19:21:31 -06:00
waitmessage
return
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_EventScript_ReadyFor3rdOpponent:: @ 8200B4A
2019-11-26 17:20:08 -05:00
message BattleFrontier_BattleArenaBattleRoom_Text_ReadyFor3rdOpponent
2017-11-09 19:21:31 -06:00
waitmessage
return
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_EventScript_PauseChallenge:: @ 8200B51
2019-11-26 17:20:08 -05:00
message BattleFrontier_BattleArenaBattleRoom_Text_SavingPleaseWait
2017-11-09 19:21:31 -06:00
waitmessage
2019-12-02 14:49:22 -05:00
fallarbortent_save CHALLENGE_STATUS_PAUSED
2017-11-09 19:21:31 -06:00
playse SE_SAVE
waitse
2019-12-15 11:42:50 -05:00
fadescreen FADE_TO_BLACK
2019-11-24 16:58:40 -05:00
frontier_reset
2017-11-09 19:21:31 -06:00
end
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_EventScript_ResumeChallenge:: @ 8200B73
applymovement 2, FallarborTown_BattleTentBattleRoom_Movement_AttendantApproachPlayer
2017-11-09 19:21:31 -06:00
waitmovement 0
2019-12-15 00:55:21 -05:00
applymovement 1, FallarborTown_BattleTentBattleRoom_Movement_PlayerFaceAttendant
2017-11-09 19:21:31 -06:00
waitmovement 0
2019-12-15 00:55:21 -05:00
goto FallarborTown_BattleTentBattleRoom_EventScript_AskContinueChallenge
2017-11-09 19:21:31 -06:00
end
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_Movement_PlayerEnter: @ 8200B8D
walk_up
walk_up
walk_up
walk_in_place_fastest_right
2017-11-09 19:21:31 -06:00
step_end
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_Movement_PlayerFaceBattle: @ 8200B92
walk_in_place_fastest_right
2017-11-09 19:21:31 -06:00
step_end
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_Movement_PlayerFaceAttendant: @ 8200B94
walk_in_place_fastest_left
2017-11-09 19:21:31 -06:00
step_end
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_Movement_OpponentEnter: @ 8200B96
walk_down
walk_down
walk_down
walk_down
walk_in_place_fastest_left
2017-11-09 19:21:31 -06:00
step_end
2019-12-15 00:55:21 -05:00
@ Unused
FallarborTown_BattleTentBattleRoom_Movement_OpponentStepForward: @ 8200B9C
walk_left
step_end
2017-11-09 19:21:31 -06:00
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_Movement_OpponentExit: @ 8200B9E
walk_up
walk_up
walk_up
walk_up
2017-11-09 19:21:31 -06:00
step_end
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_Movement_AttendantJump: @ 8200BA3
disable_jump_landing_ground_effect
jump_in_place_down
2017-11-09 19:21:31 -06:00
step_end
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_Movement_AttendantApproachPlayer: @ 8200BA6
walk_down
walk_down
walk_down
walk_in_place_fastest_right
2017-11-09 19:21:31 -06:00
step_end
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_Movement_AttendantReturnToPos: @ 8200BAB
walk_up
walk_up
walk_up
walk_in_place_fastest_down
2017-11-09 19:21:31 -06:00
step_end
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_OnWarp: @ 8200BB0
map_script_2 VAR_TEMP_1, 0, FallarborTown_BattleTentBattleRoom_EventScript_SetUpObjects
2017-11-09 19:21:31 -06:00
.2byte 0
2019-12-15 00:55:21 -05:00
FallarborTown_BattleTentBattleRoom_EventScript_SetUpObjects:: @ 8200BBA
hideobjectat OBJ_EVENT_ID_PLAYER, MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM
hideobjectat 1, MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM
2017-11-09 19:21:31 -06:00
removeobject 3
2018-05-19 18:02:43 +02:00
setvar VAR_TEMP_1, 1
2017-11-09 19:21:31 -06:00
end