Use 'goto_if_eq VAR, value, Script' syntax

This commit is contained in:
GriffinR
2022-08-09 20:40:03 -04:00
parent 60fc8c5e22
commit f113da30ad
171 changed files with 1992 additions and 3453 deletions
+10 -20
View File
@@ -4,30 +4,25 @@ Route5_PokemonDayCare_EventScript_DaycareMan::
faceplayer
showmoneybox 0, 0
specialvar VAR_RESULT, IsThereMonInRoute5Daycare
compare VAR_RESULT, TRUE
goto_if_eq Route5_PokemonDayCare_EventScript_CheckOnMon
goto_if_eq VAR_RESULT, TRUE, Route5_PokemonDayCare_EventScript_CheckOnMon
msgbox Route5_PokemonDayCare_Text_WantMeToRaiseMon, MSGBOX_YESNO
compare VAR_RESULT, YES
goto_if_eq Route5_PokemonDayCare_EventScript_TryGiveMon
goto_if_eq VAR_RESULT, YES, Route5_PokemonDayCare_EventScript_TryGiveMon
msgbox Route5_PokemonDayCare_Text_ComeAgain
goto Route5_PokemonDayCare_EventScript_CloseMoneyBox
end
Route5_PokemonDayCare_EventScript_TryGiveMon::
specialvar VAR_RESULT, CountPartyNonEggMons
compare VAR_RESULT, 1
goto_if_eq Route5_PokemonDayCare_EventScript_OnlyOneMonInParty
goto_if_eq VAR_RESULT, 1, Route5_PokemonDayCare_EventScript_OnlyOneMonInParty
msgbox Route5_PokemonDayCare_Text_WhichMonShouldIRaise
fadescreen FADE_TO_BLACK
hidemoneybox
special ChooseSendDaycareMon
waitstate
showmoneybox 0, 0
compare VAR_0x8004, PARTY_SIZE
goto_if_ge Route5_PokemonDayCare_EventScript_ComeAgain
goto_if_ge VAR_0x8004, PARTY_SIZE, Route5_PokemonDayCare_EventScript_ComeAgain
specialvar VAR_RESULT, CountPartyAliveNonEggMons_IgnoreVar0x8004Slot
compare VAR_RESULT, 0
goto_if_eq Route5_PokemonDayCare_EventScript_OnlyOneAliveMonInParty
goto_if_eq VAR_RESULT, 0, Route5_PokemonDayCare_EventScript_OnlyOneAliveMonInParty
specialvar VAR_0x8005, GetSelectedMonNicknameAndSpecies
msgbox Route5_PokemonDayCare_Text_LookAfterMonForAWhile
waitse
@@ -57,14 +52,11 @@ Route5_PokemonDayCare_EventScript_OnlyOneAliveMonInParty::
Route5_PokemonDayCare_EventScript_CheckOnMon::
setvar VAR_0x8004, 0
specialvar VAR_RESULT, GetNumLevelsGainedForRoute5DaycareMon
compare VAR_RESULT, 0
call_if_ne Route5_PokemonDayCare_EventScript_MonHasGrownByXLevels
compare VAR_RESULT, 0
call_if_eq Route5_PokemonDayCare_EventScript_NotEnoughTime
call_if_ne VAR_RESULT, 0, Route5_PokemonDayCare_EventScript_MonHasGrownByXLevels
call_if_eq VAR_RESULT, 0, Route5_PokemonDayCare_EventScript_NotEnoughTime
special GetCostToWithdrawRoute5DaycareMon
msgbox Route5_PokemonDayCare_Text_OweMeXForMonsReturn, MSGBOX_YESNO
compare VAR_RESULT, YES
goto_if_eq Route5_PokemonDayCare_EventScript_TryRetrieveMon
goto_if_eq VAR_RESULT, YES, Route5_PokemonDayCare_EventScript_TryRetrieveMon
goto Route5_PokemonDayCare_EventScript_ComeAgain
end
@@ -78,11 +70,9 @@ Route5_PokemonDayCare_EventScript_NotEnoughTime::
Route5_PokemonDayCare_EventScript_TryRetrieveMon::
specialvar VAR_RESULT, CalculatePlayerPartyCount
compare VAR_RESULT, PARTY_SIZE
goto_if_eq Route5_PokemonDayCare_EventScript_NoRoomInParty
goto_if_eq VAR_RESULT, PARTY_SIZE, Route5_PokemonDayCare_EventScript_NoRoomInParty
specialvar VAR_RESULT, IsEnoughForCostInVar0x8005
compare VAR_RESULT, TRUE
goto_if_eq Route5_PokemonDayCare_EventScript_RetrieveMon
goto_if_eq VAR_RESULT, TRUE, Route5_PokemonDayCare_EventScript_RetrieveMon
msgbox Route5_PokemonDayCare_Text_DontHaveEnoughMoney
goto Route5_PokemonDayCare_EventScript_CloseMoneyBox
end