2024-05-15 14:40:40 +01:00
|
|
|
#include "global.h"
|
|
|
|
#include "test/battle.h"
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Magic Guard prevents recoil damage to the user")
|
|
|
|
{
|
|
|
|
GIVEN {
|
|
|
|
ASSUME(gMovesInfo[MOVE_DOUBLE_EDGE].recoil == 33);
|
|
|
|
PLAYER(SPECIES_CLEFABLE) { Ability(ABILITY_MAGIC_GUARD); }
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_DOUBLE_EDGE); }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_DOUBLE_EDGE, player);
|
|
|
|
HP_BAR(opponent);
|
|
|
|
NOT HP_BAR(player);
|
2024-08-15 03:48:20 +01:00
|
|
|
}
|
2024-05-15 14:40:40 +01:00
|
|
|
}
|
2024-12-30 08:01:20 +00:00
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Magic Guard ignores immobilization that can be caused by paralysis")
|
|
|
|
{
|
|
|
|
if (B_MAGIC_GUARD >= GEN_4)
|
|
|
|
PASSES_RANDOMLY(1, 1, RNG_PARALYSIS);
|
|
|
|
else
|
|
|
|
PASSES_RANDOMLY(75, 100, RNG_PARALYSIS);
|
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_CLEFABLE) { Ability(ABILITY_MAGIC_GUARD); Status1(STATUS1_PARALYSIS);}
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_CELEBRATE); }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Magic Guard does not ignore speed stat changes caused by paralysis")
|
|
|
|
{
|
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_CLEFABLE) { Speed(100); Ability(ABILITY_MAGIC_GUARD); Status1(STATUS1_PARALYSIS);}
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET) { Speed(99); }
|
|
|
|
} WHEN {
|
|
|
|
TURN { }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
|
|
|
|
}
|
|
|
|
}
|