mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 19:54:21 +01:00
afe09e9653
Remove the "But it failed!" message if the foe cannot be switched.
73 lines
2.1 KiB
C
73 lines
2.1 KiB
C
#include "global.h"
|
|
#include "test_battle.h"
|
|
|
|
ASSUMPTIONS
|
|
{
|
|
ASSUME(gBattleMoves[MOVE_DRAGON_TAIL].effect == EFFECT_HIT_SWITCH_TARGET);
|
|
ASSUME(gBattleMoves[MOVE_LOCK_ON].effect == EFFECT_LOCK_ON);
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Dragon Tail switches the target with a random non-fainted replacement")
|
|
{
|
|
KNOWN_FAILING; // Only 18/50. Waiting for an improved PASSES_RANDOMLY.
|
|
PASSES_RANDOMLY(90 * 1, 100 * 2);
|
|
GIVEN {
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_BULBASAUR);
|
|
OPPONENT(SPECIES_CHARMANDER);
|
|
OPPONENT(SPECIES_SQUIRTLE) { HP(0); }
|
|
} WHEN {
|
|
TURN { MOVE(player, MOVE_DRAGON_TAIL); }
|
|
} SCENE {
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_DRAGON_TAIL, player);
|
|
MESSAGE("Foe Bulbasaur was dragged out!");
|
|
}
|
|
}
|
|
|
|
DOUBLE_BATTLE_TEST("Dragon Tail switches the target with a random non-battler, non-fainted replacement")
|
|
{
|
|
PASSES_RANDOMLY(90 * 1, 100 * 2);
|
|
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_DRAGON_TAIL, target: opponentRight); }
|
|
} SCENE {
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_DRAGON_TAIL, playerLeft);
|
|
MESSAGE("Foe Bulbasaur was dragged out!");
|
|
}
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Dragon Tail does not fail if no replacements")
|
|
{
|
|
GIVEN {
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
} WHEN {
|
|
TURN { MOVE(player, MOVE_DRAGON_TAIL); }
|
|
} SCENE {
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_DRAGON_TAIL, player);
|
|
NOT MESSAGE("But it failed!");
|
|
}
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Dragon Tail does not fail if replacements fainted")
|
|
{
|
|
GIVEN {
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WYNAUT) { HP(0); }
|
|
} WHEN {
|
|
TURN { MOVE(player, MOVE_DRAGON_TAIL); }
|
|
} SCENE {
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_DRAGON_TAIL, player);
|
|
NOT MESSAGE("But it failed!");
|
|
}
|
|
}
|