mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-28 17:56:09 +00:00
[BUG] Magic Guard-Spiky Shield Fix (#2803)
* Added new condition for PostDefendContactAbAttr * Magic Guard-Spiky Shield interaction fix --------- Co-authored-by: Frutescens <info@laptop>
This commit is contained in:
parent
ed80ad4bef
commit
25a619708a
@ -934,9 +934,11 @@ export class ContactDamageProtectedTag extends ProtectedTag {
|
|||||||
const effectPhase = pokemon.scene.getCurrentPhase();
|
const effectPhase = pokemon.scene.getCurrentPhase();
|
||||||
if (effectPhase instanceof MoveEffectPhase && effectPhase.move.getMove().hasFlag(MoveFlags.MAKES_CONTACT)) {
|
if (effectPhase instanceof MoveEffectPhase && effectPhase.move.getMove().hasFlag(MoveFlags.MAKES_CONTACT)) {
|
||||||
const attacker = effectPhase.getPokemon();
|
const attacker = effectPhase.getPokemon();
|
||||||
|
if (!attacker.hasAbilityWithAttr(BlockNonDirectDamageAbAttr)) {
|
||||||
attacker.damageAndUpdate(Math.ceil(attacker.getMaxHp() * (1 / this.damageRatio)), HitResult.OTHER);
|
attacker.damageAndUpdate(Math.ceil(attacker.getMaxHp() * (1 / this.damageRatio)), HitResult.OTHER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user