Add some tests (#7234)

This commit is contained in:
ghoulslash 2025-06-28 04:20:39 -04:00 committed by GitHub
parent a96591dd43
commit 0c4b0c582e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 42 additions and 0 deletions

View File

@ -31,6 +31,23 @@ SINGLE_BATTLE_TEST("Life Orb activates if it hits a Substitute")
}
}
SINGLE_BATTLE_TEST("Life Orb does not activate if using status move on a Substitute")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_LIFE_ORB); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(opponent, MOVE_SUBSTITUTE); MOVE(player, MOVE_GROWL); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_SUBSTITUTE, opponent);
ANIMATION(ANIM_TYPE_MOVE, MOVE_GROWL, player);
NONE_OF {
HP_BAR(player);
MESSAGE("Wobbuffet was hurt by the Life Orb!");
}
}
}
SINGLE_BATTLE_TEST("Life Orb does not activate if using a status move")
{
GIVEN {

View File

@ -17,6 +17,7 @@ TO_DO_BATTLE_TEST("Assist cannot call a Mimicked move (Gen4 only)");
TO_DO_BATTLE_TEST("Assist can call a Mimicked move but not the original Mimic (Gen5+)");
TO_DO_BATTLE_TEST("Assist can call moves in unhatched Eggs (Gen5 only)");
TO_DO_BATTLE_TEST("Assist can be used by wild Pokémon in Wild Double Battles, even if the partner faints");
TO_DO_BATTLE_TEST("Assist called move does not get boosted by Normalize");
SINGLE_BATTLE_TEST("Assist fails if there are no valid moves to choose from")
{
@ -32,3 +33,27 @@ SINGLE_BATTLE_TEST("Assist fails if there are no valid moves to choose from")
MESSAGE("But it failed!");
}
}
SINGLE_BATTLE_TEST("Assisted move triggers correct weakness berry")
{
u16 item;
PARAMETRIZE { item = ITEM_CHILAN_BERRY; }
PARAMETRIZE { item = ITEM_PASSHO_BERRY; }
GIVEN {
PLAYER(SPECIES_WOBBUFFET) { Moves(MOVE_ASSIST, MOVE_NONE, MOVE_NONE, MOVE_NONE); }
PLAYER(SPECIES_WOBBUFFET) { Moves(MOVE_SURF, MOVE_NONE, MOVE_NONE, MOVE_NONE); }
OPPONENT(SPECIES_ARON) { Item(item); }
} WHEN {
TURN { MOVE(player, MOVE_ASSIST); }
} SCENE {
MESSAGE("Wobbuffet used Assist!");
ANIMATION(ANIM_TYPE_MOVE, MOVE_ASSIST, player);
MESSAGE("Wobbuffet used Surf!");
if (item == ITEM_PASSHO_BERRY) {
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
} else {
NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
}
ANIMATION(ANIM_TYPE_MOVE, MOVE_SURF, player);
}
}