pokecrystal/maps/BattleTowerBattleRoom.asm

160 lines
3.5 KiB
NASM
Raw Normal View History

2015-07-10 08:45:35 +00:00
BattleTowerBattleRoom_MapScriptHeader:
.MapTriggers:
db 2
; triggers
2015-11-02 19:37:02 +00:00
dw Script_EnterBattleRoom, 0
dw UnknownScript_0x9f420, 0
.MapCallbacks:
db 0
2015-08-24 23:56:30 +00:00
Script_EnterBattleRoom: ; 0x9f419
disappear $2
2015-08-24 23:56:30 +00:00
priorityjump Script_BattleRoom
dotrigger $1
2015-07-10 08:45:35 +00:00
UnknownScript_0x9f420:
end
2015-08-24 23:56:30 +00:00
Script_BattleRoom: ; 0x9f421
applymovement PLAYER, MovementData_0x9e58c
2015-08-24 23:56:30 +00: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
storetext 1
keeptextopen
loadmovesprites
2015-08-24 23:56:30 +00:00
special Function170215 ; calls predef startbattle
special FadeBlackBGMap
reloadmap
if_not_equal $0, UnknownScript_0x9f4c2
2015-09-01 04:26:31 +00: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 17:35:05 +00:00
writetext Text_YourPkmnWillBeHealedToFullHealth
closetext
loadmovesprites
playmusic MUSIC_HEAL
special FadeBlackBGMap
special LoadMapPalettes
pause 60
special FadeInBGMap
special RestartMapMusic
loadfont
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: ; 0x9f477
loadmovesprites
applymovement PLAYER, MovementData_0x9e5a9
applymovement $3, MovementData_0x9e5a1
2015-08-24 23:56:30 +00:00
jump Script_BattleRoomLoop
2015-08-24 23:56:30 +00:00
Script_DontBattleNextOpponent: ; 0x9f483
2015-08-24 17:35:05 +00:00
writetext Text_SaveAndEndTheSession
yesorno
2015-08-24 23:56:30 +00:00
iffalse Script_DontSaveAndEndTheSession
writebyte $7
special Function170687
writebyte $1f
special Function170687
writebyte $3
special Function170687
playsound SFX_SAVE
waitbutton
special FadeBlackBGMap
special Reset
2015-08-24 23:56:30 +00:00
Script_DontSaveAndEndTheSession: ; 0x9f4a3
2015-08-24 17:35:05 +00:00
writetext Text_CancelYourBattleRoomChallenge
yesorno
2015-08-24 23:56:30 +00:00
iffalse Script_ContinueAndBattleNextOpponent
writebyte $4
special Function170687
writebyte $6
special Function170687
loadmovesprites
special FadeBlackBGMap
warpfacing $1, BATTLE_TOWER_1F, $7, $7
loadfont
2015-01-20 08:01:23 +00:00
jump UnknownScript_0x9e4b0
2015-07-10 08:45:35 +00:00
UnknownScript_0x9f4c2:
pause 60
special Special_BattleTowerFade
warpfacing $1, BATTLE_TOWER_1F, $7, $7
writebyte $4
special Function170687
loadfont
2015-08-24 23:56:30 +00:00
writetext Text_ThanksForVisiting
closetext
loadmovesprites
end
2015-08-24 23:56:30 +00:00
Script_BeatenAllTrainers: ; 0x9f4d9
pause 60
special Special_BattleTowerFade
warpfacing $1, BATTLE_TOWER_1F, $7, $7
2015-07-10 08:45:35 +00:00
BattleTowerBattleRoomScript_0x9f4e4:
loadfont
2015-08-24 23:56:30 +00:00
writetext Text_CongratulationsYouveBeatenAllTheTrainers
jump Script_GivePlayerHisPrize
2015-07-10 08:45:35 +00:00
UnknownScript_0x9f4eb:
writebyte $4
special Function170687
loadfont
2015-08-24 23:56:30 +00:00
writetext Text_TooMuchTimeElapsedNoRegister
closetext
loadmovesprites
end
2015-07-10 08:45:35 +00:00
UnknownScript_0x9f4f7:
writebyte $4
special Function170687
writebyte $6
special Function170687
loadfont
2015-08-24 23:56:30 +00:00
writetext Text_ThanksForVisiting
2015-08-24 17:35:05 +00:00
writetext Text_WeHopeToServeYouAgain
closetext
loadmovesprites
end
2013-05-01 17:29:45 +00:00
2015-07-10 08:45:35 +00:00
UnknownText_0x9f50b:
text "You'll be returned"
line "after you SAVE."
done
2013-05-01 17:29:45 +00:00
2015-07-10 08:45:35 +00: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
2015-11-01 01:05:02 +00:00
person_event SPRITE_YOUNGSTER, 0, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, 0, 0, ObjectEvent, EVENT_BATTLE_TOWER_BATTLE_ROOM_YOUNGSTER
person_event SPRITE_RECEPTIONIST, 6, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, 0, 0, ObjectEvent, -1