From 2c80b9124b6563ab9e35a6d81bffa466b8cc484d Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Mon, 29 Sep 2025 18:05:13 -0300 Subject: [PATCH] =?UTF-8?q?Fix=20Debug=20Give=20Pok=C3=A9mon=20(Complex)?= =?UTF-8?q?=20with=20duplicate=20moves=20(#7821)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/debug.c | 4 ++++ test/pokemon.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/debug.c b/src/debug.c index a14b0ebe53..99e8ee85f0 100644 --- a/src/debug.c +++ b/src/debug.c @@ -2853,6 +2853,10 @@ static void DebugAction_Give_Pokemon_ComplexCreateMon(u8 taskId) //https://githu //Moves for (i = 0; i < MAX_MON_MOVES; i++) { + // Non-default moveset chosen. Reset moves before setting the chosen moves. + if (moves[0] != MOVE_NONE) + SetMonMoveSlot(&mon, MOVE_NONE, i); + if (moves[i] == MOVE_NONE || moves[i] >= MOVES_COUNT) continue; diff --git a/test/pokemon.c b/test/pokemon.c index 60058407c4..61c9e86c04 100644 --- a/test/pokemon.c +++ b/test/pokemon.c @@ -288,7 +288,7 @@ TEST("givemon [moves]") ZeroPlayerPartyMons(); RUN_OVERWORLD_SCRIPT( - givemon SPECIES_WOBBUFFET, 100, move1=MOVE_SCRATCH, move2=MOVE_SPLASH, move3=MOVE_NONE, move4=MOVE_NONE; + givemon SPECIES_WOBBUFFET, 100, move1=MOVE_SCRATCH, move2=MOVE_SPLASH, move3=MOVE_NONE; ); EXPECT_EQ(GetMonData(&gPlayerParty[0], MON_DATA_SPECIES), SPECIES_WOBBUFFET);