From 413d7482872bcddb1ef63a8bee7f27ad77eae4d5 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Sun, 3 Mar 2024 23:50:33 -0500 Subject: [PATCH] Fix moves that ignore boss segments not breaking segments --- src/field/pokemon.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 3d91e9779..2fc8e09c5 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -2374,6 +2374,10 @@ export class EnemyPokemon extends Pokemon { const ret = super.damage(damage, ignoreSegments, preventEndure); if (this.isBoss()) { + if (ignoreSegments) { + const segmentSize = this.getMaxHp() / this.bossSegments; + clearedBossSegmentIndex = Math.ceil(this.hp / segmentSize); + } if (clearedBossSegmentIndex <= this.bossSegmentIndex) this.handleBossSegmentCleared(clearedBossSegmentIndex); this.battleInfo.updateBossSegments(this);