Fixed fainting form change tests

This commit is contained in:
Eduardo Quezada 2025-10-29 18:13:41 -03:00
parent ea3b72f43f
commit 9bfac0099e
2 changed files with 19 additions and 3 deletions

View File

@ -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)

View File

@ -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);
}
}