sovereignx/test/battle/move_effect/metronome.c

62 lines
2.1 KiB
C
Raw Normal View History

#include "global.h"
#include "test/battle.h"
ASSUMPTIONS
{
2025-01-01 19:34:33 +00:00
ASSUME(GetMoveEffect(MOVE_METRONOME) == EFFECT_METRONOME);
}
SINGLE_BATTLE_TEST("Metronome picks a random move")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
2023-07-19 16:44:21 +01:00
TURN { MOVE(player, MOVE_METRONOME, WITH_RNG(RNG_METRONOME, MOVE_SCRATCH)); }
} SCENE {
MESSAGE("Wobbuffet used Metronome!");
ANIMATION(ANIM_TYPE_MOVE, MOVE_METRONOME, player);
MESSAGE("Waggling a finger let it use Scratch!");
ANIMATION(ANIM_TYPE_MOVE, MOVE_SCRATCH, player);
HP_BAR(opponent);
}
}
SINGLE_BATTLE_TEST("Metronome's called powder move fails against Grass Types")
{
GIVEN {
2025-01-01 19:34:33 +00:00
ASSUME(IsPowderMove(MOVE_POISON_POWDER));
ASSUME(gSpeciesInfo[SPECIES_TANGELA].types[0] == TYPE_GRASS);
2025-01-01 19:34:33 +00:00
ASSUME(GetMoveEffect(MOVE_POISON_POWDER) == EFFECT_POISON);
2023-07-19 16:44:21 +01:00
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_TANGELA);
} WHEN {
2023-07-19 16:44:21 +01:00
TURN { MOVE(player, MOVE_METRONOME, WITH_RNG(RNG_METRONOME, MOVE_POISON_POWDER)); }
} SCENE {
MESSAGE("Wobbuffet used Metronome!");
ANIMATION(ANIM_TYPE_MOVE, MOVE_METRONOME, player);
MESSAGE("Waggling a finger let it use Poison Powder!");
NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_POISON_POWDER, player);
MESSAGE("It doesn't affect the opposing Tangela…");
NOT STATUS_ICON(opponent, poison: TRUE);
}
}
SINGLE_BATTLE_TEST("Metronome's called multi-hit move hits multiple times")
{
GIVEN {
2025-01-01 19:34:33 +00:00
ASSUME(GetMoveEffect(MOVE_ROCK_BLAST) == EFFECT_MULTI_HIT);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
2023-07-19 16:44:21 +01:00
TURN { MOVE(player, MOVE_METRONOME, WITH_RNG(RNG_METRONOME, MOVE_ROCK_BLAST)); }
} SCENE {
MESSAGE("Wobbuffet used Metronome!");
ANIMATION(ANIM_TYPE_MOVE, MOVE_METRONOME, player);
MESSAGE("Waggling a finger let it use Rock Blast!");
ANIMATION(ANIM_TYPE_MOVE, MOVE_ROCK_BLAST, player);
HP_BAR(opponent);
MESSAGE("The Pokémon was hit 5 time(s)!");
}
}