From 07fcfcccafde563ecc96073156f3da4cdbfa5a6e Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Mon, 19 Feb 2024 10:16:38 -0500 Subject: [PATCH] Add missing highest damage stat tracking --- src/pokemon.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pokemon.ts b/src/pokemon.ts index 5d0a2d01412..29b6373eca4 100644 --- a/src/pokemon.ts +++ b/src/pokemon.ts @@ -1112,8 +1112,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { this.scene.queueMessage('A critical hit!'); this.scene.setPhaseQueueSplice(); damage.value = this.damage(damage.value); - if (source.isPlayer()) + if (source.isPlayer()) { this.scene.validateAchvs(DamageAchv, damage); + if (damage.value > this.scene.gameData.gameStats.highestDamage) + this.scene.gameData.gameStats.highestDamage = damage.value; + } source.turnData.damageDealt += damage.value; this.battleData.hitCount++; this.turnData.attacksReceived.unshift({ move: move.id, result: result as DamageResult, damage: damage.value, critical: isCritical, sourceId: source.id });