sovereignx/test/battle/ability/tablets_of_ruin.c

32 lines
1.1 KiB
C
Raw Normal View History

2023-07-25 08:59:26 +01:00
#include "global.h"
#include "test/battle.h"
2023-07-25 08:59:26 +01:00
ASSUMPTIONS
{
ASSUME(gBattleMoves[MOVE_TACKLE].category == BATTLE_CATEGORY_PHYSICAL);
ASSUME(gBattleMoves[MOVE_ENTRAINMENT].effect == EFFECT_ENTRAINMENT);
2023-07-25 08:59:26 +01:00
}
SINGLE_BATTLE_TEST("Tablets of Ruin reduces Attack if opposing mon's ability doesn't match")
2023-07-25 08:59:26 +01:00
{
s16 damage[2];
2023-07-25 08:59:26 +01:00
GIVEN {
PLAYER(SPECIES_WO_CHIEN) { Ability(ABILITY_TABLETS_OF_RUIN); }
2023-07-25 08:59:26 +01:00
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(opponent, MOVE_TACKLE); MOVE(player, MOVE_ENTRAINMENT); }
2023-07-25 08:59:26 +01:00
TURN { MOVE(opponent, MOVE_TACKLE); }
} SCENE {
ABILITY_POPUP(player, ABILITY_TABLETS_OF_RUIN);
MESSAGE("Wo-Chien's Tablets of Ruin weakened the Attack of all surrounding Pokémon!");
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent);
HP_BAR(player, captureDamage: &damage[0]);
ANIMATION(ANIM_TYPE_MOVE, MOVE_ENTRAINMENT, player);
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent);
HP_BAR(player, captureDamage: &damage[1]);
} THEN {
EXPECT_MUL_EQ(damage[0], Q_4_12(1.33), damage[1]);
2023-07-25 08:59:26 +01:00
}
}