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

@@ -16,17 +16,14 @@ BattleFrontier_BattleTowerMultiBattleRoom_MapScripts::
@ The multi partner is represented by LOCALID_PARTNER, which has the gfx id VAR_OBJ_GFX_ID_E
BattleFrontier_BattleTowerMultiBattleRoom_OnTransition:
compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS
call_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_SetObjGfx
compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS
call_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_SetLinkPlayerGfx
call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_SetObjGfx
call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_SetLinkPlayerGfx
end
BattleFrontier_BattleTowerMultiBattleRoom_EventScript_SetObjGfx::
tower_setpartnergfx
checkplayergender
compare VAR_RESULT, FEMALE
goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_SetPlayerGfxFemale
goto_if_eq VAR_RESULT, FEMALE, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_SetPlayerGfxFemale
setvar VAR_OBJ_GFX_ID_F, OBJ_EVENT_GFX_BRENDAN_NORMAL
return
@@ -56,8 +53,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_EnterRoom::
applymovement LOCALID_PARTNER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_PartnerEnterRoom
waitmovement 0
frontier_get FRONTIER_DATA_BATTLE_NUM
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_OpponentsEnter
goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_OpponentsEnter
applymovement LOCALID_ATTENDANT_1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_AttendantApproachPlayer
applymovement LOCALID_ATTENDANT_2, BattleFrontier_BattleTowerMultiBattleRoom_Movement_AttendantApproachPlayer
waitmovement 0
@@ -74,8 +70,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_OpponentsEnter::
applymovement LOCALID_OPPONENT_1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_Opponent1Enter
applymovement LOCALID_OPPONENT_2, BattleFrontier_BattleTowerMultiBattleRoom_Movement_Opponent2Enter
waitmovement 0
compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS
goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_DoOpponentIntrosLink
goto_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_DoOpponentIntrosLink
tower_getopponentintro 0
delay 15
applymovement LOCALID_OPPONENT_1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_WalkInPlaceLeft
@@ -130,8 +125,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_DefeatedOpponents::
applymovement LOCALID_PLAYER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_FaceAttendant
applymovement LOCALID_PARTNER, BattleFrontier_BattleTowerMultiBattleRoom_Movement_FaceAttendant
waitmovement 0
compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS
goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_RetorePartyMsgLink
goto_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_RetorePartyMsgLink
msgbox BattleFrontier_BattleTowerBattleRoom_Text_RestoreMonsToFullHealth, MSGBOX_DEFAULT
goto BattleFrontier_BattleTowerMultiBattleRoom_EventScript_RestoreParty
@@ -142,19 +136,16 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_RetorePartyMsgLink::
BattleFrontier_BattleTowerMultiBattleRoom_EventScript_RestoreParty::
special LoadPlayerParty
frontier_setpartyorder FRONTIER_MULTI_PARTY_SIZE
compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS
call_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ReconnectLink
call_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ReconnectLink
playfanfare MUS_HEAL
waitfanfare
special HealPlayerParty
BattleFrontier_BattleTowerMultiBattleRoom_EventScript_AskReadyForOpponents::
frontier_get FRONTIER_DATA_BATTLE_NUM
call BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ReadyForNextOpponentSet
compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS
goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ContinueChallenge
goto_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ContinueChallenge
call BattleFrontier_EventScript_GetCantRecordBattle
compare VAR_RESULT, TRUE
goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_AskReadyForOpponentsNoRecord
goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_AskReadyForOpponentsNoRecord
multichoice 19, 4, MULTI_GO_ON_RECORD_REST_RETIRE, TRUE
switch VAR_RESULT
case 0, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ContinueChallenge
@@ -230,8 +221,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_PauseChallenge::
end
BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ReadyForNextOpponentSet::
compare VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS
goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ReadyForNextOpponentSetLink
goto_if_eq VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_LINK_MULTIS, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ReadyForNextOpponentSetLink
copyvar VAR_TEMP_F, VAR_RESULT
switch VAR_TEMP_F
case 1, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ReadyFor2ndOpponentSet
@@ -347,8 +337,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_ContinueChallengeLink::
waitmessage
special LinkRetireStatusWithBattleTowerPartner
waitstate
compare VAR_RESULT, BATTLE_TOWER_LINKSTAT_CONTINUE
goto_if_ne BattleFrontier_BattleTowerMultiBattleRoom_EventScript_WarpToLobbyLost
goto_if_ne VAR_RESULT, BATTLE_TOWER_LINKSTAT_CONTINUE, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_WarpToLobbyLost
goto BattleFrontier_BattleTowerMultiBattleRoom_EventScript_LinkDelayForMsg
end
@@ -368,8 +357,7 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_AskRetireChallengeLink::
message BattleFrontier_BattleTowerBattleRoom_Text_CancelYourChallenge
waitmessage
multichoicedefault 20, 8, MULTI_YESNO, 1, FALSE
compare VAR_RESULT, 0
goto_if_eq BattleFrontier_BattleTowerMultiBattleRoom_EventScript_RetireChallengeLink
goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerMultiBattleRoom_EventScript_RetireChallengeLink
goto BattleFrontier_BattleTowerMultiBattleRoom_EventScript_AskReadyForOpponents
end