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

@@ -35,8 +35,7 @@ BattleFrontier_ScottsHouse_EventScript_CheckSilverSymbols::
goto_if_unset FLAG_SYS_PYRAMID_SILVER, BattleFrontier_ScottsHouse_EventScript_CheckGiveShield
msgbox BattleFrontier_ScottsHouse_Text_YouveCollectedAllSilverSymbols, MSGBOX_DEFAULT
giveitem ITEM_LANSAT_BERRY
compare VAR_RESULT, FALSE
goto_if_eq BattleFrontier_ScottsHouse_EventScript_BerryPocketFull
goto_if_eq VAR_RESULT, FALSE, BattleFrontier_ScottsHouse_EventScript_BerryPocketFull
setflag FLAG_COLLECTED_ALL_SILVER_SYMBOLS
setflag FLAG_TEMP_4
release
@@ -52,8 +51,7 @@ BattleFrontier_ScottsHouse_EventScript_CheckGoldSymbols::
goto_if_unset FLAG_SYS_PYRAMID_GOLD, BattleFrontier_ScottsHouse_EventScript_CheckGiveShield
msgbox BattleFrontier_ScottsHouse_Text_YouveCollectedAllGoldSymbols, MSGBOX_DEFAULT
giveitem ITEM_STARF_BERRY
compare VAR_RESULT, FALSE
goto_if_eq BattleFrontier_ScottsHouse_EventScript_BerryPocketFull
goto_if_eq VAR_RESULT, FALSE, BattleFrontier_ScottsHouse_EventScript_BerryPocketFull
setflag FLAG_COLLECTED_ALL_GOLD_SYMBOLS
setflag FLAG_TEMP_4
release
@@ -71,10 +69,8 @@ BattleFrontier_ScottsHouse_EventScript_GivenBerry::
BattleFrontier_ScottsHouse_EventScript_RandomComment::
random 3
compare VAR_RESULT, 1
goto_if_eq BattleFrontier_ScottsHouse_EventScript_FrontierBrainComment
compare VAR_RESULT, 2
goto_if_eq BattleFrontier_ScottsHouse_EventScript_ArtisanCaveComment
goto_if_eq VAR_RESULT, 1, BattleFrontier_ScottsHouse_EventScript_FrontierBrainComment
goto_if_eq VAR_RESULT, 2, BattleFrontier_ScottsHouse_EventScript_ArtisanCaveComment
msgbox BattleFrontier_ScottsHouse_Text_WhyIGoSeekingTrainers, MSGBOX_DEFAULT
release
end
@@ -93,20 +89,17 @@ BattleFrontier_ScottsHouse_EventScript_CheckGiveSilverShield::
setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50
tower_get TOWER_DATA_WIN_STREAK
compare VAR_RESULT, 50
goto_if_ge BattleFrontier_ScottsHouse_EventScript_GiveSilverShield
goto_if_ge VAR_RESULT, 50, BattleFrontier_ScottsHouse_EventScript_GiveSilverShield
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_OPEN
tower_get TOWER_DATA_WIN_STREAK
compare VAR_RESULT, 50
goto_if_ge BattleFrontier_ScottsHouse_EventScript_GiveSilverShield
goto_if_ge VAR_RESULT, 50, BattleFrontier_ScottsHouse_EventScript_GiveSilverShield
goto BattleFrontier_ScottsHouse_EventScript_RandomComment
end
BattleFrontier_ScottsHouse_EventScript_GiveSilverShield::
msgbox BattleFrontier_ScottsHouse_Text_Beat50TrainersInARow, MSGBOX_DEFAULT
givedecoration DECOR_SILVER_SHIELD
compare VAR_RESULT, FALSE
goto_if_eq BattleFrontier_ScottsHouse_EventScript_NoRoomForShield
goto_if_eq VAR_RESULT, FALSE, BattleFrontier_ScottsHouse_EventScript_NoRoomForShield
setflag FLAG_RECEIVED_SILVER_SHIELD
setflag FLAG_TEMP_3
goto BattleFrontier_ScottsHouse_EventScript_GivenShield
@@ -126,20 +119,17 @@ BattleFrontier_ScottsHouse_EventScript_CheckGiveGoldShield::
setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50
tower_get TOWER_DATA_WIN_STREAK
compare VAR_RESULT, 100
goto_if_ge BattleFrontier_ScottsHouse_EventScript_GiveGoldShield
goto_if_ge VAR_RESULT, 100, BattleFrontier_ScottsHouse_EventScript_GiveGoldShield
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_OPEN
tower_get TOWER_DATA_WIN_STREAK
compare VAR_RESULT, 100
goto_if_ge BattleFrontier_ScottsHouse_EventScript_GiveGoldShield
goto_if_ge VAR_RESULT, 100, BattleFrontier_ScottsHouse_EventScript_GiveGoldShield
goto BattleFrontier_ScottsHouse_EventScript_RandomComment
end
BattleFrontier_ScottsHouse_EventScript_GiveGoldShield::
msgbox BattleFrontier_ScottsHouse_Text_Beat100TrainersInARow, MSGBOX_DEFAULT
givedecoration DECOR_GOLD_SHIELD
compare VAR_RESULT, FALSE
goto_if_eq BattleFrontier_ScottsHouse_EventScript_NoRoomForShield
goto_if_eq VAR_RESULT, FALSE, BattleFrontier_ScottsHouse_EventScript_NoRoomForShield
setflag FLAG_RECEIVED_GOLD_SHIELD
setflag FLAG_TEMP_3
goto BattleFrontier_ScottsHouse_EventScript_GivenShield
@@ -154,24 +144,17 @@ BattleFrontier_ScottsHouse_EventScript_WelcomeToFrontier::
msgbox BattleFrontier_ScottsHouse_Text_WelcomeToBattleFrontier, MSGBOX_DEFAULT
closemessage
delay 30
compare VAR_FACING, DIR_NORTH
call_if_eq BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayNorth
compare VAR_FACING, DIR_SOUTH
call_if_eq BattleFrontier_ScottsHouse_EventScript_ScottFaceAwaySouth
compare VAR_FACING, DIR_EAST
call_if_eq BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayEast
compare VAR_FACING, DIR_WEST
call_if_eq BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayWest
call_if_eq VAR_FACING, DIR_NORTH, BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayNorth
call_if_eq VAR_FACING, DIR_SOUTH, BattleFrontier_ScottsHouse_EventScript_ScottFaceAwaySouth
call_if_eq VAR_FACING, DIR_EAST, BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayEast
call_if_eq VAR_FACING, DIR_WEST, BattleFrontier_ScottsHouse_EventScript_ScottFaceAwayWest
msgbox BattleFrontier_ScottsHouse_Text_HowMuchEffortItTookToMakeReal, MSGBOX_DEFAULT
applymovement LOCALID_SCOTT, Common_Movement_FacePlayer
waitmovement 0
msgbox BattleFrontier_ScottsHouse_Text_HaveThisAsMementoOfOurPathsCrossing, MSGBOX_DEFAULT
compare VAR_SCOTT_STATE, 13
goto_if_eq BattleFrontier_ScottsHouse_EventScript_Give4BattlePoints
compare VAR_SCOTT_STATE, 9
goto_if_ge BattleFrontier_ScottsHouse_EventScript_Give3BattlePoints
compare VAR_SCOTT_STATE, 6
goto_if_ge BattleFrontier_ScottsHouse_EventScript_Give2BattlePoints
goto_if_eq VAR_SCOTT_STATE, 13, BattleFrontier_ScottsHouse_EventScript_Give4BattlePoints
goto_if_ge VAR_SCOTT_STATE, 9, BattleFrontier_ScottsHouse_EventScript_Give3BattlePoints
goto_if_ge VAR_SCOTT_STATE, 6, BattleFrontier_ScottsHouse_EventScript_Give2BattlePoints
goto BattleFrontier_ScottsHouse_EventScript_Give1BattlePoint
end