mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-27 10:42:25 +02:00
Fix PostDefendAbilitySwapAbAttr
This commit is contained in:
parent
2a971e73ab
commit
34d2919586
@ -1056,9 +1056,9 @@ export class PostDefendAbilitySwapAbAttr extends PostDefendAbAttr {
|
|||||||
if (move.checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon)
|
if (move.checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon)
|
||||||
&& !attacker.getAbility().hasAttr(UnswappableAbilityAbAttr) && !move.hitsSubstitute(attacker, pokemon)) {
|
&& !attacker.getAbility().hasAttr(UnswappableAbilityAbAttr) && !move.hitsSubstitute(attacker, pokemon)) {
|
||||||
if (!simulated) {
|
if (!simulated) {
|
||||||
const tempAbilityId = attacker.getAbility().id;
|
const tempAbility = attacker.getAbility();
|
||||||
attacker.summonData.ability = pokemon.getAbility().id;
|
attacker.setTempAbility(pokemon.getAbility());
|
||||||
pokemon.summonData.ability = tempAbilityId;
|
pokemon.setTempAbility(tempAbility);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user