Reformat compare + goto_if/call_if to single statements
This commit is contained in:
@@ -19,14 +19,11 @@ BattleFrontier_BattleFactoryBattleRoom_MapScripts::
|
||||
BattleFrontier_BattleFactoryBattleRoom_OnTransition:
|
||||
frontier_settrainers
|
||||
checkplayergender
|
||||
compare VAR_RESULT, MALE
|
||||
call_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_SetPlayerGfxMale
|
||||
compare VAR_RESULT, FEMALE
|
||||
call_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_SetPlayerGfxFemale
|
||||
call_if_eq VAR_RESULT, MALE, BattleFrontier_BattleFactoryBattleRoom_EventScript_SetPlayerGfxMale
|
||||
call_if_eq VAR_RESULT, FEMALE, BattleFrontier_BattleFactoryBattleRoom_EventScript_SetPlayerGfxFemale
|
||||
frontier_getbrainstatus
|
||||
copyvar VAR_TEMP_F, VAR_RESULT
|
||||
compare VAR_RESULT, FRONTIER_BRAIN_NOT_READY
|
||||
goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_SetUpFactoryHeadObj
|
||||
goto_if_ne VAR_RESULT, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleFactoryBattleRoom_EventScript_SetUpFactoryHeadObj
|
||||
end
|
||||
|
||||
BattleFrontier_BattleFactoryBattleRoom_EventScript_SetUpFactoryHeadObj::
|
||||
@@ -41,8 +38,7 @@ BattleFrontier_BattleFactoryBattleRoom_OnWarp:
|
||||
BattleFrontier_BattleFactoryBattleRoom_EventScript_HideObjects::
|
||||
setvar VAR_TEMP_1, 1
|
||||
hideobjectat OBJ_EVENT_ID_PLAYER, MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM
|
||||
compare VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY
|
||||
goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_EndHideObjects
|
||||
goto_if_ne VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleFactoryBattleRoom_EventScript_EndHideObjects
|
||||
hideobjectat LOCALID_OPPONENT, MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM
|
||||
BattleFrontier_BattleFactoryBattleRoom_EventScript_EndHideObjects::
|
||||
end
|
||||
@@ -71,8 +67,7 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoomFactoryHeadBattle::
|
||||
end
|
||||
|
||||
BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoom::
|
||||
compare VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY
|
||||
goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoomFactoryHeadBattle
|
||||
goto_if_ne VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoomFactoryHeadBattle
|
||||
applymovement LOCALID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerEnterRoom
|
||||
applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerEnterRoom
|
||||
waitmovement 0
|
||||
@@ -84,8 +79,7 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_EnterRoom::
|
||||
applymovement LOCALID_OPPONENT, BattleFrontier_BattleFactoryBattleRoom_Movement_OpponentEnter
|
||||
waitmovement 0
|
||||
BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleOpponent::
|
||||
compare VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY
|
||||
goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNoland
|
||||
goto_if_ne VAR_TEMP_F, FRONTIER_BRAIN_NOT_READY, BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNoland
|
||||
palace_getopponentintro
|
||||
lockall
|
||||
msgbox gStringVar4, MSGBOX_DEFAULT
|
||||
@@ -105,8 +99,7 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyLost::
|
||||
|
||||
BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedOpponent::
|
||||
factory_get FACTORY_DATA_WIN_STREAK_SWAPS
|
||||
compare VAR_RESULT, MAX_STREAK
|
||||
goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementWinStreak
|
||||
goto_if_eq VAR_RESULT, MAX_STREAK, BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementWinStreak
|
||||
addvar VAR_RESULT, 1
|
||||
setorcopyvar VAR_0x8006, VAR_RESULT
|
||||
factory_set FACTORY_DATA_WIN_STREAK_SWAPS @ uses VAR_0x8006 above
|
||||
@@ -131,21 +124,18 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNoland::
|
||||
case FRONTIER_BRAIN_STREAK, BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandSilver
|
||||
case FRONTIER_BRAIN_STREAK_LONG, BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandGold
|
||||
frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandSilver
|
||||
goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandSilver
|
||||
msgbox BattleFrontier_BattleFactoryBattleRoom_Text_NolandImFactoryHead, MSGBOX_DEFAULT
|
||||
frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH
|
||||
BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandSilver::
|
||||
msgbox BattleFrontier_BattleFactoryBattleRoom_Text_ShakeOutKnowledgeBringItOn, MSGBOX_DEFAULT
|
||||
call BattleFrontier_BattleFactoryBattleRoom_EventScript_DoNolandBattle
|
||||
compare VAR_RESULT, 1
|
||||
goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandSilver
|
||||
goto_if_eq VAR_RESULT, 1, BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandSilver
|
||||
goto BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyLost
|
||||
|
||||
BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandSilver::
|
||||
frontier_getsymbols
|
||||
compare VAR_RESULT, 0
|
||||
goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland
|
||||
goto_if_ne VAR_RESULT, 0, BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland
|
||||
msgbox BattleFrontier_BattleFactoryBattleRoom_Text_NolandLetsSeeFrontierPass, MSGBOX_DEFAULT
|
||||
closemessage
|
||||
applymovement LOCALID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerApproachNoland
|
||||
@@ -160,21 +150,18 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandSilver::
|
||||
|
||||
BattleFrontier_BattleFactoryBattleRoom_EventScript_IntroNolandGold::
|
||||
frontier_get FRONTIER_DATA_HEARD_BRAIN_SPEECH
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_ne BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandGold
|
||||
goto_if_ne VAR_RESULT, FALSE, BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandGold
|
||||
msgbox BattleFrontier_BattleFactoryBattleRoom_Text_HarderLookThanLastTime, MSGBOX_DEFAULT
|
||||
frontier_set FRONTIER_DATA_HEARD_BRAIN_SPEECH
|
||||
BattleFrontier_BattleFactoryBattleRoom_EventScript_BattleNolandGold::
|
||||
msgbox BattleFrontier_BattleFactoryBattleRoom_Text_AllRightBringItOn, MSGBOX_DEFAULT
|
||||
call BattleFrontier_BattleFactoryBattleRoom_EventScript_DoNolandBattle
|
||||
compare VAR_RESULT, 1
|
||||
goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandGold
|
||||
goto_if_eq VAR_RESULT, 1, BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandGold
|
||||
goto BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyLost
|
||||
|
||||
BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNolandGold::
|
||||
frontier_getsymbols
|
||||
compare VAR_RESULT, 2
|
||||
goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland
|
||||
goto_if_eq VAR_RESULT, 2, BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland
|
||||
msgbox BattleFrontier_BattleFactoryBattleRoom_Text_OutOfMyLeagueLetsSeePass, MSGBOX_DEFAULT
|
||||
waitmessage
|
||||
applymovement LOCALID_PLAYER, BattleFrontier_BattleFactoryBattleRoom_Movement_PlayerApproachNoland
|
||||
@@ -199,14 +186,12 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_DoNolandBattle::
|
||||
|
||||
BattleFrontier_BattleFactoryBattleRoom_EventScript_DefeatedNoland::
|
||||
factory_get FACTORY_DATA_WIN_STREAK_SWAPS
|
||||
compare VAR_RESULT, MAX_STREAK
|
||||
goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementWinStreak
|
||||
goto_if_eq VAR_RESULT, MAX_STREAK, BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementWinStreak
|
||||
addvar VAR_RESULT, 1
|
||||
setorcopyvar VAR_0x8006, VAR_RESULT
|
||||
factory_set FACTORY_DATA_WIN_STREAK_SWAPS @ uses VAR_0x8006 above
|
||||
factory_get FACTORY_DATA_WIN_STREAK
|
||||
compare VAR_RESULT, MAX_STREAK
|
||||
goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementBattleNum
|
||||
goto_if_eq VAR_RESULT, MAX_STREAK, BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementBattleNum
|
||||
addvar VAR_RESULT, 1
|
||||
factory_set FACTORY_DATA_WIN_STREAK, VAR_RESULT
|
||||
frontier_get FRONTIER_DATA_BATTLE_NUM
|
||||
@@ -245,8 +230,7 @@ BattleFrontier_BattleFactoryBattleRoom_Movement_NolandMoveToBattle:
|
||||
|
||||
BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobby::
|
||||
copyvar VAR_RESULT, VAR_FRONTIER_BATTLE_MODE
|
||||
compare VAR_RESULT, FRONTIER_MODE_DOUBLES
|
||||
goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyDoubles
|
||||
goto_if_eq VAR_RESULT, FRONTIER_MODE_DOUBLES, BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyDoubles
|
||||
warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY, 4, 8
|
||||
waitstate
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user