Change double boss bar split to factor in base stat total
parent
2b213da4a6
commit
8f0a3f15a3
|
@ -595,6 +595,8 @@ export class EncounterPhase extends BattlePhase {
|
||||||
|
|
||||||
const battle = this.scene.currentBattle;
|
const battle = this.scene.currentBattle;
|
||||||
|
|
||||||
|
let totalBst = 0;
|
||||||
|
|
||||||
battle.enemyLevels.forEach((level, e) => {
|
battle.enemyLevels.forEach((level, e) => {
|
||||||
if (!this.loaded) {
|
if (!this.loaded) {
|
||||||
if (battle.battleType === BattleType.TRAINER)
|
if (battle.battleType === BattleType.TRAINER)
|
||||||
|
@ -630,6 +632,8 @@ export class EncounterPhase extends BattlePhase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
totalBst += enemyPokemon.getSpeciesForm().baseTotal;
|
||||||
|
|
||||||
loadEnemyAssets.push(enemyPokemon.loadAssets());
|
loadEnemyAssets.push(enemyPokemon.loadAssets());
|
||||||
|
|
||||||
console.log(enemyPokemon.name, enemyPokemon.species.speciesId, enemyPokemon.stats);
|
console.log(enemyPokemon.name, enemyPokemon.species.speciesId, enemyPokemon.stats);
|
||||||
|
@ -638,11 +642,10 @@ export class EncounterPhase extends BattlePhase {
|
||||||
if (battle.battleType === BattleType.TRAINER)
|
if (battle.battleType === BattleType.TRAINER)
|
||||||
loadEnemyAssets.push(battle.trainer.loadAssets().then(() => battle.trainer.initSprite()));
|
loadEnemyAssets.push(battle.trainer.loadAssets().then(() => battle.trainer.initSprite()));
|
||||||
else {
|
else {
|
||||||
const bossCount = battle.enemyParty.filter(p => p.isBoss()).length;
|
if (battle.enemyParty.filter(p => p.isBoss()).length > 1) {
|
||||||
if (bossCount > 1) {
|
|
||||||
for (let enemyPokemon of battle.enemyParty) {
|
for (let enemyPokemon of battle.enemyParty) {
|
||||||
if (enemyPokemon.isBoss()) {
|
if (enemyPokemon.isBoss()) {
|
||||||
enemyPokemon.setBoss(true, Math.ceil(enemyPokemon.bossSegments / bossCount));
|
enemyPokemon.setBoss(true, Math.ceil(enemyPokemon.bossSegments * (enemyPokemon.getSpeciesForm().baseTotal / totalBst)));
|
||||||
enemyPokemon.initBattleInfo();
|
enemyPokemon.initBattleInfo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue