2020-07-24 13:49:26 +00:00
|
|
|
object_const_def
|
2015-11-27 05:22:14 +00:00
|
|
|
const BATTLETOWERBATTLEROOM_YOUNGSTER
|
|
|
|
const BATTLETOWERBATTLEROOM_RECEPTIONIST
|
|
|
|
|
2018-01-17 03:57:19 +00:00
|
|
|
BattleTowerBattleRoom_MapScripts:
|
2020-07-24 13:49:26 +00:00
|
|
|
def_scene_scripts
|
2022-08-09 22:04:18 +00:00
|
|
|
scene_script BattleTowerBattleRoomEnterScene, SCENE_BATTLETOWERBATTLEROOM_ENTER
|
|
|
|
scene_script BattleTowerBattleRoomNoopScene, SCENE_BATTLETOWERBATTLEROOM_NOOP
|
2013-02-17 06:54:07 +00:00
|
|
|
|
2020-07-24 13:49:26 +00:00
|
|
|
def_callbacks
|
2013-02-17 06:54:07 +00:00
|
|
|
|
2022-08-09 22:04:18 +00:00
|
|
|
BattleTowerBattleRoomEnterScene:
|
2015-11-27 05:22:14 +00:00
|
|
|
disappear BATTLETOWERBATTLEROOM_YOUNGSTER
|
2021-06-09 00:35:04 +00:00
|
|
|
sdefer Script_BattleRoom
|
2022-07-29 21:43:10 +00:00
|
|
|
setscene SCENE_BATTLETOWERBATTLEROOM_NOOP
|
2022-08-09 22:04:18 +00:00
|
|
|
; fallthrough
|
|
|
|
BattleTowerBattleRoomNoopScene:
|
2013-02-17 06:54:07 +00:00
|
|
|
end
|
|
|
|
|
2018-03-01 22:33:43 +00:00
|
|
|
Script_BattleRoom:
|
2015-11-27 02:05:32 +00:00
|
|
|
applymovement PLAYER, MovementData_BattleTowerBattleRoomPlayerWalksIn
|
2015-08-24 23:56:30 +00:00
|
|
|
; beat all 7 opponents in a row
|
2018-03-01 22:33:43 +00:00
|
|
|
Script_BattleRoomLoop:
|
2019-03-10 19:31:59 +00:00
|
|
|
setval BATTLETOWERBATTLEROOM_YOUNGSTER
|
2018-01-24 16:17:05 +00:00
|
|
|
special LoadOpponentTrainerAndPokemonWithOTSprite
|
2015-11-27 05:22:14 +00:00
|
|
|
appear BATTLETOWERBATTLEROOM_YOUNGSTER
|
2013-02-17 06:54:07 +00:00
|
|
|
warpsound
|
2015-11-25 15:16:29 +00:00
|
|
|
waitsfx
|
2015-11-27 05:22:14 +00:00
|
|
|
applymovement BATTLETOWERBATTLEROOM_YOUNGSTER, MovementData_BattleTowerBattleRoomOpponentWalksIn
|
2015-12-09 23:25:44 +00:00
|
|
|
opentext
|
2018-01-15 00:26:55 +00:00
|
|
|
battletowertext BATTLETOWERTEXT_INTRO
|
2019-11-03 17:48:54 +00:00
|
|
|
promptbutton
|
2015-11-25 15:16:29 +00:00
|
|
|
closetext
|
2020-06-13 22:48:26 +00:00
|
|
|
special BattleTowerBattle ; predef StartBattle
|
2024-01-07 11:38:00 +00:00
|
|
|
special FadeOutToWhite
|
2013-12-02 19:18:03 +00:00
|
|
|
reloadmap
|
2018-02-03 02:09:17 +00:00
|
|
|
ifnotequal $0, Script_FailedBattleTowerChallenge
|
2019-03-10 19:31:59 +00:00
|
|
|
readmem wNrOfBeatenBattleTowerTrainers
|
2018-02-03 02:09:17 +00:00
|
|
|
ifequal BATTLETOWER_STREAK_LENGTH, Script_BeatenAllTrainers
|
2015-11-27 05:22:14 +00:00
|
|
|
applymovement BATTLETOWERBATTLEROOM_YOUNGSTER, MovementData_BattleTowerBattleRoomOpponentWalksOut
|
2013-02-17 06:54:07 +00:00
|
|
|
warpsound
|
2015-11-27 05:22:14 +00:00
|
|
|
disappear BATTLETOWERBATTLEROOM_YOUNGSTER
|
|
|
|
applymovement BATTLETOWERBATTLEROOM_RECEPTIONIST, MovementData_BattleTowerBattleRoomReceptionistWalksToPlayer
|
2015-11-27 02:05:32 +00:00
|
|
|
applymovement PLAYER, MovementData_BattleTowerBattleRoomPlayerTurnsToFaceReceptionist
|
2015-12-09 23:25:44 +00:00
|
|
|
opentext
|
2018-02-22 16:13:29 +00:00
|
|
|
writetext Text_YourMonWillBeHealedToFullHealth
|
2015-11-25 15:16:29 +00:00
|
|
|
waitbutton
|
2013-02-17 06:54:07 +00:00
|
|
|
closetext
|
2014-04-30 10:04:35 +00:00
|
|
|
playmusic MUSIC_HEAL
|
2024-01-07 11:38:00 +00:00
|
|
|
special FadeOutToWhite
|
2018-01-24 16:17:05 +00:00
|
|
|
special LoadMapPalettes
|
2013-02-17 06:54:07 +00:00
|
|
|
pause 60
|
2024-01-07 11:38:00 +00:00
|
|
|
special FadeInFromWhite
|
2015-02-11 23:03:42 +00:00
|
|
|
special RestartMapMusic
|
2015-12-09 23:25:44 +00:00
|
|
|
opentext
|
2015-08-24 17:35:05 +00:00
|
|
|
writetext Text_NextUpOpponentNo
|
2013-02-17 06:54:07 +00:00
|
|
|
yesorno
|
2015-08-24 23:56:30 +00:00
|
|
|
iffalse Script_DontBattleNextOpponent
|
2018-03-01 22:33:43 +00:00
|
|
|
Script_ContinueAndBattleNextOpponent:
|
2015-11-25 15:16:29 +00:00
|
|
|
closetext
|
2015-11-27 02:05:32 +00:00
|
|
|
applymovement PLAYER, MovementData_BattleTowerBattleRoomPlayerTurnsToFaceNextOpponent
|
2015-11-27 05:22:14 +00:00
|
|
|
applymovement BATTLETOWERBATTLEROOM_RECEPTIONIST, MovementData_BattleTowerBattleRoomReceptionistWalksAway
|
2019-03-10 20:39:31 +00:00
|
|
|
sjump Script_BattleRoomLoop
|
2013-02-17 06:54:07 +00:00
|
|
|
|
2018-03-01 22:33:43 +00:00
|
|
|
Script_DontBattleNextOpponent:
|
2015-08-24 17:35:05 +00:00
|
|
|
writetext Text_SaveAndEndTheSession
|
2013-02-17 06:54:07 +00:00
|
|
|
yesorno
|
2015-08-24 23:56:30 +00:00
|
|
|
iffalse Script_DontSaveAndEndTheSession
|
2019-03-10 19:31:59 +00:00
|
|
|
setval BATTLETOWERACTION_SAVELEVELGROUP ; save level group
|
2018-01-24 16:17:05 +00:00
|
|
|
special BattleTowerAction
|
2019-03-10 19:31:59 +00:00
|
|
|
setval BATTLETOWERACTION_SAVEOPTIONS ; choose reward
|
2018-01-24 16:17:05 +00:00
|
|
|
special BattleTowerAction
|
2019-03-10 19:31:59 +00:00
|
|
|
setval BATTLETOWERACTION_SAVE_AND_QUIT ; quicksave
|
2018-01-24 16:17:05 +00:00
|
|
|
special BattleTowerAction
|
2014-04-30 10:04:35 +00:00
|
|
|
playsound SFX_SAVE
|
2015-11-25 15:16:29 +00:00
|
|
|
waitsfx
|
2024-01-07 11:38:00 +00:00
|
|
|
special FadeOutToWhite
|
2015-02-11 23:03:42 +00:00
|
|
|
special Reset
|
2018-03-01 22:33:43 +00:00
|
|
|
Script_DontSaveAndEndTheSession:
|
2015-08-24 17:35:05 +00:00
|
|
|
writetext Text_CancelYourBattleRoomChallenge
|
2013-02-17 06:54:07 +00:00
|
|
|
yesorno
|
2015-08-24 23:56:30 +00:00
|
|
|
iffalse Script_ContinueAndBattleNextOpponent
|
2019-03-10 19:31:59 +00:00
|
|
|
setval BATTLETOWERACTION_CHALLENGECANCELED
|
2018-01-24 16:17:05 +00:00
|
|
|
special BattleTowerAction
|
2019-03-10 19:31:59 +00:00
|
|
|
setval BATTLETOWERACTION_06
|
2018-01-24 16:17:05 +00:00
|
|
|
special BattleTowerAction
|
2015-11-25 15:16:29 +00:00
|
|
|
closetext
|
2024-01-07 11:38:00 +00:00
|
|
|
special FadeOutToWhite
|
2018-01-09 23:45:25 +00:00
|
|
|
warpfacing UP, BATTLE_TOWER_1F, 7, 7
|
2015-12-09 23:25:44 +00:00
|
|
|
opentext
|
2019-03-10 20:39:31 +00:00
|
|
|
sjump Script_BattleTowerHopeToServeYouAgain
|
2013-02-17 06:54:07 +00:00
|
|
|
|
2015-11-03 20:05:19 +00:00
|
|
|
Script_FailedBattleTowerChallenge:
|
2013-02-17 06:54:07 +00:00
|
|
|
pause 60
|
2018-01-24 16:17:05 +00:00
|
|
|
special BattleTowerFade
|
2018-01-09 23:45:25 +00:00
|
|
|
warpfacing UP, BATTLE_TOWER_1F, 7, 7
|
2019-03-10 19:31:59 +00:00
|
|
|
setval BATTLETOWERACTION_CHALLENGECANCELED
|
2018-01-24 16:17:05 +00:00
|
|
|
special BattleTowerAction
|
2015-12-09 23:25:44 +00:00
|
|
|
opentext
|
2015-08-24 23:56:30 +00:00
|
|
|
writetext Text_ThanksForVisiting
|
2015-11-25 15:16:29 +00:00
|
|
|
waitbutton
|
2013-02-17 06:54:07 +00:00
|
|
|
closetext
|
|
|
|
end
|
|
|
|
|
2018-03-01 22:33:43 +00:00
|
|
|
Script_BeatenAllTrainers:
|
2013-02-17 06:54:07 +00:00
|
|
|
pause 60
|
2018-01-24 16:17:05 +00:00
|
|
|
special BattleTowerFade
|
2018-01-09 23:45:25 +00:00
|
|
|
warpfacing UP, BATTLE_TOWER_1F, 7, 7
|
2015-11-27 02:05:32 +00:00
|
|
|
Script_BeatenAllTrainers2:
|
2015-12-09 23:25:44 +00:00
|
|
|
opentext
|
2015-08-24 23:56:30 +00:00
|
|
|
writetext Text_CongratulationsYouveBeatenAllTheTrainers
|
2019-03-10 20:39:31 +00:00
|
|
|
sjump Script_GivePlayerHisPrize
|
2013-02-17 06:54:07 +00:00
|
|
|
|
2020-06-21 20:27:43 +00:00
|
|
|
Script_TooMuchTimeElapsedNoRegister: ; unreferenced
|
2019-03-10 19:31:59 +00:00
|
|
|
setval BATTLETOWERACTION_CHALLENGECANCELED
|
2018-01-24 16:17:05 +00:00
|
|
|
special BattleTowerAction
|
2015-12-09 23:25:44 +00:00
|
|
|
opentext
|
2015-08-24 23:56:30 +00:00
|
|
|
writetext Text_TooMuchTimeElapsedNoRegister
|
2015-11-25 15:16:29 +00:00
|
|
|
waitbutton
|
2013-02-17 06:54:07 +00:00
|
|
|
closetext
|
|
|
|
end
|
|
|
|
|
2020-06-21 20:27:43 +00:00
|
|
|
Script_ChallengeCanceled: ; unreferenced
|
2019-03-10 19:31:59 +00:00
|
|
|
setval BATTLETOWERACTION_CHALLENGECANCELED
|
2018-01-24 16:17:05 +00:00
|
|
|
special BattleTowerAction
|
2019-03-10 19:31:59 +00:00
|
|
|
setval BATTLETOWERACTION_06
|
2018-01-24 16:17:05 +00:00
|
|
|
special BattleTowerAction
|
2015-12-09 23:25:44 +00:00
|
|
|
opentext
|
2015-08-24 23:56:30 +00:00
|
|
|
writetext Text_ThanksForVisiting
|
2015-08-24 17:35:05 +00:00
|
|
|
writetext Text_WeHopeToServeYouAgain
|
2015-11-25 15:16:29 +00:00
|
|
|
waitbutton
|
2013-02-17 06:54:07 +00:00
|
|
|
closetext
|
|
|
|
end
|
|
|
|
|
2020-10-26 19:45:57 +00:00
|
|
|
Text_ReturnedAfterSave_Mobile: ; unreferenced
|
2014-03-06 05:29:44 +00:00
|
|
|
text "You'll be returned"
|
|
|
|
line "after you SAVE."
|
|
|
|
done
|
2013-05-01 17:29:45 +00:00
|
|
|
|
2018-01-17 03:57:19 +00:00
|
|
|
BattleTowerBattleRoom_MapEvents:
|
2018-01-30 19:15:47 +00:00
|
|
|
db 0, 0 ; filler
|
2013-02-17 06:54:07 +00:00
|
|
|
|
2020-07-24 13:49:26 +00:00
|
|
|
def_warp_events
|
2018-02-02 03:22:07 +00:00
|
|
|
warp_event 3, 7, BATTLE_TOWER_HALLWAY, 4
|
|
|
|
warp_event 4, 7, BATTLE_TOWER_HALLWAY, 4
|
2013-02-17 06:54:07 +00:00
|
|
|
|
2020-07-24 13:49:26 +00:00
|
|
|
def_coord_events
|
2013-02-17 06:54:07 +00:00
|
|
|
|
2020-07-24 13:49:26 +00:00
|
|
|
def_bg_events
|
2013-02-17 06:54:07 +00:00
|
|
|
|
2020-07-24 13:49:26 +00:00
|
|
|
def_object_events
|
2018-02-02 03:22:07 +00:00
|
|
|
object_event 4, 0, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_BATTLE_TOWER_BATTLE_ROOM_YOUNGSTER
|
|
|
|
object_event 1, 6, SPRITE_RECEPTIONIST, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, -1
|