2023-04-14 20:25:50 +02:00
|
|
|
#include "global.h"
|
|
|
|
#include "test_battle.h"
|
|
|
|
|
2023-04-18 23:02:51 +02:00
|
|
|
SINGLE_BATTLE_TEST("X-Attack sharply raises battler's Attack stat", s16 damage)
|
2023-04-14 20:25:50 +02:00
|
|
|
{
|
|
|
|
u16 useItem;
|
|
|
|
PARAMETRIZE { useItem = FALSE; }
|
|
|
|
PARAMETRIZE { useItem = TRUE; }
|
|
|
|
GIVEN {
|
|
|
|
ASSUME(gItems[ITEM_X_ATTACK].battleUsage == EFFECT_ITEM_INCREASE_STAT);
|
|
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
if (useItem) TURN { USE_ITEM(player, ITEM_X_ATTACK); }
|
|
|
|
TURN { MOVE(player, MOVE_TACKLE); }
|
|
|
|
} SCENE {
|
|
|
|
MESSAGE("Wobbuffet used Tackle!");
|
|
|
|
HP_BAR(opponent, captureDamage: &results[i].damage);
|
|
|
|
} FINALLY {
|
|
|
|
if (B_X_ITEMS_BUFF >= GEN_7)
|
|
|
|
EXPECT_MUL_EQ(results[0].damage, Q_4_12(2.0), results[1].damage);
|
|
|
|
else
|
|
|
|
EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage);
|
|
|
|
}
|
|
|
|
}
|