Tune Princess Lima v2 boss balance and Sun Crystal aid
All checks were successful
Build Org Website / build (push) Successful in 37s
All checks were successful
Build Org Website / build (push) Successful in 37s
This commit is contained in:
26
assets/scripts/pages/princess-lima-v2-scenes.js
Normal file → Executable file
26
assets/scripts/pages/princess-lima-v2-scenes.js
Normal file → Executable file
@@ -143,6 +143,7 @@
|
||||
this.pathTick = 0;
|
||||
this.puzzleProgress = {};
|
||||
this.spawnedObjects = new Set();
|
||||
this.sunAidUsed = false;
|
||||
}
|
||||
create() {
|
||||
controller.scene = this;
|
||||
@@ -366,10 +367,23 @@
|
||||
return;
|
||||
}
|
||||
if (action === "boss-mechanic") {
|
||||
if (this.sunAidUsed) return controller.status("The Sun Crystal is gathering its light again.");
|
||||
const malrec = this.enemies.getChildren().find((enemy) => enemy.active && enemy.getData("actorId") === "malrec");
|
||||
if (!malrec) return controller.status("The Sun Crystal is warm, but its moment has not come.");
|
||||
this.sunAidUsed = true;
|
||||
controller.state.flags.sun_veil_broken = true;
|
||||
controller.state.health = Math.min(controller.state.maxHealth, controller.state.health + 25);
|
||||
malrec.setData("health", Math.max(1, malrec.getData("health") - 12));
|
||||
malrec.setData("stunnedUntil", this.time.now + 2100);
|
||||
malrec.setData("state", "hurt");
|
||||
malrec.setVelocity(0).setTint(0xffe39a).setTintMode(Phaser.TintModes.FILL);
|
||||
this.projectiles.forEach((projectile) => projectile.active && projectile.destroy());
|
||||
this.projectiles = [];
|
||||
this.time.delayedCall(350, () => malrec.active && malrec.clearTint());
|
||||
controller.save();
|
||||
controller.updateHud();
|
||||
this.cameras.main.flash(200, 255, 230, 150);
|
||||
controller.status("The Sun Crystal tears open Malrec's veil.");
|
||||
controller.status("Lima channels the Sun Crystal: Malrec's veil breaks, and your strength returns.");
|
||||
return;
|
||||
}
|
||||
if (action === "block-tutorial") return controller.status("Hold Shift to block. Release and strike during an enemy's recovery.");
|
||||
@@ -553,11 +567,15 @@
|
||||
const id = enemy.getData("actorId");
|
||||
const phase = enemy.getData("phase");
|
||||
if (["ranged", "caster", "support"].includes(spec.role) || id === "malrec") {
|
||||
const count = id === "malrec" ? phase * 2 + 1 : 1;
|
||||
const count = id === "malrec" ? phase + 1 : 1;
|
||||
const preparedReduction = id === "malrec"
|
||||
? (controller.state.flags.defences_disabled ? 2 : 0) + (controller.state.flags.prisoners_freed ? 2 : 0)
|
||||
: 0;
|
||||
const damage = Math.max(8, spec.damage - preparedReduction);
|
||||
for (let index = 0; index < count; index += 1) {
|
||||
const base = Phaser.Math.Angle.Between(enemy.x, enemy.y, this.player.x, this.player.y);
|
||||
const angle = base + (index - (count - 1) / 2) * 0.22;
|
||||
this.spawnProjectile(enemy.x, enemy.y, angle, spec.damage, id === "malrec" ? 185 : 145);
|
||||
const angle = base + (index - (count - 1) / 2) * (id === "malrec" ? 0.3 : 0.22);
|
||||
this.spawnProjectile(enemy.x, enemy.y, angle, damage, id === "malrec" ? 150 : 145);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user