Fix moves that ignore boss segments not breaking segments
parent
477680fab2
commit
413d748287
|
@ -2374,6 +2374,10 @@ export class EnemyPokemon extends Pokemon {
|
||||||
const ret = super.damage(damage, ignoreSegments, preventEndure);
|
const ret = super.damage(damage, ignoreSegments, preventEndure);
|
||||||
|
|
||||||
if (this.isBoss()) {
|
if (this.isBoss()) {
|
||||||
|
if (ignoreSegments) {
|
||||||
|
const segmentSize = this.getMaxHp() / this.bossSegments;
|
||||||
|
clearedBossSegmentIndex = Math.ceil(this.hp / segmentSize);
|
||||||
|
}
|
||||||
if (clearedBossSegmentIndex <= this.bossSegmentIndex)
|
if (clearedBossSegmentIndex <= this.bossSegmentIndex)
|
||||||
this.handleBossSegmentCleared(clearedBossSegmentIndex);
|
this.handleBossSegmentCleared(clearedBossSegmentIndex);
|
||||||
this.battleInfo.updateBossSegments(this);
|
this.battleInfo.updateBossSegments(this);
|
||||||
|
|
Loading…
Reference in New Issue