2023-07-15 13:00:55 +01:00
|
|
|
#include "global.h"
|
2023-08-12 20:00:15 +01:00
|
|
|
#include "test/battle.h"
|
2023-07-15 13:00:55 +01:00
|
|
|
|
|
|
|
ASSUMPTIONS
|
|
|
|
{
|
2025-01-01 19:34:33 +00:00
|
|
|
ASSUME(GetMoveEffect(MOVE_METRONOME) == EFFECT_METRONOME);
|
2023-07-15 13:00:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
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)); }
|
2023-07-15 13:00:55 +01:00
|
|
|
} SCENE {
|
|
|
|
MESSAGE("Wobbuffet used Metronome!");
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_METRONOME, player);
|
2024-10-21 18:52:45 +01:00
|
|
|
MESSAGE("Waggling a finger let it use Scratch!");
|
2023-07-15 13:00:55 +01:00
|
|
|
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));
|
2023-07-15 13:00:55 +01:00
|
|
|
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);
|
2023-07-15 13:00:55 +01:00
|
|
|
} WHEN {
|
2023-07-19 16:44:21 +01:00
|
|
|
TURN { MOVE(player, MOVE_METRONOME, WITH_RNG(RNG_METRONOME, MOVE_POISON_POWDER)); }
|
2023-07-15 13:00:55 +01:00
|
|
|
} SCENE {
|
|
|
|
MESSAGE("Wobbuffet used Metronome!");
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_METRONOME, player);
|
2024-10-21 18:52:45 +01:00
|
|
|
MESSAGE("Waggling a finger let it use Poison Powder!");
|
2023-07-15 13:00:55 +01:00
|
|
|
NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_POISON_POWDER, player);
|
2024-10-21 18:52:45 +01:00
|
|
|
MESSAGE("It doesn't affect the opposing Tangela…");
|
2023-07-15 13:00:55 +01:00
|
|
|
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);
|
2023-07-15 13:00:55 +01:00
|
|
|
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)); }
|
2023-07-15 13:00:55 +01:00
|
|
|
} SCENE {
|
|
|
|
MESSAGE("Wobbuffet used Metronome!");
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_METRONOME, player);
|
2024-10-21 18:52:45 +01:00
|
|
|
MESSAGE("Waggling a finger let it use Rock Blast!");
|
2023-07-15 13:00:55 +01:00
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_ROCK_BLAST, player);
|
|
|
|
HP_BAR(opponent);
|
2024-10-21 18:52:45 +01:00
|
|
|
MESSAGE("The Pokémon was hit 5 time(s)!");
|
2023-07-15 13:00:55 +01:00
|
|
|
}
|
|
|
|
}
|