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

@@ -5,19 +5,14 @@ Route114_MapScripts::
.byte 0
Route114_OnTransition:
compare VAR_SHOULD_END_ABNORMAL_WEATHER, 1
call_if_eq AbnormalWeather_EventScript_HideMapNamePopup
compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_114_NORTH
call_if_eq AbnormalWeather_StartGroudonWeather
compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_114_SOUTH
call_if_eq AbnormalWeather_StartGroudonWeather
call_if_eq VAR_SHOULD_END_ABNORMAL_WEATHER, 1, AbnormalWeather_EventScript_HideMapNamePopup
call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_114_NORTH, AbnormalWeather_StartGroudonWeather
call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_114_SOUTH, AbnormalWeather_StartGroudonWeather
end
Route114_OnLoad:
compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_114_NORTH
call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute114North
compare VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_114_SOUTH
call_if_eq AbnormalWeather_EventScript_PlaceTilesRoute114South
call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_114_NORTH, AbnormalWeather_EventScript_PlaceTilesRoute114North
call_if_eq VAR_ABNORMAL_WEATHER_LOCATION, ABNORMAL_WEATHER_ROUTE_114_SOUTH, AbnormalWeather_EventScript_PlaceTilesRoute114South
end
Route114_OnFrame:
@@ -34,8 +29,7 @@ Route114_EventScript_Man::
addvar VAR_RESULT, NUM_ROUTE_114_MAN_BERRIES_SKIPPED
addvar VAR_RESULT, FIRST_BERRY_INDEX
giveitem VAR_RESULT
compare VAR_RESULT, FALSE
goto_if_eq Common_EventScript_ShowBagIsFull
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setflag FLAG_DAILY_ROUTE_114_RECEIVED_BERRY
msgbox Route114_Text_TryBerryCrushWithFriends, MSGBOX_DEFAULT
release
@@ -52,8 +46,7 @@ Route114_EventScript_RoarGentleman::
goto_if_set FLAG_RECEIVED_TM05, Route114_EventScript_ReceivedRoar
msgbox Route114_Text_AllMyMonDoesIsRoarTakeThis, MSGBOX_DEFAULT
giveitem ITEM_TM05
compare VAR_RESULT, FALSE
goto_if_eq Common_EventScript_ShowBagIsFull
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM05
msgbox Route114_Text_ExplainRoar, MSGBOX_DEFAULT
release
@@ -109,8 +102,7 @@ Route114_EventScript_Nancy::
Route114_EventScript_Steve::
trainerbattle_single TRAINER_STEVE_1, Route114_Text_SteveIntro, Route114_Text_SteveDefeat, Route114_EventScript_RegisterSteve
specialvar VAR_RESULT, ShouldTryRematchBattle
compare VAR_RESULT, TRUE
goto_if_eq Route114_EventScript_RematchSteve
goto_if_eq VAR_RESULT, TRUE, Route114_EventScript_RematchSteve
msgbox Route114_Text_StevePostBattle, MSGBOX_DEFAULT
release
end
@@ -131,8 +123,7 @@ Route114_EventScript_RematchSteve::
Route114_EventScript_Bernie::
trainerbattle_single TRAINER_BERNIE_1, Route114_Text_BernieIntro, Route114_Text_BernieDefeat, Route114_EventScript_RegisterBernie
specialvar VAR_RESULT, ShouldTryRematchBattle
compare VAR_RESULT, TRUE
goto_if_eq Route114_EventScript_RematchBernie
goto_if_eq VAR_RESULT, TRUE, Route114_EventScript_RematchBernie
msgbox Route114_Text_BerniePostBattle, MSGBOX_DEFAULT
release
end