Field effect for cutting grass is missing setfieldeffectargument. Issue #5766 (#5952)

This commit is contained in:
shachar700 2025-01-05 17:45:21 +02:00 committed by GitHub
parent c6d92eaf80
commit cbd0b3ef0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 1 deletions

View file

@ -385,6 +385,18 @@ EventScript_UseDig::
lockall
goto EventScript_DigCommon
EventScript_CutGrassCommon:
isfollowerfieldmoveuser VAR_0x8004
setfieldeffectargument 3, VAR_0x8004 @ skip pose if true
dofieldeffect FLDEFF_USE_CUT_ON_GRASS
waitstate
@ Use Cut grass from party menu
EventScript_UseCutGrass::
lockall
goto EventScript_CutGrassCommon
Text_CantDive:
.string "The sea is deep here. A POKéMON\n"
.string "may be able to go underwater.$"

View file

@ -405,6 +405,7 @@ extern const u8 EventScript_UseFlash[];
extern const u8 EventScript_UseCut[];
extern const u8 EventScript_UseRockSmash[];
extern const u8 EventScript_UseDig[];
extern const u8 EventScript_UseCutGrass[];
//player pc
extern const u8 LittlerootTown_BrendansHouse_2F_EventScript_TurnOffPlayerPC[];

View file

@ -277,8 +277,8 @@ bool8 SetUpFieldMove_Cut(void)
static void FieldCallback_CutGrass(void)
{
FieldEffectStart(FLDEFF_USE_CUT_ON_GRASS);
gFieldEffectArguments[0] = GetCursorSelectionMonId();
ScriptContext_SetupScript(EventScript_UseCutGrass);
}
bool8 FldEff_UseCutOnGrass(void)