Fix moves that ignore boss segments not breaking segments

This commit is contained in:
Flashfyre 2024-03-03 23:50:33 -05:00
parent 477680fab2
commit 413d748287
1 changed files with 4 additions and 0 deletions

View File

@ -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);