2024-01-21 22:42:01 +00:00
|
|
|
#include "global.h"
|
|
|
|
#include "test/battle.h"
|
|
|
|
|
|
|
|
ASSUMPTIONS
|
|
|
|
{
|
2024-01-29 11:51:32 +00:00
|
|
|
ASSUME(gMovesInfo[MOVE_STEEL_BEAM].effect == EFFECT_MAX_HP_50_RECOIL);
|
2024-01-21 22:42:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Steel Beam causes the user to take damage equal to half of its maximum HP")
|
|
|
|
{
|
|
|
|
s16 recoilDamage;
|
|
|
|
|
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_STEEL_BEAM); }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_STEEL_BEAM, player);
|
|
|
|
HP_BAR(opponent);
|
|
|
|
HP_BAR(player, captureDamage: &recoilDamage);
|
|
|
|
} THEN {
|
|
|
|
EXPECT_EQ(player->maxHP / 2, recoilDamage);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Steel Beam hp loss is prevented by Magic Guard")
|
|
|
|
{
|
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_CLEFAIRY) { Ability(ABILITY_MAGIC_GUARD); }
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_STEEL_BEAM); }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_STEEL_BEAM, player);
|
|
|
|
HP_BAR(opponent);
|
|
|
|
NOT HP_BAR(player);
|
|
|
|
}
|
|
|
|
}
|