Update src/field/pokemon.ts

Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
This commit is contained in:
PrabbyDD 2024-10-24 11:22:56 -07:00 committed by GitHub
parent d8b60a1484
commit 42d73c4ef2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2673,7 +2673,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
applyPreDefendAbAttrs(ReceivedMoveDamageMultiplierAbAttr, this, source, move, cancelled, simulated, damage); applyPreDefendAbAttrs(ReceivedMoveDamageMultiplierAbAttr, this, source, move, cancelled, simulated, damage);
/** Additionally apply friend guard damage reduction if ally has it. */ /** Additionally apply friend guard damage reduction if ally has it. */
if (this.scene.currentBattle.double && this.getAlly().isActive()) { if (this.scene.currentBattle.double && this.getAlly()?.isActive(true)) {
applyPreDefendAbAttrs(FriendGuardAbAttr, this.getAlly(), source, move, cancelled, simulated, damage); applyPreDefendAbAttrs(FriendGuardAbAttr, this.getAlly(), source, move, cancelled, simulated, damage);
} }
} }