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

@@ -10,10 +10,8 @@ Route119_WeatherInstitute_2F_MapScripts::
.byte 0
Route119_WeatherInstitute_2F_OnTransition:
compare VAR_WEATHER_INSTITUTE_STATE, 0
call_if_eq Route119_WeatherInstitute_2F_EventScript_SetScientistPosAquaHere
compare VAR_WEATHER_INSTITUTE_STATE, 1
call_if_eq Route119_WeatherInstitute_2F_EventScript_SetScientistPosAquaGone
call_if_eq VAR_WEATHER_INSTITUTE_STATE, 0, Route119_WeatherInstitute_2F_EventScript_SetScientistPosAquaHere
call_if_eq VAR_WEATHER_INSTITUTE_STATE, 1, Route119_WeatherInstitute_2F_EventScript_SetScientistPosAquaGone
call_if_set FLAG_SYS_GAME_CLEAR, Route119_WeatherInstitute_2F_EventScript_SetScientistPosGameClear
end
@@ -92,18 +90,15 @@ Route119_WeatherInstitute_2F_EventScript_ReceiveCastform::
msgbox Route119_WeatherInstitute_2F_Text_ThanksPleaseTakePokemon, MSGBOX_DEFAULT
setvar VAR_TEMP_1, SPECIES_CASTFORM
givemon SPECIES_CASTFORM, 25, ITEM_MYSTIC_WATER
compare VAR_RESULT, 0
goto_if_eq Route119_WeatherInstitute_2F_EventScript_ReceiveCastformParty
compare VAR_RESULT, 1
goto_if_eq Route119_WeatherInstitute_2F_EventScript_ReceiveCastformPC
goto_if_eq VAR_RESULT, 0, Route119_WeatherInstitute_2F_EventScript_ReceiveCastformParty
goto_if_eq VAR_RESULT, 1, Route119_WeatherInstitute_2F_EventScript_ReceiveCastformPC
goto Common_EventScript_NoMoreRoomForPokemon
end
Route119_WeatherInstitute_2F_EventScript_ReceiveCastformParty::
call Route119_WeatherInstitute_2F_EventScript_ReceivedCastformFanfare
msgbox gText_NicknameThisPokemon, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq Route119_WeatherInstitute_2F_EventScript_ExplainCastform
goto_if_eq VAR_RESULT, NO, Route119_WeatherInstitute_2F_EventScript_ExplainCastform
call Common_EventScript_GetGiftMonPartySlot
call Common_EventScript_NameReceivedPartyMon
goto Route119_WeatherInstitute_2F_EventScript_ExplainCastform
@@ -112,8 +107,7 @@ Route119_WeatherInstitute_2F_EventScript_ReceiveCastformParty::
Route119_WeatherInstitute_2F_EventScript_ReceiveCastformPC::
call Route119_WeatherInstitute_2F_EventScript_ReceivedCastformFanfare
msgbox gText_NicknameThisPokemon, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq Route119_WeatherInstitute_2F_EventScript_SendCastformToPC
goto_if_eq VAR_RESULT, NO, Route119_WeatherInstitute_2F_EventScript_SendCastformToPC
call Common_EventScript_NameReceivedBoxMon
goto Route119_WeatherInstitute_2F_EventScript_SendCastformToPC
end
@@ -147,12 +141,10 @@ Route119_WeatherInstitute_2F_EventScript_TryStartAbnormalWeather::
setvar VAR_0x8004, 0
call_if_set FLAG_DEFEATED_KYOGRE, Route119_WeatherInstitute_2F_EventScript_LegendaryDefeated
call_if_set FLAG_DEFEATED_GROUDON, Route119_WeatherInstitute_2F_EventScript_LegendaryDefeated
compare VAR_0x8004, 2 @ Both defeated
goto_if_eq Route119_WeatherInstitute_2F_EventScript_NoAbnormalWeather
goto_if_eq VAR_0x8004, 2, Route119_WeatherInstitute_2F_EventScript_NoAbnormalWeather @ Both defeated
call_if_unset FLAG_TEMP_2, Route119_WeatherInstitute_2F_EventScript_CreateAbnormalWeather
specialvar VAR_RESULT, GetAbnormalWeatherMapNameAndType
compare VAR_RESULT, 1
goto_if_eq Route119_WeatherInstitute_2F_EventScript_KyogreWeather
goto_if_eq VAR_RESULT, 1, Route119_WeatherInstitute_2F_EventScript_KyogreWeather
msgbox Route119_WeatherInstitute_2F_Text_GroudonWeather, MSGBOX_DEFAULT
release
end