pokeemerald/test/battle/ability/immunity.c
2023-08-12 20:00:15 +01:00

48 lines
1.4 KiB
C

#include "global.h"
#include "test/battle.h"
SINGLE_BATTLE_TEST("Immunity prevents Poison Sting poison")
{
GIVEN {
ASSUME(gBattleMoves[MOVE_POISON_STING].effect == EFFECT_POISON_HIT);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_SNORLAX) { Ability(ABILITY_IMMUNITY); }
} WHEN {
TURN { MOVE(player, MOVE_POISON_STING); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_POISON_STING, player);
NOT STATUS_ICON(opponent, poison: TRUE);
}
}
SINGLE_BATTLE_TEST("Immunity prevents Toxic bad poison")
{
GIVEN {
ASSUME(gBattleMoves[MOVE_TOXIC].effect == EFFECT_TOXIC);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_SNORLAX) { Ability(ABILITY_IMMUNITY); }
} WHEN {
TURN { MOVE(player, MOVE_TOXIC); }
} SCENE {
MESSAGE("Wobbuffet used Toxic!");
ABILITY_POPUP(opponent, ABILITY_IMMUNITY);
MESSAGE("Foe Snorlax's Immunity prevents poisoning!");
NOT STATUS_ICON(opponent, poison: TRUE);
}
}
SINGLE_BATTLE_TEST("Immunity prevents Toxic Spikes poison")
{
GIVEN {
ASSUME(gBattleMoves[MOVE_TOXIC_SPIKES].effect == EFFECT_TOXIC_SPIKES);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_SNORLAX) { Ability(ABILITY_IMMUNITY); }
} WHEN {
TURN { MOVE(player, MOVE_TOXIC_SPIKES); }
TURN { SWITCH(opponent, 1); }
} SCENE {
NOT STATUS_ICON(opponent, poison: TRUE);
}
}