pokecrystal-board/maps/BattleTowerBattleRoom.asm

160 lines
3.8 KiB
NASM
Raw Normal View History

2015-07-10 01:45:35 -07:00
BattleTowerBattleRoom_MapScriptHeader:
.MapTriggers:
db 2
; triggers
2015-11-02 11:37:02 -08:00
dw Script_EnterBattleRoom, 0
dw UnknownScript_0x9f420, 0
.MapCallbacks:
db 0
2015-08-24 16:56:30 -07:00
Script_EnterBattleRoom: ; 0x9f419
disappear $2
2015-08-24 16:56:30 -07:00
priorityjump Script_BattleRoom
dotrigger $1
2015-07-10 01:45:35 -07:00
UnknownScript_0x9f420:
end
2015-08-24 16:56:30 -07:00
Script_BattleRoom: ; 0x9f421
applymovement PLAYER, MovementData_0x9e58c
2015-08-24 16:56:30 -07:00
; beat all 7 opponents in a row
Script_BattleRoomLoop: ; 0x9f425
writebyte $2
special Function_LoadOpponentTrainerAndPokemonsWithOTSprite
appear $2
warpsound
waitbutton
applymovement $2, MovementData_0x9e592
loadfont
2015-11-03 19:35:36 -08:00
battletowertext 1
keeptextopen
loadmovesprites
2015-11-03 12:05:19 -08:00
special BattleTowerBattle ; calls predef startbattle
2015-11-20 08:47:52 -08:00
special RotatePalettesRightPalettes
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
applymovement $2, MovementData_0x9e597
warpsound
disappear $2
applymovement $3, MovementData_0x9e59c
applymovement PLAYER, MovementData_0x9e5a7
loadfont
2015-08-24 10:35:05 -07:00
writetext Text_YourPkmnWillBeHealedToFullHealth
closetext
loadmovesprites
playmusic MUSIC_HEAL
2015-11-20 08:47:52 -08:00
special RotatePalettesRightPalettes
special LoadMapPalettes
pause 60
2015-11-20 08:47:52 -08:00
special RotatePalettesLeftPalettes
special RestartMapMusic
loadfont
2015-08-24 10:35:05 -07:00
writetext Text_NextUpOpponentNo
yesorno
2015-08-24 16:56:30 -07:00
iffalse Script_DontBattleNextOpponent
Script_ContinueAndBattleNextOpponent: ; 0x9f477
loadmovesprites
applymovement PLAYER, MovementData_0x9e5a9
applymovement $3, MovementData_0x9e5a1
2015-08-24 16:56:30 -07:00
jump Script_BattleRoomLoop
2015-08-24 16:56:30 -07:00
Script_DontBattleNextOpponent: ; 0x9f483
2015-08-24 10:35:05 -07:00
writetext Text_SaveAndEndTheSession
yesorno
2015-08-24 16:56:30 -07:00
iffalse Script_DontSaveAndEndTheSession
2015-11-03 12:05:19 -08:00
writebyte BATTLE_TOWER_ACTION_07
special BattleTowerAction
writebyte BATTLE_TOWER_ACTION_1F
special BattleTowerAction
writebyte BATTLE_TOWER_ACTION_03
special BattleTowerAction
playsound SFX_SAVE
waitbutton
2015-11-20 08:47:52 -08:00
special RotatePalettesRightPalettes
special Reset
2015-08-24 16:56:30 -07:00
Script_DontSaveAndEndTheSession: ; 0x9f4a3
2015-08-24 10:35:05 -07:00
writetext Text_CancelYourBattleRoomChallenge
yesorno
2015-08-24 16:56:30 -07:00
iffalse Script_ContinueAndBattleNextOpponent
2015-11-03 12:05:19 -08:00
writebyte BATTLE_TOWER_ACTION_04
special BattleTowerAction
writebyte BATTLE_TOWER_ACTION_06
special BattleTowerAction
loadmovesprites
2015-11-20 08:47:52 -08:00
special RotatePalettesRightPalettes
2015-11-03 12:05:19 -08:00
warpfacing UP, BATTLE_TOWER_1F, $7, $7
loadfont
2015-01-20 00:01:23 -08:00
jump UnknownScript_0x9e4b0
2015-11-03 12:05:19 -08:00
Script_FailedBattleTowerChallenge:
pause 60
special Special_BattleTowerFade
2015-11-03 12:05:19 -08:00
warpfacing UP, BATTLE_TOWER_1F, $7, $7
writebyte BATTLE_TOWER_ACTION_04
special BattleTowerAction
loadfont
2015-08-24 16:56:30 -07:00
writetext Text_ThanksForVisiting
closetext
loadmovesprites
end
2015-08-24 16:56:30 -07:00
Script_BeatenAllTrainers: ; 0x9f4d9
pause 60
special Special_BattleTowerFade
2015-11-03 12:05:19 -08:00
warpfacing UP, BATTLE_TOWER_1F, $7, $7
2015-07-10 01:45:35 -07:00
BattleTowerBattleRoomScript_0x9f4e4:
loadfont
2015-08-24 16:56:30 -07:00
writetext Text_CongratulationsYouveBeatenAllTheTrainers
jump Script_GivePlayerHisPrize
2015-07-10 01:45:35 -07:00
UnknownScript_0x9f4eb:
2015-11-03 12:05:19 -08:00
writebyte BATTLE_TOWER_ACTION_04
special BattleTowerAction
loadfont
2015-08-24 16:56:30 -07:00
writetext Text_TooMuchTimeElapsedNoRegister
closetext
loadmovesprites
end
2015-07-10 01:45:35 -07:00
UnknownScript_0x9f4f7:
2015-11-03 12:05:19 -08:00
writebyte BATTLE_TOWER_ACTION_04
special BattleTowerAction
writebyte BATTLE_TOWER_ACTION_06
special BattleTowerAction
loadfont
2015-08-24 16:56:30 -07:00
writetext Text_ThanksForVisiting
2015-08-24 10:35:05 -07:00
writetext Text_WeHopeToServeYouAgain
closetext
loadmovesprites
end
2013-05-01 10:29:45 -07:00
2015-07-10 01:45:35 -07:00
UnknownText_0x9f50b:
text "You'll be returned"
line "after you SAVE."
done
2013-05-01 10:29:45 -07:00
2015-07-10 01:45:35 -07: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