2022-12-24 06:13:42 +01:00
|
|
|
#include "global.h"
|
2023-08-12 21:00:15 +02:00
|
|
|
#include "test/battle.h"
|
2022-12-24 06:13:42 +01:00
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|