sovereignx/test/battle/move_effect/hit_escape.c
Alex 166a1a4e63
Adds ability Embody Aspect + minor fix to Hospitality (#3821)
* Adds ability Embody Aspect + minor fix to Hospitality

* comment out failing tests related to neutralizing gas

* fixes neutralizing gas bug

* leftover
2023-12-25 18:28:16 +01:00

113 lines
3.1 KiB
C

#include "global.h"
#include "test/battle.h"
ASSUMPTIONS
{
ASSUME(gBattleMoves[MOVE_U_TURN].effect == EFFECT_HIT_ESCAPE);
}
SINGLE_BATTLE_TEST("U-turn switches the user out")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
PLAYER(SPECIES_WYNAUT);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_U_TURN); SEND_OUT(player, 1); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_U_TURN, player);
HP_BAR(opponent);
MESSAGE("Go! Wynaut!");
}
}
SINGLE_BATTLE_TEST("U-turn does not switch the user out if the battle ends")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
PLAYER(SPECIES_WYNAUT);
OPPONENT(SPECIES_WOBBUFFET) { HP(1); }
} WHEN {
TURN { MOVE(player, MOVE_U_TURN); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_U_TURN, player);
HP_BAR(opponent);
}
}
SINGLE_BATTLE_TEST("U-turn does not switch the user out if no replacements")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_U_TURN); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_U_TURN, player);
HP_BAR(opponent);
}
}
SINGLE_BATTLE_TEST("U-turn does not switch the user out if replacements fainted")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
PLAYER(SPECIES_WYNAUT) { HP(0); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_U_TURN); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_U_TURN, player);
HP_BAR(opponent);
}
}
SINGLE_BATTLE_TEST("U-turn does not switch the user out if Wimp Out activates")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
PLAYER(SPECIES_WYNAUT);
OPPONENT(SPECIES_WIMPOD) { MaxHP(100); HP(51); Ability(ABILITY_WIMP_OUT); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_U_TURN); SEND_OUT(opponent, 1); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_U_TURN, player);
HP_BAR(opponent);
ABILITY_POPUP(opponent, ABILITY_WIMP_OUT);
MESSAGE("2 sent out Wobbuffet!");
}
}
SINGLE_BATTLE_TEST("U-turn switches the user out if Wimp Out fails to activate")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
PLAYER(SPECIES_WYNAUT);
OPPONENT(SPECIES_WIMPOD) { MaxHP(100); HP(51); Ability(ABILITY_WIMP_OUT); }
} WHEN {
TURN { MOVE(player, MOVE_U_TURN); SEND_OUT(player, 1); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_U_TURN, player);
HP_BAR(opponent);
NOT ABILITY_POPUP(opponent);
MESSAGE("Your foe's weak! Get 'em, Wynaut!");
}
}
SINGLE_BATTLE_TEST("U-turn switches the user out after Ice Face activates")
{
GIVEN {
PLAYER(SPECIES_BEEDRILL);
PLAYER(SPECIES_WYNAUT);
OPPONENT(SPECIES_EISCUE) { Ability(ABILITY_ICE_FACE); }
} WHEN {
TURN { MOVE(player, MOVE_U_TURN); SEND_OUT(player, 1); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_U_TURN, player);
HP_BAR(opponent);
ABILITY_POPUP(opponent, ABILITY_ICE_FACE);
MESSAGE("Foe Eiscue transformed!");
MESSAGE("Go! Wynaut!");
}
}