2023-10-06 14:13:26 +01:00
|
|
|
#include "global.h"
|
|
|
|
#include "test/battle.h"
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Earth Eater heals 25% when hit by ground type moves")
|
|
|
|
{
|
|
|
|
GIVEN {
|
2024-01-29 11:51:32 +00:00
|
|
|
ASSUME(gMovesInfo[MOVE_MUD_SLAP].type == TYPE_GROUND);
|
2023-12-14 23:19:28 +00:00
|
|
|
PLAYER(SPECIES_ORTHWORM) { Ability(ABILITY_EARTH_EATER); HP(1); MaxHP(100); }
|
2023-10-06 14:13:26 +01:00
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(opponent, MOVE_MUD_SLAP); }
|
|
|
|
} SCENE {
|
|
|
|
ABILITY_POPUP(player, ABILITY_EARTH_EATER);
|
|
|
|
HP_BAR(player, damage: -25);
|
2023-12-14 23:19:28 +00:00
|
|
|
MESSAGE("Orthworm restored HP using its Earth Eater!");
|
2023-10-06 14:13:26 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Earth Eater does not activate if protected")
|
|
|
|
{
|
|
|
|
GIVEN {
|
2024-01-29 11:51:32 +00:00
|
|
|
ASSUME(gMovesInfo[MOVE_MUD_SLAP].type == TYPE_GROUND);
|
2023-12-14 23:19:28 +00:00
|
|
|
PLAYER(SPECIES_ORTHWORM) { Ability(ABILITY_EARTH_EATER); HP(1); MaxHP(100); }
|
2023-10-06 14:13:26 +01:00
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_PROTECT); MOVE(opponent, MOVE_MUD_SLAP); }
|
|
|
|
} SCENE {
|
2023-12-14 23:19:28 +00:00
|
|
|
NONE_OF {
|
|
|
|
ABILITY_POPUP(player, ABILITY_EARTH_EATER); HP_BAR(player);
|
|
|
|
MESSAGE("Orthworm restored HP using its Earth Eater!");
|
|
|
|
}
|
2023-10-06 14:13:26 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Earth Eater activates on status moves")
|
|
|
|
{
|
|
|
|
GIVEN {
|
2024-01-29 11:51:32 +00:00
|
|
|
ASSUME(gMovesInfo[MOVE_SAND_ATTACK].type == TYPE_GROUND);
|
|
|
|
ASSUME(gMovesInfo[MOVE_SAND_ATTACK].category == DAMAGE_CATEGORY_STATUS);
|
2023-12-14 23:19:28 +00:00
|
|
|
PLAYER(SPECIES_ORTHWORM) { Ability(ABILITY_EARTH_EATER); HP(1); MaxHP(100); }
|
2023-10-06 14:13:26 +01:00
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(opponent, MOVE_SAND_ATTACK); }
|
|
|
|
} SCENE {
|
|
|
|
ABILITY_POPUP(player, ABILITY_EARTH_EATER);
|
|
|
|
HP_BAR(player, damage: -25);
|
2023-12-14 23:19:28 +00:00
|
|
|
MESSAGE("Orthworm restored HP using its Earth Eater!");
|
2023-10-06 14:13:26 +01:00
|
|
|
}
|
|
|
|
}
|