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

@@ -107,10 +107,8 @@ MauvilleCity_EventScript_Wally::
end
MauvilleCity_EventScript_BattleWallyPrompt::
compare VAR_RESULT, YES
call_if_eq MauvilleCity_EventScript_BattleWally
compare VAR_RESULT, NO
goto_if_eq MauvilleCity_EventScript_DeclineWallyBattle
call_if_eq VAR_RESULT, YES, MauvilleCity_EventScript_BattleWally
goto_if_eq VAR_RESULT, NO, MauvilleCity_EventScript_DeclineWallyBattle
closemessage
switch VAR_FACING
case DIR_NORTH, MauvilleCity_EventScript_WallyAndUncleExitNorth
@@ -164,19 +162,15 @@ MauvilleCity_EventScript_DefeatedWally::
setflag FLAG_DEFEATED_WALLY_MAUVILLE
setvar VAR_WALLY_CALL_STEP_COUNTER, 0
setflag FLAG_ENABLE_FIRST_WALLY_POKENAV_CALL
compare VAR_FACING, DIR_NORTH
call_if_eq MauvilleCity_EventScript_ScottApproachPlayerNorth
compare VAR_FACING, DIR_EAST
call_if_eq MauvilleCity_EventScript_ScottApproachPlayerEast
call_if_eq VAR_FACING, DIR_NORTH, MauvilleCity_EventScript_ScottApproachPlayerNorth
call_if_eq VAR_FACING, DIR_EAST, MauvilleCity_EventScript_ScottApproachPlayerEast
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterDown
waitmovement 0
msgbox MauvilleCity_Text_ScottYouDidntHoldBack, MSGBOX_DEFAULT
closemessage
addvar VAR_SCOTT_STATE, 1
compare VAR_FACING, DIR_NORTH
call_if_eq MauvilleCity_EventScript_ScottExitNorth
compare VAR_FACING, DIR_EAST
call_if_eq MauvilleCity_EventScript_ScottExitEast
call_if_eq VAR_FACING, DIR_NORTH, MauvilleCity_EventScript_ScottExitNorth
call_if_eq VAR_FACING, DIR_EAST, MauvilleCity_EventScript_ScottExitEast
removeobject LOCALID_SCOTT
releaseall
end
@@ -425,8 +419,7 @@ MauvilleCity_EventScript_Wattson::
lock
faceplayer
goto_if_set FLAG_GOT_TM24_FROM_WATTSON, MauvilleCity_EventScript_ReceivedThunderbolt
compare VAR_NEW_MAUVILLE_STATE, 2
goto_if_eq MauvilleCity_EventScript_CompletedNewMauville
goto_if_eq VAR_NEW_MAUVILLE_STATE, 2, MauvilleCity_EventScript_CompletedNewMauville
goto_if_set FLAG_GOT_BASEMENT_KEY_FROM_WATTSON, MauvilleCity_EventScript_BegunNewMauville
msgbox MauvilleCity_Text_WattsonNeedFavorTakeKey, MSGBOX_DEFAULT
giveitem ITEM_BASEMENT_KEY
@@ -443,8 +436,7 @@ MauvilleCity_EventScript_BegunNewMauville::
MauvilleCity_EventScript_CompletedNewMauville::
msgbox MauvilleCity_Text_WattsonThanksTakeTM, MSGBOX_DEFAULT
giveitem ITEM_TM24
compare VAR_RESULT, FALSE
goto_if_eq Common_EventScript_ShowBagIsFull
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setflag FLAG_GOT_TM24_FROM_WATTSON
msgbox MauvilleCity_Text_WattsonYoungTakeCharge, MSGBOX_DEFAULT
release