diff --git a/test/battle/move_effect/fixed_damage_arg.c b/test/battle/move_effect/fixed_damage_arg.c new file mode 100644 index 000000000000..6d96b435dbbf --- /dev/null +++ b/test/battle/move_effect/fixed_damage_arg.c @@ -0,0 +1,41 @@ +#include "global.h" +#include "test/battle.h" + +ASSUMPTIONS +{ + ASSUME(gMovesInfo[MOVE_SONIC_BOOM].effect == EFFECT_FIXED_DAMAGE_ARG); +} + +SINGLE_BATTLE_TEST("Sonic Boom deals fixed damage", s16 damage) +{ + u16 mon; + PARAMETRIZE { mon = SPECIES_RATTATA; } + PARAMETRIZE { mon = SPECIES_ARON; } + + GIVEN { + ASSUME(gMovesInfo[MOVE_SONIC_BOOM].argument == 20); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(mon); + } WHEN { + TURN { MOVE(player, MOVE_SONIC_BOOM); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_SONIC_BOOM, player); + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT(results[0].damage == 20); + EXPECT(results[1].damage == 20); + } +} + +SINGLE_BATTLE_TEST("Sonic Boom doesn't affect ghost types") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_GASTLY); + } WHEN { + TURN { MOVE(player, MOVE_SONIC_BOOM); } + } SCENE { + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_SONIC_BOOM, player); + MESSAGE("It doesn't affect Foe Gastly…"); + } +}