pokeemerald/test/ability_vessel_of_ruin.c

54 lines
1.6 KiB
C
Raw Normal View History

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