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

@@ -41,8 +41,7 @@ BattleFrontier_BattlePikeLobby_EventScript_QuitWithoutSaving::
BattleFrontier_BattlePikeLobby_EventScript_WonChallenge::
lockall
frontier_isbrain
compare VAR_RESULT, TRUE
goto_if_eq BattleFrontier_BattlePikeLobby_EventScript_DefeatedQueen
goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattlePikeLobby_EventScript_DefeatedQueen
msgbox BattleFrontier_BattlePikeLobby_Text_PossessLuckInAbundance, MSGBOX_DEFAULT
waitmessage
goto BattleFrontier_BattlePikeLobby_EventScript_GiveBattlePoints
@@ -116,8 +115,7 @@ BattleFrontier_BattlePikeLobby_EventScript_TryEnterChallenge::
case FRONTIER_LVL_TENT, BattleFrontier_BattlePikeLobby_EventScript_CancelChallenge
case MULTI_B_PRESSED, BattleFrontier_BattlePikeLobby_EventScript_CancelChallenge
frontier_checkineligible
compare VAR_0x8004, TRUE
goto_if_eq BattleFrontier_BattlePikeLobby_EventScript_NotEnoughValidMons
goto_if_eq VAR_0x8004, TRUE, BattleFrontier_BattlePikeLobby_EventScript_NotEnoughValidMons
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
msgbox BattleFrontier_BattlePikeLobby_Text_PleaseChooseThreeMons, MSGBOX_DEFAULT
fadescreen FADE_TO_BLACK
@@ -126,8 +124,7 @@ BattleFrontier_BattlePikeLobby_EventScript_TryEnterChallenge::
setvar VAR_0x8005, FRONTIER_PARTY_SIZE
special ChoosePartyForBattleFrontier
waitstate
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePikeLobby_EventScript_LoadPartyAndCancelChallenge
goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePikeLobby_EventScript_LoadPartyAndCancelChallenge
msgbox BattleFrontier_BattlePikeLobby_Text_SaveBeforeChallenge, MSGBOX_YESNO
switch VAR_RESULT
case NO, BattleFrontier_BattlePikeLobby_EventScript_LoadPartyAndCancelChallenge
@@ -149,8 +146,7 @@ BattleFrontier_BattlePikeLobby_EventScript_SaveBeforeChallenge::
call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
pike_savehelditems
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattlePikeLobby_EventScript_CancelChallengeSaveFailed
goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePikeLobby_EventScript_CancelChallengeSaveFailed
special SavePlayerParty
frontier_setpartyorder FRONTIER_PARTY_SIZE
msgbox BattleFrontier_BattlePikeLobby_Text_StepThisWay, MSGBOX_DEFAULT