pokeemerald/test/battle/move_effect/metronome.c

62 lines
2.0 KiB
C
Raw Normal View History

#include "global.h"
#include "test/battle.h"
ASSUMPTIONS
{
ASSUME(gBattleMoves[MOVE_METRONOME].effect == EFFECT_METRONOME);
}
SINGLE_BATTLE_TEST("Metronome picks a random move")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
2023-07-19 17:44:21 +02: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("Wobbuffet used Scratch!");
ANIMATION(ANIM_TYPE_MOVE, MOVE_SCRATCH, player);
HP_BAR(opponent);
}
}
SINGLE_BATTLE_TEST("Metronome's called powder move fails against Grass Types")
{
GIVEN {
ASSUME(gBattleMoves[MOVE_POISON_POWDER].powderMove);
ASSUME(gSpeciesInfo[SPECIES_TANGELA].types[0] == TYPE_GRASS);
ASSUME(gBattleMoves[MOVE_POISON_POWDER].effect == EFFECT_POISON);
2023-07-19 17:44:21 +02:00
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_TANGELA);
} WHEN {
2023-07-19 17:44:21 +02: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("Wobbuffet used PoisonPowder!");
NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_POISON_POWDER, player);
MESSAGE("It doesn't affect Foe Tangela…");
NOT STATUS_ICON(opponent, poison: TRUE);
}
}
SINGLE_BATTLE_TEST("Metronome's called multi-hit move hits multiple times")
{
GIVEN {
ASSUME(gBattleMoves[MOVE_ROCK_BLAST].effect == EFFECT_MULTI_HIT);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
2023-07-19 17:44:21 +02: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("Wobbuffet used Rock Blast!");
ANIMATION(ANIM_TYPE_MOVE, MOVE_ROCK_BLAST, player);
HP_BAR(opponent);
2023-07-20 11:14:12 +02:00
MESSAGE("Hit 5 time(s)!");
}
}