74 lines
2.8 KiB
C
74 lines
2.8 KiB
C
|
#include "global.h"
|
||
|
#include "test/battle.h"
|
||
|
|
||
|
SINGLE_BATTLE_TEST("Lightning Rod absorbs Electric-type moves and increases the Sp. Attack [Gen5+]")
|
||
|
{
|
||
|
GIVEN {
|
||
|
ASSUME(gMovesInfo[MOVE_THUNDERBOLT].type == TYPE_ELECTRIC);
|
||
|
PLAYER(SPECIES_WOBBUFFET);
|
||
|
OPPONENT(SPECIES_RAICHU) { Ability(ABILITY_LIGHTNING_ROD); }
|
||
|
} WHEN {
|
||
|
TURN { MOVE(player, MOVE_THUNDERBOLT); MOVE(opponent, MOVE_CELEBRATE); }
|
||
|
} SCENE {
|
||
|
if (B_REDIRECT_ABILITY_IMMUNITY >= GEN_5) {
|
||
|
NONE_OF {
|
||
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_THUNDERBOLT, player);
|
||
|
HP_BAR(opponent);
|
||
|
};
|
||
|
ABILITY_POPUP(opponent, ABILITY_LIGHTNING_ROD);
|
||
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
|
||
|
MESSAGE("Foe Raichu's Sp. Atk rose!");
|
||
|
} else {
|
||
|
NONE_OF {
|
||
|
ABILITY_POPUP(opponent, ABILITY_LIGHTNING_ROD);
|
||
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
|
||
|
MESSAGE("Foe Raichu's Sp. Atk rose!");
|
||
|
};
|
||
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_THUNDERBOLT, player);
|
||
|
HP_BAR(opponent);
|
||
|
}
|
||
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
DOUBLE_BATTLE_TEST("Lightning Rod forces single-target Electric-type moves to target the Pokémon with this Ability.")
|
||
|
{
|
||
|
GIVEN {
|
||
|
ASSUME(gMovesInfo[MOVE_THUNDERBOLT].type == TYPE_ELECTRIC);
|
||
|
PLAYER(SPECIES_WOBBUFFET);
|
||
|
PLAYER(SPECIES_WOBBUFFET);
|
||
|
OPPONENT(SPECIES_RAICHU) { Ability(ABILITY_LIGHTNING_ROD); }
|
||
|
OPPONENT(SPECIES_WOBBUFFET);
|
||
|
} WHEN {
|
||
|
TURN {
|
||
|
MOVE(playerLeft, MOVE_THUNDERBOLT, target: opponentRight);
|
||
|
MOVE(playerRight, MOVE_THUNDERBOLT, target: opponentRight);
|
||
|
MOVE(opponentLeft, MOVE_CELEBRATE);
|
||
|
MOVE(opponentRight, MOVE_CELEBRATE);
|
||
|
}
|
||
|
} SCENE {
|
||
|
if (B_REDIRECT_ABILITY_IMMUNITY >= GEN_5) {
|
||
|
NONE_OF {
|
||
|
HP_BAR(opponentLeft);
|
||
|
HP_BAR(opponentRight);
|
||
|
};
|
||
|
ABILITY_POPUP(opponentLeft, ABILITY_LIGHTNING_ROD);
|
||
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponentLeft);
|
||
|
MESSAGE("Foe Raichu's Sp. Atk rose!");
|
||
|
ABILITY_POPUP(opponentLeft, ABILITY_LIGHTNING_ROD);
|
||
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponentLeft);
|
||
|
MESSAGE("Foe Raichu's Sp. Atk rose!");
|
||
|
} else {
|
||
|
NONE_OF {
|
||
|
HP_BAR(opponentRight);
|
||
|
};
|
||
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_THUNDERBOLT, playerLeft);
|
||
|
HP_BAR(opponentLeft);
|
||
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_THUNDERBOLT, playerRight);
|
||
|
HP_BAR(opponentLeft);
|
||
|
}
|
||
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponentLeft);
|
||
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponentRight);
|
||
|
}
|
||
|
}
|