2019-04-21 14:42:25 -07:00
|
|
|
object_const_def ; object_event constants
|
2015-11-26 21:22:14 -08:00
|
|
|
const BATTLETOWERBATTLEROOM_YOUNGSTER
|
|
|
|
const BATTLETOWERBATTLEROOM_RECEPTIONIST
|
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
BattleTowerBattleRoom_MapScripts:
|
2018-01-30 11:15:47 -08:00
|
|
|
db 2 ; scene scripts
|
2018-02-01 09:40:58 -08:00
|
|
|
scene_script .EnterBattleRoom ; SCENE_DEFAULT
|
2018-02-01 12:06:06 -08:00
|
|
|
scene_script .DummyScene ; SCENE_FINISHED
|
2013-02-16 22:54:07 -08:00
|
|
|
|
2018-01-30 11:15:47 -08:00
|
|
|
db 0 ; callbacks
|
2013-02-16 22:54:07 -08:00
|
|
|
|
2018-03-01 14:33:43 -08:00
|
|
|
.EnterBattleRoom:
|
2015-11-26 21:22:14 -08:00
|
|
|
disappear BATTLETOWERBATTLEROOM_YOUNGSTER
|
2019-03-10 13:39:31 -07:00
|
|
|
prioritysjump Script_BattleRoom
|
2018-02-01 12:06:06 -08:00
|
|
|
setscene SCENE_FINISHED
|
2017-12-24 10:46:34 -08:00
|
|
|
.DummyScene:
|
2013-02-16 22:54:07 -08:00
|
|
|
end
|
|
|
|
|
2018-03-01 14:33:43 -08:00
|
|
|
Script_BattleRoom:
|
2015-11-26 18:05:32 -08:00
|
|
|
applymovement PLAYER, MovementData_BattleTowerBattleRoomPlayerWalksIn
|
2015-08-24 16:56:30 -07:00
|
|
|
; beat all 7 opponents in a row
|
2018-03-01 14:33:43 -08:00
|
|
|
Script_BattleRoomLoop:
|
2019-03-10 12:31:59 -07:00
|
|
|
setval BATTLETOWERBATTLEROOM_YOUNGSTER
|
2018-01-24 08:17:05 -08:00
|
|
|
special LoadOpponentTrainerAndPokemonWithOTSprite
|
2015-11-26 21:22:14 -08:00
|
|
|
appear BATTLETOWERBATTLEROOM_YOUNGSTER
|
2013-02-16 22:54:07 -08:00
|
|
|
warpsound
|
2015-11-25 07:16:29 -08:00
|
|
|
waitsfx
|
2015-11-26 21:22:14 -08:00
|
|
|
applymovement BATTLETOWERBATTLEROOM_YOUNGSTER, MovementData_BattleTowerBattleRoomOpponentWalksIn
|
2015-12-09 15:25:44 -08:00
|
|
|
opentext
|
2018-01-14 16:26:55 -08:00
|
|
|
battletowertext BATTLETOWERTEXT_INTRO
|
2015-11-29 19:29:45 -08:00
|
|
|
buttonsound
|
2015-11-25 07:16:29 -08:00
|
|
|
closetext
|
2018-01-24 08:17:05 -08:00
|
|
|
special BattleTowerBattle ; calls predef startbattle
|
|
|
|
special FadeOutPalettes
|
2013-12-02 11:18:03 -08:00
|
|
|
reloadmap
|
2018-02-02 18:09:17 -08:00
|
|
|
ifnotequal $0, Script_FailedBattleTowerChallenge
|
2019-03-10 12:31:59 -07:00
|
|
|
readmem wNrOfBeatenBattleTowerTrainers
|
2018-02-02 18:09:17 -08:00
|
|
|
ifequal BATTLETOWER_STREAK_LENGTH, Script_BeatenAllTrainers
|
2015-11-26 21:22:14 -08:00
|
|
|
applymovement BATTLETOWERBATTLEROOM_YOUNGSTER, MovementData_BattleTowerBattleRoomOpponentWalksOut
|
2013-02-16 22:54:07 -08:00
|
|
|
warpsound
|
2015-11-26 21:22:14 -08:00
|
|
|
disappear BATTLETOWERBATTLEROOM_YOUNGSTER
|
|
|
|
applymovement BATTLETOWERBATTLEROOM_RECEPTIONIST, MovementData_BattleTowerBattleRoomReceptionistWalksToPlayer
|
2015-11-26 18:05:32 -08:00
|
|
|
applymovement PLAYER, MovementData_BattleTowerBattleRoomPlayerTurnsToFaceReceptionist
|
2015-12-09 15:25:44 -08:00
|
|
|
opentext
|
2018-02-22 08:13:29 -08:00
|
|
|
writetext Text_YourMonWillBeHealedToFullHealth
|
2015-11-25 07:16:29 -08:00
|
|
|
waitbutton
|
2013-02-16 22:54:07 -08:00
|
|
|
closetext
|
2014-04-30 03:04:35 -07:00
|
|
|
playmusic MUSIC_HEAL
|
2018-01-24 08:17:05 -08:00
|
|
|
special FadeOutPalettes
|
|
|
|
special LoadMapPalettes
|
2013-02-16 22:54:07 -08:00
|
|
|
pause 60
|
2018-01-24 08:17:05 -08:00
|
|
|
special FadeInPalettes
|
2015-02-11 15:03:42 -08:00
|
|
|
special RestartMapMusic
|
2015-12-09 15:25:44 -08:00
|
|
|
opentext
|
2015-08-24 10:35:05 -07:00
|
|
|
writetext Text_NextUpOpponentNo
|
2013-02-16 22:54:07 -08:00
|
|
|
yesorno
|
2015-08-24 16:56:30 -07:00
|
|
|
iffalse Script_DontBattleNextOpponent
|
2018-03-01 14:33:43 -08:00
|
|
|
Script_ContinueAndBattleNextOpponent:
|
2015-11-25 07:16:29 -08:00
|
|
|
closetext
|
2015-11-26 18:05:32 -08:00
|
|
|
applymovement PLAYER, MovementData_BattleTowerBattleRoomPlayerTurnsToFaceNextOpponent
|
2015-11-26 21:22:14 -08:00
|
|
|
applymovement BATTLETOWERBATTLEROOM_RECEPTIONIST, MovementData_BattleTowerBattleRoomReceptionistWalksAway
|
2019-03-10 13:39:31 -07:00
|
|
|
sjump Script_BattleRoomLoop
|
2013-02-16 22:54:07 -08:00
|
|
|
|
2018-03-01 14:33:43 -08:00
|
|
|
Script_DontBattleNextOpponent:
|
2015-08-24 10:35:05 -07:00
|
|
|
writetext Text_SaveAndEndTheSession
|
2013-02-16 22:54:07 -08:00
|
|
|
yesorno
|
2015-08-24 16:56:30 -07:00
|
|
|
iffalse Script_DontSaveAndEndTheSession
|
2019-03-10 12:31:59 -07:00
|
|
|
setval BATTLETOWERACTION_SAVELEVELGROUP ; save level group
|
2018-01-24 08:17:05 -08:00
|
|
|
special BattleTowerAction
|
2019-03-10 12:31:59 -07:00
|
|
|
setval BATTLETOWERACTION_SAVEOPTIONS ; choose reward
|
2018-01-24 08:17:05 -08:00
|
|
|
special BattleTowerAction
|
2019-03-10 12:31:59 -07:00
|
|
|
setval BATTLETOWERACTION_SAVE_AND_QUIT ; quicksave
|
2018-01-24 08:17:05 -08:00
|
|
|
special BattleTowerAction
|
2014-04-30 03:04:35 -07:00
|
|
|
playsound SFX_SAVE
|
2015-11-25 07:16:29 -08:00
|
|
|
waitsfx
|
2018-01-24 08:17:05 -08:00
|
|
|
special FadeOutPalettes
|
2015-02-11 15:03:42 -08:00
|
|
|
special Reset
|
2018-03-01 14:33:43 -08:00
|
|
|
Script_DontSaveAndEndTheSession:
|
2015-08-24 10:35:05 -07:00
|
|
|
writetext Text_CancelYourBattleRoomChallenge
|
2013-02-16 22:54:07 -08:00
|
|
|
yesorno
|
2015-08-24 16:56:30 -07:00
|
|
|
iffalse Script_ContinueAndBattleNextOpponent
|
2019-03-10 12:31:59 -07:00
|
|
|
setval BATTLETOWERACTION_CHALLENGECANCELED
|
2018-01-24 08:17:05 -08:00
|
|
|
special BattleTowerAction
|
2019-03-10 12:31:59 -07:00
|
|
|
setval BATTLETOWERACTION_06
|
2018-01-24 08:17:05 -08:00
|
|
|
special BattleTowerAction
|
2015-11-25 07:16:29 -08:00
|
|
|
closetext
|
2018-01-24 08:17:05 -08:00
|
|
|
special FadeOutPalettes
|
2018-01-09 15:45:25 -08:00
|
|
|
warpfacing UP, BATTLE_TOWER_1F, 7, 7
|
2015-12-09 15:25:44 -08:00
|
|
|
opentext
|
2019-03-10 13:39:31 -07:00
|
|
|
sjump Script_BattleTowerHopeToServeYouAgain
|
2013-02-16 22:54:07 -08:00
|
|
|
|
2015-11-03 12:05:19 -08:00
|
|
|
Script_FailedBattleTowerChallenge:
|
2013-02-16 22:54:07 -08:00
|
|
|
pause 60
|
2018-01-24 08:17:05 -08:00
|
|
|
special BattleTowerFade
|
2018-01-09 15:45:25 -08:00
|
|
|
warpfacing UP, BATTLE_TOWER_1F, 7, 7
|
2019-03-10 12:31:59 -07:00
|
|
|
setval BATTLETOWERACTION_CHALLENGECANCELED
|
2018-01-24 08:17:05 -08:00
|
|
|
special BattleTowerAction
|
2015-12-09 15:25:44 -08:00
|
|
|
opentext
|
2015-08-24 16:56:30 -07:00
|
|
|
writetext Text_ThanksForVisiting
|
2015-11-25 07:16:29 -08:00
|
|
|
waitbutton
|
2013-02-16 22:54:07 -08:00
|
|
|
closetext
|
|
|
|
end
|
|
|
|
|
2018-03-01 14:33:43 -08:00
|
|
|
Script_BeatenAllTrainers:
|
2013-02-16 22:54:07 -08:00
|
|
|
pause 60
|
2018-01-24 08:17:05 -08:00
|
|
|
special BattleTowerFade
|
2018-01-09 15:45:25 -08:00
|
|
|
warpfacing UP, BATTLE_TOWER_1F, 7, 7
|
2015-11-26 18:05:32 -08:00
|
|
|
Script_BeatenAllTrainers2:
|
2015-12-09 15:25:44 -08:00
|
|
|
opentext
|
2015-08-24 16:56:30 -07:00
|
|
|
writetext Text_CongratulationsYouveBeatenAllTheTrainers
|
2019-03-10 13:39:31 -07:00
|
|
|
sjump Script_GivePlayerHisPrize
|
2013-02-16 22:54:07 -08:00
|
|
|
|
2015-11-26 18:05:32 -08:00
|
|
|
UnreferencedScript_0x9f4eb:
|
2019-03-10 12:31:59 -07:00
|
|
|
setval BATTLETOWERACTION_CHALLENGECANCELED
|
2018-01-24 08:17:05 -08:00
|
|
|
special BattleTowerAction
|
2015-12-09 15:25:44 -08:00
|
|
|
opentext
|
2015-08-24 16:56:30 -07:00
|
|
|
writetext Text_TooMuchTimeElapsedNoRegister
|
2015-11-25 07:16:29 -08:00
|
|
|
waitbutton
|
2013-02-16 22:54:07 -08:00
|
|
|
closetext
|
|
|
|
end
|
|
|
|
|
2015-11-26 18:05:32 -08:00
|
|
|
UnreferencedScript_0x9f4f7:
|
2019-03-10 12:31:59 -07:00
|
|
|
setval BATTLETOWERACTION_CHALLENGECANCELED
|
2018-01-24 08:17:05 -08:00
|
|
|
special BattleTowerAction
|
2019-03-10 12:31:59 -07:00
|
|
|
setval BATTLETOWERACTION_06
|
2018-01-24 08:17:05 -08:00
|
|
|
special BattleTowerAction
|
2015-12-09 15:25:44 -08:00
|
|
|
opentext
|
2015-08-24 16:56:30 -07:00
|
|
|
writetext Text_ThanksForVisiting
|
2015-08-24 10:35:05 -07:00
|
|
|
writetext Text_WeHopeToServeYouAgain
|
2015-11-25 07:16:29 -08:00
|
|
|
waitbutton
|
2013-02-16 22:54:07 -08:00
|
|
|
closetext
|
|
|
|
end
|
|
|
|
|
2015-11-26 18:05:32 -08:00
|
|
|
Text_ReturnedAfterSave_Mobile:
|
2014-03-05 21:29:44 -08:00
|
|
|
text "You'll be returned"
|
|
|
|
line "after you SAVE."
|
|
|
|
done
|
2013-05-01 10:29:45 -07:00
|
|
|
|
2018-01-16 19:57:19 -08:00
|
|
|
BattleTowerBattleRoom_MapEvents:
|
2018-01-30 11:15:47 -08:00
|
|
|
db 0, 0 ; filler
|
2013-02-16 22:54:07 -08:00
|
|
|
|
2018-01-30 11:15:47 -08:00
|
|
|
db 2 ; warp events
|
2018-02-01 19:22:07 -08:00
|
|
|
warp_event 3, 7, BATTLE_TOWER_HALLWAY, 4
|
|
|
|
warp_event 4, 7, BATTLE_TOWER_HALLWAY, 4
|
2013-02-16 22:54:07 -08:00
|
|
|
|
2018-01-30 11:15:47 -08:00
|
|
|
db 0 ; coord events
|
2013-02-16 22:54:07 -08:00
|
|
|
|
2018-01-30 11:15:47 -08:00
|
|
|
db 0 ; bg events
|
2013-02-16 22:54:07 -08:00
|
|
|
|
2018-01-30 11:15:47 -08:00
|
|
|
db 2 ; object events
|
2018-02-01 19:22:07 -08: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
|