Reformat compare + goto_if/call_if to single statements
This commit is contained in:
@@ -11,8 +11,7 @@ SlateportCity_Harbor_MapScripts::
|
||||
SlateportCity_Harbor_OnTransition:
|
||||
setescapewarp MAP_SLATEPORT_CITY, 28, 13
|
||||
setvar VAR_TEMP_1, 0
|
||||
compare VAR_SLATEPORT_HARBOR_STATE, 1
|
||||
call_if_eq SlateportCity_Harbor_EventScript_ReadyAquaEscapeScene
|
||||
call_if_eq VAR_SLATEPORT_HARBOR_STATE, 1, SlateportCity_Harbor_EventScript_ReadyAquaEscapeScene
|
||||
call_if_set FLAG_SYS_GAME_CLEAR, SlateportCity_Harbor_EventScript_ShowSSTidal
|
||||
end
|
||||
|
||||
@@ -71,14 +70,10 @@ SlateportCity_Harbor_EventScript_AquaEscapeScene::
|
||||
setvar VAR_SLATEPORT_HARBOR_STATE, 2
|
||||
setflag FLAG_MET_TEAM_AQUA_HARBOR
|
||||
setflag FLAG_HIDE_LILYCOVE_MOTEL_SCOTT
|
||||
compare VAR_0x8008, 0
|
||||
call_if_eq SlateportCity_Harbor_EventScript_SternApproachPlayer0
|
||||
compare VAR_0x8008, 1
|
||||
call_if_eq SlateportCity_Harbor_EventScript_SternApproachPlayer1
|
||||
compare VAR_0x8008, 2
|
||||
call_if_eq SlateportCity_Harbor_EventScript_SternApproachPlayer
|
||||
compare VAR_0x8008, 3
|
||||
call_if_eq SlateportCity_Harbor_EventScript_SternApproachPlayer
|
||||
call_if_eq VAR_0x8008, 0, SlateportCity_Harbor_EventScript_SternApproachPlayer0
|
||||
call_if_eq VAR_0x8008, 1, SlateportCity_Harbor_EventScript_SternApproachPlayer1
|
||||
call_if_eq VAR_0x8008, 2, SlateportCity_Harbor_EventScript_SternApproachPlayer
|
||||
call_if_eq VAR_0x8008, 3, SlateportCity_Harbor_EventScript_SternApproachPlayer
|
||||
msgbox SlateportCity_Harbor_Text_CaptSternWhyStealMySubmarine, MSGBOX_DEFAULT
|
||||
closemessage
|
||||
setflag FLAG_HIDE_AQUA_HIDEOUT_1F_GRUNT_1_BLOCKING_ENTRANCE
|
||||
@@ -206,8 +201,7 @@ SlateportCity_Harbor_EventScript_NoTicket::
|
||||
|
||||
SlateportCity_Harbor_EventScript_Lilycove::
|
||||
msgbox SlateportCity_Harbor_Text_LilycoveItIs, MSGBOX_YESNO
|
||||
compare VAR_RESULT, NO
|
||||
goto_if_eq SlateportCity_Harbor_EventScript_ChooseNewDestination
|
||||
goto_if_eq VAR_RESULT, NO, SlateportCity_Harbor_EventScript_ChooseNewDestination
|
||||
setvar VAR_SS_TIDAL_STATE, SS_TIDAL_BOARD_SLATEPORT
|
||||
call SlateportCity_Harbor_EventScript_BoardFerry
|
||||
warp MAP_SS_TIDAL_CORRIDOR, 1, 10
|
||||
@@ -217,8 +211,7 @@ SlateportCity_Harbor_EventScript_Lilycove::
|
||||
|
||||
SlateportCity_Harbor_EventScript_BattleFrontier::
|
||||
msgbox SlateportCity_Harbor_Text_BattleFrontierItIs, MSGBOX_YESNO
|
||||
compare VAR_RESULT, NO
|
||||
goto_if_eq SlateportCity_Harbor_EventScript_ChooseNewDestination
|
||||
goto_if_eq VAR_RESULT, NO, SlateportCity_Harbor_EventScript_ChooseNewDestination
|
||||
call SlateportCity_Harbor_EventScript_BoardFerry
|
||||
warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 19, 67
|
||||
waitstate
|
||||
@@ -238,10 +231,8 @@ SlateportCity_Harbor_EventScript_BoardFerry::
|
||||
waitmovement 0
|
||||
delay 30
|
||||
hideobjectat VAR_LAST_TALKED, MAP_SLATEPORT_CITY_HARBOR
|
||||
compare VAR_FACING, DIR_NORTH
|
||||
call_if_eq SlateportCity_Harbor_EventScript_BoardFerryNorth
|
||||
compare VAR_FACING, DIR_EAST
|
||||
call_if_eq SlateportCity_Harbor_EventScript_BoardFerryEast
|
||||
call_if_eq VAR_FACING, DIR_NORTH, SlateportCity_Harbor_EventScript_BoardFerryNorth
|
||||
call_if_eq VAR_FACING, DIR_EAST, SlateportCity_Harbor_EventScript_BoardFerryEast
|
||||
delay 30
|
||||
hideobjectat OBJ_EVENT_ID_PLAYER, 0
|
||||
setvar VAR_0x8004, LOCALID_SS_TIDAL
|
||||
@@ -279,8 +270,7 @@ SlateportCity_Harbor_EventScript_Sailor::
|
||||
setvar VAR_0x8004, 0
|
||||
call_if_set FLAG_DEFEATED_KYOGRE, SlateportCity_Harbor_EventScript_CountDefeatedLegendary
|
||||
call_if_set FLAG_DEFEATED_GROUDON, SlateportCity_Harbor_EventScript_CountDefeatedLegendary
|
||||
compare VAR_0x8004, 2 @ Defeated both
|
||||
goto_if_eq SlateportCity_Harbor_EventScript_SailorNoAbnormalWeather
|
||||
goto_if_eq VAR_0x8004, 2, SlateportCity_Harbor_EventScript_SailorNoAbnormalWeather @ Defeated both
|
||||
msgbox SlateportCity_Harbor_Text_AbnormalWeather, MSGBOX_DEFAULT
|
||||
release
|
||||
end
|
||||
@@ -304,8 +294,7 @@ SlateportCity_Harbor_EventScript_CaptStern::
|
||||
goto_if_set FLAG_BADGE07_GET, SlateportCity_Harbor_EventScript_CaptSternFerryOrScannerComment
|
||||
goto_if_set FLAG_EVIL_TEAM_ESCAPED_STERN_SPOKE, SlateportCity_Harbor_EventScript_NeedDive
|
||||
goto_if_set FLAG_TEAM_AQUA_ESCAPED_IN_SUBMARINE, SlateportCity_Harbor_EventScript_TeamAquaLeftNeedDive
|
||||
compare VAR_SLATEPORT_HARBOR_STATE, 2
|
||||
goto_if_eq SlateportCity_Harbor_EventScript_WhyStealSubmarine
|
||||
goto_if_eq VAR_SLATEPORT_HARBOR_STATE, 2, SlateportCity_Harbor_EventScript_WhyStealSubmarine
|
||||
msgbox SlateportCity_Harbor_Text_SameThugsTriedToRobAtMuseum, MSGBOX_DEFAULT
|
||||
closemessage
|
||||
applymovement VAR_LAST_TALKED, Common_Movement_FaceOriginalDirection
|
||||
@@ -330,11 +319,9 @@ SlateportCity_Harbor_EventScript_NeedDive::
|
||||
end
|
||||
|
||||
SlateportCity_Harbor_EventScript_CaptSternFerryOrScannerComment::
|
||||
compare VAR_TEMP_1, 1
|
||||
goto_if_eq SlateportCity_Harbor_EventScript_TradedScanner
|
||||
goto_if_eq VAR_TEMP_1, 1, SlateportCity_Harbor_EventScript_TradedScanner
|
||||
checkitem ITEM_SCANNER
|
||||
compare VAR_RESULT, TRUE
|
||||
goto_if_eq SlateportCity_Harbor_EventScript_AskToTradeScanner
|
||||
goto_if_eq VAR_RESULT, TRUE, SlateportCity_Harbor_EventScript_AskToTradeScanner
|
||||
goto_if_set FLAG_SYS_GAME_CLEAR, SlateportCity_Harbor_EventScript_FerryFinished
|
||||
msgbox SlateportCity_Harbor_Text_WontBeLongBeforeWeFinishFerry, MSGBOX_DEFAULT
|
||||
release
|
||||
@@ -362,11 +349,9 @@ SlateportCity_Harbor_EventScript_ChooseScannerTrade::
|
||||
|
||||
SlateportCity_Harbor_EventScript_DeepSeaTooth::
|
||||
msgbox SlateportCity_Harbor_Text_TradeForDeepSeaTooth, MSGBOX_YESNO
|
||||
compare VAR_RESULT, NO
|
||||
goto_if_eq SlateportCity_Harbor_EventScript_ChooseDifferentTrade
|
||||
goto_if_eq VAR_RESULT, NO, SlateportCity_Harbor_EventScript_ChooseDifferentTrade
|
||||
giveitem ITEM_DEEP_SEA_TOOTH
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq Common_EventScript_ShowBagIsFull
|
||||
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
|
||||
removeitem ITEM_SCANNER
|
||||
msgbox SlateportCity_Harbor_Text_HandedScannerToStern, MSGBOX_DEFAULT
|
||||
setflag FLAG_EXCHANGED_SCANNER
|
||||
@@ -375,11 +360,9 @@ SlateportCity_Harbor_EventScript_DeepSeaTooth::
|
||||
|
||||
SlateportCity_Harbor_EventScript_DeepSeaScale::
|
||||
msgbox SlateportCity_Harbor_Text_TradeForDeepSeaScale, MSGBOX_YESNO
|
||||
compare VAR_RESULT, NO
|
||||
goto_if_eq SlateportCity_Harbor_EventScript_ChooseDifferentTrade
|
||||
goto_if_eq VAR_RESULT, NO, SlateportCity_Harbor_EventScript_ChooseDifferentTrade
|
||||
giveitem ITEM_DEEP_SEA_SCALE
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq Common_EventScript_ShowBagIsFull
|
||||
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
|
||||
removeitem ITEM_SCANNER
|
||||
msgbox SlateportCity_Harbor_Text_HandedScannerToStern, MSGBOX_DEFAULT
|
||||
setflag FLAG_EXCHANGED_SCANNER
|
||||
|
||||
Reference in New Issue
Block a user