Document Pokemon League scripts

This commit is contained in:
GriffinR
2020-01-26 16:38:17 -05:00
parent a09e66b53f
commit 91844cdfb2
26 changed files with 438 additions and 427 deletions
@@ -1,3 +1,6 @@
.equ LOCALID_RIVAL, 1
.equ LOCALID_PROF_OAK, 2
PokemonLeague_ChampionsRoom_MapScripts:: @ 8162AE2
map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, PokemonLeague_ChampionsRoom_OnWarp
map_script MAP_SCRIPT_ON_RESUME, PokemonLeague_ChampionsRoom_OnResume
@@ -6,91 +9,91 @@ PokemonLeague_ChampionsRoom_MapScripts:: @ 8162AE2
PokemonLeague_ChampionsRoom_OnResume:: @ 8162AF2
setvar VAR_0x8004, 4
call EventScript_1A75D5
call PokemonLeague_EventScript_DoLightingEffect
compare VAR_STARTER_MON, 2
call_if_eq EventScript_162B1E
call_if_eq PokemonLeague_ChampionsRoom_EventScript_CheckStopTriggerSquirtle
compare VAR_STARTER_MON, 1
call_if_eq EventScript_162B31
call_if_eq PokemonLeague_ChampionsRoom_EventScript_CheckStopTriggerBulbasaur
compare VAR_STARTER_MON, 0
call_if_eq EventScript_162B44
call_if_eq PokemonLeague_ChampionsRoom_EventScript_CheckStopTriggerCharmander
end
EventScript_162B1E:: @ 8162B1E
goto_if_defeated TRAINER_CHAMPION_FIRST_SQUIRTLE, EventScript_162B57
goto_if_defeated TRAINER_CHAMPION_REMATCH_SQUIRTLE, EventScript_162B57
PokemonLeague_ChampionsRoom_EventScript_CheckStopTriggerSquirtle:: @ 8162B1E
goto_if_defeated TRAINER_CHAMPION_FIRST_SQUIRTLE, PokemonLeague_ChampionsRoom_EventScript_StopSceneTrigger
goto_if_defeated TRAINER_CHAMPION_REMATCH_SQUIRTLE, PokemonLeague_ChampionsRoom_EventScript_StopSceneTrigger
return
EventScript_162B31:: @ 8162B31
goto_if_defeated TRAINER_CHAMPION_FIRST_BULBASAUR, EventScript_162B57
goto_if_defeated TRAINER_CHAMPION_REMATCH_BULBASAUR, EventScript_162B57
PokemonLeague_ChampionsRoom_EventScript_CheckStopTriggerBulbasaur:: @ 8162B31
goto_if_defeated TRAINER_CHAMPION_FIRST_BULBASAUR, PokemonLeague_ChampionsRoom_EventScript_StopSceneTrigger
goto_if_defeated TRAINER_CHAMPION_REMATCH_BULBASAUR, PokemonLeague_ChampionsRoom_EventScript_StopSceneTrigger
return
EventScript_162B44:: @ 8162B44
goto_if_defeated TRAINER_CHAMPION_FIRST_CHARMANDER, EventScript_162B57
goto_if_defeated TRAINER_CHAMPION_REMATCH_CHARMANDER, EventScript_162B57
PokemonLeague_ChampionsRoom_EventScript_CheckStopTriggerCharmander:: @ 8162B44
goto_if_defeated TRAINER_CHAMPION_FIRST_CHARMANDER, PokemonLeague_ChampionsRoom_EventScript_StopSceneTrigger
goto_if_defeated TRAINER_CHAMPION_REMATCH_CHARMANDER, PokemonLeague_ChampionsRoom_EventScript_StopSceneTrigger
return
EventScript_162B57:: @ 8162B57
PokemonLeague_ChampionsRoom_EventScript_StopSceneTrigger:: @ 8162B57
setvar VAR_TEMP_1, 1
return
PokemonLeague_ChampionsRoom_OnWarp:: @ 8162B5D
map_script_2 VAR_TEMP_1, 0, EventScript_162B67
map_script_2 VAR_TEMP_1, 0, PokemonLeague_ChampionsRoom_EventScript_TurnPlayerNorth
.2byte 0
EventScript_162B67:: @ 8162B67
PokemonLeague_ChampionsRoom_EventScript_TurnPlayerNorth:: @ 8162B67
turnobject OBJ_EVENT_ID_PLAYER, DIR_NORTH
end
PokemonLeague_ChampionsRoom_OnFrame:: @ 8162B6C
map_script_2 VAR_TEMP_1, 0, EventScript_162B76
map_script_2 VAR_TEMP_1, 0, PokemonLeague_ChampionsRoom_EventScript_EnterRoom
.2byte 0
EventScript_162B76:: @ 8162B76
PokemonLeague_ChampionsRoom_EventScript_EnterRoom:: @ 8162B76
lockall
textcolor 0
setflag FLAG_TEMP_2
applymovement OBJ_EVENT_ID_PLAYER, Movement_162D07
applymovement OBJ_EVENT_ID_PLAYER, PokemonLeague_ChampionsRoom_Movement_PlayerEnter
waitmovement 0
delay 20
call_if_unset FLAG_SYS_GAME_CLEAR, EventScript_162CB3
call_if_set FLAG_SYS_GAME_CLEAR, EventScript_162CBC
goto_if_questlog EventScript_162C68
call_if_unset FLAG_SYS_GAME_CLEAR, PokemonLeague_ChampionsRoom_EventScript_Intro
call_if_set FLAG_SYS_GAME_CLEAR, PokemonLeague_ChampionsRoom_EventScript_RematchIntro
goto_if_questlog PokemonLeague_ChampionsRoom_EventScript_QuestLogEnd
setflag FLAG_TEMP_3
setflag FLAG_TEMP_5
savebgm MUS_WIN_GYM
call_if_unset FLAG_SYS_CAN_LINK_WITH_RS, EventScript_162C6F
call_if_set FLAG_SYS_CAN_LINK_WITH_RS, EventScript_162C91
call_if_unset FLAG_SYS_CAN_LINK_WITH_RS, PokemonLeague_ChampionsRoom_EventScript_Battle
call_if_set FLAG_SYS_CAN_LINK_WITH_RS, PokemonLeague_ChampionsRoom_EventScript_Rematch
setflag FLAG_TEMP_4
clearflag FLAG_TEMP_5
setflag FLAG_DEFEATED_CHAMP
setflag FLAG_TEMP_4
msgbox gUnknown_8178F2F
msgbox PokemonLeague_ChampionsRoom_Text_PostBattle
playbgm MUS_SLOWMASARA, 0
addobject 2
msgbox gUnknown_8178FC6
addobject LOCALID_PROF_OAK
msgbox PokemonLeague_ChampionsRoom_Text_OakPlayer
closemessage
applymovement OBJ_EVENT_ID_PLAYER, Movement_162D1F
applymovement 1, Movement_162D41
applymovement 2, Movement_162D2A
applymovement OBJ_EVENT_ID_PLAYER, PokemonLeague_ChampionsRoom_Movement_PlayerWatchOakEnter
applymovement LOCALID_RIVAL, PokemonLeague_ChampionsRoom_Movement_RivalWatchOakEnter
applymovement LOCALID_PROF_OAK, PokemonLeague_ChampionsRoom_Movement_OakEnter
waitmovement 0
delay 25
specialvar VAR_RESULT, ScrSpecial_GetStarter
getspeciesname 0, VAR_RESULT
msgbox gUnknown_8178FCF
applymovement 2, Movement_WalkInPlaceFastestRight
applymovement 1, Movement_WalkInPlaceFastestLeft
msgbox PokemonLeague_ChampionsRoom_Text_OakCongratulations
applymovement LOCALID_PROF_OAK, Movement_WalkInPlaceFastestRight
applymovement LOCALID_RIVAL, Movement_WalkInPlaceFastestLeft
waitmovement 0
msgbox gUnknown_817908F
msgbox PokemonLeague_ChampionsRoom_Text_OakImDisappointedRival
closemessage
applymovement 2, Movement_WalkInPlaceFastestDown
applymovement LOCALID_PROF_OAK, Movement_WalkInPlaceFastestDown
waitmovement 0
delay 20
msgbox gUnknown_81791A3
msgbox PokemonLeague_ChampionsRoom_Text_OakPlayerComeWithMe
closemessage
delay 13
applymovement 2, Movement_162D37
applymovement OBJ_EVENT_ID_PLAYER, Movement_162D12
applymovement LOCALID_PROF_OAK, PokemonLeague_ChampionsRoom_Movement_OakExit
applymovement OBJ_EVENT_ID_PLAYER, PokemonLeague_ChampionsRoom_Movement_PlayerExit
waitmovement 0
setvar VAR_TEMP_1, 1
warp MAP_POKEMON_LEAGUE_HALL_OF_FAME, 255, 5, 12
@@ -98,62 +101,62 @@ EventScript_162B76:: @ 8162B76
releaseall
end
EventScript_162C68:: @ 8162C68
call EventScript_162B57
PokemonLeague_ChampionsRoom_EventScript_QuestLogEnd:: @ 8162C68
call PokemonLeague_ChampionsRoom_EventScript_StopSceneTrigger
releaseall
end
EventScript_162C6F:: @ 8162C6F
PokemonLeague_ChampionsRoom_EventScript_Battle:: @ 8162C6F
compare VAR_STARTER_MON, 2
call_if_eq EventScript_162CC5
call_if_eq PokemonLeague_ChampionsRoom_EventScript_BattleSquirtle
compare VAR_STARTER_MON, 1
call_if_eq EventScript_162CD0
call_if_eq PokemonLeague_ChampionsRoom_EventScript_BattleBulbasaur
compare VAR_STARTER_MON, 0
call_if_eq EventScript_162CDB
call_if_eq PokemonLeague_ChampionsRoom_EventScript_BattleCharmander
return
EventScript_162C91:: @ 8162C91
PokemonLeague_ChampionsRoom_EventScript_Rematch:: @ 8162C91
compare VAR_STARTER_MON, 2
call_if_eq EventScript_162CE6
call_if_eq PokemonLeague_ChampionsRoom_EventScript_RematchSquirtle
compare VAR_STARTER_MON, 1
call_if_eq EventScript_162CF1
call_if_eq PokemonLeague_ChampionsRoom_EventScript_RematchBulbasaur
compare VAR_STARTER_MON, 0
call_if_eq EventScript_162CFC
call_if_eq PokemonLeague_ChampionsRoom_EventScript_RematchCharmander
return
EventScript_162CB3:: @ 8162CB3
msgbox gUnknown_8178B6C
PokemonLeague_ChampionsRoom_EventScript_Intro:: @ 8162CB3
msgbox PokemonLeague_ChampionsRoom_Text_Intro
return
EventScript_162CBC:: @ 8162CBC
msgbox gUnknown_8178CD4
PokemonLeague_ChampionsRoom_EventScript_RematchIntro:: @ 8162CBC
msgbox PokemonLeague_ChampionsRoom_Text_RematchIntro
return
EventScript_162CC5:: @ 8162CC5
trainerbattle_no_intro TRAINER_CHAMPION_FIRST_SQUIRTLE, Text_178E3F
PokemonLeague_ChampionsRoom_EventScript_BattleSquirtle:: @ 8162CC5
trainerbattle_no_intro TRAINER_CHAMPION_FIRST_SQUIRTLE, PokemonLeague_ChampionsRoom_Text_Defeat
return
EventScript_162CD0:: @ 8162CD0
trainerbattle_no_intro TRAINER_CHAMPION_FIRST_BULBASAUR, Text_178E3F
PokemonLeague_ChampionsRoom_EventScript_BattleBulbasaur:: @ 8162CD0
trainerbattle_no_intro TRAINER_CHAMPION_FIRST_BULBASAUR, PokemonLeague_ChampionsRoom_Text_Defeat
return
EventScript_162CDB:: @ 8162CDB
trainerbattle_no_intro TRAINER_CHAMPION_FIRST_CHARMANDER, Text_178E3F
PokemonLeague_ChampionsRoom_EventScript_BattleCharmander:: @ 8162CDB
trainerbattle_no_intro TRAINER_CHAMPION_FIRST_CHARMANDER, PokemonLeague_ChampionsRoom_Text_Defeat
return
EventScript_162CE6:: @ 8162CE6
trainerbattle_no_intro TRAINER_CHAMPION_REMATCH_SQUIRTLE, Text_178E3F
PokemonLeague_ChampionsRoom_EventScript_RematchSquirtle:: @ 8162CE6
trainerbattle_no_intro TRAINER_CHAMPION_REMATCH_SQUIRTLE, PokemonLeague_ChampionsRoom_Text_Defeat
return
EventScript_162CF1:: @ 8162CF1
trainerbattle_no_intro TRAINER_CHAMPION_REMATCH_BULBASAUR, Text_178E3F
PokemonLeague_ChampionsRoom_EventScript_RematchBulbasaur:: @ 8162CF1
trainerbattle_no_intro TRAINER_CHAMPION_REMATCH_BULBASAUR, PokemonLeague_ChampionsRoom_Text_Defeat
return
EventScript_162CFC:: @ 8162CFC
trainerbattle_no_intro TRAINER_CHAMPION_REMATCH_CHARMANDER, Text_178E3F
PokemonLeague_ChampionsRoom_EventScript_RematchCharmander:: @ 8162CFC
trainerbattle_no_intro TRAINER_CHAMPION_REMATCH_CHARMANDER, PokemonLeague_ChampionsRoom_Text_Defeat
return
Movement_162D07:: @ 8162D07
PokemonLeague_ChampionsRoom_Movement_PlayerEnter:: @ 8162D07
walk_up
walk_up
walk_up
@@ -166,7 +169,7 @@ Movement_162D07:: @ 8162D07
walk_up
step_end
Movement_162D12:: @ 8162D12
PokemonLeague_ChampionsRoom_Movement_PlayerExit:: @ 8162D12
delay_16
walk_left
walk_up
@@ -181,7 +184,7 @@ Movement_162D12:: @ 8162D12
set_invisible
step_end
Movement_162D1F:: @ 8162D1F
PokemonLeague_ChampionsRoom_Movement_PlayerWatchOakEnter:: @ 8162D1F
delay_8
walk_in_place_fastest_down
delay_16
@@ -194,7 +197,7 @@ Movement_162D1F:: @ 8162D1F
walk_in_place_fastest_left
step_end
Movement_162D2A:: @ 8162D2A
PokemonLeague_ChampionsRoom_Movement_OakEnter:: @ 8162D2A
delay_16
delay_16
walk_up
@@ -209,7 +212,7 @@ Movement_162D2A:: @ 8162D2A
delay_16
step_end
Movement_162D37:: @ 8162D37
PokemonLeague_ChampionsRoom_Movement_OakExit:: @ 8162D37
walk_up
walk_up
walk_right
@@ -221,7 +224,7 @@ Movement_162D37:: @ 8162D37
set_invisible
step_end
Movement_162D41:: @ 8162D41
PokemonLeague_ChampionsRoom_Movement_RivalWatchOakEnter:: @ 8162D41
delay_16
delay_16
delay_16
@@ -1,4 +1,4 @@
gUnknown_8178B6C:: @ 8178B6C
PokemonLeague_ChampionsRoom_Text_Intro:: @ 8178B6C
.string "{RIVAL}: Hey, {PLAYER}!\p"
.string "I was looking forward to seeing\n"
.string "you, {PLAYER}.\p"
@@ -16,7 +16,7 @@ gUnknown_8178B6C:: @ 8178B6C
.string "I am the most powerful TRAINER in\n"
.string "the world!$"
gUnknown_8178CD4:: @ 8178CD4
PokemonLeague_ChampionsRoom_Text_RematchIntro:: @ 8178CD4
.string "{RIVAL}: Hey, {PLAYER}!\p"
.string "You came back, {PLAYER}!\n"
.string "Hahah, that is so great!\p"
@@ -34,7 +34,7 @@ gUnknown_8178CD4:: @ 8178CD4
.string "I am the most powerful TRAINER in\n"
.string "the world!$"
Text_178E3F:: @ 8178E3F
PokemonLeague_ChampionsRoom_Text_Defeat:: @ 8178E3F
.string "NO!\n"
.string "That can't be!\l"
.string "You beat me at my best!\p"
@@ -43,7 +43,7 @@ Text_178E3F:: @ 8178E3F
.string "My reign is over already?\n"
.string "It's not fair!$"
Text_178EC3:: @ 8178EC3
PokemonLeague_ChampionsRoom_Text_Victory:: @ 8178EC3
.string "はーはッ!\n"
.string "かった! かった! かった!\p"
.string "{PLAYER}に まける ような\n"
@@ -54,7 +54,7 @@ Text_178EC3:: @ 8178EC3
.string "ほめて つかわす!\n"
.string "はーッ! はーはッはッ!$"
gUnknown_8178F2F:: @ 8178F2F
PokemonLeague_ChampionsRoom_Text_PostBattle:: @ 8178F2F
.string "Why?\n"
.string "Why did I lose?\p"
.string "I never made any mistakes raising\n"
@@ -63,10 +63,10 @@ gUnknown_8178F2F:: @ 8178F2F
.string "LEAGUE CHAMPION!\p"
.string "Although I don't like to admit it…$"
gUnknown_8178FC6:: @ 8178FC6
PokemonLeague_ChampionsRoom_Text_OakPlayer:: @ 8178FC6
.string "OAK: {PLAYER}!$"
gUnknown_8178FCF:: @ 8178FCF
PokemonLeague_ChampionsRoom_Text_OakCongratulations:: @ 8178FCF
.string "OAK: So, you've won!\n"
.string "Sincerely, congratulations!\p"
.string "You're the new POKéMON LEAGUE\n"
@@ -76,7 +76,7 @@ gUnknown_8178FCF:: @ 8178FCF
.string "on the POKéDEX.\p"
.string "{PLAYER}, you have come of age!$"
gUnknown_817908F:: @ 817908F
PokemonLeague_ChampionsRoom_Text_OakImDisappointedRival:: @ 817908F
.string "OAK: {RIVAL}…\n"
.string "I'm disappointed in you.\p"
.string "I came when I heard you'd beaten\n"
@@ -90,7 +90,7 @@ gUnknown_817908F:: @ 817908F
.string "Without them, you will never\n"
.string "become a CHAMP again!$"
gUnknown_81791A3:: @ 81791A3
PokemonLeague_ChampionsRoom_Text_OakPlayerComeWithMe:: @ 81791A3
.string "OAK: {PLAYER}.\p"
.string "You understand that your victory\n"
.string "was not just your own doing.\p"