diff --git a/src/battle_util.c b/src/battle_util.c index b13e3cb293..51e5c1abee 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -5707,8 +5707,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move && !gProtectStructs[gBattlerAttacker].confusionSelfDmg && IS_MOVE_PHYSICAL(gCurrentMove) && TARGET_TURN_DAMAGED - && (gSideTimers[gBattlerAttacker].toxicSpikesAmount != 2) - && IsBattlerAlive(gBattlerTarget)) + && (gSideTimers[gBattlerAttacker].toxicSpikesAmount != 2)) { SWAP(gBattlerAttacker, gBattlerTarget, i); BattleScriptPushCursor(); diff --git a/test/battle/ability/toxic_debris.c b/test/battle/ability/toxic_debris.c index 95749358a4..f3e23e5abb 100644 --- a/test/battle/ability/toxic_debris.c +++ b/test/battle/ability/toxic_debris.c @@ -80,6 +80,21 @@ SINGLE_BATTLE_TEST("Each hit of a Multi Hit move activates Toxic Debris") } } +SINGLE_BATTLE_TEST("Toxic Debris activates if user faints after physical hit") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET) { HP(1); Ability(ABILITY_TOXIC_DEBRIS); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_TACKLE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); + MESSAGE("Wobbuffet fainted!"); + ABILITY_POPUP(player, ABILITY_TOXIC_DEBRIS); + MESSAGE("Poison Spikes were scattered all around the opposing team's feet!"); + } +} + SINGLE_BATTLE_TEST("Air Balloon is popped after Toxic Debris activates") { GIVEN {