Reformat compare + goto_if/call_if to single statements

This commit is contained in:
GriffinR
2021-11-18 23:06:30 -05:00
parent c57efdba5d
commit e66ea0cb99
293 changed files with 2990 additions and 5978 deletions

View File

@@ -11,16 +11,13 @@ SouthernIsland_Interior_OnResume:
SouthernIsland_Interior_EventScript_TryRemoveLati::
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, B_OUTCOME_CAUGHT
goto_if_ne Common_EventScript_NopReturn
goto_if_ne VAR_RESULT, B_OUTCOME_CAUGHT, Common_EventScript_NopReturn
removeobject LOCALID_LATI
return
SouthernIsland_Interior_OnTransition:
compare VAR_ROAMER_POKEMON, 0
call_if_eq SouthernIsland_Interior_EventScript_SetUpLatios
compare VAR_ROAMER_POKEMON, 0
call_if_ne SouthernIsland_Interior_EventScript_SetUpLatias
call_if_eq VAR_ROAMER_POKEMON, 0, SouthernIsland_Interior_EventScript_SetUpLatios
call_if_ne VAR_ROAMER_POKEMON, 0, SouthernIsland_Interior_EventScript_SetUpLatias
call SouthernIsland_Interior_EventScript_SetUpPlayerGfx
end
@@ -36,10 +33,8 @@ SouthernIsland_Interior_EventScript_SetUpLatias::
SouthernIsland_Interior_EventScript_SetUpPlayerGfx::
checkplayergender
compare VAR_RESULT, MALE
goto_if_eq SouthernIsland_Interior_EventScript_SetBrendanGfx
compare VAR_RESULT, FEMALE
goto_if_eq SouthernIsland_Interior_EventScript_SetMayGfx
goto_if_eq VAR_RESULT, MALE, SouthernIsland_Interior_EventScript_SetBrendanGfx
goto_if_eq VAR_RESULT, FEMALE, SouthernIsland_Interior_EventScript_SetMayGfx
end
SouthernIsland_Interior_EventScript_SetBrendanGfx::
@@ -79,21 +74,16 @@ SouthernIsland_Interior_EventScript_Lati::
delay 50
special RemoveCameraObject
setvar VAR_LAST_TALKED, LOCALID_LATI
compare VAR_ROAMER_POKEMON, 0
call_if_eq SouthernIsland_Interior_EventScript_SetLatiosBattleVars
compare VAR_ROAMER_POKEMON, 0
call_if_ne SouthernIsland_Interior_EventScript_SetLatiasBattleVars
call_if_eq VAR_ROAMER_POKEMON, 0, SouthernIsland_Interior_EventScript_SetLatiosBattleVars
call_if_ne VAR_ROAMER_POKEMON, 0, SouthernIsland_Interior_EventScript_SetLatiasBattleVars
setflag FLAG_SYS_CTRL_OBJ_DELETE
special BattleSetup_StartLatiBattle
waitstate
clearflag FLAG_SYS_CTRL_OBJ_DELETE
specialvar VAR_RESULT, GetBattleOutcome
compare VAR_RESULT, B_OUTCOME_WON
goto_if_eq SouthernIsland_Interior_EventScript_LatiDefeated
compare VAR_RESULT, B_OUTCOME_RAN
goto_if_eq SouthernIsland_Interior_EventScript_RanFromLati
compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED
goto_if_eq SouthernIsland_Interior_EventScript_RanFromLati
goto_if_eq VAR_RESULT, B_OUTCOME_WON, SouthernIsland_Interior_EventScript_LatiDefeated
goto_if_eq VAR_RESULT, B_OUTCOME_RAN, SouthernIsland_Interior_EventScript_RanFromLati
goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, SouthernIsland_Interior_EventScript_RanFromLati
setflag FLAG_CAUGHT_LATIAS_OR_LATIOS
releaseall
end