mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Fix Toxic Debris after user faints (#3323)
This commit is contained in:
parent
136ea395ac
commit
415d6e9054
@ -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();
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user