pokeemerald/test/battle/move_effect/double_shock.c

54 lines
1.7 KiB
C
Raw Normal View History

2023-04-30 16:46:21 +02:00
#include "global.h"
#include "test/battle.h"
2023-04-30 16:46:21 +02:00
ASSUMPTIONS
{
ASSUME(gBattleMoves[MOVE_DOUBLE_SHOCK].effect == EFFECT_DOUBLE_SHOCK);
ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[0] != TYPE_ELECTRIC || gSpeciesInfo[SPECIES_WOBBUFFET].types[1] != TYPE_ELECTRIC);
ASSUME(gSpeciesInfo[SPECIES_PIKACHU].types[0] == TYPE_ELECTRIC || gSpeciesInfo[SPECIES_PIKACHU].types[1] == TYPE_ELECTRIC);
}
SINGLE_BATTLE_TEST("Double Shock user loses its Electric-type")
{
GIVEN {
PLAYER(SPECIES_PIKACHU);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_DOUBLE_SHOCK); }
TURN { MOVE(player, MOVE_DOUBLE_SHOCK); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_DOUBLE_SHOCK, player);
MESSAGE("Pikachu used up all of its electricity!");
MESSAGE("Pikachu used Double Shock!");
MESSAGE("But it failed!");
}
}
SINGLE_BATTLE_TEST("Double Shock fails if the user isn't an Electric-type")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_DOUBLE_SHOCK); }
} SCENE {
NONE_OF { ANIMATION(ANIM_TYPE_MOVE, MOVE_DOUBLE_SHOCK, player); }
MESSAGE("Wobbuffet used Double Shock!");
MESSAGE("But it failed!");
}
}
SINGLE_BATTLE_TEST("Double Shock user loses its Electric-type if enemy faints")
{
GIVEN {
PLAYER(SPECIES_PIKACHU);
OPPONENT(SPECIES_WOBBUFFET) { HP(1); }
} WHEN {
TURN { MOVE(player, MOVE_DOUBLE_SHOCK); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_DOUBLE_SHOCK, player);
HP_BAR(opponent, hp: 0);
MESSAGE("Pikachu used up all of its electricity!");
}
}