pokeemerald/test/battle/move_effect/toxic.c
Martin Griffin 5fe564f014
Detect 'NOT x; NOT y;' (#3459)
Fix Purifying Salt to be immune to statuses from secondary effects.
2023-10-24 09:55:32 +02:00

51 lines
1.4 KiB
C

#include "global.h"
#include "test/battle.h"
ASSUMPTIONS
{
ASSUME(gBattleMoves[MOVE_TOXIC].effect == EFFECT_TOXIC);
}
SINGLE_BATTLE_TEST("Toxic inflicts bad poison")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_TOXIC); }
TURN {}
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_TOXIC, player);
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_PSN, opponent);
STATUS_ICON(opponent, badPoison: TRUE);
}
}
SINGLE_BATTLE_TEST("Toxic cannot miss if used by a Poison-type")
{
u32 species;
bool32 hit;
PARAMETRIZE { species = SPECIES_WOBBUFFET; hit = FALSE; }
PARAMETRIZE { species = SPECIES_NIDORAN_M; hit = TRUE; }
GIVEN {
ASSUME(B_TOXIC_NEVER_MISS >= GEN_6);
ASSUME(gSpeciesInfo[SPECIES_NIDORAN_M].types[0] == TYPE_POISON);
PLAYER(species);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_TOXIC, hit: FALSE); }
} SCENE {
if (hit) {
ANIMATION(ANIM_TYPE_MOVE, MOVE_TOXIC, player);
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_PSN, opponent);
STATUS_ICON(opponent, badPoison: TRUE);
} else {
NONE_OF {
ANIMATION(ANIM_TYPE_MOVE, MOVE_TOXIC, player);
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_PSN, opponent);
STATUS_ICON(opponent, badPoison: TRUE);
}
}
}
}