2023-08-12 21:00:15 +02:00
|
|
|
#include "global.h"
|
|
|
|
#include "test/battle.h"
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Burn deals 1/16th damage per turn")
|
|
|
|
{
|
2023-10-12 12:14:07 +02:00
|
|
|
u32 j;
|
2023-08-12 21:00:15 +02:00
|
|
|
GIVEN {
|
|
|
|
ASSUME(B_BURN_DAMAGE >= GEN_LATEST);
|
|
|
|
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_BURN); }
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
2023-10-12 12:14:07 +02:00
|
|
|
for (j = 0; j < 4; j++)
|
2023-08-12 21:00:15 +02:00
|
|
|
TURN {}
|
|
|
|
} SCENE {
|
|
|
|
s32 maxHP = GetMonData(&PLAYER_PARTY[0], MON_DATA_MAX_HP);
|
2023-10-12 12:14:07 +02:00
|
|
|
for (j = 0; j < 4; j++)
|
2023-08-12 21:00:15 +02:00
|
|
|
HP_BAR(player, damage: maxHP / 16);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Burn reduces Attack by 50%", s16 damage)
|
|
|
|
{
|
|
|
|
bool32 burned;
|
|
|
|
PARAMETRIZE { burned = FALSE; }
|
|
|
|
PARAMETRIZE { burned = TRUE; }
|
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET) { if (burned) Status1(STATUS1_BURN); }
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_TACKLE); }
|
|
|
|
} SCENE {
|
|
|
|
HP_BAR(opponent, captureDamage: &results[i].damage);
|
|
|
|
} FINALLY {
|
|
|
|
EXPECT_MUL_EQ(results[0].damage, Q_4_12(0.5), results[1].damage);
|
|
|
|
}
|
|
|
|
}
|