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>
33 lines
1.0 KiB
C
33 lines
1.0 KiB
C
#include "global.h"
|
|
#include "test_battle.h"
|
|
|
|
ASSUMPTIONS
|
|
{
|
|
ASSUME(gBattleMoves[MOVE_CONFIDE].effect == EFFECT_SPECIAL_ATTACK_DOWN);
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Confide lowers Special Attack", s16 damage)
|
|
{
|
|
bool32 lowerSpecialAttack;
|
|
PARAMETRIZE { lowerSpecialAttack = FALSE; }
|
|
PARAMETRIZE { lowerSpecialAttack = TRUE; }
|
|
GIVEN {
|
|
ASSUME(gBattleMoves[MOVE_GUST].split == SPLIT_SPECIAL);
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
} WHEN {
|
|
if (lowerSpecialAttack) TURN { MOVE(player, MOVE_CONFIDE); }
|
|
TURN { MOVE(opponent, MOVE_GUST); }
|
|
} SCENE {
|
|
if (lowerSpecialAttack) {
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CONFIDE, player);
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
|
|
MESSAGE("Foe Wobbuffet's sp. attack fell!");
|
|
}
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_GUST, opponent);
|
|
HP_BAR(player, captureDamage: &results[i].damage);
|
|
} FINALLY {
|
|
EXPECT_MUL_EQ(results[1].damage, Q_4_12(1.5), results[0].damage);
|
|
}
|
|
}
|