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
@@ -13,8 +13,7 @@ SlateportCity_BattleTentCorridor_OnWarp:
SlateportCity_BattleTentCorridor_EventScript_SetUpObjects::
setvar VAR_TEMP_1, 1
compare VAR_0x8006, 1
goto_if_ne SlateportCity_BattleTentCorridor_EventScript_TurnPlayerNorth
goto_if_ne VAR_0x8006, 1, SlateportCity_BattleTentCorridor_EventScript_TurnPlayerNorth
setobjectxy LOCALID_ATTENDANT, 2, 2
turnobject LOCALID_ATTENDANT, DIR_SOUTH
SlateportCity_BattleTentCorridor_EventScript_TurnPlayerNorth::
@@ -26,14 +25,12 @@ SlateportCity_BattleTentCorridor_OnFrame:
.2byte 0
SlateportCity_BattleTentCorridor_EventScript_EnterCorridor::
compare VAR_0x8006, 1
goto_if_eq SlateportCity_BattleTentCorridor_EventScript_ReturnToRoomFromBattle
goto_if_eq VAR_0x8006, 1, SlateportCity_BattleTentCorridor_EventScript_ReturnToRoomFromBattle
setvar VAR_TEMP_0, 1
applymovement LOCALID_ATTENDANT, SlateportCity_BattleTentCorridor_Movement_AttendantEnter
applymovement OBJ_EVENT_ID_PLAYER, SlateportCity_BattleTentCorridor_Movement_PlayerEnter
waitmovement 0
compare VAR_0x8006, 2
goto_if_eq SlateportCity_BattleTentCorridor_EventScript_ResumeChallenge
goto_if_eq VAR_0x8006, 2, SlateportCity_BattleTentCorridor_EventScript_ResumeChallenge
slateporttent_generaterentalmons
slateporttent_generateopponentmons
msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_HoldMonsChooseFromSelection, MSGBOX_DEFAULT
@@ -65,10 +62,8 @@ SlateportCity_BattleTentCorridor_EventScript_ReturnToRoomFromBattle::
special HealPlayerParty
SlateportCity_BattleTentCorridor_EventScript_AskReadyForOpponent::
frontier_get FRONTIER_DATA_BATTLE_NUM
compare VAR_RESULT, 1
call_if_eq SlateportCity_BattleTentCorridor_EventScript_ReadyFor2ndOpponent
compare VAR_RESULT, 2
call_if_eq SlateportCity_BattleTentCorridor_EventScript_ReadyFor3rdOpponent
call_if_eq VAR_RESULT, 1, SlateportCity_BattleTentCorridor_EventScript_ReadyFor2ndOpponent
call_if_eq VAR_RESULT, 2, SlateportCity_BattleTentCorridor_EventScript_ReadyFor3rdOpponent
multichoice 20, 6, MULTI_GO_ON_REST_RETIRE, TRUE
switch VAR_RESULT
case 0, SlateportCity_BattleTentCorridor_EventScript_AskSwapMon
@@ -103,8 +98,7 @@ SlateportCity_BattleTentCorridor_EventScript_SwapMons::
fadescreen FADE_TO_BLACK
slateporttent_swapmons
waitstate
compare VAR_RESULT, 1
goto_if_eq SlateportCity_BattleTentCorridor_EventScript_EnterBattleRoom
goto_if_eq VAR_RESULT, 1, SlateportCity_BattleTentCorridor_EventScript_EnterBattleRoom
msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_YourSwapIsComplete, MSGBOX_DEFAULT
goto SlateportCity_BattleTentCorridor_EventScript_EnterBattleRoom