2017-11-10 02:21:31 +01:00
|
|
|
VerdanturfTown_BattleTentBattleRoom_MapScripts:: @ 82022FA
|
2019-04-22 22:31:51 +02:00
|
|
|
map_script MAP_SCRIPT_ON_TRANSITION, VerdanturfTown_BattleTentBattleRoom_OnTransition
|
2019-12-15 06:55:21 +01:00
|
|
|
map_script MAP_SCRIPT_ON_FRAME_TABLE, VerdanturfTown_BattleTentBattleRoom_OnFrame
|
|
|
|
map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, VerdanturfTown_BattleTentBattleRoom_OnWarp
|
2017-11-10 02:21:31 +01:00
|
|
|
.byte 0
|
|
|
|
|
2019-12-15 06:55:21 +01: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 2, which has the gfx id VAR_OBJ_GFX_ID_0
|
|
|
|
|
2019-04-22 22:31:51 +02:00
|
|
|
VerdanturfTown_BattleTentBattleRoom_OnTransition: @ 820230A
|
2019-12-15 06:55:21 +01:00
|
|
|
call VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfx
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2019-12-15 06:55:21 +01:00
|
|
|
VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfx:: @ 8202310
|
2017-11-10 02:21:31 +01:00
|
|
|
checkplayergender
|
2018-12-25 03:22:56 +01:00
|
|
|
compare VAR_RESULT, MALE
|
2019-12-15 06:55:21 +01:00
|
|
|
goto_if_eq VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfxMale
|
2018-12-25 03:22:56 +01:00
|
|
|
compare VAR_RESULT, FEMALE
|
2019-12-15 06:55:21 +01:00
|
|
|
goto_if_eq VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfxFemale
|
2017-11-10 02:21:31 +01:00
|
|
|
return
|
|
|
|
|
2019-12-15 06:55:21 +01:00
|
|
|
VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfxMale:: @ 8202328
|
2019-11-21 05:12:51 +01:00
|
|
|
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-10 02:21:31 +01:00
|
|
|
return
|
|
|
|
|
2019-12-15 06:55:21 +01:00
|
|
|
VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfxFemale:: @ 8202333
|
2019-11-21 05:12:51 +01:00
|
|
|
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-10 02:21:31 +01:00
|
|
|
return
|
|
|
|
|
2019-12-15 06:55:21 +01:00
|
|
|
VerdanturfTown_BattleTentBattleRoom_OnFrame: @ 820233E
|
|
|
|
map_script_2 VAR_TEMP_0, 0, VerdanturfTown_BattleTentBattleRoom_EventScript_EnterRoom
|
2017-11-10 02:21:31 +01:00
|
|
|
.2byte 0
|
|
|
|
|
2019-12-15 06:55:21 +01:00
|
|
|
VerdanturfTown_BattleTentBattleRoom_EventScript_EnterRoom:: @ 8202348
|
2018-06-15 05:00:09 +02:00
|
|
|
showobjectat 1, MAP_VERDANTURF_TOWN_BATTLE_TENT_BATTLE_ROOM
|
2019-12-15 06:55:21 +01:00
|
|
|
applymovement 1, VerdanturfTown_BattleTentBattleRoom_Movement_PlayerEnter
|
2017-11-10 02:21:31 +01:00
|
|
|
waitmovement 0
|
2019-11-24 22:58:40 +01:00
|
|
|
frontier_get FRONTIER_DATA_BATTLE_NUM
|
2017-12-21 20:47:52 +01:00
|
|
|
compare VAR_RESULT, 0
|
2019-12-15 06:55:21 +01:00
|
|
|
goto_if_ne VerdanturfTown_BattleTentBattleRoom_EventScript_AskContinueChallenge
|
|
|
|
VerdanturfTown_BattleTentBattleRoom_EventScript_NextOpponentEnter:: @ 820236F
|
2019-11-29 04:46:39 +01:00
|
|
|
tower_setopponent
|
2017-11-10 02:21:31 +01:00
|
|
|
addobject 2
|
2019-12-15 06:55:21 +01:00
|
|
|
applymovement 2, VerdanturfTown_BattleTentBattleRoom_Movement_OpponentEnter
|
2017-11-10 02:21:31 +01:00
|
|
|
waitmovement 0
|
2019-12-02 20:49:22 +01:00
|
|
|
battletent_getopponentintro
|
2018-12-02 09:37:46 +01:00
|
|
|
msgbox gStringVar4, MSGBOX_DEFAULT
|
2017-11-10 02:21:31 +01:00
|
|
|
waitmessage
|
2019-12-07 03:25:46 +01:00
|
|
|
call BattleFrontier_BattlePalaceBattleRoom_EventScript_DoPalaceBattle
|
2017-11-10 02:21:31 +01:00
|
|
|
switch VAR_RESULT
|
2019-12-15 06:55:21 +01:00
|
|
|
case 1, VerdanturfTown_BattleTentBattleRoom_EventScript_DefeatedOpponent
|
|
|
|
VerdanturfTown_BattleTentBattleRoom_EventScript_WarpToLobbyLost:: @ 82023AA
|
2019-11-24 22:58:40 +01:00
|
|
|
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST
|
2018-04-29 14:21:59 +02:00
|
|
|
special LoadPlayerParty
|
2018-06-15 05:00:09 +02:00
|
|
|
warp MAP_VERDANTURF_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6
|
2017-11-10 02:21:31 +01:00
|
|
|
waitstate
|
|
|
|
|
2019-12-15 06:55:21 +01:00
|
|
|
VerdanturfTown_BattleTentBattleRoom_EventScript_DefeatedOpponent:: @ 82023C8
|
2019-11-24 22:58:40 +01:00
|
|
|
frontier_get FRONTIER_DATA_BATTLE_NUM
|
2017-11-10 02:21:31 +01:00
|
|
|
addvar VAR_RESULT, 1
|
2019-11-24 22:58:40 +01:00
|
|
|
frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT
|
2017-11-10 02:21:31 +01:00
|
|
|
switch VAR_RESULT
|
2019-12-15 06:55:21 +01:00
|
|
|
case 3, VerdanturfTown_BattleTentBattleRoom_EventScript_WarpToLobbyWon
|
|
|
|
applymovement 2, VerdanturfTown_BattleTentBattleRoom_Movement_OpponentExit
|
2017-11-10 02:21:31 +01:00
|
|
|
waitmovement 0
|
|
|
|
removeobject 2
|
2019-10-06 19:55:30 +02:00
|
|
|
applymovement 3, Common_Movement_WalkInPlaceFastestDown
|
|
|
|
applymovement 1, Common_Movement_WalkInPlaceFastestUp
|
2017-11-10 02:21:31 +01:00
|
|
|
waitmovement 0
|
2019-12-07 03:25:46 +01:00
|
|
|
msgbox BattleFrontier_BattlePalaceBattleRoom_Text_LetMeRestoreYourMons, MSGBOX_DEFAULT
|
2018-04-29 14:21:59 +02:00
|
|
|
special LoadPlayerParty
|
|
|
|
special SavePlayerParty
|
2019-11-24 22:58:40 +01:00
|
|
|
frontier_setpartyorder FRONTIER_PARTY_SIZE
|
2017-12-22 08:46:19 +01:00
|
|
|
playfanfare MUS_ME_ASA
|
2017-11-10 02:21:31 +01:00
|
|
|
waitfanfare
|
2017-12-16 00:08:23 +01:00
|
|
|
special HealPlayerParty
|
2017-11-10 02:21:31 +01:00
|
|
|
|
2019-12-15 06:55:21 +01:00
|
|
|
VerdanturfTown_BattleTentBattleRoom_EventScript_AskContinueChallenge:: @ 820243C
|
2019-11-24 22:58:40 +01:00
|
|
|
frontier_get FRONTIER_DATA_BATTLE_NUM
|
2017-12-21 20:47:52 +01:00
|
|
|
compare VAR_RESULT, 1
|
2019-12-15 06:55:21 +01:00
|
|
|
call_if_eq VerdanturfTown_BattleTentBattleRoom_EventScript_ReadyFor2ndOpponent
|
2017-12-21 20:47:52 +01:00
|
|
|
compare VAR_RESULT, 2
|
2019-12-15 06:55:21 +01:00
|
|
|
call_if_eq VerdanturfTown_BattleTentBattleRoom_EventScript_ReadyFor3rdOpponent
|
2019-09-19 06:56:51 +02:00
|
|
|
multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, 1
|
2017-11-10 02:21:31 +01:00
|
|
|
switch VAR_RESULT
|
2019-12-15 06:55:21 +01:00
|
|
|
case 0, VerdanturfTown_BattleTentBattleRoom_EventScript_ContinueChallenge
|
|
|
|
case 1, VerdanturfTown_BattleTentBattleRoom_EventScript_AskPauseChallenge
|
|
|
|
case 2, VerdanturfTown_BattleTentBattleRoom_EventScript_AskRetireChallenge
|
2017-11-10 02:21:31 +01:00
|
|
|
|
2019-12-15 06:55:21 +01:00
|
|
|
VerdanturfTown_BattleTentBattleRoom_EventScript_AskPauseChallenge:: @ 820248A
|
2019-12-07 03:25:46 +01:00
|
|
|
msgbox BattleFrontier_BattlePalaceBattleRoom_Text_SaveAndQuitGame, MSGBOX_YESNO
|
2017-11-10 02:21:31 +01:00
|
|
|
switch VAR_RESULT
|
2019-12-15 06:55:21 +01:00
|
|
|
case NO, VerdanturfTown_BattleTentBattleRoom_EventScript_AskContinueChallenge
|
|
|
|
case YES, VerdanturfTown_BattleTentBattleRoom_EventScript_PauseChallenge
|
|
|
|
case MULTI_B_PRESSED, VerdanturfTown_BattleTentBattleRoom_EventScript_AskContinueChallenge
|
2017-11-10 02:21:31 +01:00
|
|
|
|
2019-12-15 06:55:21 +01:00
|
|
|
VerdanturfTown_BattleTentBattleRoom_EventScript_AskRetireChallenge:: @ 82024B8
|
2019-12-07 03:25:46 +01:00
|
|
|
message BattleFrontier_BattlePalaceBattleRoom_Text_WishToQuitChallenge
|
2017-11-10 02:21:31 +01:00
|
|
|
waitmessage
|
2019-09-19 06:56:51 +02:00
|
|
|
multichoicedefault 20, 8, MULTI_YESNO, 1, 0
|
2017-11-10 02:21:31 +01:00
|
|
|
switch VAR_RESULT
|
2019-12-15 06:55:21 +01:00
|
|
|
case 1, VerdanturfTown_BattleTentBattleRoom_EventScript_AskContinueChallenge
|
|
|
|
case 0, VerdanturfTown_BattleTentBattleRoom_EventScript_WarpToLobbyLost
|
|
|
|
case MULTI_B_PRESSED, VerdanturfTown_BattleTentBattleRoom_EventScript_AskContinueChallenge
|
2017-11-10 02:21:31 +01:00
|
|
|
|
2019-12-15 06:55:21 +01:00
|
|
|
VerdanturfTown_BattleTentBattleRoom_EventScript_ContinueChallenge:: @ 82024EA
|
2019-10-06 19:55:30 +02:00
|
|
|
applymovement 3, Common_Movement_WalkInPlaceFastestRight
|
|
|
|
applymovement 1, Common_Movement_WalkInPlaceFastestRight
|
2017-11-10 02:21:31 +01:00
|
|
|
waitmovement 0
|
|
|
|
closemessage
|
2019-12-15 06:55:21 +01:00
|
|
|
goto VerdanturfTown_BattleTentBattleRoom_EventScript_NextOpponentEnter
|
2017-11-10 02:21:31 +01:00
|
|
|
|
2019-12-15 06:55:21 +01:00
|
|
|
VerdanturfTown_BattleTentBattleRoom_EventScript_WarpToLobbyWon:: @ 8202501
|
2019-11-24 22:58:40 +01:00
|
|
|
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON
|
2018-04-29 14:21:59 +02:00
|
|
|
special LoadPlayerParty
|
2018-06-15 05:00:09 +02:00
|
|
|
warp MAP_VERDANTURF_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6
|
2017-11-10 02:21:31 +01:00
|
|
|
waitstate
|
|
|
|
|
2019-12-15 06:55:21 +01:00
|
|
|
VerdanturfTown_BattleTentBattleRoom_EventScript_PauseChallenge:: @ 820251F
|
2019-12-07 03:25:46 +01:00
|
|
|
message BattleFrontier_BattlePalaceBattleRoom_Text_SavingData
|
2017-11-10 02:21:31 +01:00
|
|
|
waitmessage
|
2019-12-02 20:49:22 +01:00
|
|
|
verdanturftent_save CHALLENGE_STATUS_PAUSED
|
2017-11-10 02:21:31 +01:00
|
|
|
playse SE_SAVE
|
|
|
|
waitse
|
2019-12-15 17:42:50 +01:00
|
|
|
fadescreen FADE_TO_BLACK
|
2019-11-24 22:58:40 +01:00
|
|
|
frontier_reset
|
2017-11-10 02:21:31 +01:00
|
|
|
end
|
|
|
|
|
2019-12-15 06:55:21 +01:00
|
|
|
VerdanturfTown_BattleTentBattleRoom_OnWarp: @ 8202541
|
|
|
|
map_script_2 VAR_TEMP_1, 0, VerdanturfTown_BattleTentBattleRoom_EventScript_SetUpObjects
|
2017-11-10 02:21:31 +01:00
|
|
|
.2byte 0
|
|
|
|
|
2019-12-15 06:55:21 +01:00
|
|
|
VerdanturfTown_BattleTentBattleRoom_EventScript_SetUpObjects:: @ 820254B
|
2018-06-15 05:00:09 +02:00
|
|
|
hideobjectat 1, MAP_VERDANTURF_TOWN_BATTLE_TENT_BATTLE_ROOM
|
2019-12-15 06:55:21 +01:00
|
|
|
call VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfx
|
2018-05-19 18:02:43 +02:00
|
|
|
setvar VAR_TEMP_1, 1
|
2019-12-18 19:16:38 +01:00
|
|
|
applymovement OBJ_EVENT_ID_PLAYER, VerdanturfTown_BattleTentBattleRoom_Movement_SetInvisible
|
2017-11-10 02:21:31 +01:00
|
|
|
removeobject 2
|
|
|
|
end
|
|
|
|
|
2019-12-15 06:55:21 +01:00
|
|
|
VerdanturfTown_BattleTentBattleRoom_EventScript_ReadyFor2ndOpponent:: @ 8202565
|
2019-12-07 03:25:46 +01:00
|
|
|
message BattleFrontier_BattlePalaceBattleRoom_Text_PreparedFor2ndOpponent
|
2017-11-10 02:21:31 +01:00
|
|
|
waitmessage
|
|
|
|
return
|
|
|
|
|
2019-12-15 06:55:21 +01:00
|
|
|
VerdanturfTown_BattleTentBattleRoom_EventScript_ReadyFor3rdOpponent:: @ 820256C
|
2019-12-07 03:25:46 +01:00
|
|
|
message BattleFrontier_BattlePalaceBattleRoom_Text_PreparedFor3rdOpponent
|
2017-11-10 02:21:31 +01:00
|
|
|
waitmessage
|
|
|
|
return
|
|
|
|
|
2019-12-15 06:55:21 +01:00
|
|
|
VerdanturfTown_BattleTentBattleRoom_Movement_SetInvisible: @ 8202573
|
2018-06-14 01:19:19 +02:00
|
|
|
set_invisible
|
2017-11-10 02:21:31 +01:00
|
|
|
step_end
|
|
|
|
|
2019-12-15 06:55:21 +01:00
|
|
|
VerdanturfTown_BattleTentBattleRoom_Movement_PlayerEnter: @ 8202575
|
2018-06-14 01:19:19 +02:00
|
|
|
set_visible
|
|
|
|
walk_up
|
|
|
|
walk_up
|
|
|
|
walk_up
|
|
|
|
face_right
|
2017-11-10 02:21:31 +01:00
|
|
|
step_end
|
|
|
|
|
2019-12-15 06:55:21 +01:00
|
|
|
VerdanturfTown_BattleTentBattleRoom_Movement_OpponentEnter: @ 820257B
|
2018-06-14 01:19:19 +02:00
|
|
|
walk_down
|
|
|
|
walk_down
|
|
|
|
walk_down
|
|
|
|
walk_down
|
|
|
|
face_left
|
2017-11-10 02:21:31 +01:00
|
|
|
step_end
|
|
|
|
|
2019-12-15 06:55:21 +01:00
|
|
|
VerdanturfTown_BattleTentBattleRoom_Movement_OpponentExit: @ 8202581
|
2018-06-14 01:19:19 +02:00
|
|
|
walk_up
|
|
|
|
walk_up
|
|
|
|
walk_up
|
|
|
|
walk_up
|
2017-11-10 02:21:31 +01:00
|
|
|
step_end
|
|
|
|
|