mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 12:14:20 +01:00
0c8fdce1a4
* tests for intimidate defiant * sheer force fix + tests * white herb tests * tests for stealth rock, weak armor and last resort fix * style changes to weak armor test
74 lines
2.3 KiB
C
74 lines
2.3 KiB
C
#include "global.h"
|
|
#include "test/battle.h"
|
|
|
|
ASSUMPTIONS
|
|
{
|
|
ASSUME(gBattleMoves[MOVE_ENCORE].effect == EFFECT_ENCORE);
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Encore forces consecutive move uses for 2 turns for player")
|
|
{
|
|
GIVEN {
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
} WHEN {
|
|
TURN { MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_ENCORE); }
|
|
TURN { FORCED_MOVE(player); }
|
|
TURN { FORCED_MOVE(player); }
|
|
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);
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_SPLASH, player);
|
|
}
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Encore forces consecutive move uses for 2 turns for opponent")
|
|
{
|
|
GIVEN {
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
} WHEN {
|
|
TURN { MOVE(opponent, MOVE_CELEBRATE); MOVE(player, MOVE_ENCORE); }
|
|
TURN { FORCED_MOVE(opponent); }
|
|
TURN { FORCED_MOVE(opponent); }
|
|
TURN { MOVE(opponent, MOVE_SPLASH); }
|
|
} SCENE {
|
|
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_SPLASH, opponent);
|
|
}
|
|
}
|
|
|
|
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 {
|
|
MESSAGE("Foe Wobbuffet used Encore!");
|
|
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);
|
|
}
|
|
}
|