2022-12-24 06:13:42 +01:00
|
|
|
#include "global.h"
|
2023-08-12 21:00:15 +02:00
|
|
|
#include "test/battle.h"
|
2022-12-24 06:13:42 +01:00
|
|
|
|
|
|
|
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);
|
2023-04-18 23:02:51 +02:00
|
|
|
MESSAGE("Wobbuffet's Defense rose!");
|
2022-12-24 06:13:42 +01:00
|
|
|
}
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|