pokecrystal-board/maps/BattleTowerBattleRoom.asm

162 lines
4.4 KiB
NASM
Raw Normal View History

2015-11-27 00:22:14 -05:00
const_value set 2
const BATTLETOWERBATTLEROOM_YOUNGSTER
const BATTLETOWERBATTLEROOM_RECEPTIONIST
2015-07-10 02:45:35 -06:00
BattleTowerBattleRoom_MapScriptHeader:
.MapTriggers:
db 2
maptrigger .EnterBattleRoom
maptrigger .DummyTrigger
.MapCallbacks:
db 0
2015-11-26 21:05:32 -05:00
.EnterBattleRoom: ; 0x9f419
2015-11-27 00:22:14 -05:00
disappear BATTLETOWERBATTLEROOM_YOUNGSTER
2015-08-25 01:56:30 +02:00
priorityjump Script_BattleRoom
dotrigger $1
2015-11-26 21:05:32 -05:00
.DummyTrigger:
end
2015-08-25 01:56:30 +02:00
Script_BattleRoom: ; 0x9f421
2015-11-26 21:05:32 -05:00
applymovement PLAYER, MovementData_BattleTowerBattleRoomPlayerWalksIn
2015-08-25 01:56:30 +02:00
; beat all 7 opponents in a row
Script_BattleRoomLoop: ; 0x9f425
2015-12-08 16:06:13 -05:00
writebyte BATTLETOWERBATTLEROOM_YOUNGSTER
special Function_LoadOpponentTrainerAndPokemonsWithOTSprite
2015-11-27 00:22:14 -05:00
appear BATTLETOWERBATTLEROOM_YOUNGSTER
warpsound
2015-11-25 10:16:29 -05:00
waitsfx
2015-11-27 00:22:14 -05:00
applymovement BATTLETOWERBATTLEROOM_YOUNGSTER, MovementData_BattleTowerBattleRoomOpponentWalksIn
2015-12-09 18:25:44 -05:00
opentext
2015-11-03 22:35:36 -05:00
battletowertext 1
2015-11-29 22:29:45 -05:00
buttonsound
2015-11-25 10:16:29 -05:00
closetext
2015-11-03 15:05:19 -05:00
special BattleTowerBattle ; calls predef startbattle
2015-11-26 21:05:32 -05:00
special FadeOutPalettes
reloadmap
2015-11-03 15:05:19 -05:00
if_not_equal $0, Script_FailedBattleTowerChallenge
2015-09-01 06:26:31 +02:00
copybytetovar wNrOfBeatenBattleTowerTrainers ; wcf64
if_equal BATTLETOWER_NROFTRAINERS, Script_BeatenAllTrainers
2015-11-27 00:22:14 -05:00
applymovement BATTLETOWERBATTLEROOM_YOUNGSTER, MovementData_BattleTowerBattleRoomOpponentWalksOut
warpsound
2015-11-27 00:22:14 -05:00
disappear BATTLETOWERBATTLEROOM_YOUNGSTER
applymovement BATTLETOWERBATTLEROOM_RECEPTIONIST, MovementData_BattleTowerBattleRoomReceptionistWalksToPlayer
2015-11-26 21:05:32 -05:00
applymovement PLAYER, MovementData_BattleTowerBattleRoomPlayerTurnsToFaceReceptionist
2015-12-09 18:25:44 -05:00
opentext
2015-08-24 19:35:05 +02:00
writetext Text_YourPkmnWillBeHealedToFullHealth
2015-11-25 10:16:29 -05:00
waitbutton
closetext
playmusic MUSIC_HEAL
2015-11-26 21:05:32 -05:00
special FadeOutPalettes
special LoadMapPalettes
pause 60
2015-11-26 21:05:32 -05:00
special FadeInPalettes
special RestartMapMusic
2015-12-09 18:25:44 -05:00
opentext
2015-08-24 19:35:05 +02:00
writetext Text_NextUpOpponentNo
yesorno
2015-08-25 01:56:30 +02:00
iffalse Script_DontBattleNextOpponent
Script_ContinueAndBattleNextOpponent: ; 0x9f477
2015-11-25 10:16:29 -05:00
closetext
2015-11-26 21:05:32 -05:00
applymovement PLAYER, MovementData_BattleTowerBattleRoomPlayerTurnsToFaceNextOpponent
2015-11-27 00:22:14 -05:00
applymovement BATTLETOWERBATTLEROOM_RECEPTIONIST, MovementData_BattleTowerBattleRoomReceptionistWalksAway
2015-08-25 01:56:30 +02:00
jump Script_BattleRoomLoop
2015-08-25 01:56:30 +02:00
Script_DontBattleNextOpponent: ; 0x9f483
2015-08-24 19:35:05 +02:00
writetext Text_SaveAndEndTheSession
yesorno
2015-08-25 01:56:30 +02:00
iffalse Script_DontSaveAndEndTheSession
2015-11-26 21:05:32 -05:00
writebyte BATTLETOWERACTION_SAVELEVELGROUP ; save level group
2015-11-03 15:05:19 -05:00
special BattleTowerAction
2015-12-08 16:06:13 -05:00
writebyte BATTLETOWERACTION_SAVEOPTIONS ; choose reward
2015-11-03 15:05:19 -05:00
special BattleTowerAction
2015-12-08 16:06:13 -05:00
writebyte BATTLETOWERACTION_SAVE_AND_QUIT ; quicksave
2015-11-03 15:05:19 -05:00
special BattleTowerAction
playsound SFX_SAVE
2015-11-25 10:16:29 -05:00
waitsfx
2015-11-26 21:05:32 -05:00
special FadeOutPalettes
special Reset
2015-08-25 01:56:30 +02:00
Script_DontSaveAndEndTheSession: ; 0x9f4a3
2015-08-24 19:35:05 +02:00
writetext Text_CancelYourBattleRoomChallenge
yesorno
2015-08-25 01:56:30 +02:00
iffalse Script_ContinueAndBattleNextOpponent
2015-11-26 21:05:32 -05:00
writebyte BATTLETOWERACTION_CHALLENGECANCELED
2015-11-03 15:05:19 -05:00
special BattleTowerAction
2015-11-26 21:05:32 -05:00
writebyte BATTLETOWERACTION_06
2015-11-03 15:05:19 -05:00
special BattleTowerAction
2015-11-25 10:16:29 -05:00
closetext
2015-11-26 21:05:32 -05:00
special FadeOutPalettes
2015-11-03 15:05:19 -05:00
warpfacing UP, BATTLE_TOWER_1F, $7, $7
2015-12-09 18:25:44 -05:00
opentext
2015-11-26 21:05:32 -05:00
jump Script_BattleTowerHopeToServeYouAgain
2015-11-03 15:05:19 -05:00
Script_FailedBattleTowerChallenge:
pause 60
special Special_BattleTowerFade
2015-11-03 15:05:19 -05:00
warpfacing UP, BATTLE_TOWER_1F, $7, $7
2015-11-26 21:05:32 -05:00
writebyte BATTLETOWERACTION_CHALLENGECANCELED
2015-11-03 15:05:19 -05:00
special BattleTowerAction
2015-12-09 18:25:44 -05:00
opentext
2015-08-25 01:56:30 +02:00
writetext Text_ThanksForVisiting
2015-11-25 10:16:29 -05:00
waitbutton
closetext
end
2015-08-25 01:56:30 +02:00
Script_BeatenAllTrainers: ; 0x9f4d9
pause 60
special Special_BattleTowerFade
2015-11-03 15:05:19 -05:00
warpfacing UP, BATTLE_TOWER_1F, $7, $7
2015-11-26 21:05:32 -05:00
Script_BeatenAllTrainers2:
2015-12-09 18:25:44 -05:00
opentext
2015-08-25 01:56:30 +02:00
writetext Text_CongratulationsYouveBeatenAllTheTrainers
jump Script_GivePlayerHisPrize
2015-11-26 21:05:32 -05:00
UnreferencedScript_0x9f4eb:
writebyte BATTLETOWERACTION_CHALLENGECANCELED
2015-11-03 15:05:19 -05:00
special BattleTowerAction
2015-12-09 18:25:44 -05:00
opentext
2015-08-25 01:56:30 +02:00
writetext Text_TooMuchTimeElapsedNoRegister
2015-11-25 10:16:29 -05:00
waitbutton
closetext
end
2015-11-26 21:05:32 -05:00
UnreferencedScript_0x9f4f7:
writebyte BATTLETOWERACTION_CHALLENGECANCELED
2015-11-03 15:05:19 -05:00
special BattleTowerAction
2015-11-26 21:05:32 -05:00
writebyte BATTLETOWERACTION_06
2015-11-03 15:05:19 -05:00
special BattleTowerAction
2015-12-09 18:25:44 -05:00
opentext
2015-08-25 01:56:30 +02:00
writetext Text_ThanksForVisiting
2015-08-24 19:35:05 +02:00
writetext Text_WeHopeToServeYouAgain
2015-11-25 10:16:29 -05:00
waitbutton
closetext
end
2013-05-01 13:29:45 -04:00
2015-11-26 21:05:32 -05:00
Text_ReturnedAfterSave_Mobile:
text "You'll be returned"
line "after you SAVE."
done
2013-05-01 13:29:45 -04:00
2015-07-10 02:45:35 -06:00
BattleTowerBattleRoom_MapEventHeader:
; filler
db 0, 0
.Warps:
db 2
warp_def $7, $3, 4, BATTLE_TOWER_HALLWAY
warp_def $7, $4, 4, BATTLE_TOWER_HALLWAY
.XYTriggers:
db 0
.Signposts:
db 0
.PersonEvents:
db 2
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