2022-12-24 05:13:42 +00:00
|
|
|
#include "global.h"
|
2023-08-12 20:00:15 +01:00
|
|
|
#include "test/battle.h"
|
2022-12-24 05:13:42 +00:00
|
|
|
|
|
|
|
ASSUMPTIONS
|
|
|
|
{
|
2024-01-29 11:51:32 +00:00
|
|
|
ASSUME(gMovesInfo[MOVE_ENCORE].effect == EFFECT_ENCORE);
|
2022-12-24 05:13:42 +00:00
|
|
|
}
|
|
|
|
|
2024-06-14 12:15:38 +01:00
|
|
|
SINGLE_BATTLE_TEST("Encore forces consecutive move uses for 3 turns for player: Encore used before move")
|
2022-12-24 05:13:42 +00:00
|
|
|
{
|
|
|
|
GIVEN {
|
2024-06-14 12:15:38 +01:00
|
|
|
PLAYER(SPECIES_WOBBUFFET) { Speed(10); }
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET) { Speed(20); }
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(opponent, MOVE_CELEBRATE); MOVE(player, MOVE_CELEBRATE); }
|
|
|
|
TURN { MOVE(opponent, MOVE_ENCORE); MOVE(player, MOVE_CELEBRATE); }
|
|
|
|
// TURN { FORCED_MOVE(player); }
|
|
|
|
TURN { FORCED_MOVE(player); }
|
|
|
|
TURN { FORCED_MOVE(player); }
|
|
|
|
TURN { MOVE(player, MOVE_SPLASH); }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_ENCORE, opponent);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_SPLASH, player);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Encore forces consecutive move uses for 3 turns for player: Encore used after move")
|
|
|
|
{
|
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET) { Speed(20); }
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET) { Speed(10); }
|
2022-12-24 05:13:42 +00:00
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_ENCORE); }
|
|
|
|
TURN { FORCED_MOVE(player); }
|
|
|
|
TURN { FORCED_MOVE(player); }
|
2024-06-14 12:15:38 +01:00
|
|
|
TURN { FORCED_MOVE(player); }
|
2022-12-24 05:13:42 +00:00
|
|
|
TURN { MOVE(player, MOVE_SPLASH); }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_ENCORE, opponent);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
|
2024-06-14 12:15:38 +01:00
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
|
2022-12-24 05:13:42 +00:00
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_SPLASH, player);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-06-14 12:15:38 +01:00
|
|
|
SINGLE_BATTLE_TEST("Encore forces consecutive move uses for 3 turns for opponent: Encore used before move")
|
2023-10-30 10:39:41 +00:00
|
|
|
{
|
|
|
|
GIVEN {
|
2024-06-14 12:15:38 +01:00
|
|
|
PLAYER(SPECIES_WOBBUFFET) { Speed(20); }
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET) { Speed(10); }
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_CELEBRATE); }
|
|
|
|
TURN { MOVE(player, MOVE_ENCORE); MOVE(opponent, MOVE_CELEBRATE); }
|
|
|
|
// TURN { FORCED_MOVE(opponent); }
|
|
|
|
TURN { FORCED_MOVE(opponent); }
|
|
|
|
TURN { FORCED_MOVE(opponent); }
|
|
|
|
TURN { MOVE(opponent, MOVE_SPLASH); }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_ENCORE, player);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_SPLASH, opponent);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Encore forces consecutive move uses for 3 turns for opponent: Encore used after move")
|
|
|
|
{
|
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET) { Speed(10); }
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET) { Speed(20); }
|
2023-10-30 10:39:41 +00:00
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(opponent, MOVE_CELEBRATE); MOVE(player, MOVE_ENCORE); }
|
|
|
|
TURN { FORCED_MOVE(opponent); }
|
|
|
|
TURN { FORCED_MOVE(opponent); }
|
2024-06-14 12:15:38 +01:00
|
|
|
TURN { FORCED_MOVE(opponent); }
|
2023-10-30 10:39:41 +00:00
|
|
|
TURN { MOVE(opponent, MOVE_SPLASH); }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_ENCORE, player);
|
2024-06-14 12:15:38 +01:00
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
2023-10-30 10:39:41 +00:00
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_SPLASH, opponent);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-12-24 05:13:42 +00:00
|
|
|
SINGLE_BATTLE_TEST("Encore has no effect if no previous move")
|
|
|
|
{
|
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(opponent, MOVE_ENCORE); MOVE(player, MOVE_CELEBRATE); }
|
|
|
|
} SCENE {
|
2024-10-21 18:52:45 +01:00
|
|
|
MESSAGE("The opposing Wobbuffet used Encore!");
|
2022-12-24 05:13:42 +00:00
|
|
|
MESSAGE("But it failed!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Encore overrides the chosen move if it occurs first")
|
|
|
|
{
|
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_CELEBRATE); }
|
|
|
|
TURN { MOVE(opponent, MOVE_ENCORE); MOVE(player, MOVE_SPLASH); }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_ENCORE, opponent);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
|
|
|
|
}
|
|
|
|
}
|