#include "global.h" #include "test/battle.h" 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.33), 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); } }