pokeemerald/test/battle/weather/hail.c
kittenchilly 28c6a1af49
More weather and type-specific tests (#3260)
Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2023-10-14 22:58:31 -03:00

32 lines
882 B
C

#include "global.h"
#include "test/battle.h"
// Please add Hail interactions with move, item and ability effects on their respective files.
SINGLE_BATTLE_TEST("Hail deals 1/16 damage per turn")
{
s16 hailDamage;
GIVEN {
PLAYER(SPECIES_GLALIE);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN {MOVE(player, MOVE_HAIL);}
} SCENE {
MESSAGE("Foe Wobbuffet is pelted by HAIL!");
HP_BAR(opponent, captureDamage: &hailDamage);
} THEN { EXPECT_EQ(hailDamage, opponent->maxHP / 16); }
}
SINGLE_BATTLE_TEST("Hail damage does not affect Ice-type Pokémon")
{
GIVEN {
ASSUME(gSpeciesInfo[SPECIES_GLALIE].types[0] == TYPE_ICE);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_GLALIE);
} WHEN {
TURN {MOVE(player, MOVE_HAIL);}
} SCENE {
NOT MESSAGE("Foe Glalie is pelted by HAIL!");
}
}