2015-11-26 21:22:14 -08:00
|
|
|
const_value set 2
|
|
|
|
const BATTLETOWERBATTLEROOM_YOUNGSTER
|
|
|
|
const BATTLETOWERBATTLEROOM_RECEPTIONIST
|
|
|
|
|
2015-07-10 01:45:35 -07:00
|
|
|
BattleTowerBattleRoom_MapScriptHeader:
|
2015-07-20 21:02:21 -07:00
|
|
|
.MapTriggers:
|
2013-02-16 22:54:07 -08:00
|
|
|
db 2
|
2017-12-10 14:53:21 -08:00
|
|
|
maptrigger .EnterBattleRoom
|
|
|
|
maptrigger .DummyTrigger
|
2013-02-16 22:54:07 -08:00
|
|
|
|
2015-07-20 21:02:21 -07:00
|
|
|
.MapCallbacks:
|
2013-02-16 22:54:07 -08:00
|
|
|
db 0
|
|
|
|
|
2015-11-26 18:05:32 -08:00
|
|
|
.EnterBattleRoom: ; 0x9f419
|
2015-11-26 21:22:14 -08:00
|
|
|
disappear BATTLETOWERBATTLEROOM_YOUNGSTER
|
2015-08-24 16:56:30 -07:00
|
|
|
priorityjump Script_BattleRoom
|
2013-02-16 22:54:07 -08:00
|
|
|
dotrigger $1
|
2015-11-26 18:05:32 -08:00
|
|
|
.DummyTrigger:
|
2013-02-16 22:54:07 -08:00
|
|
|
end
|
|
|
|
|
2015-08-24 16:56:30 -07:00
|
|
|
Script_BattleRoom: ; 0x9f421
|
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
|
|
|
|
Script_BattleRoomLoop: ; 0x9f425
|
2015-12-08 13:06:13 -08:00
|
|
|
writebyte BATTLETOWERBATTLEROOM_YOUNGSTER
|
2015-08-31 05:31:13 -07:00
|
|
|
special Function_LoadOpponentTrainerAndPokemonsWithOTSprite
|
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
|
2015-11-03 19:35:36 -08:00
|
|
|
battletowertext 1
|
2015-11-29 19:29:45 -08:00
|
|
|
buttonsound
|
2015-11-25 07:16:29 -08:00
|
|
|
closetext
|
2015-11-03 12:05:19 -08:00
|
|
|
special BattleTowerBattle ; calls predef startbattle
|
2015-11-26 18:05:32 -08:00
|
|
|
special FadeOutPalettes
|
2013-12-02 11:18:03 -08:00
|
|
|
reloadmap
|
2015-11-03 12:05:19 -08:00
|
|
|
if_not_equal $0, Script_FailedBattleTowerChallenge
|
2015-08-31 21:26:31 -07:00
|
|
|
copybytetovar wNrOfBeatenBattleTowerTrainers ; wcf64
|
|
|
|
if_equal BATTLETOWER_NROFTRAINERS, 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
|
2015-08-24 10:35:05 -07:00
|
|
|
writetext Text_YourPkmnWillBeHealedToFullHealth
|
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
|
2015-11-26 18:05:32 -08:00
|
|
|
special FadeOutPalettes
|
2015-07-20 00:51:52 -07:00
|
|
|
special LoadMapPalettes
|
2013-02-16 22:54:07 -08:00
|
|
|
pause 60
|
2015-11-26 18:05:32 -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
|
|
|
|
Script_ContinueAndBattleNextOpponent: ; 0x9f477
|
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
|
2015-08-24 16:56:30 -07:00
|
|
|
jump Script_BattleRoomLoop
|
2013-02-16 22:54:07 -08:00
|
|
|
|
2015-08-24 16:56:30 -07:00
|
|
|
Script_DontBattleNextOpponent: ; 0x9f483
|
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
|
2015-11-26 18:05:32 -08:00
|
|
|
writebyte BATTLETOWERACTION_SAVELEVELGROUP ; save level group
|
2015-11-03 12:05:19 -08:00
|
|
|
special BattleTowerAction
|
2015-12-08 13:06:13 -08:00
|
|
|
writebyte BATTLETOWERACTION_SAVEOPTIONS ; choose reward
|
2015-11-03 12:05:19 -08:00
|
|
|
special BattleTowerAction
|
2015-12-08 13:06:13 -08:00
|
|
|
writebyte BATTLETOWERACTION_SAVE_AND_QUIT ; quicksave
|
2015-11-03 12:05:19 -08:00
|
|
|
special BattleTowerAction
|
2014-04-30 03:04:35 -07:00
|
|
|
playsound SFX_SAVE
|
2015-11-25 07:16:29 -08:00
|
|
|
waitsfx
|
2015-11-26 18:05:32 -08:00
|
|
|
special FadeOutPalettes
|
2015-02-11 15:03:42 -08:00
|
|
|
special Reset
|
2015-08-24 16:56:30 -07:00
|
|
|
Script_DontSaveAndEndTheSession: ; 0x9f4a3
|
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
|
2015-11-26 18:05:32 -08:00
|
|
|
writebyte BATTLETOWERACTION_CHALLENGECANCELED
|
2015-11-03 12:05:19 -08:00
|
|
|
special BattleTowerAction
|
2015-11-26 18:05:32 -08:00
|
|
|
writebyte BATTLETOWERACTION_06
|
2015-11-03 12:05:19 -08:00
|
|
|
special BattleTowerAction
|
2015-11-25 07:16:29 -08:00
|
|
|
closetext
|
2015-11-26 18:05:32 -08:00
|
|
|
special FadeOutPalettes
|
2015-11-03 12:05:19 -08:00
|
|
|
warpfacing UP, BATTLE_TOWER_1F, $7, $7
|
2015-12-09 15:25:44 -08:00
|
|
|
opentext
|
2015-11-26 18:05:32 -08:00
|
|
|
jump 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
|
2015-07-20 15:59:26 -07:00
|
|
|
special Special_BattleTowerFade
|
2015-11-03 12:05:19 -08:00
|
|
|
warpfacing UP, BATTLE_TOWER_1F, $7, $7
|
2015-11-26 18:05:32 -08:00
|
|
|
writebyte BATTLETOWERACTION_CHALLENGECANCELED
|
2015-11-03 12:05:19 -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
|
|
|
|
|
2015-08-24 16:56:30 -07:00
|
|
|
Script_BeatenAllTrainers: ; 0x9f4d9
|
2013-02-16 22:54:07 -08:00
|
|
|
pause 60
|
2015-07-20 15:59:26 -07:00
|
|
|
special Special_BattleTowerFade
|
2015-11-03 12:05:19 -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
|
|
|
|
jump Script_GivePlayerHisPrize
|
2013-02-16 22:54:07 -08:00
|
|
|
|
2015-11-26 18:05:32 -08:00
|
|
|
UnreferencedScript_0x9f4eb:
|
|
|
|
writebyte BATTLETOWERACTION_CHALLENGECANCELED
|
2015-11-03 12:05:19 -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:
|
|
|
|
writebyte BATTLETOWERACTION_CHALLENGECANCELED
|
2015-11-03 12:05:19 -08:00
|
|
|
special BattleTowerAction
|
2015-11-26 18:05:32 -08:00
|
|
|
writebyte BATTLETOWERACTION_06
|
2015-11-03 12:05:19 -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
|
|
|
|
|
2013-05-01 10:29:45 -07:00
|
|
|
|
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
|
|
|
|
2013-02-16 22:54:07 -08:00
|
|
|
|
2015-07-10 01:45:35 -07:00
|
|
|
BattleTowerBattleRoom_MapEventHeader:
|
2013-02-16 22:54:07 -08:00
|
|
|
; filler
|
|
|
|
db 0, 0
|
|
|
|
|
2015-07-20 21:02:21 -07:00
|
|
|
.Warps:
|
2013-02-16 22:54:07 -08:00
|
|
|
db 2
|
2015-07-23 09:59:19 -07:00
|
|
|
warp_def $7, $3, 4, BATTLE_TOWER_HALLWAY
|
|
|
|
warp_def $7, $4, 4, BATTLE_TOWER_HALLWAY
|
2013-02-16 22:54:07 -08:00
|
|
|
|
2015-07-20 21:02:21 -07:00
|
|
|
.XYTriggers:
|
2013-02-16 22:54:07 -08:00
|
|
|
db 0
|
|
|
|
|
2015-07-20 21:02:21 -07:00
|
|
|
.Signposts:
|
2013-02-16 22:54:07 -08:00
|
|
|
db 0
|
|
|
|
|
2015-07-20 21:02:21 -07:00
|
|
|
.PersonEvents:
|
2013-02-16 22:54:07 -08:00
|
|
|
db 2
|
2015-11-15 12:07:20 -08:00
|
|
|
person_event SPRITE_YOUNGSTER, 0, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_BATTLE_TOWER_BATTLE_ROOM_YOUNGSTER
|
|
|
|
person_event SPRITE_RECEPTIONIST, 6, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, -1
|