2023-07-25 09:59:26 +02:00
|
|
|
#include "global.h"
|
2023-08-12 21:00:15 +02:00
|
|
|
#include "test/battle.h"
|
2023-07-25 09:59:26 +02:00
|
|
|
|
|
|
|
ASSUMPTIONS
|
|
|
|
{
|
|
|
|
ASSUME(gBattleMoves[MOVE_WATER_GUN].split == SPLIT_SPECIAL);
|
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Beads of Ruin reduces Sp. Def", s16 damage)
|
|
|
|
{
|
|
|
|
u32 ability;
|
|
|
|
|
|
|
|
PARAMETRIZE { ability = ABILITY_SHADOW_TAG; }
|
|
|
|
PARAMETRIZE { ability = ABILITY_BEADS_OF_RUIN; }
|
|
|
|
|
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET) { Ability(ability); }
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_WATER_GUN); }
|
|
|
|
} SCENE {
|
|
|
|
if (ability == ABILITY_BEADS_OF_RUIN) {
|
|
|
|
ABILITY_POPUP(player, ABILITY_BEADS_OF_RUIN);
|
|
|
|
MESSAGE("Wobbuffet's Beads of Ruin weakened the Sp. Def of all surrounding Pokémon!");
|
|
|
|
}
|
|
|
|
HP_BAR(opponent, captureDamage: &results[i].damage);
|
|
|
|
} FINALLY {
|
|
|
|
EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.25), results[1].damage);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Beads of Ruin does not reduce Sp. Def if opposing mon has the same ability", s16 damage)
|
|
|
|
{
|
|
|
|
u32 ability;
|
|
|
|
|
|
|
|
PARAMETRIZE { ability = ABILITY_SHADOW_TAG; }
|
|
|
|
PARAMETRIZE { ability = ABILITY_BEADS_OF_RUIN; }
|
|
|
|
|
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET) { Ability(ability); }
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET) { Ability(ABILITY_BEADS_OF_RUIN); }
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_WATER_GUN); }
|
|
|
|
} SCENE {
|
|
|
|
if (ability == ABILITY_BEADS_OF_RUIN) {
|
|
|
|
ABILITY_POPUP(player, ABILITY_BEADS_OF_RUIN);
|
|
|
|
MESSAGE("Wobbuffet's Beads of Ruin weakened the Sp. Def of all surrounding Pokémon!");
|
|
|
|
}
|
|
|
|
HP_BAR(opponent, captureDamage: &results[i].damage);
|
|
|
|
} FINALLY {
|
|
|
|
EXPECT_EQ(results[0].damage, results[1].damage);
|
|
|
|
}
|
|
|
|
}
|