mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +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>
33 lines
1016 B
C
33 lines
1016 B
C
#include "global.h"
|
|
#include "test_battle.h"
|
|
|
|
ASSUMPTIONS
|
|
{
|
|
ASSUME(gBattleMoves[MOVE_HARDEN].effect == EFFECT_DEFENSE_UP);
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Harden raises Defense", s16 damage)
|
|
{
|
|
bool32 raiseDefense;
|
|
PARAMETRIZE { raiseDefense = FALSE; }
|
|
PARAMETRIZE { raiseDefense = TRUE; }
|
|
GIVEN {
|
|
ASSUME(gBattleMoves[MOVE_TACKLE].split == SPLIT_PHYSICAL);
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
} WHEN {
|
|
if (raiseDefense) TURN { MOVE(player, MOVE_HARDEN); }
|
|
TURN { MOVE(opponent, MOVE_TACKLE); }
|
|
} SCENE {
|
|
if (raiseDefense) {
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_HARDEN, player);
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
|
MESSAGE("Wobbuffet's defense rose!");
|
|
}
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent);
|
|
HP_BAR(player, captureDamage: &results[i].damage);
|
|
} FINALLY {
|
|
EXPECT_MUL_EQ(results[1].damage, Q_4_12(1.5), results[0].damage);
|
|
}
|
|
}
|