Skip to content

Commit

Permalink
Fixed damage test (#5574)
Browse files Browse the repository at this point in the history
  • Loading branch information
GhoulMage authored Oct 24, 2024
1 parent b892ad4 commit be98de7
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions test/battle/move_effect/fixed_damage_arg.c
Original file line number Diff line number Diff line change
@@ -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…");
}
}

0 comments on commit be98de7

Please sign in to comment.