Reformat compare + goto_if/call_if to single statements
This commit is contained in:
@@ -107,8 +107,7 @@ VerdanturfTown_BattleTentLobby_EventScript_Attendant::
|
||||
lock
|
||||
faceplayer
|
||||
verdanturftent_getprize
|
||||
compare VAR_RESULT, ITEM_NONE
|
||||
goto_if_ne VerdanturfTown_BattleTentLobby_EventScript_PrizeWaiting
|
||||
goto_if_ne VAR_RESULT, ITEM_NONE, VerdanturfTown_BattleTentLobby_EventScript_PrizeWaiting
|
||||
special SavePlayerParty
|
||||
msgbox VerdanturfTown_BattleTentLobby_Text_WelcomeToBattleTent, MSGBOX_DEFAULT
|
||||
VerdanturfTown_BattleTentLobby_EventScript_AskEnterChallenge::
|
||||
@@ -126,8 +125,7 @@ VerdanturfTown_BattleTentLobby_EventScript_TryEnterChallenge::
|
||||
setvar VAR_FRONTIER_BATTLE_MODE, FRONTIER_MODE_SINGLES
|
||||
setvar VAR_RESULT, 2
|
||||
frontier_checkineligible
|
||||
compare VAR_0x8004, TRUE
|
||||
goto_if_eq VerdanturfTown_BattleTentLobby_EventScript_NotEnoughValidMons
|
||||
goto_if_eq VAR_0x8004, TRUE, VerdanturfTown_BattleTentLobby_EventScript_NotEnoughValidMons
|
||||
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_TENT
|
||||
msgbox VerdanturfTown_BattleTentLobby_Text_SelectThreeMons, MSGBOX_DEFAULT
|
||||
fadescreen FADE_TO_BLACK
|
||||
@@ -135,8 +133,7 @@ VerdanturfTown_BattleTentLobby_EventScript_TryEnterChallenge::
|
||||
setvar VAR_0x8005, FRONTIER_PARTY_SIZE
|
||||
special ChoosePartyForBattleFrontier
|
||||
waitstate
|
||||
compare VAR_RESULT, 0
|
||||
goto_if_eq VerdanturfTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge
|
||||
goto_if_eq VAR_RESULT, 0, VerdanturfTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge
|
||||
msgbox VerdanturfTown_BattleTentLobby_Text_SaveBeforeChallenge, MSGBOX_YESNO
|
||||
switch VAR_RESULT
|
||||
case NO, VerdanturfTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge
|
||||
@@ -154,8 +151,7 @@ VerdanturfTown_BattleTentLobby_EventScript_SaveBeforeChallenge::
|
||||
delay 2
|
||||
call Common_EventScript_SaveGame
|
||||
setvar VAR_TEMP_0, 255
|
||||
compare VAR_RESULT, 0
|
||||
goto_if_eq VerdanturfTown_BattleTentLobby_EventScript_CancelChallengeSaveFailed
|
||||
goto_if_eq VAR_RESULT, 0, VerdanturfTown_BattleTentLobby_EventScript_CancelChallengeSaveFailed
|
||||
VerdanturfTown_BattleTentLobby_EventScript_EnterChallenge::
|
||||
special SavePlayerParty
|
||||
frontier_setpartyorder FRONTIER_PARTY_SIZE
|
||||
@@ -232,8 +228,7 @@ VerdanturfTown_BattleTentLobby_EventScript_AttractGiver::
|
||||
goto_if_set FLAG_RECEIVED_TM45, VerdanturfTown_BattleTentLobby_EventScript_ReceivedAttract
|
||||
msgbox VerdanturfTown_BattleTentLobby_Text_AttractionRunsDeep, MSGBOX_DEFAULT
|
||||
giveitem ITEM_TM45
|
||||
compare VAR_RESULT, 0
|
||||
goto_if_eq Common_EventScript_ShowBagIsFull
|
||||
goto_if_eq VAR_RESULT, 0, Common_EventScript_ShowBagIsFull
|
||||
setflag FLAG_RECEIVED_TM45
|
||||
msgbox VerdanturfTown_BattleTentLobby_Text_AttractionMutual, MSGBOX_DEFAULT
|
||||
release
|
||||
|
||||
Reference in New Issue
Block a user