#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!"); } }