pokeemerald/test/move_effect_torment.c

54 lines
1.7 KiB
C
Raw Normal View History

#include "global.h"
#include "test_battle.h"
ASSUMPTIONS
{
ASSUME(gBattleMoves[MOVE_TORMENT].effect == EFFECT_TORMENT);
}
SINGLE_BATTLE_TEST("Torment prevents consecutive move uses")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET) { Moves(MOVE_SPLASH, MOVE_CELEBRATE); }
} WHEN {
TURN { MOVE(player, MOVE_TORMENT); MOVE(opponent, MOVE_SPLASH); }
TURN { MOVE(opponent, MOVE_SPLASH, allowed: FALSE); MOVE(opponent, MOVE_CELEBRATE); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_TORMENT, player);
MESSAGE("Foe Wobbuffet was subjected to torment!");
ANIMATION(ANIM_TYPE_MOVE, MOVE_SPLASH, opponent);
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
}
}
SINGLE_BATTLE_TEST("Torment forces Struggle if the only move is prevented")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET) { Moves(MOVE_SPLASH); }
} WHEN {
TURN { MOVE(player, MOVE_TORMENT); MOVE(opponent, MOVE_SPLASH); }
TURN { MOVE(opponent, MOVE_SPLASH, allowed: FALSE); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_SPLASH, opponent);
ANIMATION(ANIM_TYPE_MOVE, MOVE_STRUGGLE, opponent);
}
}
SINGLE_BATTLE_TEST("Torment allows non-consecutive move uses")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_TORMENT); MOVE(opponent, MOVE_SPLASH); }
TURN { MOVE(opponent, MOVE_CELEBRATE); }
TURN { MOVE(opponent, MOVE_SPLASH); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_SPLASH, opponent);
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
ANIMATION(ANIM_TYPE_MOVE, MOVE_SPLASH, opponent);
}
}