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
+25 -50
View File
@@ -5,8 +5,7 @@ RustboroCity_DevonCorp_2F_MapScripts::
.byte 0
RustboroCity_DevonCorp_2F_OnTransition:
compare VAR_FOSSIL_RESURRECTION_STATE, 1
call_if_eq RustboroCity_DevonCorp_2F_EventScript_SetFossilReady
call_if_eq VAR_FOSSIL_RESURRECTION_STATE, 1, RustboroCity_DevonCorp_2F_EventScript_SetFossilReady
end
RustboroCity_DevonCorp_2F_EventScript_SetFossilReady::
@@ -16,8 +15,7 @@ RustboroCity_DevonCorp_2F_EventScript_SetFossilReady::
RustboroCity_DevonCorp_2F_EventScript_TalkToPokemonScientist::
lock
faceplayer
compare VAR_FOSSIL_RESURRECTION_STATE, 1
call_if_eq RustboroCity_DevonCorp_2F_EventScript_SetFossilReady
call_if_eq VAR_FOSSIL_RESURRECTION_STATE, 1, RustboroCity_DevonCorp_2F_EventScript_SetFossilReady
msgbox RustboroCity_DevonCorp_2F_Text_DeviceForTalkingToPokemon, MSGBOX_DEFAULT
release
end
@@ -25,8 +23,7 @@ RustboroCity_DevonCorp_2F_EventScript_TalkToPokemonScientist::
RustboroCity_DevonCorp_2F_EventScript_BallScientist::
lock
faceplayer
compare VAR_FOSSIL_RESURRECTION_STATE, 1
call_if_eq RustboroCity_DevonCorp_2F_EventScript_SetFossilReady
call_if_eq VAR_FOSSIL_RESURRECTION_STATE, 1, RustboroCity_DevonCorp_2F_EventScript_SetFossilReady
goto_if_set FLAG_MET_DEVON_EMPLOYEE, RustboroCity_DevonCorp_2F_EventScript_DevelopedBalls
msgbox RustboroCity_DevonCorp_2F_Text_DevelopingNewBalls, MSGBOX_DEFAULT
release
@@ -40,8 +37,7 @@ RustboroCity_DevonCorp_2F_EventScript_DevelopedBalls::
RustboroCity_DevonCorp_2F_EventScript_PokenavScientist::
lock
faceplayer
compare VAR_FOSSIL_RESURRECTION_STATE, 1
call_if_eq RustboroCity_DevonCorp_2F_EventScript_SetFossilReady
call_if_eq VAR_FOSSIL_RESURRECTION_STATE, 1, RustboroCity_DevonCorp_2F_EventScript_SetFossilReady
goto_if_set FLAG_RECEIVED_POKENAV, RustboroCity_DevonCorp_2F_EventScript_HasPokenav
msgbox RustboroCity_DevonCorp_2F_Text_IMadePokenav, MSGBOX_DEFAULT
release
@@ -55,8 +51,7 @@ RustboroCity_DevonCorp_2F_EventScript_HasPokenav::
RustboroCity_DevonCorp_2F_EventScript_PokemonDreamsScientist::
lock
faceplayer
compare VAR_FOSSIL_RESURRECTION_STATE, 1
call_if_eq RustboroCity_DevonCorp_2F_EventScript_SetFossilReady
call_if_eq VAR_FOSSIL_RESURRECTION_STATE, 1, RustboroCity_DevonCorp_2F_EventScript_SetFossilReady
msgbox RustboroCity_DevonCorp_2F_Text_DeviceToVisualizePokemonDreams, MSGBOX_DEFAULT
release
end
@@ -64,17 +59,13 @@ RustboroCity_DevonCorp_2F_EventScript_PokemonDreamsScientist::
RustboroCity_DevonCorp_2F_EventScript_FossilScientist::
lock
faceplayer
compare VAR_FOSSIL_RESURRECTION_STATE, 2
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_FossilMonReady
compare VAR_FOSSIL_RESURRECTION_STATE, 1
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_StillRegenerating
goto_if_eq VAR_FOSSIL_RESURRECTION_STATE, 2, RustboroCity_DevonCorp_2F_EventScript_FossilMonReady
goto_if_eq VAR_FOSSIL_RESURRECTION_STATE, 1, RustboroCity_DevonCorp_2F_EventScript_StillRegenerating
msgbox RustboroCity_DevonCorp_2F_Text_DevelopDeviceToResurrectFossils, MSGBOX_DEFAULT
checkitem ITEM_ROOT_FOSSIL
compare VAR_RESULT, TRUE
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_NoticeRootFossil
goto_if_eq VAR_RESULT, TRUE, RustboroCity_DevonCorp_2F_EventScript_NoticeRootFossil
checkitem ITEM_CLAW_FOSSIL
compare VAR_RESULT, TRUE
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_NoticeClawFossil
goto_if_eq VAR_RESULT, TRUE, RustboroCity_DevonCorp_2F_EventScript_NoticeClawFossil
release
end
@@ -87,11 +78,9 @@ RustboroCity_DevonCorp_2F_EventScript_NoticeRootFossil::
applymovement LOCALID_FOSSIL_SCIENTIST, Common_Movement_Delay48
waitmovement 0
msgbox RustboroCity_DevonCorp_2F_Text_WantToBringFossilBackToLife, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_DeclineGiveFossil
goto_if_eq VAR_RESULT, NO, RustboroCity_DevonCorp_2F_EventScript_DeclineGiveFossil
checkitem ITEM_CLAW_FOSSIL
compare VAR_RESULT, TRUE
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ChooseFossil
goto_if_eq VAR_RESULT, TRUE, RustboroCity_DevonCorp_2F_EventScript_ChooseFossil
goto RustboroCity_DevonCorp_2F_EventScript_GiveRootFossil
end
@@ -112,11 +101,9 @@ RustboroCity_DevonCorp_2F_EventScript_NoticeClawFossil::
applymovement LOCALID_FOSSIL_SCIENTIST, Common_Movement_Delay48
waitmovement 0
msgbox RustboroCity_DevonCorp_2F_Text_WantToBringFossilBackToLife, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_DeclineGiveFossil
goto_if_eq VAR_RESULT, NO, RustboroCity_DevonCorp_2F_EventScript_DeclineGiveFossil
checkitem ITEM_ROOT_FOSSIL
compare VAR_RESULT, TRUE
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ChooseFossil
goto_if_eq VAR_RESULT, TRUE, RustboroCity_DevonCorp_2F_EventScript_ChooseFossil
goto RustboroCity_DevonCorp_2F_EventScript_GiveClawFossil
end
@@ -140,10 +127,8 @@ RustboroCity_DevonCorp_2F_EventScript_StillRegenerating::
end
RustboroCity_DevonCorp_2F_EventScript_FossilMonReady::
compare VAR_WHICH_FOSSIL_REVIVED, 1
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_LileepReady
compare VAR_WHICH_FOSSIL_REVIVED, 2
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_AnorithReady
goto_if_eq VAR_WHICH_FOSSIL_REVIVED, 1, RustboroCity_DevonCorp_2F_EventScript_LileepReady
goto_if_eq VAR_WHICH_FOSSIL_REVIVED, 2, RustboroCity_DevonCorp_2F_EventScript_AnorithReady
end
RustboroCity_DevonCorp_2F_EventScript_LileepReady::
@@ -161,18 +146,15 @@ RustboroCity_DevonCorp_2F_EventScript_AnorithReady::
RustboroCity_DevonCorp_2F_EventScript_ReceiveLileep::
setvar VAR_TEMP_1, SPECIES_LILEEP
givemon SPECIES_LILEEP, 20, ITEM_NONE
compare VAR_RESULT, 0
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepParty
compare VAR_RESULT, 1
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepPC
goto_if_eq VAR_RESULT, 0, RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepParty
goto_if_eq VAR_RESULT, 1, RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepPC
goto Common_EventScript_NoMoreRoomForPokemon
end
RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepParty::
call RustboroCity_DevonCorp_2F_EventScript_ReceivedLileepFanfare
msgbox gText_NicknameThisPokemon, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_FinishReceivingLileep
goto_if_eq VAR_RESULT, NO, RustboroCity_DevonCorp_2F_EventScript_FinishReceivingLileep
call Common_EventScript_GetGiftMonPartySlot
call Common_EventScript_NameReceivedPartyMon
goto RustboroCity_DevonCorp_2F_EventScript_FinishReceivingLileep
@@ -181,8 +163,7 @@ RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepParty::
RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepPC::
call RustboroCity_DevonCorp_2F_EventScript_ReceivedLileepFanfare
msgbox gText_NicknameThisPokemon, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_TransferLileepToPC
goto_if_eq VAR_RESULT, NO, RustboroCity_DevonCorp_2F_EventScript_TransferLileepToPC
call Common_EventScript_NameReceivedBoxMon
goto RustboroCity_DevonCorp_2F_EventScript_TransferLileepToPC
end
@@ -210,18 +191,15 @@ RustboroCity_DevonCorp_2F_EventScript_FinishReceivingLileep::
RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorith::
setvar VAR_TEMP_1, SPECIES_ANORITH
givemon SPECIES_ANORITH, 20, ITEM_NONE
compare VAR_RESULT, 0
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithParty
compare VAR_RESULT, 1
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithPC
goto_if_eq VAR_RESULT, 0, RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithParty
goto_if_eq VAR_RESULT, 1, RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithPC
goto Common_EventScript_NoMoreRoomForPokemon
end
RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithParty::
call RustboroCity_DevonCorp_2F_EventScript_ReceivedAnorithFanfare
msgbox gText_NicknameThisPokemon, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_FinishReceivingAnorith
goto_if_eq VAR_RESULT, NO, RustboroCity_DevonCorp_2F_EventScript_FinishReceivingAnorith
call Common_EventScript_GetGiftMonPartySlot
call Common_EventScript_NameReceivedPartyMon
goto RustboroCity_DevonCorp_2F_EventScript_FinishReceivingAnorith
@@ -230,8 +208,7 @@ RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithParty::
RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithPC::
call RustboroCity_DevonCorp_2F_EventScript_ReceivedAnorithFanfare
msgbox gText_NicknameThisPokemon, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_TransferAnorithToPC
goto_if_eq VAR_RESULT, NO, RustboroCity_DevonCorp_2F_EventScript_TransferAnorithToPC
call Common_EventScript_NameReceivedBoxMon
goto RustboroCity_DevonCorp_2F_EventScript_TransferAnorithToPC
end
@@ -282,10 +259,8 @@ RustboroCity_DevonCorp_2F_EventScript_CancelFossilSelect::
RustboroCity_DevonCorp_2F_EventScript_MatchCallScientist::
lock
faceplayer
compare VAR_FOSSIL_RESURRECTION_STATE, 1
call_if_eq RustboroCity_DevonCorp_2F_EventScript_SetFossilReady
compare VAR_RUSTBORO_CITY_STATE, 6
goto_if_ge RustboroCity_DevonCorp_2F_EventScript_WorkOnNext
call_if_eq VAR_FOSSIL_RESURRECTION_STATE, 1, RustboroCity_DevonCorp_2F_EventScript_SetFossilReady
goto_if_ge VAR_RUSTBORO_CITY_STATE, 6, RustboroCity_DevonCorp_2F_EventScript_WorkOnNext
msgbox RustboroCity_DevonCorp_2F_Text_DevelopNewPokenavFeature, MSGBOX_DEFAULT
release
end