mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
5fe564f014
Fix Purifying Salt to be immune to statuses from secondary effects.
51 lines
1.4 KiB
C
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);
|
|
}
|
|
}
|
|
}
|
|
}
|