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

@@ -37,26 +37,21 @@ Route111_EventScript_SecretPowerMan::
lock
faceplayer
msgbox Route111_Text_MakingRoomUseTMToMakeYourOwn, MSGBOX_YESNO
compare VAR_RESULT, YES
goto_if_eq Route111_EventScript_GiveSecretPower
goto_if_eq VAR_RESULT, YES, Route111_EventScript_GiveSecretPower
msgbox Route111_Text_DontWantThis, MSGBOX_DEFAULT
release
end
Route111_EventScript_GiveSecretPower::
giveitem ITEM_TM43
compare VAR_RESULT, FALSE
goto_if_eq Route111_EventScript_NoRoomForSecretPower
goto_if_eq VAR_RESULT, FALSE, Route111_EventScript_NoRoomForSecretPower
msgbox Route111_Text_ExplainSecretPower, MSGBOX_DEFAULT
closemessage
setflag FLAG_RECEIVED_SECRET_POWER
clearflag FLAG_HIDE_SLATEPORT_CITY_TM_SALESMAN
compare VAR_FACING, DIR_WEST
call_if_eq Route111_EventScript_SecretPowerManExit
compare VAR_FACING, DIR_EAST
call_if_eq Route111_EventScript_SecretPowerManExit
compare VAR_FACING, DIR_NORTH
call_if_eq Route111_EventScript_SecretPowerManExitNorth
call_if_eq VAR_FACING, DIR_WEST, Route111_EventScript_SecretPowerManExit
call_if_eq VAR_FACING, DIR_EAST, Route111_EventScript_SecretPowerManExit
call_if_eq VAR_FACING, DIR_NORTH, Route111_EventScript_SecretPowerManExitNorth
removeobject VAR_LAST_TALKED
release
end