From 3add78dbd16a7487abe3293f60a795eb9faa3b6e Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 9 Aug 2022 20:12:26 -0400 Subject: [PATCH] Use constants for setfieldeffectargument --- data/maps/BirthIsland_Exterior/scripts.inc | 4 ++-- data/maps/CeladonCity_GameCorner/scripts.inc | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/data/maps/BirthIsland_Exterior/scripts.inc b/data/maps/BirthIsland_Exterior/scripts.inc index f22754aad..bf8366f56 100644 --- a/data/maps/BirthIsland_Exterior/scripts.inc +++ b/data/maps/BirthIsland_Exterior/scripts.inc @@ -72,8 +72,8 @@ BirthIsland_Exterior_EventScript_Deoxys:: addobject LOCALID_DEOXYS waitse setfieldeffectargument 0, LOCALID_DEOXYS_ROCK - setfieldeffectargument 1, 56 - setfieldeffectargument 2, 2 + setfieldeffectargument 1, MAP_NUM(BIRTH_ISLAND_EXTERIOR) + setfieldeffectargument 2, MAP_GROUP(BIRTH_ISLAND_EXTERIOR) dofieldeffect FLDEFF_DESTROY_DEOXYS_ROCK playbgm MUS_ENCOUNTER_DEOXYS, 0 waitfieldeffect FLDEFF_DESTROY_DEOXYS_ROCK diff --git a/data/maps/CeladonCity_GameCorner/scripts.inc b/data/maps/CeladonCity_GameCorner/scripts.inc index d95a601fc..e0be493bb 100644 --- a/data/maps/CeladonCity_GameCorner/scripts.inc +++ b/data/maps/CeladonCity_GameCorner/scripts.inc @@ -256,9 +256,15 @@ CeladonCity_GameCorner_EventScript_SlotMachine:: msgbox CeladonCity_GameCorner_Text_SlotMachineWantToPlay, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq CeladonCity_GameCorner_EventScript_DontPlaySlotMachine - setfieldeffectargument 0, 255 - setfieldeffectargument 1, 10 - setfieldeffectargument 2, 14 + setfieldeffectargument 0, OBJ_EVENT_ID_PLAYER +.ifdef BUGFIX + setfieldeffectargument 1, MAP_NUM(CELADON_CITY_GAME_CORNER) + setfieldeffectargument 2, MAP_GROUP(CELADON_CITY_GAME_CORNER) +.else + @ Map num/group were provided in the wrong order + setfieldeffectargument 1, MAP_GROUP(CELADON_CITY_GAME_CORNER) + setfieldeffectargument 2, MAP_NUM(CELADON_CITY_GAME_CORNER) +.endif dofieldeffect FLDEFF_SMILEY_FACE_ICON waitfieldeffect FLDEFF_SMILEY_FACE_ICON specialvar VAR_RESULT, GetRandomSlotMachineId