2023-12-30 19:20:12 +00:00
|
|
|
#include "global.h"
|
|
|
|
#include "test/battle.h"
|
|
|
|
|
|
|
|
ASSUMPTIONS
|
|
|
|
{
|
2024-01-29 11:51:32 +00:00
|
|
|
ASSUME(gMovesInfo[MOVE_FICKLE_BEAM].effect == EFFECT_FICKLE_BEAM);
|
2023-12-30 19:20:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Fickle Beam deals double damage 30% of the time")
|
|
|
|
{
|
|
|
|
s16 damage[2];
|
|
|
|
|
|
|
|
PASSES_RANDOMLY(30, 100, RNG_FICKLE_BEAM);
|
|
|
|
GIVEN {
|
2024-01-29 11:51:32 +00:00
|
|
|
ASSUME(gMovesInfo[MOVE_POWER_GEM].power == 80);
|
|
|
|
ASSUME(gMovesInfo[MOVE_FICKLE_BEAM].power == 80);
|
2023-12-30 19:20:12 +00:00
|
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_POWER_GEM); }
|
|
|
|
TURN { MOVE(player, MOVE_FICKLE_BEAM); }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_POWER_GEM, player);
|
|
|
|
HP_BAR(opponent, captureDamage: &damage[0]);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_FICKLE_BEAM, player);
|
|
|
|
HP_BAR(opponent, captureDamage: &damage[1]);
|
|
|
|
} THEN {
|
|
|
|
EXPECT_MUL_EQ(damage[0], Q_4_12(2.0), damage[1]);
|
|
|
|
}
|
|
|
|
}
|