pokecrystal/maps/BattleTowerBattleRoom.asm

153 lines
4.3 KiB
NASM
Raw Normal View History

object_const_def ; object_event constants
2015-11-27 05:22:14 +00:00
const BATTLETOWERBATTLEROOM_YOUNGSTER
const BATTLETOWERBATTLEROOM_RECEPTIONIST
BattleTowerBattleRoom_MapScripts:
db 2 ; scene scripts
scene_script .EnterBattleRoom ; SCENE_DEFAULT
scene_script .DummyScene ; SCENE_FINISHED
db 0 ; callbacks
.EnterBattleRoom:
2015-11-27 05:22:14 +00:00
disappear BATTLETOWERBATTLEROOM_YOUNGSTER
prioritysjump Script_BattleRoom
setscene SCENE_FINISHED
.DummyScene:
end
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
Script_BattleRoomLoop:
setval BATTLETOWERBATTLEROOM_YOUNGSTER
special LoadOpponentTrainerAndPokemonWithOTSprite
2015-11-27 05:22:14 +00:00
appear BATTLETOWERBATTLEROOM_YOUNGSTER
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
battletowertext BATTLETOWERTEXT_INTRO
2019-11-03 17:48:54 +00:00
promptbutton
2015-11-25 15:16:29 +00:00
closetext
special BattleTowerBattle ; predef StartBattle
special FadeOutPalettes
reloadmap
2018-02-03 02:09:17 +00:00
ifnotequal $0, Script_FailedBattleTowerChallenge
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
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
writetext Text_YourMonWillBeHealedToFullHealth
2015-11-25 15:16:29 +00:00
waitbutton
closetext
playmusic MUSIC_HEAL
special FadeOutPalettes
special LoadMapPalettes
pause 60
special FadeInPalettes
special RestartMapMusic
2015-12-09 23:25:44 +00:00
opentext
2015-08-24 17:35:05 +00:00
writetext Text_NextUpOpponentNo
yesorno
2015-08-24 23:56:30 +00:00
iffalse Script_DontBattleNextOpponent
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
sjump Script_BattleRoomLoop
Script_DontBattleNextOpponent:
2015-08-24 17:35:05 +00:00
writetext Text_SaveAndEndTheSession
yesorno
2015-08-24 23:56:30 +00:00
iffalse Script_DontSaveAndEndTheSession
setval BATTLETOWERACTION_SAVELEVELGROUP ; save level group
special BattleTowerAction
setval BATTLETOWERACTION_SAVEOPTIONS ; choose reward
special BattleTowerAction
setval BATTLETOWERACTION_SAVE_AND_QUIT ; quicksave
special BattleTowerAction
playsound SFX_SAVE
2015-11-25 15:16:29 +00:00
waitsfx
special FadeOutPalettes
special Reset
Script_DontSaveAndEndTheSession:
2015-08-24 17:35:05 +00:00
writetext Text_CancelYourBattleRoomChallenge
yesorno
2015-08-24 23:56:30 +00:00
iffalse Script_ContinueAndBattleNextOpponent
setval BATTLETOWERACTION_CHALLENGECANCELED
special BattleTowerAction
setval BATTLETOWERACTION_06
special BattleTowerAction
2015-11-25 15:16:29 +00:00
closetext
special FadeOutPalettes
warpfacing UP, BATTLE_TOWER_1F, 7, 7
2015-12-09 23:25:44 +00:00
opentext
sjump Script_BattleTowerHopeToServeYouAgain
2015-11-03 20:05:19 +00:00
Script_FailedBattleTowerChallenge:
pause 60
special BattleTowerFade
warpfacing UP, BATTLE_TOWER_1F, 7, 7
setval BATTLETOWERACTION_CHALLENGECANCELED
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
closetext
end
Script_BeatenAllTrainers:
pause 60
special BattleTowerFade
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
sjump Script_GivePlayerHisPrize
Script_TooMuchTimeElapsedNoRegister: ; unreferenced
setval BATTLETOWERACTION_CHALLENGECANCELED
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
closetext
end
Script_ChallengeCanceled: ; unreferenced
setval BATTLETOWERACTION_CHALLENGECANCELED
special BattleTowerAction
setval BATTLETOWERACTION_06
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
closetext
end
2015-11-27 02:05:32 +00:00
Text_ReturnedAfterSave_Mobile:
text "You'll be returned"
line "after you SAVE."
done
2013-05-01 17:29:45 +00:00
BattleTowerBattleRoom_MapEvents:
db 0, 0 ; filler
db 2 ; 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
db 0 ; coord events
db 0 ; bg events
db 2 ; 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