mirror of
https://github.com/rh-hideout/pokeemerald-expansion.git
synced 2026-03-21 18:04:50 -05:00
Fix Lightning Rod activation on fainted mon (#9434)
This commit is contained in:
parent
4e0fc26fc5
commit
8c42eafd0a
|
|
@ -824,6 +824,9 @@ static bool32 HandleMoveTargetRedirection(enum MoveTarget moveTarget)
|
|||
enum BattlerId battler;
|
||||
for (battler = 0; battler < gBattlersCount; battler++)
|
||||
{
|
||||
if (!IsBattlerAlive(battler) || gBattlerAttacker == battler)
|
||||
continue;
|
||||
|
||||
ability = GetBattlerAbility(battler);
|
||||
if ((B_REDIRECT_ABILITY_ALLIES >= GEN_4 || !IsBattlerAlly(gBattlerAttacker, battler))
|
||||
&& battler != gBattlerAttacker
|
||||
|
|
|
|||
|
|
@ -130,3 +130,21 @@ DOUBLE_BATTLE_TEST("Lightning Rod absorbs moves that targets all battlers but do
|
|||
HP_BAR(playerRight);
|
||||
}
|
||||
}
|
||||
|
||||
DOUBLE_BATTLE_TEST("Lightning Rod doesn't activate if user has fainted")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(GetMoveType(MOVE_SPARK) == TYPE_ELECTRIC);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_RAICHU) { HP(1); Ability(ABILITY_LIGHTNING_ROD); }
|
||||
} WHEN {
|
||||
TURN { MOVE(playerLeft, MOVE_POUND, target: opponentRight); MOVE(playerRight, MOVE_SPARK, target: opponentLeft); }
|
||||
} SCENE {
|
||||
NONE_OF {
|
||||
MESSAGE("The opposing Raichu's Lightning Rod took the attack");
|
||||
ABILITY_POPUP(opponentRight, ABILITY_LIGHTNING_ROD);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user