mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-29 13:50:42 +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>
35 lines
1.1 KiB
C
35 lines
1.1 KiB
C
#include "global.h"
|
|
#include "test_battle.h"
|
|
|
|
ASSUMPTIONS
|
|
{
|
|
ASSUME(gBattleMoves[MOVE_BIDE].effect == EFFECT_BIDE);
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Bide deals twice the taken damage over two turns")
|
|
{
|
|
s16 damage1;
|
|
s16 damage2;
|
|
s16 bideDamage;
|
|
GIVEN {
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
} WHEN {
|
|
TURN { MOVE(player, MOVE_BIDE); MOVE(opponent, MOVE_TACKLE); }
|
|
TURN { SKIP_TURN(player); MOVE(opponent, MOVE_TACKLE); }
|
|
TURN { SKIP_TURN(player); }
|
|
} SCENE {
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_BIDE, player);
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent);
|
|
HP_BAR(player, captureDamage: &damage1);
|
|
MESSAGE("Wobbuffet is storing energy!");
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent);
|
|
HP_BAR(player, captureDamage: &damage2);
|
|
MESSAGE("Wobbuffet unleashed energy!");
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_BIDE, player);
|
|
HP_BAR(opponent, captureDamage: &bideDamage);
|
|
} FINALLY {
|
|
EXPECT_EQ(bideDamage, damage1 + damage2);
|
|
}
|
|
}
|