Reformat compare + goto_if/call_if to single statements
This commit is contained in:
@@ -21,8 +21,7 @@ BattleFrontier_BattlePyramidFloor_EventScript_UpdateLight::
|
||||
BattleFrontier_BattlePyramidFloor_EventScript_UpdateLightLoop::
|
||||
special CallBattlePyramidFunction
|
||||
delay 2
|
||||
compare VAR_RESULT, 2
|
||||
goto_if_ne BattleFrontier_BattlePyramidFloor_EventScript_UpdateLightLoop
|
||||
goto_if_ne VAR_RESULT, 2, BattleFrontier_BattlePyramidFloor_EventScript_UpdateLightLoop
|
||||
setvar VAR_TEMP_D, 0
|
||||
releaseall
|
||||
end
|
||||
@@ -45,18 +44,12 @@ BattleFrontier_BattlePyramidFloor_OnResume:
|
||||
case CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePyramid_EventScript_WarpToLobby
|
||||
case CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePyramidFloor_EventScript_ReadyChallenge
|
||||
frontier_get FRONTIER_DATA_BATTLE_OUTCOME
|
||||
compare VAR_RESULT, B_OUTCOME_RAN
|
||||
goto_if_eq BattleFrontier_BattlePyramidFloor_EventScript_ResetParty
|
||||
compare VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED
|
||||
goto_if_eq BattleFrontier_BattlePyramidFloor_EventScript_ResetParty
|
||||
compare VAR_RESULT, 0
|
||||
goto_if_eq BattleFrontier_BattlePyramidFloor_EventScript_ResetParty
|
||||
compare VAR_RESULT, B_OUTCOME_LOST
|
||||
goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost
|
||||
compare VAR_RESULT, B_OUTCOME_DREW
|
||||
goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost
|
||||
compare VAR_RESULT, B_OUTCOME_FORFEITED
|
||||
goto_if_eq BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost
|
||||
goto_if_eq VAR_RESULT, B_OUTCOME_RAN, BattleFrontier_BattlePyramidFloor_EventScript_ResetParty
|
||||
goto_if_eq VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED, BattleFrontier_BattlePyramidFloor_EventScript_ResetParty
|
||||
goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePyramidFloor_EventScript_ResetParty
|
||||
goto_if_eq VAR_RESULT, B_OUTCOME_LOST, BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost
|
||||
goto_if_eq VAR_RESULT, B_OUTCOME_DREW, BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost
|
||||
goto_if_eq VAR_RESULT, B_OUTCOME_FORFEITED, BattleFrontier_BattlePyramid_EventScript_WarpToLobbyLost
|
||||
frontier_isbattletype BATTLE_TYPE_TRAINER @ VAR_RESULT seems to be ignored here
|
||||
setvar VAR_TEMP_D, 1
|
||||
BattleFrontier_BattlePyramidFloor_EventScript_ResetParty::
|
||||
@@ -97,8 +90,7 @@ BattlePyramid_WarpToNextFloor::
|
||||
frontier_get FRONTIER_DATA_BATTLE_NUM @ Floor number
|
||||
addvar VAR_RESULT, 1
|
||||
frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT
|
||||
compare VAR_RESULT, 7
|
||||
goto_if_eq BattlePyramid_WarpToTop
|
||||
goto_if_eq VAR_RESULT, 7, BattlePyramid_WarpToTop
|
||||
pyramid_seedfloor
|
||||
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
|
||||
setvar VAR_RESULT, 0
|
||||
@@ -124,8 +116,7 @@ BattlePyramid_TrainerBattle::
|
||||
BattlePyramid_FindItemBall::
|
||||
pyramid_setitem
|
||||
callstd STD_FIND_ITEM
|
||||
compare VAR_0x8007, 0
|
||||
goto_if_eq BattlePyramid_FindItemBallEnd
|
||||
goto_if_eq VAR_0x8007, 0, BattlePyramid_FindItemBallEnd
|
||||
pyramid_hideitem
|
||||
BattlePyramid_FindItemBallEnd::
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user