From a101476d5187243b1d9c7a22d44d9fc60bbd7481 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sun, 12 Mar 2023 17:01:53 -0300 Subject: [PATCH] Hunger Switch test --- test/ability_hunger_switch.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/ability_hunger_switch.c diff --git a/test/ability_hunger_switch.c b/test/ability_hunger_switch.c new file mode 100644 index 000000000..8ae313929 --- /dev/null +++ b/test/ability_hunger_switch.c @@ -0,0 +1,25 @@ +#include "global.h" +#include "test_battle.h" + +SINGLE_BATTLE_TEST("Hunger Switch switches Morpeko's forms at the end of the turn") +{ + u16 species; + PARAMETRIZE { species = SPECIES_MORPEKO; } + PARAMETRIZE { species = SPECIES_MORPEKO_HANGRY; } + GIVEN { + ASSUME(P_GEN_8_POKEMON == TRUE); + PLAYER(species) { Moves(MOVE_CELEBRATE); Speed(2); }; + OPPONENT(SPECIES_WOBBUFFET) { Moves(MOVE_CELEBRATE); Speed(1); }; + } WHEN { + TURN { MOVE(player, MOVE_CELEBRATE); } + } SCENE { + MESSAGE("Morpeko used Celebrate!"); + MESSAGE("Foe Wobbuffet used Celebrate!"); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); + } THEN { + if (species == SPECIES_MORPEKO) + EXPECT_EQ(player->species, SPECIES_MORPEKO_HANGRY); + else + EXPECT_EQ(player->species, SPECIES_MORPEKO); + } +}