Reformat compare + goto_if/call_if to single statements
This commit is contained in:
@@ -4,10 +4,8 @@ LilycoveCity_DepartmentStoreRooftop_MapScripts::
|
||||
|
||||
LilycoveCity_DepartmentStoreRooftop_OnTransition:
|
||||
getpokenewsactive POKENEWS_LILYCOVE
|
||||
compare VAR_RESULT, TRUE
|
||||
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_ShowSaleWoman
|
||||
compare VAR_RESULT, FALSE
|
||||
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_HideSaleWoman
|
||||
call_if_eq VAR_RESULT, TRUE, LilycoveCity_DepartmentStoreRooftop_EventScript_ShowSaleWoman
|
||||
call_if_eq VAR_RESULT, FALSE, LilycoveCity_DepartmentStoreRooftop_EventScript_HideSaleWoman
|
||||
end
|
||||
|
||||
LilycoveCity_DepartmentStoreRooftop_EventScript_ShowSaleWoman::
|
||||
@@ -52,8 +50,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_Man::
|
||||
lock
|
||||
faceplayer
|
||||
getpokenewsactive POKENEWS_LILYCOVE
|
||||
compare VAR_RESULT, TRUE
|
||||
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_ManClearOutSale
|
||||
call_if_eq VAR_RESULT, TRUE, LilycoveCity_DepartmentStoreRooftop_EventScript_ManClearOutSale
|
||||
msgbox LilycoveCity_DepartmentStoreRooftop_Text_SetDatesForClearOutSales, MSGBOX_DEFAULT
|
||||
release
|
||||
end
|
||||
@@ -126,23 +123,15 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyLemonade::
|
||||
return
|
||||
|
||||
LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink::
|
||||
compare VAR_TEMP_1, 0
|
||||
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyFreshWater
|
||||
compare VAR_TEMP_1, 1
|
||||
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneySodaPop
|
||||
compare VAR_TEMP_1, 2
|
||||
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyLemonade
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NotEnoughMoneyForDrink
|
||||
call_if_eq VAR_TEMP_1, 0, LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyFreshWater
|
||||
call_if_eq VAR_TEMP_1, 1, LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneySodaPop
|
||||
call_if_eq VAR_TEMP_1, 2, LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyLemonade
|
||||
goto_if_eq VAR_RESULT, FALSE, LilycoveCity_DepartmentStoreRooftop_EventScript_NotEnoughMoneyForDrink
|
||||
checkitemspace VAR_TEMP_0
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink
|
||||
compare VAR_TEMP_1, 0
|
||||
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyFreshWater
|
||||
compare VAR_TEMP_1, 1
|
||||
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneySodaPop
|
||||
compare VAR_TEMP_1, 2
|
||||
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyLemonade
|
||||
goto_if_eq VAR_RESULT, FALSE, LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink
|
||||
call_if_eq VAR_TEMP_1, 0, LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyFreshWater
|
||||
call_if_eq VAR_TEMP_1, 1, LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneySodaPop
|
||||
call_if_eq VAR_TEMP_1, 2, LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyLemonade
|
||||
updatemoneybox
|
||||
bufferitemname STR_VAR_1, VAR_TEMP_0
|
||||
playse SE_VEND
|
||||
@@ -152,11 +141,9 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink::
|
||||
bufferstdstring STR_VAR_3, STDSTRING_ITEMS
|
||||
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
|
||||
random 64 @ 1/64 chance of an additional drink dropping
|
||||
compare VAR_RESULT, 0
|
||||
goto_if_ne LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink
|
||||
goto_if_ne VAR_RESULT, 0, LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink
|
||||
checkitemspace VAR_TEMP_0
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink
|
||||
goto_if_eq VAR_RESULT, FALSE, LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink
|
||||
playse SE_VEND
|
||||
msgbox LilycoveCity_DepartmentStoreRooftop_Text_ExtraCanOfDrinkDroppedDown, MSGBOX_DEFAULT
|
||||
additem VAR_TEMP_0
|
||||
@@ -164,11 +151,9 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink::
|
||||
bufferstdstring STR_VAR_3, STDSTRING_ITEMS
|
||||
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
|
||||
random 64 @ 1/64 * the prev 1/64 chance of a third additional drink dropping, ~ 0.02% chance
|
||||
compare VAR_RESULT, 0
|
||||
goto_if_ne LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink
|
||||
goto_if_ne VAR_RESULT, 0, LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink
|
||||
checkitemspace VAR_TEMP_0
|
||||
compare VAR_RESULT, 0
|
||||
goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink
|
||||
goto_if_eq VAR_RESULT, 0, LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink
|
||||
playse SE_VEND
|
||||
msgbox LilycoveCity_DepartmentStoreRooftop_Text_ExtraCanOfDrinkDroppedDown, MSGBOX_DEFAULT
|
||||
additem VAR_TEMP_0
|
||||
|
||||
Reference in New Issue
Block a user