sovereignx/test/battle/ability/ice_body.c

55 lines
1.6 KiB
C
Raw Permalink Normal View History

#include "global.h"
#include "test/battle.h"
ASSUMPTIONS {
ASSUME(gMovesInfo[MOVE_HAIL].effect == EFFECT_HAIL);
ASSUME(gMovesInfo[MOVE_SNOWSCAPE].effect == EFFECT_SNOWSCAPE);
}
SINGLE_BATTLE_TEST("Ice Body prevents damage from hail")
{
u32 move;
PARAMETRIZE { move = MOVE_HAIL; }
PARAMETRIZE { move = MOVE_SNOWSCAPE; }
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
2023-06-23 10:38:18 +01:00
OPPONENT(SPECIES_GLALIE) { Ability(ABILITY_ICE_BODY); }
} WHEN {
TURN { MOVE(player, move); MOVE(opponent, MOVE_SKILL_SWAP); }
} SCENE {
NONE_OF { HP_BAR(player); }
}
}
SINGLE_BATTLE_TEST("Ice Body recovers 1/16th of Max HP in hail.")
{
u32 move;
PARAMETRIZE { move = MOVE_HAIL; }
PARAMETRIZE { move = MOVE_SNOWSCAPE; }
GIVEN {
2023-06-23 10:38:18 +01:00
PLAYER(SPECIES_GLALIE) { Ability(ABILITY_ICE_BODY); HP(1); MaxHP(100); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(opponent, move); }
} SCENE {
ABILITY_POPUP(player, ABILITY_ICE_BODY);
2023-06-22 17:24:35 +01:00
HP_BAR(player, damage: -(100 / 16));
MESSAGE("Glalie's Ice Body healed it a little bit!");
}
}
SINGLE_BATTLE_TEST("Ice Body doesn't recover HP if Cloud Nine/Air Lock is on the field")
{
u32 move;
PARAMETRIZE { move = MOVE_HAIL; }
PARAMETRIZE { move = MOVE_SNOWSCAPE; }
GIVEN {
PLAYER(SPECIES_GLALIE) { Ability(ABILITY_ICE_BODY); HP(1); MaxHP(100); }
OPPONENT(SPECIES_GOLDUCK) { Ability(ABILITY_CLOUD_NINE); }
} WHEN {
TURN { MOVE(opponent, move); }
} SCENE {
NOT ABILITY_POPUP(player, ABILITY_ICE_BODY);
}
}