pokeemerald/test/powder_moves.c
DizzyEggg 0c523f9518
Fix Magic bounce powder moves against grass types (#2633)
* Fix Magic bounce powder moves against grass types
2023-02-17 13:55:51 +00:00

48 lines
1.5 KiB
C

#include "global.h"
#include "test_battle.h"
SINGLE_BATTLE_TEST("Powder Moves are blocked by Grass Types")
{
GIVEN {
ASSUME(gBattleMoves[MOVE_STUN_SPORE].flags & FLAG_POWDER);
ASSUME(gSpeciesInfo[SPECIES_ODDISH].types[0] == TYPE_GRASS);
PLAYER(SPECIES_WYNAUT);
OPPONENT(SPECIES_ODDISH);
} WHEN {
TURN { MOVE(player, MOVE_STUN_SPORE); }
} SCENE {
NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_STUN_SPORE, player);
MESSAGE("It doesn't affect Foe Oddish…");
}
}
SINGLE_BATTLE_TEST("Powder Moves are blocked by Ability Overcoat")
{
GIVEN {
ASSUME(gBattleMoves[MOVE_STUN_SPORE].flags & FLAG_POWDER);
PLAYER(SPECIES_WYNAUT);
OPPONENT(SPECIES_PINECO) { Ability(ABILITY_OVERCOAT);};
} WHEN {
TURN { MOVE(player, MOVE_STUN_SPORE); }
} SCENE {
ABILITY_POPUP(opponent, ABILITY_OVERCOAT);
NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_STUN_SPORE, player);
MESSAGE("It doesn't affect Foe Pineco…");
}
}
SINGLE_BATTLE_TEST("Powder Moves are blocked by Item Safety Goggles")
{
GIVEN {
ASSUME(gBattleMoves[MOVE_STUN_SPORE].flags & FLAG_POWDER);
ASSUME(gItems[ITEM_SAFETY_GOGGLES].holdEffect == HOLD_EFFECT_SAFETY_GOGGLES);
PLAYER(SPECIES_WYNAUT);
OPPONENT(SPECIES_ABRA) { Item(ITEM_SAFETY_GOGGLES);};
} WHEN {
TURN { MOVE(player, MOVE_STUN_SPORE); }
} SCENE {
NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_STUN_SPORE, player);
MESSAGE("Foe Abra is not affected thanks to its SafetyGoggles!");
}
}