2023-05-02 19:08:05 +01:00
|
|
|
#include "global.h"
|
2023-08-12 20:00:15 +01:00
|
|
|
#include "test/battle.h"
|
2023-05-02 19:08:05 +01:00
|
|
|
|
2024-08-16 22:02:49 +01:00
|
|
|
ASSUMPTIONS {
|
|
|
|
ASSUME(gMovesInfo[MOVE_HAIL].effect == EFFECT_HAIL);
|
|
|
|
ASSUME(gMovesInfo[MOVE_SNOWSCAPE].effect == EFFECT_SNOWSCAPE);
|
|
|
|
}
|
|
|
|
|
2023-05-02 19:08:05 +01:00
|
|
|
SINGLE_BATTLE_TEST("Ice Body prevents damage from hail")
|
|
|
|
{
|
2024-08-16 22:02:49 +01:00
|
|
|
u32 move;
|
|
|
|
PARAMETRIZE { move = MOVE_HAIL; }
|
|
|
|
PARAMETRIZE { move = MOVE_SNOWSCAPE; }
|
2023-05-02 19:08:05 +01:00
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET);
|
2023-06-23 10:38:18 +01:00
|
|
|
OPPONENT(SPECIES_GLALIE) { Ability(ABILITY_ICE_BODY); }
|
2023-05-02 19:08:05 +01:00
|
|
|
} WHEN {
|
2024-08-16 22:02:49 +01:00
|
|
|
TURN { MOVE(player, move); MOVE(opponent, MOVE_SKILL_SWAP); }
|
2023-05-02 19:08:05 +01:00
|
|
|
} SCENE {
|
|
|
|
NONE_OF { HP_BAR(player); }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Ice Body recovers 1/16th of Max HP in hail.")
|
|
|
|
{
|
2024-08-16 22:02:49 +01:00
|
|
|
u32 move;
|
|
|
|
PARAMETRIZE { move = MOVE_HAIL; }
|
|
|
|
PARAMETRIZE { move = MOVE_SNOWSCAPE; }
|
2023-05-02 19:08:05 +01:00
|
|
|
GIVEN {
|
2023-06-23 10:38:18 +01:00
|
|
|
PLAYER(SPECIES_GLALIE) { Ability(ABILITY_ICE_BODY); HP(1); MaxHP(100); }
|
2023-05-02 19:08:05 +01:00
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
2024-08-16 22:02:49 +01:00
|
|
|
TURN { MOVE(opponent, move); }
|
2023-05-02 19:08:05 +01:00
|
|
|
} SCENE {
|
|
|
|
ABILITY_POPUP(player, ABILITY_ICE_BODY);
|
2023-06-22 17:24:35 +01:00
|
|
|
HP_BAR(player, damage: -(100 / 16));
|
2024-07-13 11:12:40 +01:00
|
|
|
MESSAGE("Glalie's Ice Body healed it a little bit!");
|
2023-05-02 19:08:05 +01:00
|
|
|
}
|
|
|
|
}
|
2024-08-14 14:43:18 +01:00
|
|
|
|
2024-08-16 22:02:49 +01:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|