Update score logic for bosses

pull/16/head
Flashfyre 2024-03-17 21:56:24 -04:00
parent fc86f5c05a
commit 11ab31d533
1 changed files with 4 additions and 0 deletions

View File

@ -150,6 +150,10 @@ export default class Battle {
let partyMemberTurnMultiplier = scene.getEnemyParty().length / 2 + 0.5; let partyMemberTurnMultiplier = scene.getEnemyParty().length / 2 + 0.5;
if (this.double) if (this.double)
partyMemberTurnMultiplier /= 1.5; partyMemberTurnMultiplier /= 1.5;
for (let p of scene.getEnemyParty()) {
if (p.isBoss())
partyMemberTurnMultiplier *= (p.bossSegments / 1.5) / scene.getEnemyParty().length;
}
const turnMultiplier = Phaser.Tweens.Builders.GetEaseFunction('Sine.easeIn')(1 - Math.min(this.turn - 2, 10 * partyMemberTurnMultiplier) / (10 * partyMemberTurnMultiplier)); const turnMultiplier = Phaser.Tweens.Builders.GetEaseFunction('Sine.easeIn')(1 - Math.min(this.turn - 2, 10 * partyMemberTurnMultiplier) / (10 * partyMemberTurnMultiplier));
const finalBattleScore = Math.ceil(this.battleScore * turnMultiplier); const finalBattleScore = Math.ceil(this.battleScore * turnMultiplier);
scene.score += finalBattleScore; scene.score += finalBattleScore;