From 9bfac0099e02795e80564db256aeb93e17f38b47 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Wed, 29 Oct 2025 18:13:41 -0300 Subject: [PATCH 1/2] Fixed fainting form change tests --- include/test/battle.h | 1 + test/battle/form_change/faint.c | 21 ++++++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/include/test/battle.h b/include/test/battle.h index 9cd1d23b1f..bf7d22788d 100644 --- a/include/test/battle.h +++ b/include/test/battle.h @@ -935,6 +935,7 @@ struct TestAIScoreStruct bool8 explicitTarget; }; +// Party data at the beginning of the test. Shouldn't be confused with the party data changed during the test. #define PLAYER_PARTY (gBattleTestRunnerState->data.recordedBattle.playerParty) #define OPPONENT_PARTY (gBattleTestRunnerState->data.recordedBattle.opponentParty) diff --git a/test/battle/form_change/faint.c b/test/battle/form_change/faint.c index 8fc95cdc65..316ecca0bf 100644 --- a/test/battle/form_change/faint.c +++ b/test/battle/form_change/faint.c @@ -1,9 +1,24 @@ #include "global.h" #include "test/battle.h" -SINGLE_BATTLE_TEST("Aegislash reverts to Shield Form upon fainting") +SINGLE_BATTLE_TEST("Aegislash reverts to Shield Form upon fainting (start as Shield)") +{ + GIVEN { + PLAYER(SPECIES_AEGISLASH_SHIELD) { HP(1); } + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_SCRATCH); MOVE(opponent, MOVE_GUST); SEND_OUT(player, 1); } + } SCENE { + MESSAGE("The opposing Wobbuffet used Gust!"); + MESSAGE("Aegislash fainted!"); + } THEN { + EXPECT_EQ(GetMonData(&gPlayerParty[0], MON_DATA_SPECIES), SPECIES_AEGISLASH_SHIELD); + } +} + +SINGLE_BATTLE_TEST("Aegislash reverts to Shield Form upon fainting (start as Blade)") { - KNOWN_FAILING; GIVEN { PLAYER(SPECIES_AEGISLASH_BLADE) { HP(1); } PLAYER(SPECIES_WOBBUFFET); @@ -14,7 +29,7 @@ SINGLE_BATTLE_TEST("Aegislash reverts to Shield Form upon fainting") MESSAGE("The opposing Wobbuffet used Gust!"); MESSAGE("Aegislash fainted!"); } THEN { - EXPECT_EQ(GetMonData(&PLAYER_PARTY[0], MON_DATA_SPECIES), SPECIES_AEGISLASH_SHIELD); + EXPECT_EQ(GetMonData(&gPlayerParty[0], MON_DATA_SPECIES), SPECIES_AEGISLASH_SHIELD); } } From 9fa857d34cb0c05565b9dd7be6c0e480e16de6c2 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Wed, 29 Oct 2025 21:08:05 -0300 Subject: [PATCH 2/2] Removed redundant comment --- include/test/battle.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/test/battle.h b/include/test/battle.h index bf7d22788d..9cd1d23b1f 100644 --- a/include/test/battle.h +++ b/include/test/battle.h @@ -935,7 +935,6 @@ struct TestAIScoreStruct bool8 explicitTarget; }; -// Party data at the beginning of the test. Shouldn't be confused with the party data changed during the test. #define PLAYER_PARTY (gBattleTestRunnerState->data.recordedBattle.playerParty) #define OPPONENT_PARTY (gBattleTestRunnerState->data.recordedBattle.opponentParty)