sovereignx/test/battle/move_effect/fixed_damage_arg.c

42 lines
1.1 KiB
C
Raw Normal View History

2024-10-24 17:12:31 +01:00
#include "global.h"
#include "test/battle.h"
ASSUMPTIONS
{
2025-01-01 19:34:33 +00:00
ASSUME(GetMoveEffect(MOVE_SONIC_BOOM) == EFFECT_FIXED_DAMAGE_ARG);
2024-10-24 17:12:31 +01:00
}
SINGLE_BATTLE_TEST("Sonic Boom deals fixed damage", s16 damage)
{
u16 mon;
PARAMETRIZE { mon = SPECIES_RATTATA; }
PARAMETRIZE { mon = SPECIES_ARON; }
2024-10-24 17:12:31 +01:00
GIVEN {
2025-01-01 19:34:33 +00:00
ASSUME(GetMoveFixedDamage(MOVE_SONIC_BOOM) == 20);
2024-10-24 17:12:31 +01:00
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 the opposing Gastly…");
2024-10-24 17:12:31 +01:00
}
}