Fix moves that ignore boss segments not breaking segments
This commit is contained in:
parent
477680fab2
commit
413d748287
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue