mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
f1b9872bf0
Thank you to SBird for providing mgba-rom-test binaries and Spikes/Toxic Spikes tests! Co-authored-by: sbird <sbird@no.tld>
54 lines
1.7 KiB
C
54 lines
1.7 KiB
C
#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);
|
|
}
|
|
}
|