sovereignx/test/battle/move_effect/defense_up_2.c

33 lines
1 KiB
C
Raw Normal View History

#include "global.h"
#include "test/battle.h"
ASSUMPTIONS
{
2025-01-01 19:34:33 +00:00
ASSUME(GetMoveEffect(MOVE_IRON_DEFENSE) == EFFECT_DEFENSE_UP_2);
}
SINGLE_BATTLE_TEST("Iron Defense raises Defense by 2 stages", s16 damage)
{
bool32 raiseDefense;
PARAMETRIZE { raiseDefense = FALSE; }
PARAMETRIZE { raiseDefense = TRUE; }
GIVEN {
2025-01-01 19:34:33 +00:00
ASSUME(GetMoveCategory(MOVE_TACKLE) == DAMAGE_CATEGORY_PHYSICAL);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
if (raiseDefense) TURN { MOVE(player, MOVE_IRON_DEFENSE); }
TURN { MOVE(opponent, MOVE_TACKLE); }
} SCENE {
if (raiseDefense) {
ANIMATION(ANIM_TYPE_MOVE, MOVE_IRON_DEFENSE, player);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
MESSAGE("Wobbuffet's Defense sharply 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(2.0), results[0].damage);
}
}