sovereignx/test/battle/move_effect/roar.c
kittenchilly db24128ee3
Update battle messages to Gen 5+ standards (#3240)
Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
2024-10-21 14:52:45 -03:00

70 lines
1.9 KiB
C

#include "global.h"
#include "test/battle.h"
ASSUMPTIONS
{
ASSUME(gMovesInfo[MOVE_ROAR].effect == EFFECT_ROAR);
}
SINGLE_BATTLE_TEST("Roar switches the target with a random non-fainted replacement")
{
PASSES_RANDOMLY(1, 2, RNG_FORCE_RANDOM_SWITCH);
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_BULBASAUR);
OPPONENT(SPECIES_CHARMANDER);
OPPONENT(SPECIES_SQUIRTLE) { HP(0); }
} WHEN {
TURN { MOVE(player, MOVE_ROAR); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_ROAR, player);
MESSAGE("The opposing Bulbasaur was dragged out!");
}
}
DOUBLE_BATTLE_TEST("Roar switches the target with a random non-battler, non-fainted replacement")
{
PASSES_RANDOMLY(1, 2, RNG_FORCE_RANDOM_SWITCH);
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
PLAYER(SPECIES_WYNAUT);
OPPONENT(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WYNAUT);
OPPONENT(SPECIES_BULBASAUR);
OPPONENT(SPECIES_CHARMANDER);
OPPONENT(SPECIES_SQUIRTLE) { HP(0); }
} WHEN {
TURN { MOVE(playerLeft, MOVE_ROAR, target: opponentRight); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_ROAR, playerLeft);
MESSAGE("The opposing Bulbasaur was dragged out!");
}
}
SINGLE_BATTLE_TEST("Roar fails if no replacements")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_ROAR); }
} SCENE {
MESSAGE("Wobbuffet used Roar!");
MESSAGE("But it failed!");
}
}
SINGLE_BATTLE_TEST("Roar fails if replacements fainted")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WYNAUT) { HP(0); }
} WHEN {
TURN { MOVE(player, MOVE_ROAR); }
} SCENE {
MESSAGE("Wobbuffet used Roar!");
MESSAGE("But it failed!");
}
}