@gamebob/axon-surge 0.25.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/axon-surge.js +543 -527
- package/dist/core/GameEngine.d.ts.map +1 -1
- package/dist/render/CanvasRenderer.d.ts +1 -0
- package/dist/render/CanvasRenderer.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/ui/StartMenu.d.ts +4 -1
- package/dist/ui/StartMenu.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/axon-surge.js
CHANGED
|
@@ -195,23 +195,23 @@ class ve {
|
|
|
195
195
|
const i = performance.now() / 1e3 - 0.08, s = this.pointerHistory.filter((r) => r.time >= i);
|
|
196
196
|
let o = 0, n = 0;
|
|
197
197
|
if (s.length >= 2) {
|
|
198
|
-
const r = s[0],
|
|
199
|
-
o = (
|
|
198
|
+
const r = s[0], l = s[s.length - 1], c = Math.max(0.01, l.time - r.time);
|
|
199
|
+
o = (l.x - r.x) / c, n = (l.y - r.y) / c;
|
|
200
200
|
}
|
|
201
201
|
const a = Math.hypot(o, n);
|
|
202
202
|
if (a > 30) {
|
|
203
|
-
const
|
|
203
|
+
const l = Math.min(a * 1.15, 2500), c = Math.atan2(n, o);
|
|
204
204
|
e.velocity = {
|
|
205
|
-
x: Math.cos(
|
|
206
|
-
y: Math.sin(
|
|
205
|
+
x: Math.cos(c) * l,
|
|
206
|
+
y: Math.sin(c) * l
|
|
207
207
|
};
|
|
208
208
|
} else if (this.dragStart) {
|
|
209
|
-
const r = e.position.x - this.dragStart.x,
|
|
210
|
-
if (
|
|
211
|
-
const d = Math.atan2(
|
|
209
|
+
const r = e.position.x - this.dragStart.x, l = e.position.y - this.dragStart.y, c = Math.hypot(r, l);
|
|
210
|
+
if (c > 5) {
|
|
211
|
+
const d = Math.atan2(l, r), h = Math.min(c * 4, 600);
|
|
212
212
|
e.velocity = {
|
|
213
|
-
x: Math.cos(d) *
|
|
214
|
-
y: Math.sin(d) *
|
|
213
|
+
x: Math.cos(d) * h,
|
|
214
|
+
y: Math.sin(d) * h
|
|
215
215
|
};
|
|
216
216
|
} else
|
|
217
217
|
e.velocity = { x: 0, y: 0 }, e.isThrown = !1;
|
|
@@ -225,7 +225,7 @@ class ve {
|
|
|
225
225
|
this.grabbedEnemy = null, this.grabbedOrb = null, this.dragStart = null, this.pointerHistory = [], this.isPointerDown = !1;
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
class
|
|
228
|
+
class Me {
|
|
229
229
|
cellSize;
|
|
230
230
|
grid = /* @__PURE__ */ new Map();
|
|
231
231
|
constructor(e = 100) {
|
|
@@ -245,9 +245,9 @@ class _e {
|
|
|
245
245
|
getNearby(e, t) {
|
|
246
246
|
const i = /* @__PURE__ */ new Set(), s = Math.floor((e.x - t) / this.cellSize), o = Math.floor((e.x + t) / this.cellSize), n = Math.floor((e.y - t) / this.cellSize), a = Math.floor((e.y + t) / this.cellSize);
|
|
247
247
|
for (let r = s; r <= o; r++)
|
|
248
|
-
for (let
|
|
249
|
-
const
|
|
250
|
-
d && d.forEach((
|
|
248
|
+
for (let l = n; l <= a; l++) {
|
|
249
|
+
const c = `${r}:${l}`, d = this.grid.get(c);
|
|
250
|
+
d && d.forEach((h) => i.add(h));
|
|
251
251
|
}
|
|
252
252
|
return i;
|
|
253
253
|
}
|
|
@@ -266,7 +266,7 @@ class te {
|
|
|
266
266
|
}), e.behavior.onChainReaction ? e.behavior.onChainReaction({ ...i, enemy: e, angle: t }) : e.triggerDissolveDeath(!0));
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
|
-
class
|
|
269
|
+
class _e {
|
|
270
270
|
static update(e, t, i, s) {
|
|
271
271
|
for (let o = e.length - 1; o >= 0; o--) {
|
|
272
272
|
const n = e[o];
|
|
@@ -275,9 +275,9 @@ class Me {
|
|
|
275
275
|
for (const a of t) {
|
|
276
276
|
if (!a.active || a.isGrabbed || a.isDying || a.isStationaryShield || a.launchDelay > 0 || a.isThrown && a.behavior.canInteractWithHazard?.(a, "gravity-vortex") === !1)
|
|
277
277
|
continue;
|
|
278
|
-
const r = n.position.x - a.position.x,
|
|
279
|
-
if (d > 2 &&
|
|
280
|
-
const
|
|
278
|
+
const r = n.position.x - a.position.x, l = n.position.y - a.position.y, c = r * r + l * l, d = Math.sqrt(c);
|
|
279
|
+
if (d > 2 && c <= n.radius * n.radius) {
|
|
280
|
+
const h = Math.pow(1 - d / n.radius, 0.7), p = n.pullForce * h, g = Math.atan2(l, r);
|
|
281
281
|
a.velocity.x += Math.cos(g) * p * i, a.velocity.y += Math.sin(g) * p * i, a.position.x += Math.cos(g) * p * i * 0.8, a.position.y += Math.sin(g) * p * i * 0.8;
|
|
282
282
|
}
|
|
283
283
|
}
|
|
@@ -285,12 +285,12 @@ class Me {
|
|
|
285
285
|
if (s.gravityVortex.hasImplosionLaunch)
|
|
286
286
|
for (const a of t) {
|
|
287
287
|
if (!a.active || a.isDying) continue;
|
|
288
|
-
const r = a.position.x - n.position.x,
|
|
289
|
-
if (r * r +
|
|
290
|
-
const d = Math.atan2(
|
|
288
|
+
const r = a.position.x - n.position.x, l = a.position.y - n.position.y;
|
|
289
|
+
if (r * r + l * l <= n.radius * n.radius) {
|
|
290
|
+
const d = Math.atan2(l, r), h = 1200;
|
|
291
291
|
a.isThrown = !0, a.wasManipulated = !0, a.velocity = {
|
|
292
|
-
x: Math.cos(d) *
|
|
293
|
-
y: Math.sin(d) *
|
|
292
|
+
x: Math.cos(d) * h,
|
|
293
|
+
y: Math.sin(d) * h
|
|
294
294
|
};
|
|
295
295
|
}
|
|
296
296
|
}
|
|
@@ -317,18 +317,18 @@ const S = {
|
|
|
317
317
|
ecosoma: "#d8ff62"
|
|
318
318
|
};
|
|
319
319
|
class Ie {
|
|
320
|
-
static update(e, t, i, s, o, n, a, r,
|
|
321
|
-
for (const
|
|
322
|
-
if (!
|
|
320
|
+
static update(e, t, i, s, o, n, a, r, l, c, d) {
|
|
321
|
+
for (const h of t) {
|
|
322
|
+
if (!h.active || h.isGrabbed || h.isDying || h.launchDelay > 0 || this.tryAutoDeflectFragment(e, h, i, s, n, d))
|
|
323
323
|
continue;
|
|
324
|
-
const p = e.position.x -
|
|
325
|
-
if (Math.hypot(p, g) <= e.getHitboxRadius() +
|
|
326
|
-
if (
|
|
324
|
+
const p = e.position.x - h.position.x, g = e.position.y - h.position.y;
|
|
325
|
+
if (Math.hypot(p, g) <= e.getHitboxRadius() + h.radius) {
|
|
326
|
+
if (h.active = !1, e.takeDamage()) {
|
|
327
327
|
a.emit("onCoreDamaged", { currentIntegrity: e.integrity }), i.push({
|
|
328
328
|
id: Math.random().toString(),
|
|
329
329
|
position: { ...e.position },
|
|
330
330
|
radius: 20,
|
|
331
|
-
maxRadius: Math.max(
|
|
331
|
+
maxRadius: Math.max(l, c) * 1.3,
|
|
332
332
|
color: S.core,
|
|
333
333
|
alpha: 1,
|
|
334
334
|
lifetime: 0,
|
|
@@ -337,7 +337,7 @@ class Ie {
|
|
|
337
337
|
for (const E of t)
|
|
338
338
|
if (E.active && !E.isGrabbed && E.launchDelay <= 0) {
|
|
339
339
|
E.triggerDissolveDeath();
|
|
340
|
-
for (let
|
|
340
|
+
for (let v = 0; v < 8; v++) {
|
|
341
341
|
const A = Math.random() * Math.PI * 2, x = 100 + Math.random() * 200;
|
|
342
342
|
s.push({
|
|
343
343
|
id: Math.random().toString(),
|
|
@@ -374,12 +374,12 @@ class Ie {
|
|
|
374
374
|
const a = n.core;
|
|
375
375
|
if (!a.autoDeflectFragments || !t.behavior.autoDeflectFromCore || t.psionicDeflectionCooldown > 0)
|
|
376
376
|
return !1;
|
|
377
|
-
const r = e.position.x - t.position.x,
|
|
378
|
-
if (
|
|
379
|
-
const d = Math.hypot(t.velocity.x, t.velocity.y),
|
|
380
|
-
if (d <= 0 ||
|
|
377
|
+
const r = e.position.x - t.position.x, l = e.position.y - t.position.y, c = Math.hypot(r, l);
|
|
378
|
+
if (c <= 0) return !1;
|
|
379
|
+
const d = Math.hypot(t.velocity.x, t.velocity.y), h = (t.velocity.x * r + t.velocity.y * l) / c;
|
|
380
|
+
if (d <= 0 || h <= 0) return !1;
|
|
381
381
|
const p = e.getHitboxRadius() + t.radius;
|
|
382
|
-
if (Math.max(0,
|
|
382
|
+
if (Math.max(0, c - p) / h > a.fragmentDeflectionLookahead) return !1;
|
|
383
383
|
const m = Math.random() * Math.PI * 2, E = Math.max(a.fragmentDeflectionSpeed, d * 1.08);
|
|
384
384
|
t.velocity = {
|
|
385
385
|
x: Math.cos(m) * E,
|
|
@@ -394,7 +394,7 @@ class Ie {
|
|
|
394
394
|
lifetime: 0,
|
|
395
395
|
maxLifetime: 0.24
|
|
396
396
|
});
|
|
397
|
-
for (let
|
|
397
|
+
for (let v = 0; v < 6; v++) {
|
|
398
398
|
const A = m + Math.PI + (Math.random() - 0.5) * 1.2, x = 120 + Math.random() * 180;
|
|
399
399
|
s.push({
|
|
400
400
|
id: Math.random().toString(),
|
|
@@ -414,8 +414,8 @@ class Ie {
|
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
class Te {
|
|
417
|
-
static update(e, t, i, s, o, n, a, r,
|
|
418
|
-
const E = (x, f,
|
|
417
|
+
static update(e, t, i, s, o, n, a, r, l, c, d, h, p, g, y, m) {
|
|
418
|
+
const E = (x, f, M) => {
|
|
419
419
|
te.killEnemy(
|
|
420
420
|
x,
|
|
421
421
|
f,
|
|
@@ -431,16 +431,16 @@ class Te {
|
|
|
431
431
|
spatialHash: p,
|
|
432
432
|
factory: g,
|
|
433
433
|
config: y,
|
|
434
|
-
width:
|
|
434
|
+
width: c,
|
|
435
435
|
height: d,
|
|
436
|
-
currentThrowState:
|
|
436
|
+
currentThrowState: h,
|
|
437
437
|
onKill: m ?? (() => {
|
|
438
438
|
}),
|
|
439
439
|
killEnemy: E
|
|
440
440
|
},
|
|
441
|
-
|
|
441
|
+
M
|
|
442
442
|
);
|
|
443
|
-
},
|
|
443
|
+
}, v = () => ({
|
|
444
444
|
enemies: e,
|
|
445
445
|
pools: t,
|
|
446
446
|
vortices: i,
|
|
@@ -452,9 +452,9 @@ class Te {
|
|
|
452
452
|
spatialHash: p,
|
|
453
453
|
factory: g,
|
|
454
454
|
config: y,
|
|
455
|
-
width:
|
|
455
|
+
width: c,
|
|
456
456
|
height: d,
|
|
457
|
-
currentThrowState:
|
|
457
|
+
currentThrowState: h,
|
|
458
458
|
onKill: m ?? (() => {
|
|
459
459
|
}),
|
|
460
460
|
killEnemy: E
|
|
@@ -462,18 +462,18 @@ class Te {
|
|
|
462
462
|
let A = !1;
|
|
463
463
|
for (const x of e.slice())
|
|
464
464
|
if (!(!x.active || !x.isThrown || x.isDying || x.launchDelay > 0)) {
|
|
465
|
-
if (A = !0, x.position.x < -120 || x.position.x >
|
|
466
|
-
x.behavior.onOutOfBounds?.(x,
|
|
465
|
+
if (A = !0, x.position.x < -120 || x.position.x > c + 120 || x.position.y < -120 || x.position.y > d + 120) {
|
|
466
|
+
x.behavior.onOutOfBounds?.(x, v()), x.active = !1, x.isThrown = !1;
|
|
467
467
|
continue;
|
|
468
468
|
}
|
|
469
469
|
for (const f of p.getNearby(x.position, x.getHitRadius() + 80)) {
|
|
470
470
|
if (f === x || !f.active || f.isGrabbed || f.isDying || f.launchDelay > 0 || f.isStationaryShield)
|
|
471
471
|
continue;
|
|
472
|
-
const
|
|
473
|
-
if (
|
|
474
|
-
|
|
472
|
+
const M = f.position.x - x.position.x, _ = f.position.y - x.position.y, I = x.getHitRadius() + f.getHitRadius();
|
|
473
|
+
if (M * M + _ * _ > I * I) continue;
|
|
474
|
+
h.pos = { x: x.position.x, y: x.position.y };
|
|
475
475
|
const C = Math.atan2(x.velocity.y, x.velocity.x), T = {
|
|
476
|
-
...
|
|
476
|
+
...v(),
|
|
477
477
|
thrownEnemy: x,
|
|
478
478
|
targetEnemy: f,
|
|
479
479
|
impactAngle: C
|
|
@@ -491,17 +491,17 @@ class Te {
|
|
|
491
491
|
particles: o,
|
|
492
492
|
floatingTexts: n,
|
|
493
493
|
eventBus: r,
|
|
494
|
-
width:
|
|
494
|
+
width: c,
|
|
495
495
|
height: d,
|
|
496
496
|
factory: g,
|
|
497
497
|
config: y
|
|
498
|
-
}), x.active && !x.isDying && x.triggerDissolveDeath(!0), f.active && !f.isDying && f.triggerDissolveDeath(!0),
|
|
498
|
+
}), x.active && !x.isDying && x.triggerDissolveDeath(!0), f.active && !f.isDying && f.triggerDissolveDeath(!0), h.kills += 2, m?.();
|
|
499
499
|
break;
|
|
500
500
|
}
|
|
501
501
|
const w = x.synergyKey === f.synergyKey, G = w ? 360 : 250;
|
|
502
502
|
s.push({
|
|
503
503
|
id: Math.random().toString(),
|
|
504
|
-
position: { ...
|
|
504
|
+
position: { ...h.pos },
|
|
505
505
|
radius: 15,
|
|
506
506
|
maxRadius: G,
|
|
507
507
|
color: x.color,
|
|
@@ -513,7 +513,7 @@ class Te {
|
|
|
513
513
|
const q = Math.random() * Math.PI * 2, ne = 200 + Math.random() * 450;
|
|
514
514
|
o.push({
|
|
515
515
|
id: Math.random().toString(),
|
|
516
|
-
position: { ...
|
|
516
|
+
position: { ...h.pos },
|
|
517
517
|
velocity: { x: Math.cos(q) * ne, y: Math.sin(q) * ne },
|
|
518
518
|
color: x.color,
|
|
519
519
|
radius: 4 + Math.random() * 6,
|
|
@@ -522,70 +522,70 @@ class Te {
|
|
|
522
522
|
maxLifetime: 0.7
|
|
523
523
|
});
|
|
524
524
|
}
|
|
525
|
-
w ? (
|
|
525
|
+
w ? (h.kills += 2, a.triggerHitstop(0.14), a.triggerFlash(0.5), a.triggerScreenShake({ x: M, y: _ }, 16), E(x, C), E(f, C, x.type)) : (h.kills += 2, a.triggerHitstop(0.08), a.triggerFlash(0.35), a.triggerScreenShake({ x: M, y: _ }, 10), E(x, C), E(f, C, x.type));
|
|
526
526
|
for (const P of e.slice()) {
|
|
527
527
|
if (P === x || P === f || !P.active || P.isGrabbed || P.isDying)
|
|
528
528
|
continue;
|
|
529
529
|
Math.hypot(
|
|
530
|
-
P.position.x -
|
|
531
|
-
P.position.y -
|
|
532
|
-
) <= G && P.behavior.canBeChainReactionTarget && (E(P, C, x.type),
|
|
530
|
+
P.position.x - h.pos.x,
|
|
531
|
+
P.position.y - h.pos.y
|
|
532
|
+
) <= G && P.behavior.canBeChainReactionTarget && (E(P, C, x.type), h.kills++);
|
|
533
533
|
}
|
|
534
534
|
m?.();
|
|
535
535
|
break;
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
|
-
|
|
538
|
+
l.value = h.kills, !A && h.kills > 0 && (h.kills >= 2 && h.pos && n.push({
|
|
539
539
|
id: Math.random().toString(),
|
|
540
|
-
text: `MULTIKILL x${
|
|
541
|
-
position: { ...
|
|
540
|
+
text: `MULTIKILL x${h.kills}!`,
|
|
541
|
+
position: { ...h.pos },
|
|
542
542
|
velocity: { x: 0, y: -90 },
|
|
543
543
|
color: S.coreAccent,
|
|
544
544
|
alpha: 1,
|
|
545
545
|
lifetime: 0,
|
|
546
546
|
maxLifetime: 1.4,
|
|
547
547
|
size: 32
|
|
548
|
-
}), r.emit("onComboUpdated", { combo:
|
|
548
|
+
}), r.emit("onComboUpdated", { combo: l.value }), h.kills = 0, h.pos = null);
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
551
|
class be {
|
|
552
|
-
static update(e, t, i, s, o, n, a, r,
|
|
553
|
-
for (let
|
|
554
|
-
const d = e[
|
|
552
|
+
static update(e, t, i, s, o, n, a, r, l) {
|
|
553
|
+
for (let c = e.length - 1; c >= 0; c--) {
|
|
554
|
+
const d = e[c];
|
|
555
555
|
if (d) {
|
|
556
556
|
d.duration += n;
|
|
557
|
-
for (const
|
|
558
|
-
if (!
|
|
557
|
+
for (const h of t.slice()) {
|
|
558
|
+
if (!h.active || h.isGrabbed || h.isDying || h.launchDelay > 0 || h.isThrown && h.behavior.canInteractWithHazard?.(h, "toxic-pool") === !1)
|
|
559
559
|
continue;
|
|
560
|
-
const p =
|
|
561
|
-
p * p + g * g <= d.radius * d.radius && (te.killEnemy(
|
|
560
|
+
const p = h.position.x - d.position.x, g = h.position.y - d.position.y;
|
|
561
|
+
p * p + g * g <= d.radius * d.radius && (te.killEnemy(h, 0, r, d.sourceType), a.kills++, l && l());
|
|
562
562
|
}
|
|
563
|
-
d.duration >= d.maxDuration && e.splice(
|
|
563
|
+
d.duration >= d.maxDuration && e.splice(c, 1);
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
568
|
class Ce {
|
|
569
|
-
static update(e, t, i, s, o, n, a, r,
|
|
569
|
+
static update(e, t, i, s, o, n, a, r, l, c, d, h, p, g, y) {
|
|
570
570
|
const m = g.shield.protectionArc;
|
|
571
571
|
for (const E of e.slice())
|
|
572
572
|
if (!(!E.active || !E.isStationaryShield || E.isDying))
|
|
573
|
-
for (const
|
|
573
|
+
for (const v of h.getNearby(
|
|
574
574
|
E.position,
|
|
575
575
|
E.getHitRadius() + 80
|
|
576
576
|
)) {
|
|
577
|
-
if (
|
|
577
|
+
if (v === E || !v.active || v.isGrabbed || v.isDying || v.launchDelay > 0)
|
|
578
578
|
continue;
|
|
579
|
-
const A =
|
|
579
|
+
const A = v.position.x - E.position.x, x = v.position.y - E.position.y;
|
|
580
580
|
let f = Math.atan2(x, A) - E.rotation;
|
|
581
581
|
for (; f < -Math.PI; ) f += Math.PI * 2;
|
|
582
582
|
for (; f > Math.PI; ) f -= Math.PI * 2;
|
|
583
583
|
if (Math.abs(f) > m / 2) continue;
|
|
584
|
-
const
|
|
585
|
-
if (A * A + x * x <=
|
|
584
|
+
const M = E.getHitRadius() + v.getHitRadius();
|
|
585
|
+
if (A * A + x * x <= M * M) {
|
|
586
586
|
E.isStationaryShield = !1, E.strategy && E.strategy.execute({
|
|
587
587
|
thrownEnemy: E,
|
|
588
|
-
targetEnemy:
|
|
588
|
+
targetEnemy: v,
|
|
589
589
|
allEnemies: e,
|
|
590
590
|
pools: t,
|
|
591
591
|
vortices: i,
|
|
@@ -593,11 +593,11 @@ class Ce {
|
|
|
593
593
|
particles: o,
|
|
594
594
|
floatingTexts: n,
|
|
595
595
|
eventBus: r,
|
|
596
|
-
width:
|
|
596
|
+
width: c,
|
|
597
597
|
height: d,
|
|
598
598
|
factory: p,
|
|
599
599
|
config: g
|
|
600
|
-
}),
|
|
600
|
+
}), l.kills += 2, a.triggerHitstop(0.12), a.triggerScreenShake({ x: A, y: x }, 18), y && y();
|
|
601
601
|
break;
|
|
602
602
|
}
|
|
603
603
|
}
|
|
@@ -681,13 +681,13 @@ class O {
|
|
|
681
681
|
}
|
|
682
682
|
class Re {
|
|
683
683
|
constructor(e, t, i, s) {
|
|
684
|
-
this.factory = i, this.configManager = s, this.spatialHash = new
|
|
684
|
+
this.factory = i, this.configManager = s, this.spatialHash = new Me(100), this.eventBus = e, this.i18n = t;
|
|
685
685
|
}
|
|
686
686
|
spatialHash;
|
|
687
687
|
eventBus;
|
|
688
688
|
i18n;
|
|
689
689
|
throwState = { kills: 0, pos: null };
|
|
690
|
-
update(e, t, i, s, o, n, a, r,
|
|
690
|
+
update(e, t, i, s, o, n, a, r, l, c, d, h, p, g) {
|
|
691
691
|
const y = this.configManager.getConfig(), m = {}, E = (A, x, f) => te.killEnemy(A, x, m, f);
|
|
692
692
|
Object.assign(m, {
|
|
693
693
|
enemies: i,
|
|
@@ -697,11 +697,11 @@ class Re {
|
|
|
697
697
|
particles: a,
|
|
698
698
|
floatingTexts: r,
|
|
699
699
|
eventBus: this.eventBus,
|
|
700
|
-
juice:
|
|
700
|
+
juice: l,
|
|
701
701
|
spatialHash: this.spatialHash,
|
|
702
702
|
factory: this.factory,
|
|
703
703
|
config: y,
|
|
704
|
-
width:
|
|
704
|
+
width: h,
|
|
705
705
|
height: p,
|
|
706
706
|
currentThrowState: this.throwState,
|
|
707
707
|
onKill: g ?? (() => {
|
|
@@ -716,21 +716,21 @@ class Re {
|
|
|
716
716
|
config: y
|
|
717
717
|
}), A.isStationaryShield) {
|
|
718
718
|
let x = null, f = 1 / 0;
|
|
719
|
-
for (const
|
|
720
|
-
if (
|
|
719
|
+
for (const M of i) {
|
|
720
|
+
if (M === A || !M.active || M.isGrabbed || M.isDying || M.isStationaryShield)
|
|
721
721
|
continue;
|
|
722
|
-
const
|
|
723
|
-
C < f && (f = C, x =
|
|
722
|
+
const _ = M.position.x - A.position.x, I = M.position.y - A.position.y, C = _ * _ + I * I;
|
|
723
|
+
C < f && (f = C, x = M);
|
|
724
724
|
}
|
|
725
725
|
if (x) {
|
|
726
|
-
let
|
|
726
|
+
let _ = Math.atan2(
|
|
727
727
|
x.position.y - A.position.y,
|
|
728
728
|
x.position.x - A.position.x
|
|
729
729
|
) - A.rotation;
|
|
730
|
-
for (;
|
|
731
|
-
for (;
|
|
730
|
+
for (; _ < -Math.PI; ) _ += Math.PI * 2;
|
|
731
|
+
for (; _ > Math.PI; ) _ -= Math.PI * 2;
|
|
732
732
|
const I = 5 * e;
|
|
733
|
-
A.rotation += Math.sign(
|
|
733
|
+
A.rotation += Math.sign(_) * Math.min(Math.abs(_), I);
|
|
734
734
|
}
|
|
735
735
|
}
|
|
736
736
|
A.update(e);
|
|
@@ -742,7 +742,7 @@ class Re {
|
|
|
742
742
|
const f = x.lifetime / x.maxLifetime;
|
|
743
743
|
x.radius = x.maxRadius * f, x.alpha = Math.max(0, 1 - f), x.lifetime >= x.maxLifetime && n.splice(A, 1);
|
|
744
744
|
}
|
|
745
|
-
|
|
745
|
+
_e.update(o, i, e, y), this.spatialHash.clear();
|
|
746
746
|
for (const A of i)
|
|
747
747
|
A.active && !A.isDying && A.launchDelay <= 0 && this.spatialHash.insert(A);
|
|
748
748
|
Ie.update(
|
|
@@ -751,10 +751,10 @@ class Re {
|
|
|
751
751
|
n,
|
|
752
752
|
a,
|
|
753
753
|
r,
|
|
754
|
-
|
|
754
|
+
l,
|
|
755
755
|
this.eventBus,
|
|
756
756
|
d,
|
|
757
|
-
|
|
757
|
+
h,
|
|
758
758
|
p,
|
|
759
759
|
y
|
|
760
760
|
), Te.update(
|
|
@@ -764,10 +764,10 @@ class Re {
|
|
|
764
764
|
n,
|
|
765
765
|
a,
|
|
766
766
|
r,
|
|
767
|
-
c,
|
|
768
|
-
this.eventBus,
|
|
769
767
|
l,
|
|
770
|
-
|
|
768
|
+
this.eventBus,
|
|
769
|
+
c,
|
|
770
|
+
h,
|
|
771
771
|
p,
|
|
772
772
|
this.throwState,
|
|
773
773
|
this.spatialHash,
|
|
@@ -791,25 +791,25 @@ class Re {
|
|
|
791
791
|
n,
|
|
792
792
|
a,
|
|
793
793
|
r,
|
|
794
|
-
|
|
794
|
+
l,
|
|
795
795
|
this.eventBus,
|
|
796
796
|
this.throwState,
|
|
797
|
-
|
|
797
|
+
h,
|
|
798
798
|
p,
|
|
799
799
|
this.spatialHash,
|
|
800
800
|
this.factory,
|
|
801
801
|
y,
|
|
802
802
|
g
|
|
803
803
|
), O.merge(s, o, n, y.effectAggregation);
|
|
804
|
-
const
|
|
805
|
-
n.length >
|
|
804
|
+
const v = 32;
|
|
805
|
+
n.length > v && n.splice(0, n.length - v);
|
|
806
806
|
}
|
|
807
807
|
}
|
|
808
808
|
const ae = {
|
|
809
809
|
rendererId: "circle",
|
|
810
810
|
rotatesWithVelocity: !0,
|
|
811
811
|
canBeChainReactionTarget: !0,
|
|
812
|
-
synergyKey: (
|
|
812
|
+
synergyKey: (u) => u.color
|
|
813
813
|
};
|
|
814
814
|
class F {
|
|
815
815
|
id;
|
|
@@ -913,13 +913,13 @@ class k {
|
|
|
913
913
|
return i === 0 ? { x: Math.random() * e, y: -s } : i === 1 ? { x: e + s, y: Math.random() * t } : i === 2 ? { x: Math.random() * e, y: t + s } : { x: -s, y: Math.random() * t };
|
|
914
914
|
}
|
|
915
915
|
static spawnCircleOfDeath(e, t, i, s, o, n) {
|
|
916
|
-
const a = [],
|
|
917
|
-
for (let
|
|
918
|
-
const d =
|
|
919
|
-
x: s.x + Math.cos(d) *
|
|
920
|
-
y: s.y + Math.sin(d) *
|
|
921
|
-
}, p = t.get(), g = i[
|
|
922
|
-
e.configureEnemy(p, g,
|
|
916
|
+
const a = [], l = Math.max(o, n) * 0.55 + 80;
|
|
917
|
+
for (let c = 0; c < 18; c++) {
|
|
918
|
+
const d = c * Math.PI * 2 / 18, h = {
|
|
919
|
+
x: s.x + Math.cos(d) * l,
|
|
920
|
+
y: s.y + Math.sin(d) * l
|
|
921
|
+
}, p = t.get(), g = i[c % i.length];
|
|
922
|
+
e.configureEnemy(p, g, h, s), p.velocity = {
|
|
923
923
|
x: Math.cos(d + Math.PI) * 55,
|
|
924
924
|
y: Math.sin(d + Math.PI) * 55
|
|
925
925
|
}, a.push(p);
|
|
@@ -927,14 +927,14 @@ class k {
|
|
|
927
927
|
return a;
|
|
928
928
|
}
|
|
929
929
|
static spawnDenseCluster(e, t, i, s, o, n) {
|
|
930
|
-
const a = [],
|
|
931
|
-
let
|
|
932
|
-
|
|
930
|
+
const a = [], l = Math.floor(Math.random() * 4);
|
|
931
|
+
let c = { x: -60, y: -60 };
|
|
932
|
+
l === 0 ? c = { x: Math.random() * s, y: -80 } : l === 1 ? c = { x: s + 80, y: Math.random() * o } : l === 2 ? c = { x: Math.random() * s, y: o + 80 } : c = { x: -80, y: Math.random() * o };
|
|
933
933
|
for (let d = 0; d < 14; d++) {
|
|
934
|
-
const
|
|
934
|
+
const h = {
|
|
935
935
|
x: (Math.random() - 0.5) * 60,
|
|
936
936
|
y: (Math.random() - 0.5) * 60
|
|
937
|
-
}, p = { x:
|
|
937
|
+
}, p = { x: c.x + h.x, y: c.y + h.y }, g = t.get();
|
|
938
938
|
e.configureEnemy(g, i[0], p, n);
|
|
939
939
|
const y = n.x - p.x, m = n.y - p.y, E = Math.atan2(m, y);
|
|
940
940
|
g.velocity = {
|
|
@@ -945,36 +945,36 @@ class k {
|
|
|
945
945
|
return a;
|
|
946
946
|
}
|
|
947
947
|
static spawnSineSnake(e, t, i, s, o, n) {
|
|
948
|
-
const a = [],
|
|
949
|
-
for (let
|
|
948
|
+
const a = [], l = o * 0.2 + Math.random() * o * 0.6;
|
|
949
|
+
for (let c = 0; c < 12; c++) {
|
|
950
950
|
const d = {
|
|
951
|
-
x: -60 -
|
|
952
|
-
y:
|
|
953
|
-
},
|
|
954
|
-
e.configureEnemy(
|
|
951
|
+
x: -60 - c * 40,
|
|
952
|
+
y: l + Math.sin(c * 0.45) * 70
|
|
953
|
+
}, h = t.get();
|
|
954
|
+
e.configureEnemy(h, i[0], d, n), h.velocity = { x: 75, y: Math.cos(c * 0.45) * 30 }, a.push(h);
|
|
955
955
|
}
|
|
956
956
|
return a;
|
|
957
957
|
}
|
|
958
958
|
static spawnDoubleSpiral(e, t, i, s, o, n) {
|
|
959
959
|
const a = [];
|
|
960
|
-
for (let
|
|
961
|
-
const
|
|
962
|
-
x: s + Math.cos(d) *
|
|
963
|
-
y: -60 + Math.sin(d) *
|
|
960
|
+
for (let l = 0; l < 14; l++) {
|
|
961
|
+
const c = l / 14, d = c * Math.PI * 4, h = 120 + c * 450, p = {
|
|
962
|
+
x: s + Math.cos(d) * h,
|
|
963
|
+
y: -60 + Math.sin(d) * h
|
|
964
964
|
}, g = t.get();
|
|
965
965
|
e.configureEnemy(g, i[0], p, n), a.push(g);
|
|
966
966
|
}
|
|
967
967
|
return a;
|
|
968
968
|
}
|
|
969
969
|
static spawnMarchingWall(e, t, i, s, o, n) {
|
|
970
|
-
const a = [],
|
|
971
|
-
for (let
|
|
972
|
-
const d =
|
|
973
|
-
x:
|
|
970
|
+
const a = [], l = Math.random() > 0.5;
|
|
971
|
+
for (let c = 0; c < 12; c++) {
|
|
972
|
+
const d = c / 11 * o, h = {
|
|
973
|
+
x: l ? -60 : s + 60,
|
|
974
974
|
y: d
|
|
975
975
|
}, p = t.get();
|
|
976
|
-
e.configureEnemy(p, i[0],
|
|
977
|
-
x:
|
|
976
|
+
e.configureEnemy(p, i[0], h, n), p.velocity = {
|
|
977
|
+
x: l ? 70 : -70,
|
|
978
978
|
y: 0
|
|
979
979
|
}, a.push(p);
|
|
980
980
|
}
|
|
@@ -982,11 +982,11 @@ class k {
|
|
|
982
982
|
}
|
|
983
983
|
static spawnCrossfireStreams(e, t, i, s, o, n) {
|
|
984
984
|
const a = [];
|
|
985
|
-
for (let
|
|
986
|
-
const
|
|
987
|
-
e.configureEnemy(d, i[0],
|
|
988
|
-
const
|
|
989
|
-
e.configureEnemy(p, i[1 % i.length],
|
|
985
|
+
for (let l = 0; l < 10; l++) {
|
|
986
|
+
const c = { x: -50 - l * 35, y: -50 - l * 35 }, d = t.get();
|
|
987
|
+
e.configureEnemy(d, i[0], c, n), a.push(d);
|
|
988
|
+
const h = { x: s + 50 + l * 35, y: o + 50 + l * 35 }, p = t.get();
|
|
989
|
+
e.configureEnemy(p, i[1 % i.length], h, n), a.push(p);
|
|
990
990
|
}
|
|
991
991
|
return a;
|
|
992
992
|
}
|
|
@@ -1006,40 +1006,40 @@ class Le {
|
|
|
1006
1006
|
}
|
|
1007
1007
|
update(e, t, i, s, o) {
|
|
1008
1008
|
this.waveTimer += e, this.spawnTimer += e, this.patternCooldown += e, this.applyFlockingBehaviors(t, e, o);
|
|
1009
|
-
const n = t.filter((
|
|
1009
|
+
const n = t.filter((l) => l.active).length, a = Math.max(0.9, 2.2 - (this.wave - 1) * 0.18);
|
|
1010
1010
|
if (this.waveTimer > this.initialGracePeriod && this.patternCooldown > Math.max(12 - this.wave, 6) && n < 35) {
|
|
1011
1011
|
this.patternCooldown = 0;
|
|
1012
|
-
const
|
|
1013
|
-
for (const
|
|
1014
|
-
t.push(
|
|
1012
|
+
const l = this.spawnPatternFormation(i, s, o);
|
|
1013
|
+
for (const c of l)
|
|
1014
|
+
t.push(c);
|
|
1015
1015
|
}
|
|
1016
1016
|
const r = Math.min(18 + this.wave * 4, 80);
|
|
1017
1017
|
return this.spawnTimer >= a && n < r ? (this.spawnTimer = 0, this.spawnSingleEnemy(i, s, o)) : null;
|
|
1018
1018
|
}
|
|
1019
1019
|
spawnSingleEnemy(e, t, i) {
|
|
1020
1020
|
const s = k.getOffscreenPosition(e, t), o = this.content.enemies.values().filter(
|
|
1021
|
-
(
|
|
1021
|
+
(c) => (c.spawnWeight ?? 0) > 0 && (!c.requiredUnlockId || this.unlockState?.isUnlocked(c.requiredUnlockId) === !0)
|
|
1022
1022
|
), n = o.reduce(
|
|
1023
|
-
(
|
|
1023
|
+
(c, d) => c + (d.spawnWeight ?? 0),
|
|
1024
1024
|
0
|
|
1025
1025
|
);
|
|
1026
1026
|
let a = Math.random() * n, r = o[0]?.id ?? "";
|
|
1027
|
-
for (const
|
|
1028
|
-
if (a -=
|
|
1029
|
-
r =
|
|
1027
|
+
for (const c of o)
|
|
1028
|
+
if (a -= c.spawnWeight ?? 0, a <= 0) {
|
|
1029
|
+
r = c.id;
|
|
1030
1030
|
break;
|
|
1031
1031
|
}
|
|
1032
|
-
const
|
|
1033
|
-
return this.factory.configureEnemy(
|
|
1032
|
+
const l = this.pool.get();
|
|
1033
|
+
return this.factory.configureEnemy(l, r, s, i), l;
|
|
1034
1034
|
}
|
|
1035
1035
|
spawnPatternFormation(e, t, i) {
|
|
1036
|
-
const s = this.content.spawnerPatterns.values(), o = s.reduce((
|
|
1036
|
+
const s = this.content.spawnerPatterns.values(), o = s.reduce((l, c) => l + c.weight, 0);
|
|
1037
1037
|
let n = Math.random() * o;
|
|
1038
|
-
const a = s.find((
|
|
1038
|
+
const a = s.find((l) => (n -= l.weight, n <= 0));
|
|
1039
1039
|
if (!a) return [];
|
|
1040
|
-
const r = a.enemyIds.filter((
|
|
1041
|
-
const
|
|
1042
|
-
return !
|
|
1040
|
+
const r = a.enemyIds.filter((l) => {
|
|
1041
|
+
const c = this.content.enemies.require(l);
|
|
1042
|
+
return !c.requiredUnlockId || this.unlockState?.isUnlocked(c.requiredUnlockId) === !0;
|
|
1043
1043
|
});
|
|
1044
1044
|
return r.length === 0 ? [] : k.spawn(
|
|
1045
1045
|
this.factory,
|
|
@@ -1055,19 +1055,19 @@ class Le {
|
|
|
1055
1055
|
for (let o = 0; o < e.length; o++) {
|
|
1056
1056
|
const n = e[o];
|
|
1057
1057
|
if (!n.active || n.isGrabbed || n.isThrown || n.isDying) continue;
|
|
1058
|
-
let a = 0, r = 0,
|
|
1058
|
+
let a = 0, r = 0, l = 0;
|
|
1059
1059
|
for (let p = 0; p < e.length; p++) {
|
|
1060
1060
|
if (o === p) continue;
|
|
1061
1061
|
const g = e[p];
|
|
1062
1062
|
if (!g.active || g.isGrabbed || g.isDying) continue;
|
|
1063
1063
|
const y = n.position.x - g.position.x, m = n.position.y - g.position.y, E = Math.hypot(y, m);
|
|
1064
|
-
E > 0 && E < 70 && (a += y / E, r += m / E,
|
|
1064
|
+
E > 0 && E < 70 && (a += y / E, r += m / E, l++);
|
|
1065
1065
|
}
|
|
1066
|
-
|
|
1067
|
-
const
|
|
1068
|
-
if (
|
|
1066
|
+
l > 0 && (a /= l, r /= l, n.velocity.x += a * 60 * t, n.velocity.y += r * 60 * t);
|
|
1067
|
+
const c = i.x - n.position.x, d = i.y - n.position.y, h = Math.hypot(c, d);
|
|
1068
|
+
if (h > 0) {
|
|
1069
1069
|
const p = 80 + Math.min(this.wave * 4, 40);
|
|
1070
|
-
n.velocity.x +=
|
|
1070
|
+
n.velocity.x += c / h * p * t, n.velocity.y += d / h * p * t;
|
|
1071
1071
|
}
|
|
1072
1072
|
if (n.maxSpeed > 0) {
|
|
1073
1073
|
const p = Math.hypot(n.velocity.x, n.velocity.y);
|
|
@@ -1218,15 +1218,15 @@ class De {
|
|
|
1218
1218
|
if (!n.active || n.isGrabbed || n.isDying) continue;
|
|
1219
1219
|
const a = n.position.x, r = n.position.y;
|
|
1220
1220
|
if (a >= 0 && a <= i && r >= 0 && r <= s) continue;
|
|
1221
|
-
const
|
|
1221
|
+
const l = Math.min(i, Math.max(0, a)), c = Math.min(s, Math.max(0, r)), d = Math.hypot(a - l, r - c);
|
|
1222
1222
|
if (d <= 0 || d > this.maxDistance) continue;
|
|
1223
|
-
const
|
|
1224
|
-
if (e.save(), e.globalAlpha = y, e.shadowColor = n.color, e.shadowBlur = 14, e.strokeStyle = n.color, e.lineWidth = p, e.lineCap = "round", e.beginPath(),
|
|
1225
|
-
const m = Math.max(0,
|
|
1226
|
-
e.moveTo(
|
|
1223
|
+
const h = Math.min(1, Math.max(0, d / this.maxDistance)), p = this.minThickness + (this.maxThickness - this.minThickness) * (1 - h), g = this.minLength + (this.maxLength - this.minLength) * (1 - h), y = 0.55 + (1 - h) * 0.35;
|
|
1224
|
+
if (e.save(), e.globalAlpha = y, e.shadowColor = n.color, e.shadowBlur = 14, e.strokeStyle = n.color, e.lineWidth = p, e.lineCap = "round", e.beginPath(), l === 0 || l === i) {
|
|
1225
|
+
const m = Math.max(0, c - g / 2), E = Math.min(s, c + g / 2);
|
|
1226
|
+
e.moveTo(l, m), e.lineTo(l, E);
|
|
1227
1227
|
} else {
|
|
1228
|
-
const m = Math.max(0,
|
|
1229
|
-
e.moveTo(m,
|
|
1228
|
+
const m = Math.max(0, l - g / 2), E = Math.min(i, l + g / 2);
|
|
1229
|
+
e.moveTo(m, c), e.lineTo(E, c);
|
|
1230
1230
|
}
|
|
1231
1231
|
e.stroke(), e.strokeStyle = o.effectHighlight, e.lineWidth = Math.max(1.8, p * 0.28), e.globalAlpha = y * 0.9, e.stroke(), e.restore();
|
|
1232
1232
|
}
|
|
@@ -1234,15 +1234,15 @@ class De {
|
|
|
1234
1234
|
}
|
|
1235
1235
|
class Ne {
|
|
1236
1236
|
render(e, t, i, s, o, n, a = !1) {
|
|
1237
|
-
const r = Math.max(1, o),
|
|
1238
|
-
a ? (m.addColorStop(0, `hsl(${
|
|
1237
|
+
const r = Math.max(1, o), l = Math.min(1, (r - 1) / 8), c = this.wrapHue(190 + (r - 1) * 34 + Math.sin(s * 0.1) * 5), d = this.wrapHue(c + 42), h = this.wrapHue(c + 150), p = t / 2, g = i / 2, y = Math.max(t, i) * 0.82, m = e.createRadialGradient(p, g, 20, p, g, y);
|
|
1238
|
+
a ? (m.addColorStop(0, `hsl(${c}, 42%, 91%)`), m.addColorStop(0.42, `hsl(${d}, 42%, 86%)`), m.addColorStop(0.78, `hsl(${h}, 38%, 81%)`), m.addColorStop(1, n.bgOuter)) : (m.addColorStop(0, `hsl(${c}, 42%, 11%)`), m.addColorStop(0.42, `hsl(${d}, 48%, 8%)`), m.addColorStop(0.78, `hsl(${h}, 42%, 5%)`), m.addColorStop(1, `hsl(${h}, 48%, 2.5%)`)), e.fillStyle = m, e.fillRect(0, 0, t, i);
|
|
1239
1239
|
const E = Math.min(t, i) * 0.055;
|
|
1240
1240
|
this.drawNebula(
|
|
1241
1241
|
e,
|
|
1242
1242
|
t * 0.22 + Math.sin(s * 0.18) * E,
|
|
1243
1243
|
i * 0.28 + Math.cos(s * 0.15) * E,
|
|
1244
1244
|
Math.max(t, i) * 0.42,
|
|
1245
|
-
|
|
1245
|
+
c,
|
|
1246
1246
|
a ? 0.27 : 0.23,
|
|
1247
1247
|
a
|
|
1248
1248
|
), this.drawNebula(
|
|
@@ -1258,11 +1258,11 @@ class Ne {
|
|
|
1258
1258
|
t * 0.86 + Math.sin(s * 0.11) * E * 0.7,
|
|
1259
1259
|
i * 0.16 + Math.cos(s * 0.13) * E * 0.7,
|
|
1260
1260
|
Math.max(t, i) * 0.3,
|
|
1261
|
-
|
|
1261
|
+
h,
|
|
1262
1262
|
a ? 0.17 : 0.14,
|
|
1263
1263
|
a
|
|
1264
|
-
), this.drawSoftFlows(e, t, i, s,
|
|
1265
|
-
const
|
|
1264
|
+
), this.drawSoftFlows(e, t, i, s, c, l, a), this.drawParticleField(e, t, i, s, c, d, r, a);
|
|
1265
|
+
const v = e.createRadialGradient(
|
|
1266
1266
|
p,
|
|
1267
1267
|
g,
|
|
1268
1268
|
Math.min(t, i) * 0.28,
|
|
@@ -1270,22 +1270,22 @@ class Ne {
|
|
|
1270
1270
|
g,
|
|
1271
1271
|
y
|
|
1272
1272
|
);
|
|
1273
|
-
|
|
1273
|
+
v.addColorStop(0, "rgba(0, 0, 0, 0)"), v.addColorStop(1, a ? "rgba(40, 60, 90, 0.09)" : "rgba(0, 0, 0, 0.2)"), e.fillStyle = v, e.fillRect(0, 0, t, i);
|
|
1274
1274
|
}
|
|
1275
1275
|
drawNebula(e, t, i, s, o, n, a) {
|
|
1276
|
-
const r = e.createRadialGradient(t, i, 0, t, i, s),
|
|
1277
|
-
r.addColorStop(0, `hsla(${o}, ${a ? 88 : 80}%, ${
|
|
1276
|
+
const r = e.createRadialGradient(t, i, 0, t, i, s), l = a ? 52 : 60;
|
|
1277
|
+
r.addColorStop(0, `hsla(${o}, ${a ? 88 : 80}%, ${l}%, ${n})`), r.addColorStop(
|
|
1278
1278
|
0.38,
|
|
1279
|
-
`hsla(${o}, ${a ? 82 : 75}%, ${
|
|
1279
|
+
`hsla(${o}, ${a ? 82 : 75}%, ${l - (a ? 7 : 12)}%, ${n * 0.5})`
|
|
1280
1280
|
), r.addColorStop(1, "rgba(0, 0, 0, 0)"), e.fillStyle = r, e.beginPath(), e.arc(t, i, s, 0, Math.PI * 2), e.fill();
|
|
1281
1281
|
}
|
|
1282
1282
|
drawSoftFlows(e, t, i, s, o, n, a) {
|
|
1283
1283
|
e.save();
|
|
1284
|
-
const r = Math.min(t, i),
|
|
1284
|
+
const r = Math.min(t, i), l = r * 0.035;
|
|
1285
1285
|
e.globalAlpha = a ? 0.15 : 0.12, e.lineWidth = Math.max(1.3, r * 17e-4), e.lineCap = "round", e.shadowBlur = r * 0.02, e.shadowColor = `hsla(${o}, 85%, ${a ? 52 : 62}%, 0.28)`;
|
|
1286
|
-
for (let
|
|
1287
|
-
const d = (
|
|
1288
|
-
e.strokeStyle = `hsla(${this.wrapHue(o +
|
|
1286
|
+
for (let c = 0; c < 3; c++) {
|
|
1287
|
+
const d = (c - 1) * r * 0.075 + Math.sin(s * 0.06 + c) * l, h = c * 28 + n * 18;
|
|
1288
|
+
e.strokeStyle = `hsla(${this.wrapHue(o + h)}, ${a ? 78 : 74}%, ${a ? 47 : 62}%, ${0.52 - c * 0.08})`, e.beginPath(), e.moveTo(-r * 0.12, i * 0.2 + d), e.bezierCurveTo(
|
|
1289
1289
|
t * 0.2,
|
|
1290
1290
|
i * 0.02 + d,
|
|
1291
1291
|
t * 0.47,
|
|
@@ -1318,12 +1318,12 @@ class Ne {
|
|
|
1318
1318
|
e.restore();
|
|
1319
1319
|
}
|
|
1320
1320
|
drawParticleField(e, t, i, s, o, n, a, r) {
|
|
1321
|
-
const
|
|
1322
|
-
for (let p = 0; p <
|
|
1323
|
-
const g = p + a * 17, y = this.unitNoise(g * 1.7) * t, m = this.unitNoise(g * 2.9 + 13) * i, E = Math.hypot(y -
|
|
1321
|
+
const l = 44 + Math.min(24, a * 2), c = t / 2, d = i / 2, h = Math.min(t, i) * 0.17;
|
|
1322
|
+
for (let p = 0; p < l; p++) {
|
|
1323
|
+
const g = p + a * 17, y = this.unitNoise(g * 1.7) * t, m = this.unitNoise(g * 2.9 + 13) * i, E = Math.hypot(y - c, m - d), v = Math.min(
|
|
1324
1324
|
1,
|
|
1325
|
-
Math.max(0, (E -
|
|
1326
|
-
), A = 0.7 + Math.sin(s * (0.6 + p % 4 * 0.08) + g) * 0.3, x = (r ? 0.34 : 0.3) *
|
|
1325
|
+
Math.max(0, (E - h) / (Math.min(t, i) * 0.28))
|
|
1326
|
+
), A = 0.7 + Math.sin(s * (0.6 + p % 4 * 0.08) + g) * 0.3, x = (r ? 0.34 : 0.3) * v * A, f = 0.65 + p % 3 * 0.45;
|
|
1327
1327
|
e.fillStyle = `hsla(${p % 3 === 0 ? n : o}, ${r ? 82 : 78}%, ${r ? 40 : 70}%, ${x})`, e.beginPath(), e.arc(y, m, f, 0, Math.PI * 2), e.fill();
|
|
1328
1328
|
}
|
|
1329
1329
|
}
|
|
@@ -1341,17 +1341,17 @@ class we {
|
|
|
1341
1341
|
if (!s || !o || !s.active || !o.active) return;
|
|
1342
1342
|
const n = t.getStep();
|
|
1343
1343
|
if (e.save(), n === 1) {
|
|
1344
|
-
const a = Math.sin(i * 6) * 10, r = s.position.x,
|
|
1345
|
-
e.shadowColor = S.core, e.shadowBlur = 20, e.fillStyle = S.core, e.beginPath(), e.moveTo(r,
|
|
1346
|
-
const
|
|
1347
|
-
e.strokeStyle = "rgba(0, 240, 255, 0.8)", e.lineWidth = 3, e.beginPath(), e.arc(s.position.x, s.position.y,
|
|
1344
|
+
const a = Math.sin(i * 6) * 10, r = s.position.x, l = s.position.y - 65 + a;
|
|
1345
|
+
e.shadowColor = S.core, e.shadowBlur = 20, e.fillStyle = S.core, e.beginPath(), e.moveTo(r, l + 20), e.lineTo(r - 16, l - 12), e.lineTo(r - 6, l - 12), e.lineTo(r - 6, l - 32), e.lineTo(r + 6, l - 32), e.lineTo(r + 6, l - 12), e.lineTo(r + 16, l - 12), e.closePath(), e.fill();
|
|
1346
|
+
const c = s.radius * (1.6 + Math.sin(i * 8) * 0.3);
|
|
1347
|
+
e.strokeStyle = "rgba(0, 240, 255, 0.8)", e.lineWidth = 3, e.beginPath(), e.arc(s.position.x, s.position.y, c, 0, Math.PI * 2), e.stroke();
|
|
1348
1348
|
} else if (n === 2) {
|
|
1349
1349
|
const a = o.position.x - s.position.x, r = o.position.y - s.position.y;
|
|
1350
1350
|
if (Math.hypot(a, r) > 10) {
|
|
1351
|
-
const
|
|
1351
|
+
const c = Math.atan2(r, a);
|
|
1352
1352
|
e.shadowColor = S.coreAccent, e.shadowBlur = 22, e.strokeStyle = S.coreAccent, e.lineWidth = 4, e.setLineDash([12, 8]), e.beginPath(), e.moveTo(s.position.x, s.position.y), e.lineTo(o.position.x, o.position.y), e.stroke(), e.setLineDash([]);
|
|
1353
|
-
const d = o.position.x - Math.cos(
|
|
1354
|
-
e.fillStyle = S.coreAccent, e.beginPath(), e.moveTo(d,
|
|
1353
|
+
const d = o.position.x - Math.cos(c) * (o.radius + 10), h = o.position.y - Math.sin(c) * (o.radius + 10);
|
|
1354
|
+
e.fillStyle = S.coreAccent, e.beginPath(), e.moveTo(d, h), e.lineTo(d - Math.cos(c - 0.4) * 24, h - Math.sin(c - 0.4) * 24), e.lineTo(d - Math.cos(c + 0.4) * 24, h - Math.sin(c + 0.4) * 24), e.closePath(), e.fill();
|
|
1355
1355
|
const p = o.radius * (1.8 + Math.cos(i * 10) * 0.3);
|
|
1356
1356
|
e.strokeStyle = "rgba(255, 0, 221, 0.9)", e.lineWidth = 3.5, e.beginPath(), e.arc(o.position.x, o.position.y, p, 0, Math.PI * 2), e.stroke();
|
|
1357
1357
|
}
|
|
@@ -1381,8 +1381,8 @@ class ie {
|
|
|
1381
1381
|
e.rotate(t.rotation), e.beginPath();
|
|
1382
1382
|
const o = 12;
|
|
1383
1383
|
for (let n = 0; n <= o; n++) {
|
|
1384
|
-
const a = n * Math.PI * 2 / o, r = t.radius * 1.6 + Math.sin(a * 3 + i * 4) * 3,
|
|
1385
|
-
n === 0 ? e.moveTo(
|
|
1384
|
+
const a = n * Math.PI * 2 / o, r = t.radius * 1.6 + Math.sin(a * 3 + i * 4) * 3, l = t.radius * 0.6 + Math.cos(a * 2 + i * 3) * 2, c = Math.cos(a) * r, d = Math.sin(a) * l;
|
|
1385
|
+
n === 0 ? e.moveTo(c, d) : e.lineTo(c, d);
|
|
1386
1386
|
}
|
|
1387
1387
|
e.closePath(), e.fill(), e.fillStyle = s.effectHighlight, e.beginPath(), e.arc(4, 0, 4, 0, Math.PI * 2), e.fill();
|
|
1388
1388
|
}
|
|
@@ -1390,8 +1390,8 @@ class ie {
|
|
|
1390
1390
|
e.beginPath();
|
|
1391
1391
|
const o = 8;
|
|
1392
1392
|
for (let n = 0; n < o; n++) {
|
|
1393
|
-
const a = n * Math.PI * 2 / o, r = t.radius + Math.sin(a * 4 + i * 3 + t.position.x) * 4,
|
|
1394
|
-
n === 0 ? e.moveTo(
|
|
1393
|
+
const a = n * Math.PI * 2 / o, r = t.radius + Math.sin(a * 4 + i * 3 + t.position.x) * 4, l = Math.cos(a) * r, c = Math.sin(a) * r;
|
|
1394
|
+
n === 0 ? e.moveTo(l, c) : e.lineTo(l, c);
|
|
1395
1395
|
}
|
|
1396
1396
|
e.closePath(), e.fill(), e.fillStyle = s.effectHighlight, e.beginPath(), e.arc(-4, -4, 5, 0, Math.PI * 2), e.arc(5, 3, 4, 0, Math.PI * 2), e.fill();
|
|
1397
1397
|
}
|
|
@@ -1404,8 +1404,8 @@ class ie {
|
|
|
1404
1404
|
e.beginPath();
|
|
1405
1405
|
const o = 14;
|
|
1406
1406
|
for (let n = 0; n <= o; n++) {
|
|
1407
|
-
const a = n * Math.PI * 2 / o, r = t.radius + Math.sin(a * 5 - i * 5) * 3,
|
|
1408
|
-
n === 0 ? e.moveTo(
|
|
1407
|
+
const a = n * Math.PI * 2 / o, r = t.radius + Math.sin(a * 5 - i * 5) * 3, l = Math.cos(a) * r, c = Math.sin(a) * r;
|
|
1408
|
+
n === 0 ? e.moveTo(l, c) : e.lineTo(l, c);
|
|
1409
1409
|
}
|
|
1410
1410
|
e.closePath(), e.fill(), e.fillStyle = s.bgOuter, e.beginPath(), e.arc(0, 0, t.radius * 0.45, 0, Math.PI * 2), e.fill();
|
|
1411
1411
|
}
|
|
@@ -1413,19 +1413,19 @@ class ie {
|
|
|
1413
1413
|
e.rotate(t.rotation);
|
|
1414
1414
|
const o = t.radius, n = o * 0.88, a = Math.sin(i * 3 + t.position.x * 0.01) * 1.5, r = t.color;
|
|
1415
1415
|
e.save(), e.translate(-o * 0.12, a), e.fillStyle = r, e.shadowColor = r, e.shadowBlur = 20, e.beginPath();
|
|
1416
|
-
const
|
|
1417
|
-
for (let m = 0; m <=
|
|
1418
|
-
const E = m * Math.PI * 2 /
|
|
1416
|
+
const l = 10;
|
|
1417
|
+
for (let m = 0; m <= l; m++) {
|
|
1418
|
+
const E = m * Math.PI * 2 / l, v = 1 + Math.sin(E * 3 + i * 2.4) * 0.08, A = Math.cos(E) * n * v, x = Math.sin(E) * n * v * 0.9;
|
|
1419
1419
|
m === 0 ? e.moveTo(A, x) : e.lineTo(A, x);
|
|
1420
1420
|
}
|
|
1421
1421
|
e.closePath(), e.fill(), e.fillStyle = s.effectHighlight, e.shadowColor = s.effectHighlight, e.shadowBlur = 7, e.beginPath(), e.arc(-o * 0.28, -o * 0.2, o * 0.11, 0, Math.PI * 2), e.arc(o * 0.02, o * 0.18, o * 0.08, 0, Math.PI * 2), e.fill(), e.restore();
|
|
1422
|
-
const
|
|
1423
|
-
e.save(), e.translate(
|
|
1422
|
+
const c = o * 0.22, d = this.configManager.getConfig().shield.protectionArc, h = o * 0.72, p = o * 0.38;
|
|
1423
|
+
e.save(), e.translate(c, 0), e.beginPath(), e.arc(0, 0, h, -d / 2, d / 2, !1);
|
|
1424
1424
|
const g = Math.cos(d / 2) * p, y = Math.sin(d / 2) * p;
|
|
1425
|
-
e.lineTo(g, y), e.arc(0, 0, p, d / 2, -d / 2, !0), e.closePath(), e.fillStyle = t.color, e.shadowColor = t.color, e.shadowBlur = t.isStationaryShield ? 28 : 16, e.fill(), e.strokeStyle = s.effectHighlight, e.lineWidth = 2.5, e.beginPath(), e.arc(0, 0,
|
|
1425
|
+
e.lineTo(g, y), e.arc(0, 0, p, d / 2, -d / 2, !0), e.closePath(), e.fillStyle = t.color, e.shadowColor = t.color, e.shadowBlur = t.isStationaryShield ? 28 : 16, e.fill(), e.strokeStyle = s.effectHighlight, e.lineWidth = 2.5, e.beginPath(), e.arc(0, 0, h + Math.sin(i * 4) * 2, -d / 2 + 0.1, d / 2 - 0.1), e.stroke(), e.strokeStyle = s.effectHighlight, e.lineWidth = 1.5, e.shadowColor = s.effectHighlight, e.shadowBlur = 8, e.beginPath(), e.arc(0, 0, p * 0.72, -d * 0.42, d * 0.42), e.stroke();
|
|
1426
1426
|
for (let m = -2; m <= 2; m++) {
|
|
1427
|
-
const E = m * d / 6,
|
|
1428
|
-
e.fillStyle = s.effectHighlight, e.beginPath(), e.arc(
|
|
1427
|
+
const E = m * d / 6, v = Math.cos(E) * (p + 6), A = Math.sin(E) * (p + 6);
|
|
1428
|
+
e.fillStyle = s.effectHighlight, e.beginPath(), e.arc(v, A, 3, 0, Math.PI * 2), e.fill();
|
|
1429
1429
|
}
|
|
1430
1430
|
e.restore();
|
|
1431
1431
|
}
|
|
@@ -1437,41 +1437,41 @@ class ke {
|
|
|
1437
1437
|
e.save(), this.drawCentralFlash(e, t, i, s, n), this.drawSupernovaShell(e, t, i, s, n), this.drawSupernovaParticles(e, t, i, s, o, n), this.drawRebornSeed(e, t, i, n), e.restore();
|
|
1438
1438
|
}
|
|
1439
1439
|
drawCentralFlash(e, t, i, s, o) {
|
|
1440
|
-
const { x: n, y: a } = t.position, r = Math.max(0, 1 - i / 0.52) * 0.95,
|
|
1441
|
-
if (
|
|
1442
|
-
const d = t.radius * (1.4 + s * 7.5),
|
|
1443
|
-
|
|
1440
|
+
const { x: n, y: a } = t.position, r = Math.max(0, 1 - i / 0.52) * 0.95, l = this.easeIn(this.clamp((i - 0.64) / 0.24)) * 0.35, c = Math.max(r, l);
|
|
1441
|
+
if (c <= 0) return;
|
|
1442
|
+
const d = t.radius * (1.4 + s * 7.5), h = e.createRadialGradient(n, a, 0, n, a, d);
|
|
1443
|
+
h.addColorStop(0, this.colorWithAlpha(o.effectHighlight, c)), h.addColorStop(0.12, this.colorWithAlpha(o.corePrimary, c * 0.95)), h.addColorStop(0.48, this.colorWithAlpha(o.tendrilCyan, c * 0.3)), h.addColorStop(1, this.colorWithAlpha(o.corePrimary, 0)), e.fillStyle = h, e.beginPath(), e.arc(n, a, d, 0, Math.PI * 2), e.fill();
|
|
1444
1444
|
}
|
|
1445
1445
|
drawSupernovaShell(e, t, i, s, o) {
|
|
1446
|
-
const { x: n, y: a } = t.position, r = Math.max(0, 0.9 - i * 0.45),
|
|
1447
|
-
for (let
|
|
1448
|
-
const d = this.clamp(s * (0.72 +
|
|
1449
|
-
e.save(), e.strokeStyle = this.colorWithAlpha(p, g), e.lineWidth = Math.max(1.2, 3.6 -
|
|
1446
|
+
const { x: n, y: a } = t.position, r = Math.max(0, 0.9 - i * 0.45), l = t.radius * (2.2 + s * 10.5);
|
|
1447
|
+
for (let c = 0; c < 4; c += 1) {
|
|
1448
|
+
const d = this.clamp(s * (0.72 + c * 0.07)), h = t.radius * (1.1 + d * (4.2 + c * 2.1)), p = c % 2 === 0 ? o.tendrilCyan : o.tendrilMagenta, g = r * (0.72 - c * 0.1);
|
|
1449
|
+
e.save(), e.strokeStyle = this.colorWithAlpha(p, g), e.lineWidth = Math.max(1.2, 3.6 - c * 0.55), e.shadowColor = p, e.shadowBlur = 18 - c * 2, e.beginPath();
|
|
1450
1450
|
const y = 96;
|
|
1451
1451
|
for (let m = 0; m <= y; m += 1) {
|
|
1452
|
-
const E = m * Math.PI * 2 / y,
|
|
1452
|
+
const E = m * Math.PI * 2 / y, v = Math.sin(E * (3 + c) + t.pulsePhase * 1.8 + c) * t.radius * (0.13 + c * 0.025), A = n + Math.cos(E) * (h + v), x = a + Math.sin(E) * (h + v);
|
|
1453
1453
|
m === 0 ? e.moveTo(A, x) : e.lineTo(A, x);
|
|
1454
1454
|
}
|
|
1455
1455
|
e.closePath(), e.stroke(), e.restore();
|
|
1456
1456
|
}
|
|
1457
|
-
e.save(), e.strokeStyle = this.colorWithAlpha(o.effectHighlight, r * 0.45), e.lineWidth = Math.max(1, t.radius * 0.08), e.shadowColor = o.effectHighlight, e.shadowBlur = 22, e.beginPath(), e.arc(n, a,
|
|
1457
|
+
e.save(), e.strokeStyle = this.colorWithAlpha(o.effectHighlight, r * 0.45), e.lineWidth = Math.max(1, t.radius * 0.08), e.shadowColor = o.effectHighlight, e.shadowBlur = 22, e.beginPath(), e.arc(n, a, l * 0.58, 0, Math.PI * 2), e.stroke(), e.restore();
|
|
1458
1458
|
}
|
|
1459
1459
|
drawSupernovaParticles(e, t, i, s, o, n) {
|
|
1460
|
-
const { x: a, y: r } = t.position,
|
|
1461
|
-
for (let
|
|
1462
|
-
const p = Math.sin(
|
|
1463
|
-
e.save(), e.strokeStyle = this.colorWithAlpha(I, C), e.lineWidth = 1 + g * 2.4, e.shadowColor = I, e.shadowBlur = 9, e.beginPath(), e.moveTo(
|
|
1460
|
+
const { x: a, y: r } = t.position, l = 52, c = s, d = Math.max(0.08, 1 - i * 0.76);
|
|
1461
|
+
for (let h = 0; h < l; h += 1) {
|
|
1462
|
+
const p = Math.sin(h * 17.31) * 43758.5453, g = p - Math.floor(p), y = h / l * Math.PI * 2 + (g - 0.5) * 0.2, E = t.radius * (0.4 + g * 0.85) + c * t.radius * (4.6 + g * 7.8) - o * t.radius * 0.4, v = Math.sin(i * 9 + h) * t.radius * 0.5, A = a + Math.cos(y) * E + Math.cos(y + Math.PI / 2) * v, x = r + Math.sin(y) * E + Math.sin(y + Math.PI / 2) * v, f = t.radius * (0.18 + g * 0.45) * (0.45 + c), M = A - Math.cos(y) * f, _ = x - Math.sin(y) * f, I = h % 3 === 0 ? n.effectHighlight : n.tendrilCyan, C = d * (0.45 + g * 0.55);
|
|
1463
|
+
e.save(), e.strokeStyle = this.colorWithAlpha(I, C), e.lineWidth = 1 + g * 2.4, e.shadowColor = I, e.shadowBlur = 9, e.beginPath(), e.moveTo(M, _), e.lineTo(A, x), e.stroke(), e.restore();
|
|
1464
1464
|
}
|
|
1465
1465
|
}
|
|
1466
1466
|
drawRebornSeed(e, t, i, s) {
|
|
1467
1467
|
const o = this.easeOut(this.clamp((i - 0.84) / 0.16));
|
|
1468
1468
|
if (o <= 0) return;
|
|
1469
|
-
const { x: n, y: a } = t.position, r = t.radius * (0.08 + o * 0.86),
|
|
1470
|
-
|
|
1469
|
+
const { x: n, y: a } = t.position, r = t.radius * (0.08 + o * 0.86), l = r * (3.5 + o * 2.5), c = e.createRadialGradient(n, a, 0, n, a, l);
|
|
1470
|
+
c.addColorStop(0, this.colorWithAlpha(s.effectHighlight, o * 0.95)), c.addColorStop(0.22, this.colorWithAlpha(s.corePrimary, o * 0.8)), c.addColorStop(0.6, this.colorWithAlpha(s.tendrilCyan, o * 0.18)), c.addColorStop(1, this.colorWithAlpha(s.corePrimary, 0)), e.fillStyle = c, e.beginPath(), e.arc(n, a, l, 0, Math.PI * 2), e.fill(), e.save(), e.translate(n, a), e.strokeStyle = this.colorWithAlpha(s.corePrimary, o), e.fillStyle = this.colorWithAlpha(s.corePrimary, o * 0.78), e.lineWidth = Math.max(2, t.radius * 0.1), e.shadowColor = s.corePrimary, e.shadowBlur = 22, e.beginPath();
|
|
1471
1471
|
const d = 48;
|
|
1472
|
-
for (let
|
|
1473
|
-
const p =
|
|
1474
|
-
|
|
1472
|
+
for (let h = 0; h <= d; h += 1) {
|
|
1473
|
+
const p = h * Math.PI * 2 / d, g = r * (1 + Math.sin(p * 3 + t.pulsePhase) * 0.12 + Math.sin(p * 5 - t.pulsePhase * 0.7) * 0.07), y = Math.cos(p) * g, m = Math.sin(p) * g;
|
|
1474
|
+
h === 0 ? e.moveTo(y, m) : e.lineTo(y, m);
|
|
1475
1475
|
}
|
|
1476
1476
|
e.closePath(), e.fill(), e.stroke(), e.fillStyle = this.colorWithAlpha(s.effectHighlight, o), e.beginPath(), e.arc(0, 0, r * 0.28, 0, Math.PI * 2), e.fill(), e.restore();
|
|
1477
1477
|
}
|
|
@@ -1509,16 +1509,16 @@ class He {
|
|
|
1509
1509
|
constructor(e, t, i) {
|
|
1510
1510
|
this.canvas = e, this.ctx = e.getContext("2d"), this.themeManager = t, this.indicatorRenderer = new De(), this.bgRenderer = new Ne(), this.tutorialArrowRenderer = new we(), this.enemyShapeRenderer = new ie(i), this.coreDeathEffectRenderer = new ke(), this.configManager = i;
|
|
1511
1511
|
}
|
|
1512
|
-
render(e, t, i, s, o, n, a, r,
|
|
1512
|
+
render(e, t, i, s, o, n, a, r, l, c, d, h, p = 1, g = 0, y = 0, m = !1, E, v) {
|
|
1513
1513
|
if (!this.ctx) return;
|
|
1514
|
-
const A = this.themeManager.getPalette(), { width: x, height: f } = this.canvas,
|
|
1515
|
-
this.ctx.save(), this.ctx.translate(
|
|
1514
|
+
const A = this.themeManager.getPalette(), { width: x, height: f } = this.canvas, M = c.getShakeOffset();
|
|
1515
|
+
this.ctx.save(), this.ctx.translate(M.x, M.y), this.bgRenderer.render(this.ctx, x, f, e.pulsePhase, p, A, !1), this.drawExperienceOrbs(i, e.position, e.pulsePhase, A), this.drawEcosomaOrbs(s, e.position, e.pulsePhase, A), this.drawToxicPools(o, e.pulsePhase), this.drawGravityVortices(n, e.pulsePhase), this.drawShockwaves(a), v === void 0 && this.drawCoreFilaments(e, A), this.drawAutoDeflectionBeams(e.position, t, e.pulsePhase, A), this.drawParticles(r), this.configManager.getConfig().core.hasOffscreenIndicators && this.indicatorRenderer.render(this.ctx, t, x, f, A), this.drawOrganicEnemies(t, e.pulsePhase, A), E && this.tutorialArrowRenderer.render(this.ctx, E, e.pulsePhase), v === void 0 && d ? this.drawPsionicTendril(e.position, d.position, A) : v === void 0 && e && this.drawHoverTendril(e.position, h, t, A), m && this.drawLevelUpDimmer(), v === void 0 ? this.drawOrganicConsciousnessCore(e, A, g, y) : this.coreDeathEffectRenderer.render(this.ctx, {
|
|
1516
1516
|
position: e.position,
|
|
1517
1517
|
radius: e.radius,
|
|
1518
1518
|
pulsePhase: e.pulsePhase,
|
|
1519
|
-
progress:
|
|
1519
|
+
progress: v,
|
|
1520
1520
|
palette: A
|
|
1521
|
-
}), this.drawFloatingTexts(
|
|
1521
|
+
}), this.drawFloatingTexts(l), c.flashAlpha > 0 && (this.ctx.fillStyle = `rgba(255, 255, 255, ${c.flashAlpha})`, this.ctx.fillRect(0, 0, x, f)), this.ctx.restore();
|
|
1522
1522
|
}
|
|
1523
1523
|
drawLevelUpDimmer() {
|
|
1524
1524
|
this.ctx && (this.ctx.save(), this.ctx.fillStyle = "rgba(0, 0, 0, 0.48)", this.ctx.fillRect(0, 0, this.canvas.width, this.canvas.height), this.ctx.restore());
|
|
@@ -1532,20 +1532,20 @@ class He {
|
|
|
1532
1532
|
o.radius * o.visualScale + Math.sin(i * 7 + o.position.x * 0.01) * (0.8 + o.mergePulse * 1.2)
|
|
1533
1533
|
), { x: a, y: r } = o.position;
|
|
1534
1534
|
this.ctx.save(), this.ctx.shadowColor = o.color, this.ctx.shadowBlur = o.isAbsorbing ? 18 : Math.min(24, 8 + o.radius * 0.45 + o.mergePulse * 10), o.isAbsorbing && (this.ctx.globalAlpha = 0.35, this.ctx.strokeStyle = s.tendrilCyan, this.ctx.lineWidth = 1, this.ctx.setLineDash([4, 7]), this.ctx.beginPath(), this.ctx.moveTo(a, r), this.ctx.lineTo(t.x, t.y), this.ctx.stroke(), this.ctx.setLineDash([]), this.ctx.globalAlpha = 1);
|
|
1535
|
-
const
|
|
1536
|
-
|
|
1535
|
+
const l = this.ctx.createRadialGradient(a - 1, r - 1, 1, a, r, n * 1.6);
|
|
1536
|
+
l.addColorStop(0, s.effectHighlight), l.addColorStop(0.4, o.color), l.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = l, this.ctx.beginPath(), this.ctx.arc(a, r, n * 1.6, 0, Math.PI * 2), this.ctx.fill(), this.ctx.fillStyle = s.effectHighlight, this.ctx.beginPath(), this.ctx.arc(a, r, n * 0.65, 0, Math.PI * 2), this.ctx.fill(), this.ctx.strokeStyle = o.color, this.ctx.lineWidth = Math.min(3, 1 + o.radius * 0.08), this.ctx.beginPath(), this.ctx.arc(a, r, n + 3, -i * 2, -i * 2 + Math.PI * 1.4), this.ctx.stroke(), this.ctx.restore();
|
|
1537
1537
|
}
|
|
1538
1538
|
}
|
|
1539
1539
|
drawEcosomaOrbs(e, t, i, s) {
|
|
1540
1540
|
if (this.ctx)
|
|
1541
1541
|
for (const o of e) {
|
|
1542
1542
|
if (!o.active) continue;
|
|
1543
|
-
const n = 1 + Math.sin(i * 5 + o.position.x * 0.02) * 0.08, { x: a, y: r } = o.position,
|
|
1543
|
+
const n = 1 + Math.sin(i * 5 + o.position.x * 0.02) * 0.08, { x: a, y: r } = o.position, l = o.radius * n;
|
|
1544
1544
|
o.isAbsorbing && this.drawEcosomaTendril(o, t, i), this.ctx.save(), this.ctx.translate(a, r), this.ctx.rotate(Math.sin(i * 0.8 + a * 0.01) * 0.16), this.ctx.shadowColor = o.color, this.ctx.shadowBlur = o.isAbsorbing ? 14 : 10;
|
|
1545
|
-
const
|
|
1546
|
-
d.addColorStop(0, this.colorWithAlpha(s.effectHighlight, 0.28)), d.addColorStop(0.38, this.colorWithAlpha(o.color, 0.48)), d.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = d, this.ctx.beginPath(), this.ctx.arc(0, 0,
|
|
1547
|
-
const
|
|
1548
|
-
this.ctx.scale(
|
|
1545
|
+
const c = l * 2.05, d = this.ctx.createRadialGradient(0, -l * 0.18, 1, 0, 0, c);
|
|
1546
|
+
d.addColorStop(0, this.colorWithAlpha(s.effectHighlight, 0.28)), d.addColorStop(0.38, this.colorWithAlpha(o.color, 0.48)), d.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = d, this.ctx.beginPath(), this.ctx.arc(0, 0, c, 0, Math.PI * 2), this.ctx.fill();
|
|
1547
|
+
const h = l / 11.5;
|
|
1548
|
+
this.ctx.scale(h, h), this.ctx.shadowBlur = 5, this.ctx.fillStyle = this.colorWithAlpha(s.effectShadow, 0.86), this.ctx.strokeStyle = o.color, this.ctx.lineWidth = 2.2, this.ctx.beginPath(), this.ctx.moveTo(0, -13), this.ctx.bezierCurveTo(-6, -9, -9, -5, -9, 0.5), this.ctx.bezierCurveTo(-9, 6.3, -5, 11, 0, 13), this.ctx.bezierCurveTo(5, 11, 9, 4.3, 9, -0.5), this.ctx.bezierCurveTo(9, -5, 6, -9, 0, -13), this.ctx.closePath(), this.ctx.fill(), this.ctx.stroke(), this.ctx.strokeStyle = o.color, this.ctx.lineWidth = 1.7, this.ctx.lineCap = "round", this.ctx.beginPath(), this.ctx.moveTo(0, -7), this.ctx.bezierCurveTo(-2.8, -5, -3.8, -2.8, -2, -0.7), this.ctx.bezierCurveTo(-0.7, 0.8, 4.7, 0.1, 4.7, 2.4), this.ctx.bezierCurveTo(4.7, 4.1, 3.3, 5.2, 0.1, 6.1), this.ctx.stroke(), this.ctx.fillStyle = o.color, this.ctx.beginPath(), this.ctx.arc(0, -7, 1.4, 0, Math.PI * 2), this.ctx.fill(), this.ctx.restore();
|
|
1549
1549
|
}
|
|
1550
1550
|
}
|
|
1551
1551
|
drawEcosomaTendril(e, t, i) {
|
|
@@ -1553,15 +1553,15 @@ class He {
|
|
|
1553
1553
|
const s = e.position.x - t.x, o = e.position.y - t.y, n = Math.max(1, Math.hypot(s, o)), a = { x: -o / n, y: s / n };
|
|
1554
1554
|
this.ctx.save(), this.ctx.strokeStyle = e.color, this.ctx.shadowColor = e.color, this.ctx.shadowBlur = 24;
|
|
1555
1555
|
for (let r = 0; r < 3; r++) {
|
|
1556
|
-
const
|
|
1556
|
+
const l = Math.sin(i * 3.6 + r * 2.1 + n * 0.012) * (8 + n * 0.025), c = r === 0 ? 1 : 0.65;
|
|
1557
1557
|
this.ctx.globalAlpha = r === 0 ? 0.92 : 0.5, this.ctx.lineWidth = r === 0 ? 3.2 : 1.3, this.ctx.beginPath(), this.ctx.moveTo(
|
|
1558
|
-
t.x + a.x *
|
|
1559
|
-
t.y + a.y *
|
|
1558
|
+
t.x + a.x * l * 0.15,
|
|
1559
|
+
t.y + a.y * l * 0.15
|
|
1560
1560
|
), this.ctx.bezierCurveTo(
|
|
1561
|
-
t.x + s * 0.25 + a.x *
|
|
1562
|
-
t.y + o * 0.25 + a.y *
|
|
1563
|
-
t.x + s * 0.68 - a.x *
|
|
1564
|
-
t.y + o * 0.68 - a.y *
|
|
1561
|
+
t.x + s * 0.25 + a.x * l * c,
|
|
1562
|
+
t.y + o * 0.25 + a.y * l * c,
|
|
1563
|
+
t.x + s * 0.68 - a.x * l * 0.7,
|
|
1564
|
+
t.y + o * 0.68 - a.y * l * 0.7,
|
|
1565
1565
|
e.position.x,
|
|
1566
1566
|
e.position.y
|
|
1567
1567
|
), this.ctx.stroke();
|
|
@@ -1574,21 +1574,21 @@ class He {
|
|
|
1574
1574
|
for (const s of e) {
|
|
1575
1575
|
const o = s.duration / s.maxDuration, n = Math.min(0.7, (1 - o) * 0.7), { x: a, y: r } = s.position;
|
|
1576
1576
|
this.ctx.save();
|
|
1577
|
-
const
|
|
1578
|
-
|
|
1579
|
-
const
|
|
1580
|
-
for (let d = 0; d <=
|
|
1581
|
-
const
|
|
1577
|
+
const l = this.ctx.createRadialGradient(a, r, 10, a, r, s.radius * 1.2);
|
|
1578
|
+
l.addColorStop(0, this.colorWithAlpha(i.sporeColor, n * 0.9)), l.addColorStop(0.4, `rgba(16, 185, 129, ${n * 0.65})`), l.addColorStop(0.8, `rgba(5, 80, 45, ${n * 0.35})`), l.addColorStop(1, "rgba(2, 35, 15, 0)"), this.ctx.fillStyle = l, this.ctx.shadowColor = i.sporeColor, this.ctx.shadowBlur = 30, this.ctx.beginPath();
|
|
1579
|
+
const c = 70;
|
|
1580
|
+
for (let d = 0; d <= c; d++) {
|
|
1581
|
+
const h = d * Math.PI * 2 / c, p = Math.sin(h * 5 + t * 3) * 14, g = Math.cos(h * 3 - t * 2) * 9, y = s.radius + p + g, m = a + Math.cos(h) * y, E = r + Math.sin(h) * y;
|
|
1582
1582
|
d === 0 ? this.ctx.moveTo(m, E) : this.ctx.lineTo(m, E);
|
|
1583
1583
|
}
|
|
1584
1584
|
this.ctx.closePath(), this.ctx.fill(), this.ctx.strokeStyle = this.colorWithAlpha(i.sporeColor, n * 0.8), this.ctx.lineWidth = 2.5, this.ctx.beginPath();
|
|
1585
|
-
for (let d = 0; d <=
|
|
1586
|
-
const
|
|
1585
|
+
for (let d = 0; d <= c; d++) {
|
|
1586
|
+
const h = d * Math.PI * 2 / c, p = Math.sin(h * 6 + t * 4) * 8, g = s.radius * 0.75 + p, y = a + Math.cos(h) * g, m = r + Math.sin(h) * g;
|
|
1587
1587
|
d === 0 ? this.ctx.moveTo(y, m) : this.ctx.lineTo(y, m);
|
|
1588
1588
|
}
|
|
1589
1589
|
this.ctx.closePath(), this.ctx.stroke();
|
|
1590
1590
|
for (let d = 0; d < 6; d++) {
|
|
1591
|
-
const
|
|
1591
|
+
const h = d * Math.PI * 0.33 + t * 1.5, p = s.radius * 0.5 * (0.3 + Math.sin(t * 2 + d) * 0.3), g = a + Math.cos(h) * p, y = r + Math.sin(h) * p, m = 3 + Math.sin(t * 3 + d) * 2;
|
|
1592
1592
|
this.ctx.fillStyle = `rgba(255, 255, 255, ${n * 0.8})`, this.ctx.beginPath(), this.ctx.arc(g, y, Math.max(1, m), 0, Math.PI * 2), this.ctx.fill();
|
|
1593
1593
|
}
|
|
1594
1594
|
this.ctx.restore();
|
|
@@ -1621,11 +1621,11 @@ class He {
|
|
|
1621
1621
|
for (const s of e) {
|
|
1622
1622
|
const o = Math.min(0.85, (1 - s.duration / s.maxDuration) * 0.85), n = s.radius * (1 - s.duration / s.maxDuration * 0.1), { x: a, y: r } = s.position;
|
|
1623
1623
|
this.ctx.save();
|
|
1624
|
-
const
|
|
1625
|
-
|
|
1626
|
-
for (let
|
|
1627
|
-
const d = n *
|
|
1628
|
-
this.ctx.beginPath(), this.ctx.arc(a, r, d,
|
|
1624
|
+
const l = this.ctx.createRadialGradient(a, r, 0, a, r, 60);
|
|
1625
|
+
l.addColorStop(0, this.colorWithAlpha(i.vortexCore, o)), l.addColorStop(0.7, this.colorWithAlpha(i.vortexMid, o)), l.addColorStop(1, this.colorWithAlpha(i.parasiteColor, o * 0.5)), this.ctx.fillStyle = l, this.ctx.beginPath(), this.ctx.arc(a, r, 60, 0, Math.PI * 2), this.ctx.fill(), this.ctx.strokeStyle = i.parasiteColor, this.ctx.lineWidth = 5, this.ctx.shadowColor = i.parasiteColor, this.ctx.shadowBlur = 32;
|
|
1626
|
+
for (let c = 1; c <= 5; c++) {
|
|
1627
|
+
const d = n * c / 5, h = t * c * 2.2;
|
|
1628
|
+
this.ctx.beginPath(), this.ctx.arc(a, r, d, h, h + Math.PI * 1.5), this.ctx.stroke();
|
|
1629
1629
|
}
|
|
1630
1630
|
this.ctx.restore();
|
|
1631
1631
|
}
|
|
@@ -1650,15 +1650,15 @@ class He {
|
|
|
1650
1650
|
380
|
|
1651
1651
|
);
|
|
1652
1652
|
r.addColorStop(0, s.nebulaCyan), r.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = r, this.ctx.beginPath(), this.ctx.arc(n, a, 380, 0, Math.PI * 2), this.ctx.fill();
|
|
1653
|
-
const
|
|
1654
|
-
c,
|
|
1653
|
+
const l = e * 0.68 + Math.cos(i * 0.35) * 50, c = t * 0.55 + Math.sin(i * 0.3) * 45, d = this.ctx.createRadialGradient(
|
|
1655
1654
|
l,
|
|
1656
|
-
20,
|
|
1657
1655
|
c,
|
|
1656
|
+
20,
|
|
1658
1657
|
l,
|
|
1658
|
+
c,
|
|
1659
1659
|
420
|
|
1660
1660
|
);
|
|
1661
|
-
d.addColorStop(0, s.nebulaMagenta), d.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = d, this.ctx.beginPath(), this.ctx.arc(
|
|
1661
|
+
d.addColorStop(0, s.nebulaMagenta), d.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = d, this.ctx.beginPath(), this.ctx.arc(l, c, 420, 0, Math.PI * 2), this.ctx.fill();
|
|
1662
1662
|
}
|
|
1663
1663
|
drawCoreFilaments(e, t) {
|
|
1664
1664
|
if (!this.ctx) return;
|
|
@@ -1667,17 +1667,17 @@ class He {
|
|
|
1667
1667
|
for (let s = 0; s < i; s++) {
|
|
1668
1668
|
const o = e.collectedPowerUpColors[s] || t.nebulaCyan;
|
|
1669
1669
|
this.ctx.strokeStyle = o;
|
|
1670
|
-
const n = s * Math.PI * 2 / i + e.pulsePhase * 0.12, a = 85 + Math.sin(e.pulsePhase * 1.5 + s) * 25, r = e.position.x + Math.cos(n) * a,
|
|
1671
|
-
this.ctx.beginPath(), this.ctx.moveTo(e.position.x, e.position.y), this.ctx.quadraticCurveTo(
|
|
1670
|
+
const n = s * Math.PI * 2 / i + e.pulsePhase * 0.12, a = 85 + Math.sin(e.pulsePhase * 1.5 + s) * 25, r = e.position.x + Math.cos(n) * a, l = e.position.y + Math.sin(n) * a, c = e.position.x + Math.cos(n + 0.4) * 48, d = e.position.y + Math.sin(n + 0.4) * 48;
|
|
1671
|
+
this.ctx.beginPath(), this.ctx.moveTo(e.position.x, e.position.y), this.ctx.quadraticCurveTo(c, d, r, l), this.ctx.stroke(), this.ctx.fillStyle = o, this.ctx.beginPath(), this.ctx.arc(r, l, 3.5, 0, Math.PI * 2), this.ctx.fill();
|
|
1672
1672
|
}
|
|
1673
1673
|
}
|
|
1674
1674
|
drawAutoDeflectionBeams(e, t, i, s) {
|
|
1675
1675
|
if (this.ctx)
|
|
1676
1676
|
for (const o of t) {
|
|
1677
1677
|
if (!o.active || o.psionicDeflectionTimer <= 0) continue;
|
|
1678
|
-
const n = Math.min(1, o.psionicDeflectionTimer / 0.24), a = o.position.x - e.x, r = o.position.y - e.y,
|
|
1679
|
-
if (
|
|
1680
|
-
const
|
|
1678
|
+
const n = Math.min(1, o.psionicDeflectionTimer / 0.24), a = o.position.x - e.x, r = o.position.y - e.y, l = Math.hypot(a, r);
|
|
1679
|
+
if (l <= 0) continue;
|
|
1680
|
+
const c = -r / l, d = a / l, h = Math.sin(i * 18 + o.position.x * 0.02) * 10, p = (e.x + o.position.x) / 2 + c * h, g = (e.y + o.position.y) / 2 + d * h;
|
|
1681
1681
|
this.ctx.save(), this.ctx.globalAlpha = n, this.ctx.strokeStyle = s.tendrilMagenta, this.ctx.lineWidth = 6, this.ctx.shadowColor = s.tendrilMagenta, this.ctx.shadowBlur = 18, this.ctx.beginPath(), this.ctx.moveTo(e.x, e.y), this.ctx.quadraticCurveTo(p, g, o.position.x, o.position.y), this.ctx.stroke(), this.ctx.strokeStyle = s.effectHighlight, this.ctx.lineWidth = 1.8, this.ctx.shadowColor = s.tendrilCyan, this.ctx.shadowBlur = 10, this.ctx.beginPath(), this.ctx.moveTo(e.x, e.y), this.ctx.quadraticCurveTo(p, g, o.position.x, o.position.y), this.ctx.stroke(), this.ctx.restore();
|
|
1682
1682
|
}
|
|
1683
1683
|
}
|
|
@@ -1690,46 +1690,46 @@ class He {
|
|
|
1690
1690
|
}
|
|
1691
1691
|
const a = e.getColorHex();
|
|
1692
1692
|
for (let f = 0; f < e.integrity; f++) {
|
|
1693
|
-
const
|
|
1693
|
+
const M = e.radius + 16 + f * 12;
|
|
1694
1694
|
this.ctx.strokeStyle = a, this.ctx.lineWidth = 2.2, this.ctx.shadowColor = a, this.ctx.shadowBlur = 12, this.ctx.beginPath();
|
|
1695
|
-
const
|
|
1696
|
-
for (let I = 0; I <=
|
|
1697
|
-
const C = I * Math.PI * 2 /
|
|
1695
|
+
const _ = 60;
|
|
1696
|
+
for (let I = 0; I <= _; I++) {
|
|
1697
|
+
const C = I * Math.PI * 2 / _, R = M + Math.sin(C * 4 + e.pulsePhase * 2 + f) * 3, T = o + Math.cos(C) * R, b = n + Math.sin(C) * R;
|
|
1698
1698
|
I === 0 ? this.ctx.moveTo(T, b) : this.ctx.lineTo(T, b);
|
|
1699
1699
|
}
|
|
1700
1700
|
this.ctx.closePath(), this.ctx.stroke();
|
|
1701
1701
|
}
|
|
1702
1702
|
if (e.repairProgress > 0) {
|
|
1703
|
-
const f = e.integrity,
|
|
1703
|
+
const f = e.integrity, M = e.radius + 16 + f * 12;
|
|
1704
1704
|
this.ctx.save(), this.ctx.globalAlpha = Math.max(0.15, e.repairProgress), this.ctx.strokeStyle = a, this.ctx.lineWidth = 2, this.ctx.shadowColor = a, this.ctx.shadowBlur = 8, this.ctx.setLineDash([6, 4]), this.ctx.beginPath();
|
|
1705
|
-
const
|
|
1706
|
-
for (let I = 0; I <=
|
|
1707
|
-
const C = I * Math.PI * 2 /
|
|
1705
|
+
const _ = 60;
|
|
1706
|
+
for (let I = 0; I <= _; I++) {
|
|
1707
|
+
const C = I * Math.PI * 2 / _, R = M + Math.sin(C * 4 + e.pulsePhase * 2 + f) * 3, T = o + Math.cos(C) * R, b = n + Math.sin(C) * R;
|
|
1708
1708
|
I === 0 ? this.ctx.moveTo(T, b) : this.ctx.lineTo(T, b);
|
|
1709
1709
|
}
|
|
1710
1710
|
this.ctx.closePath(), this.ctx.stroke(), this.ctx.restore();
|
|
1711
1711
|
}
|
|
1712
1712
|
const r = this.ctx.createRadialGradient(o, n, 5, o, n, e.radius * 2.2);
|
|
1713
1713
|
r.addColorStop(0, a), r.addColorStop(0.5, t.nebulaMagenta), r.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = r, this.ctx.beginPath(), this.ctx.arc(o, n, e.radius * 2.2, 0, Math.PI * 2), this.ctx.fill(), this.ctx.save(), this.ctx.translate(o, n), this.ctx.strokeStyle = a, this.ctx.lineWidth = 3, this.ctx.fillStyle = a, this.ctx.shadowColor = a, this.ctx.shadowBlur = 20, this.ctx.beginPath();
|
|
1714
|
-
const
|
|
1715
|
-
for (let f = 0; f <=
|
|
1716
|
-
const
|
|
1714
|
+
const l = 80;
|
|
1715
|
+
for (let f = 0; f <= l; f++) {
|
|
1716
|
+
const M = f * Math.PI * 2 / l, _ = e.getMembraneRadius(M), I = Math.cos(M) * _, C = Math.sin(M) * _;
|
|
1717
1717
|
f === 0 ? this.ctx.moveTo(I, C) : this.ctx.lineTo(I, C);
|
|
1718
1718
|
}
|
|
1719
1719
|
this.ctx.closePath(), this.ctx.fillStyle = a, this.ctx.fill(), this.ctx.strokeStyle = a, this.ctx.lineWidth = 3, this.ctx.stroke();
|
|
1720
|
-
const
|
|
1721
|
-
if (
|
|
1720
|
+
const c = e.powerUpCount;
|
|
1721
|
+
if (c > 0) {
|
|
1722
1722
|
this.ctx.strokeStyle = t.effectHighlight, this.ctx.lineWidth = 1.8, this.ctx.shadowColor = a, this.ctx.shadowBlur = 10;
|
|
1723
|
-
for (let f = 0; f <
|
|
1724
|
-
const
|
|
1723
|
+
for (let f = 0; f < c; f++) {
|
|
1724
|
+
const M = f * Math.PI * 2 / c + e.pulsePhase * 0.4, _ = e.radius * (0.45 + Math.sin(e.pulsePhase * 2 + f) * 0.15);
|
|
1725
1725
|
this.ctx.beginPath(), this.ctx.moveTo(0, 0);
|
|
1726
|
-
const I = Math.cos(
|
|
1726
|
+
const I = Math.cos(M + Math.sin(e.pulsePhase + f) * 0.4) * (_ * 0.6), C = Math.sin(M + Math.cos(e.pulsePhase + f) * 0.4) * (_ * 0.6), R = Math.cos(M) * _, T = Math.sin(M) * _;
|
|
1727
1727
|
this.ctx.quadraticCurveTo(I, C, R, T), this.ctx.stroke(), this.ctx.fillStyle = a, this.ctx.beginPath(), this.ctx.arc(R, T, 2.5, 0, Math.PI * 2), this.ctx.fill();
|
|
1728
1728
|
}
|
|
1729
1729
|
}
|
|
1730
|
-
const d = Math.max(0, Math.min(1, i)),
|
|
1731
|
-
const
|
|
1732
|
-
const w = f +
|
|
1730
|
+
const d = Math.max(0, Math.min(1, i)), h = Math.max(0, Math.min(1, s)), p = e.radius * 0.42 * (1 + h * 0.1), g = Math.max(4, e.radius * 0.14), y = p + g * 0.5 - 0.5, m = -Math.PI / 2, E = m + Math.PI * 2 * d, v = (f) => y + (e.getMembraneRadius(f) - e.radius) * 0.18 + Math.sin(f * 2 - e.pulsePhase * 0.9) * 0.75 + Math.sin(f * 4 + e.pulsePhase * 0.55) * 0.35, A = (f, M) => {
|
|
1731
|
+
const _ = Math.max(8, Math.ceil(Math.abs(M) / (Math.PI * 2) * 96)), I = Array.from({ length: _ + 1 }, (T, b) => {
|
|
1732
|
+
const w = f + M * b / _, G = v(w);
|
|
1733
1733
|
return { x: Math.cos(w) * G, y: Math.sin(w) * G };
|
|
1734
1734
|
});
|
|
1735
1735
|
this.ctx.beginPath(), this.ctx.moveTo(I[0].x, I[0].y);
|
|
@@ -1743,12 +1743,12 @@ class He {
|
|
|
1743
1743
|
);
|
|
1744
1744
|
}
|
|
1745
1745
|
const C = I[I.length - 1], R = I[I.length - 2];
|
|
1746
|
-
this.ctx.quadraticCurveTo(R.x, R.y, C.x, C.y), Math.abs(
|
|
1746
|
+
this.ctx.quadraticCurveTo(R.x, R.y, C.x, C.y), Math.abs(M) >= Math.PI * 2 - 1e-3 && this.ctx.closePath(), this.ctx.stroke();
|
|
1747
1747
|
};
|
|
1748
1748
|
if (this.ctx.save(), this.ctx.strokeStyle = this.colorWithAlpha(t.progressAccent, 0.32), this.ctx.lineWidth = g, this.ctx.lineCap = "round", A(0, Math.PI * 2), d > 0) {
|
|
1749
|
-
this.ctx.strokeStyle = this.colorWithAlpha(t.progressAccent, 0.78), this.ctx.lineWidth = g +
|
|
1750
|
-
const f =
|
|
1751
|
-
this.ctx.fillStyle = this.colorWithAlpha(t.progressAccent, 0.8), this.ctx.shadowColor = t.progressAccent, this.ctx.shadowBlur = 5 +
|
|
1749
|
+
this.ctx.strokeStyle = this.colorWithAlpha(t.progressAccent, 0.78), this.ctx.lineWidth = g + h * 0.8, this.ctx.shadowColor = t.progressAccent, this.ctx.shadowBlur = 4 + h * 10, A(m, Math.PI * 2 * d);
|
|
1750
|
+
const f = v(E), M = Math.cos(E) * f, _ = Math.sin(E) * f;
|
|
1751
|
+
this.ctx.fillStyle = this.colorWithAlpha(t.progressAccent, 0.8), this.ctx.shadowColor = t.progressAccent, this.ctx.shadowBlur = 5 + h * 7, this.ctx.beginPath(), this.ctx.arc(M, _, g * 0.3 + h, 0, Math.PI * 2), this.ctx.fill();
|
|
1752
1752
|
const I = Math.PI * 2 * d, C = e.pulsePhase * 0.22 % 0.72, R = m + I * (0.14 + C);
|
|
1753
1753
|
this.ctx.save(), this.ctx.strokeStyle = this.colorWithAlpha(t.progressAccent, 0.55), this.ctx.lineWidth = 1.25, this.ctx.shadowColor = t.progressAccent, this.ctx.shadowBlur = 5, A(R, Math.min(I * 0.16, 0.34)), this.ctx.restore();
|
|
1754
1754
|
}
|
|
@@ -1761,12 +1761,12 @@ class He {
|
|
|
1761
1761
|
0,
|
|
1762
1762
|
p
|
|
1763
1763
|
);
|
|
1764
|
-
if (x.addColorStop(0, t.effectHighlight), x.addColorStop(0.62, this.colorWithAlpha(t.effectHighlight, 0.96)), x.addColorStop(1, this.colorWithAlpha(t.tendrilCyan, 0.6)), this.ctx.fillStyle = x, this.ctx.shadowColor =
|
|
1765
|
-
const f = 1 -
|
|
1766
|
-
this.ctx.save(), this.ctx.globalAlpha =
|
|
1767
|
-
for (let
|
|
1768
|
-
const
|
|
1769
|
-
this.ctx.beginPath(), this.ctx.moveTo(Math.cos(
|
|
1764
|
+
if (x.addColorStop(0, t.effectHighlight), x.addColorStop(0.62, this.colorWithAlpha(t.effectHighlight, 0.96)), x.addColorStop(1, this.colorWithAlpha(t.tendrilCyan, 0.6)), this.ctx.fillStyle = x, this.ctx.shadowColor = h > 0 ? a : t.effectHighlight, this.ctx.shadowBlur = 14 + h * 32, this.ctx.beginPath(), this.ctx.arc(0, 0, p, 0, Math.PI * 2), this.ctx.fill(), h > 0) {
|
|
1765
|
+
const f = 1 - h;
|
|
1766
|
+
this.ctx.save(), this.ctx.globalAlpha = h * 0.75, this.ctx.strokeStyle = t.effectHighlight, this.ctx.lineWidth = 2 + h * 2, this.ctx.shadowColor = a, this.ctx.shadowBlur = 18, this.ctx.beginPath(), this.ctx.arc(0, 0, p + 8 + f * 28, 0, Math.PI * 2), this.ctx.stroke();
|
|
1767
|
+
for (let M = 0; M < 8; M++) {
|
|
1768
|
+
const _ = M * Math.PI * 2 / 8 + e.pulsePhase * 0.4, I = p + 8, C = I + 10 + f * 16;
|
|
1769
|
+
this.ctx.beginPath(), this.ctx.moveTo(Math.cos(_) * I, Math.sin(_) * I), this.ctx.lineTo(Math.cos(_) * C, Math.sin(_) * C), this.ctx.stroke();
|
|
1770
1770
|
}
|
|
1771
1771
|
this.ctx.restore();
|
|
1772
1772
|
}
|
|
@@ -1780,8 +1780,8 @@ class He {
|
|
|
1780
1780
|
const n = (e.x + t.x) / 2 + Math.sin(Date.now() * 0.02) * 16, a = (e.y + t.y) / 2 + Math.cos(Date.now() * 0.02) * 16;
|
|
1781
1781
|
this.ctx.quadraticCurveTo(n, a, t.x, t.y), this.ctx.stroke(), this.ctx.strokeStyle = i.tendrilCyan, this.ctx.lineWidth = 3.5, this.ctx.shadowColor = i.tendrilCyan, this.ctx.shadowBlur = 12, this.ctx.beginPath(), this.ctx.moveTo(e.x, e.y), this.ctx.lineTo(t.x, t.y), this.ctx.stroke();
|
|
1782
1782
|
for (let r = 0; r < 6; r++) {
|
|
1783
|
-
const
|
|
1784
|
-
this.ctx.fillStyle = i.effectHighlight, this.ctx.beginPath(), this.ctx.arc(
|
|
1783
|
+
const l = Math.random(), c = e.x + s * l + (Math.random() - 0.5) * 24, d = e.y + o * l + (Math.random() - 0.5) * 24;
|
|
1784
|
+
this.ctx.fillStyle = i.effectHighlight, this.ctx.beginPath(), this.ctx.arc(c, d, 2.5 + Math.random() * 2.5, 0, Math.PI * 2), this.ctx.fill();
|
|
1785
1785
|
}
|
|
1786
1786
|
this.ctx.restore();
|
|
1787
1787
|
}
|
|
@@ -1805,19 +1805,19 @@ class He {
|
|
|
1805
1805
|
if (this.ctx.save(), this.ctx.translate(n, a), s.wasManipulated && !s.isDying) {
|
|
1806
1806
|
const r = s.radius * 1.5 + Math.sin(t * 6) * 4;
|
|
1807
1807
|
this.ctx.strokeStyle = i.tendrilMagenta, this.ctx.lineWidth = 2.5, this.ctx.shadowColor = i.tendrilMagenta, this.ctx.shadowBlur = 18, this.ctx.beginPath(), this.ctx.arc(0, 0, r, 0, Math.PI * 2), this.ctx.stroke();
|
|
1808
|
-
const
|
|
1809
|
-
this.ctx.strokeStyle = i.tendrilCyan, this.ctx.lineWidth = 1.5, this.ctx.beginPath(), this.ctx.arc(0, 0,
|
|
1808
|
+
const l = s.radius * 1.8 + Math.cos(t * 8) * 3;
|
|
1809
|
+
this.ctx.strokeStyle = i.tendrilCyan, this.ctx.lineWidth = 1.5, this.ctx.beginPath(), this.ctx.arc(0, 0, l, 0, Math.PI * 2), this.ctx.stroke();
|
|
1810
1810
|
}
|
|
1811
1811
|
if (s.isDying) {
|
|
1812
|
-
const r = s.deathTimer / s.maxDeathTimer,
|
|
1813
|
-
if (this.ctx.globalAlpha =
|
|
1814
|
-
const
|
|
1815
|
-
this.ctx.fillStyle = i.sporeColor, this.ctx.shadowColor = i.sporeColor, this.ctx.shadowBlur = 20, this.ctx.beginPath(), this.ctx.arc(0, 0,
|
|
1812
|
+
const r = s.deathTimer / s.maxDeathTimer, l = Math.max(0, 1 - r);
|
|
1813
|
+
if (this.ctx.globalAlpha = l, s.deathType === "dissolve") {
|
|
1814
|
+
const c = s.radius * (1 - r * 0.7);
|
|
1815
|
+
this.ctx.fillStyle = i.sporeColor, this.ctx.shadowColor = i.sporeColor, this.ctx.shadowBlur = 20, this.ctx.beginPath(), this.ctx.arc(0, 0, c, 0, Math.PI * 2), this.ctx.fill();
|
|
1816
1816
|
for (let d = 0; d < 4; d++) {
|
|
1817
|
-
const
|
|
1817
|
+
const h = d * Math.PI * 0.5 + r * 4, p = c * 0.8 * r;
|
|
1818
1818
|
this.ctx.fillStyle = i.effectHighlight, this.ctx.beginPath(), this.ctx.arc(
|
|
1819
|
-
Math.cos(
|
|
1820
|
-
Math.sin(
|
|
1819
|
+
Math.cos(h) * p,
|
|
1820
|
+
Math.sin(h) * p,
|
|
1821
1821
|
3,
|
|
1822
1822
|
0,
|
|
1823
1823
|
Math.PI * 2
|
|
@@ -1826,8 +1826,8 @@ class He {
|
|
|
1826
1826
|
this.ctx.restore();
|
|
1827
1827
|
continue;
|
|
1828
1828
|
} else if (s.deathType === "sliced") {
|
|
1829
|
-
const
|
|
1830
|
-
this.ctx.shadowColor = i.piercerColor, this.ctx.shadowBlur = 22, this.ctx.fillStyle = o, this.ctx.save(), this.ctx.translate(
|
|
1829
|
+
const c = r * 24, d = s.sliceAngle + Math.PI / 2, h = Math.cos(d) * c, p = Math.sin(d) * c;
|
|
1830
|
+
this.ctx.shadowColor = i.piercerColor, this.ctx.shadowBlur = 22, this.ctx.fillStyle = o, this.ctx.save(), this.ctx.translate(h, p), this.ctx.beginPath(), this.ctx.arc(0, 0, s.radius * 0.8, 0, Math.PI), this.ctx.fill(), this.ctx.restore(), this.ctx.save(), this.ctx.translate(-h, -p), this.ctx.beginPath(), this.ctx.arc(0, 0, s.radius * 0.8, Math.PI, Math.PI * 2), this.ctx.fill(), this.ctx.restore(), this.ctx.restore();
|
|
1831
1831
|
continue;
|
|
1832
1832
|
}
|
|
1833
1833
|
}
|
|
@@ -1849,28 +1849,34 @@ class He {
|
|
|
1849
1849
|
}
|
|
1850
1850
|
drawOrbitingModifierOrbs(e, t, i, s = !0, o = 1) {
|
|
1851
1851
|
if (!this.ctx) return;
|
|
1852
|
-
const n = this.themeManager.getPalette();
|
|
1853
|
-
for (const
|
|
1854
|
-
if (!
|
|
1855
|
-
const { x:
|
|
1856
|
-
this.ctx.save(), this.ctx.shadowColor =
|
|
1857
|
-
let
|
|
1858
|
-
if (
|
|
1859
|
-
const
|
|
1860
|
-
|
|
1852
|
+
const n = this.themeManager.getPalette(), a = this.getDisplayScale(), r = Math.max(14, Math.round(14 * a)), l = Math.max(16, Math.round(16 * a));
|
|
1853
|
+
for (const c of e) {
|
|
1854
|
+
if (!c.active) continue;
|
|
1855
|
+
const { x: d, y: h } = c.position, p = c.definition.color, g = c.definition.rarity, y = Ue[g], m = c.radius + Math.sin(t * 6 + c.orbitAngle) * 3;
|
|
1856
|
+
this.ctx.save(), this.ctx.shadowColor = y;
|
|
1857
|
+
let E = 16;
|
|
1858
|
+
if (g === "legendary" && (E = 28), c.isGrabbed && (E = 36), this.ctx.shadowBlur = E, g === "legendary" || g === "epic") {
|
|
1859
|
+
const x = m + 12, f = this.ctx.createRadialGradient(d, h, m, d, h, x);
|
|
1860
|
+
f.addColorStop(0, y), f.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = f, this.ctx.beginPath(), this.ctx.arc(d, h, x, 0, Math.PI * 2), this.ctx.fill();
|
|
1861
1861
|
}
|
|
1862
|
-
const
|
|
1863
|
-
|
|
1864
|
-
const
|
|
1865
|
-
this.ctx.textBaseline = "alphabetic", this.ctx.font =
|
|
1862
|
+
const v = this.ctx.createRadialGradient(d, h, 2, d, h, m * 1.4);
|
|
1863
|
+
v.addColorStop(0, n.effectHighlight), v.addColorStop(0.4, p), v.addColorStop(1, "rgba(0, 0, 0, 0.5)"), this.ctx.fillStyle = v, this.ctx.beginPath(), this.ctx.arc(d, h, m, 0, Math.PI * 2), this.ctx.fill(), this.ctx.strokeStyle = y, this.ctx.lineWidth = g === "legendary" ? 3.5 : 2.5, this.ctx.beginPath(), this.ctx.arc(d, h, m + 4, t * 3, t * 3 + Math.PI * 1.2), this.ctx.stroke(), (g === "legendary" || g === "epic") && (this.ctx.strokeStyle = n.effectHighlight, this.ctx.lineWidth = 1.5, this.ctx.beginPath(), this.ctx.arc(d, h, m + 8, -t * 2, -t * 2 + Math.PI * 0.9), this.ctx.stroke()), this.ctx.font = `900 ${r}px Orbitron`, this.ctx.textAlign = "center", this.ctx.textBaseline = "middle", this.ctx.fillStyle = n.effectInk, this.ctx.shadowColor = n.effectShadow, this.ctx.shadowBlur = 6, this.ctx.fillText(c.definition.badge, d, h);
|
|
1864
|
+
const A = i ? i.translate(c.definition.titleKey) : c.definition.badge;
|
|
1865
|
+
this.ctx.textBaseline = "alphabetic", this.ctx.font = `900 ${l}px Orbitron`, this.ctx.fillStyle = n.effectInk, this.ctx.shadowColor = y, this.ctx.shadowBlur = 14, this.ctx.fillText(A, d, h - m - 14), this.ctx.restore();
|
|
1866
1866
|
}
|
|
1867
1867
|
if (i && s) {
|
|
1868
|
-
const
|
|
1869
|
-
this.ctx.save()
|
|
1870
|
-
const
|
|
1871
|
-
this.ctx.
|
|
1868
|
+
const c = this.canvas.width / 2, d = this.canvas.height / 2 + 300, h = i.translate("rerollButton", { count: o });
|
|
1869
|
+
this.ctx.save();
|
|
1870
|
+
const p = Math.max(14, Math.round(14 * a));
|
|
1871
|
+
this.ctx.font = `900 ${p}px Orbitron`, this.ctx.textAlign = "center", this.ctx.textBaseline = "middle", this.ctx.fillStyle = n.effectPanel, this.ctx.strokeStyle = n.tendrilCyan, this.ctx.lineWidth = 2, this.ctx.shadowColor = n.tendrilCyan, this.ctx.shadowBlur = 12;
|
|
1872
|
+
const g = this.ctx.measureText(h).width, y = Math.round(20 * a), m = g + y * 2, E = Math.round(38 * a);
|
|
1873
|
+
this.ctx.beginPath(), this.ctx.roundRect(c - m / 2, d - E / 2, m, E, 8), this.ctx.fill(), this.ctx.stroke(), this.ctx.fillStyle = n.effectInk, this.ctx.shadowColor = n.effectShadow, this.ctx.shadowBlur = 4, this.ctx.fillText(h, c, d), this.ctx.restore();
|
|
1872
1874
|
}
|
|
1873
1875
|
}
|
|
1876
|
+
getDisplayScale() {
|
|
1877
|
+
const e = this.canvas.getBoundingClientRect().width;
|
|
1878
|
+
return e <= 0 ? 1 : Math.max(1, this.canvas.width / e);
|
|
1879
|
+
}
|
|
1874
1880
|
colorWithAlpha(e, t) {
|
|
1875
1881
|
const i = e.replace("#", "");
|
|
1876
1882
|
if (i.length !== 6) return e;
|
|
@@ -1952,19 +1958,25 @@ class Ke {
|
|
|
1952
1958
|
onOpenGeneticMemory;
|
|
1953
1959
|
onOpenCodex;
|
|
1954
1960
|
hasCodexUnread;
|
|
1955
|
-
|
|
1956
|
-
|
|
1961
|
+
geneticMemory;
|
|
1962
|
+
constructor(e, t, i, s, o, n, a) {
|
|
1963
|
+
this.i18n = t, this.onStartCallback = i, this.onOpenGeneticMemory = s, this.onOpenCodex = o, this.hasCodexUnread = n, this.geneticMemory = a, this.container = document.createElement("div"), this.container.className = "axon-start-menu", this.renderContent(), e.appendChild(this.container);
|
|
1957
1964
|
}
|
|
1958
1965
|
renderContent() {
|
|
1959
1966
|
this.container.innerHTML = `
|
|
1960
1967
|
<div class="axon-title-halo">
|
|
1961
1968
|
<h1 class="axon-title">${this.i18n.translate("title")}</h1>
|
|
1962
|
-
<p class="axon-version-mark">v0.
|
|
1969
|
+
<p class="axon-version-mark">v0.27.0</p>
|
|
1963
1970
|
<button id="axon-start-btn" class="axon-start-button">${this.i18n.translate("startButton")}</button>
|
|
1964
1971
|
<div class="axon-home-secondary-actions">
|
|
1965
|
-
<button id="axon-genetic-memory-btn" class="axon-home-secondary-button">
|
|
1972
|
+
<button id="axon-genetic-memory-btn" class="axon-home-secondary-button axon-genetic-memory-home-button">
|
|
1966
1973
|
<span class="axon-ecosoma-mark" aria-hidden="true">${this.renderEcosomaIcon()}</span>
|
|
1967
1974
|
<strong class="axon-home-secondary-title">${this.i18n.translate("geneticMemoryButton")}</strong>
|
|
1975
|
+
<span class="axon-home-secondary-currency" aria-label="${this.i18n.translate("ecosomaLabel")}: ${this.geneticMemory.getBalance()}">
|
|
1976
|
+
<span class="axon-ecosoma-mark" aria-hidden="true">${this.renderEcosomaIcon()}</span>
|
|
1977
|
+
${this.geneticMemory.getBalance()}
|
|
1978
|
+
${this.hasPurchasableGeneticMemory() ? `<span class="axon-genetic-ready" aria-label="${this.i18n.translate("geneticStatePurchasable")}">●</span>` : ""}
|
|
1979
|
+
</span>
|
|
1968
1980
|
</button>
|
|
1969
1981
|
<button id="axon-codex-btn" class="axon-home-secondary-button axon-codex-home-button">
|
|
1970
1982
|
<span class="axon-codex-mark" aria-hidden="true">${this.renderCodexIcon()}</span>
|
|
@@ -1989,6 +2001,9 @@ class Ke {
|
|
|
1989
2001
|
hide() {
|
|
1990
2002
|
this.container.style.display = "none";
|
|
1991
2003
|
}
|
|
2004
|
+
hasPurchasableGeneticMemory() {
|
|
2005
|
+
return this.geneticMemory.getNodes().some((e) => e.state === "purchasable");
|
|
2006
|
+
}
|
|
1992
2007
|
renderEcosomaIcon() {
|
|
1993
2008
|
return '<svg viewBox="0 0 32 32" fill="none" aria-hidden="true"><path d="M16 3C10 7 7 11 7 16.5 7 22.3 11 27 16 29c5-2 9-6.7 9-12.5C25 11 22 7 16 3Z" stroke="currentColor" stroke-width="1.6"/><path d="M16 9c-2.8 2-3.8 4.2-2 6.3 1.3 1.5 4.7 1.1 4.7 3.4 0 1.7-1.4 2.8-3.2 3.8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>';
|
|
1994
2009
|
}
|
|
@@ -3739,8 +3754,8 @@ const W = {
|
|
|
3739
3754
|
"ko",
|
|
3740
3755
|
"zh"
|
|
3741
3756
|
];
|
|
3742
|
-
function $(
|
|
3743
|
-
return xe.includes(
|
|
3757
|
+
function $(u) {
|
|
3758
|
+
return xe.includes(u);
|
|
3744
3759
|
}
|
|
3745
3760
|
class Ve {
|
|
3746
3761
|
modal;
|
|
@@ -3757,8 +3772,8 @@ class Ve {
|
|
|
3757
3772
|
this.i18n = t, this.themeManager = i, this.platform = s, this.onLanguageChangedCallback = o, this.onCloseCallback = n, this.onFpsLimitChangedCallback = a;
|
|
3758
3773
|
const r = localStorage.getItem("axon_surge_haptics");
|
|
3759
3774
|
r !== null && (this.hapticsEnabled = r === "true");
|
|
3760
|
-
const
|
|
3761
|
-
(
|
|
3775
|
+
const l = Number(localStorage.getItem("axon_surge_fps_limit"));
|
|
3776
|
+
(l === 30 || l === 60 || l === 120) && (this.fpsLimit = l), this.modal = document.createElement("dialog"), this.modal.className = "axon-settings-modal", this.card = document.createElement("div"), this.card.className = "axon-settings-card", this.modal.appendChild(this.card), e.appendChild(this.modal), this.modal.addEventListener("close", () => {
|
|
3762
3777
|
this.onCloseCallback && this.onCloseCallback();
|
|
3763
3778
|
}), this.renderContent();
|
|
3764
3779
|
}
|
|
@@ -3803,10 +3818,10 @@ class Ve {
|
|
|
3803
3818
|
a.className = "axon-select-arrow", a.textContent = "▼", s.appendChild(o), s.appendChild(a), t.appendChild(i), t.appendChild(s);
|
|
3804
3819
|
const r = document.createElement("div");
|
|
3805
3820
|
r.className = "axon-setting-row";
|
|
3806
|
-
const
|
|
3807
|
-
|
|
3808
|
-
const
|
|
3809
|
-
|
|
3821
|
+
const l = document.createElement("span");
|
|
3822
|
+
l.textContent = this.i18n.translate("themeLabel");
|
|
3823
|
+
const c = document.createElement("div");
|
|
3824
|
+
c.className = "axon-toggle-group";
|
|
3810
3825
|
const d = [
|
|
3811
3826
|
{ id: "bioluminescent", label: "BIO" },
|
|
3812
3827
|
{ id: "dark", label: "DARK" }
|
|
@@ -3815,11 +3830,11 @@ class Ve {
|
|
|
3815
3830
|
const b = document.createElement("button");
|
|
3816
3831
|
b.type = "button", b.className = `axon-toggle-btn ${this.themeManager.getTheme() === T.id ? "is-active" : ""}`, b.textContent = T.label, b.addEventListener("click", () => {
|
|
3817
3832
|
this.themeManager.setTheme(T.id), this.renderContent();
|
|
3818
|
-
}),
|
|
3833
|
+
}), c.appendChild(b);
|
|
3819
3834
|
}
|
|
3820
|
-
r.appendChild(
|
|
3821
|
-
const
|
|
3822
|
-
|
|
3835
|
+
r.appendChild(l), r.appendChild(c);
|
|
3836
|
+
const h = document.createElement("div");
|
|
3837
|
+
h.className = "axon-setting-row";
|
|
3823
3838
|
const p = document.createElement("span");
|
|
3824
3839
|
p.textContent = this.i18n.translate("fpsLimitLabel");
|
|
3825
3840
|
const g = document.createElement("div");
|
|
@@ -3835,13 +3850,13 @@ class Ve {
|
|
|
3835
3850
|
this.fpsLimit = T.limit, localStorage.setItem("axon_surge_fps_limit", String(T.limit)), this.onFpsLimitChangedCallback?.(T.limit), this.renderContent();
|
|
3836
3851
|
}), g.appendChild(b);
|
|
3837
3852
|
}
|
|
3838
|
-
|
|
3853
|
+
h.appendChild(p), h.appendChild(g);
|
|
3839
3854
|
const m = document.createElement("div");
|
|
3840
3855
|
m.className = "axon-setting-row";
|
|
3841
3856
|
const E = document.createElement("span");
|
|
3842
3857
|
E.textContent = this.i18n.translate("hapticsLabel");
|
|
3843
|
-
const
|
|
3844
|
-
|
|
3858
|
+
const v = document.createElement("div");
|
|
3859
|
+
v.className = "axon-toggle-group";
|
|
3845
3860
|
const A = [
|
|
3846
3861
|
{ enabled: !0, label: this.i18n.translate("hapticsOn") },
|
|
3847
3862
|
{ enabled: !1, label: this.i18n.translate("hapticsOff") }
|
|
@@ -3850,32 +3865,32 @@ class Ve {
|
|
|
3850
3865
|
const b = document.createElement("button");
|
|
3851
3866
|
b.type = "button", b.className = `axon-toggle-btn ${this.hapticsEnabled === T.enabled ? "is-active" : ""}`, b.textContent = T.label, b.addEventListener("click", () => {
|
|
3852
3867
|
this.hapticsEnabled = T.enabled, localStorage.setItem("axon_surge_haptics", String(T.enabled)), this.hapticsEnabled && this.platform.haptics.selectionChanged(), this.renderContent();
|
|
3853
|
-
}),
|
|
3868
|
+
}), v.appendChild(b);
|
|
3854
3869
|
}
|
|
3855
|
-
m.appendChild(E), m.appendChild(
|
|
3870
|
+
m.appendChild(E), m.appendChild(v);
|
|
3856
3871
|
const x = document.createElement("div");
|
|
3857
3872
|
x.className = "axon-setting-row";
|
|
3858
3873
|
const f = document.createElement("span");
|
|
3859
3874
|
f.textContent = this.i18n.translate("tutorialSettingLabel");
|
|
3860
|
-
const
|
|
3861
|
-
|
|
3862
|
-
const
|
|
3875
|
+
const M = document.createElement("div");
|
|
3876
|
+
M.className = "axon-toggle-group";
|
|
3877
|
+
const _ = localStorage.getItem("axon_surge_show_tutorial") !== "false", I = [
|
|
3863
3878
|
{ enabled: !0, label: this.i18n.translate("hapticsOn") },
|
|
3864
3879
|
{ enabled: !1, label: this.i18n.translate("hapticsOff") }
|
|
3865
3880
|
];
|
|
3866
3881
|
for (const T of I) {
|
|
3867
3882
|
const b = document.createElement("button");
|
|
3868
|
-
b.type = "button", b.className = `axon-toggle-btn ${
|
|
3883
|
+
b.type = "button", b.className = `axon-toggle-btn ${_ === T.enabled ? "is-active" : ""}`, b.textContent = T.label, b.addEventListener("click", () => {
|
|
3869
3884
|
localStorage.setItem("axon_surge_show_tutorial", String(T.enabled)), this.renderContent();
|
|
3870
|
-
}),
|
|
3885
|
+
}), M.appendChild(b);
|
|
3871
3886
|
}
|
|
3872
|
-
x.appendChild(f), x.appendChild(
|
|
3887
|
+
x.appendChild(f), x.appendChild(M);
|
|
3873
3888
|
const C = document.createElement("div");
|
|
3874
3889
|
C.className = "axon-settings-credits", C.textContent = this.i18n.translate("creditsJam");
|
|
3875
3890
|
const R = document.createElement("button");
|
|
3876
3891
|
R.type = "button", R.className = "axon-start-button", R.style.padding = "12px 36px", R.style.fontSize = "14px", R.textContent = this.i18n.translate("closeButton"), R.addEventListener("click", () => {
|
|
3877
3892
|
this.modal.close();
|
|
3878
|
-
}), this.card.appendChild(e), this.card.appendChild(t), this.card.appendChild(r), this.card.appendChild(
|
|
3893
|
+
}), this.card.appendChild(e), this.card.appendChild(t), this.card.appendChild(r), this.card.appendChild(h), this.card.appendChild(m), this.card.appendChild(x), this.card.appendChild(C), this.card.appendChild(R);
|
|
3879
3894
|
}
|
|
3880
3895
|
isHapticsEnabled() {
|
|
3881
3896
|
return this.hapticsEnabled;
|
|
@@ -3942,7 +3957,7 @@ class Fe {
|
|
|
3942
3957
|
if (!this.isActive || !this.dummyLauncher || !this.dummyTarget) return;
|
|
3943
3958
|
const a = this.dummyLauncher, r = this.dummyTarget;
|
|
3944
3959
|
t.includes(a) || t.push(a), t.includes(r) || t.push(r);
|
|
3945
|
-
const
|
|
3960
|
+
const l = r.position.x - a.position.x, c = r.position.y - a.position.y, d = Math.hypot(l, c);
|
|
3946
3961
|
if (a.isGrabbed) {
|
|
3947
3962
|
if (this.showWarning = !1, d <= a.radius + r.radius + 60) {
|
|
3948
3963
|
n && n(), a.isGrabbed = !1, this.showWarning = !0, this.resetDummies(a, r);
|
|
@@ -3951,8 +3966,8 @@ class Fe {
|
|
|
3951
3966
|
return;
|
|
3952
3967
|
}
|
|
3953
3968
|
if (a.wasManipulated) {
|
|
3954
|
-
const
|
|
3955
|
-
if (!a.isThrown ||
|
|
3969
|
+
const h = Math.hypot(a.velocity.x, a.velocity.y);
|
|
3970
|
+
if (!a.isThrown || h < 70) {
|
|
3956
3971
|
n && n(), this.showWarning = !0, this.resetDummies(a, r);
|
|
3957
3972
|
return;
|
|
3958
3973
|
}
|
|
@@ -3960,7 +3975,7 @@ class Fe {
|
|
|
3960
3975
|
a.triggerDissolveDeath(!0), r.triggerDissolveDeath(!0), this.showWarning = !1, this.isActive = !1, o();
|
|
3961
3976
|
return;
|
|
3962
3977
|
}
|
|
3963
|
-
(a.position.x < -60 || a.position.x > i + 60 || a.position.y < -60 || a.position.y > s + 60 ||
|
|
3978
|
+
(a.position.x < -60 || a.position.x > i + 60 || a.position.y < -60 || a.position.y > s + 60 || h < 40) && (n && n(), this.showWarning = !0, this.resetDummies(a, r));
|
|
3964
3979
|
}
|
|
3965
3980
|
}
|
|
3966
3981
|
resetDummies(e, t) {
|
|
@@ -4582,12 +4597,12 @@ class Ye {
|
|
|
4582
4597
|
(n) => (!n.requiredUnlockId || t?.isUnlocked(n.requiredUnlockId) === !0) && (n.isAvailable?.({ config: i }) ?? !0)
|
|
4583
4598
|
), o = [];
|
|
4584
4599
|
for (let n = 0; n < e && s.length > 0; n++) {
|
|
4585
|
-
const a = s.reduce((
|
|
4600
|
+
const a = s.reduce((l, c) => l + c.rarityWeight, 0);
|
|
4586
4601
|
let r = Math.random() * a;
|
|
4587
|
-
for (let
|
|
4588
|
-
const
|
|
4589
|
-
if (r -=
|
|
4590
|
-
o.push(
|
|
4602
|
+
for (let l = 0; l < s.length; l++) {
|
|
4603
|
+
const c = s[l];
|
|
4604
|
+
if (r -= c.rarityWeight, r <= 0) {
|
|
4605
|
+
o.push(c), s.splice(l, 1);
|
|
4591
4606
|
break;
|
|
4592
4607
|
}
|
|
4593
4608
|
}
|
|
@@ -4751,8 +4766,8 @@ class Je {
|
|
|
4751
4766
|
execute(e) {
|
|
4752
4767
|
const { thrownEnemy: t, targetEnemy: i, allEnemies: s, shockwaves: o, particles: n, floatingTexts: a } = e, r = i.position;
|
|
4753
4768
|
t.experienceDropPending = !0, i.experienceDropPending = !0, t.active = !1, i.active = !1;
|
|
4754
|
-
const
|
|
4755
|
-
o.length <
|
|
4769
|
+
const l = e.config, c = l.cluster.fragmentCount, d = l.cluster.hasHoming;
|
|
4770
|
+
o.length < l.cluster.maxExplosionShockwaves && o.push({
|
|
4756
4771
|
id: Math.random().toString(),
|
|
4757
4772
|
position: { ...r },
|
|
4758
4773
|
radius: 15,
|
|
@@ -4762,31 +4777,31 @@ class Je {
|
|
|
4762
4777
|
lifetime: 0,
|
|
4763
4778
|
maxLifetime: 0.6
|
|
4764
4779
|
});
|
|
4765
|
-
for (let p = 0; p <
|
|
4766
|
-
const g = p * Math.PI * 2 /
|
|
4780
|
+
for (let p = 0; p < c; p++) {
|
|
4781
|
+
const g = p * Math.PI * 2 / c, y = 800 + Math.random() * 300, m = {
|
|
4767
4782
|
x: r.x + Math.cos(g) * 45,
|
|
4768
4783
|
y: r.y + Math.sin(g) * 45
|
|
4769
4784
|
};
|
|
4770
4785
|
let E = g;
|
|
4771
4786
|
if (d) {
|
|
4772
4787
|
let x = null, f = 1 / 0;
|
|
4773
|
-
for (const
|
|
4774
|
-
if (
|
|
4788
|
+
for (const M of s) {
|
|
4789
|
+
if (M === t || M === i || !M.active || M.isGrabbed || M.isDying)
|
|
4775
4790
|
continue;
|
|
4776
|
-
const
|
|
4777
|
-
|
|
4778
|
-
|
|
4791
|
+
const _ = Math.hypot(
|
|
4792
|
+
M.position.x - m.x,
|
|
4793
|
+
M.position.y - m.y
|
|
4779
4794
|
);
|
|
4780
|
-
|
|
4795
|
+
_ < f && (f = _, x = M);
|
|
4781
4796
|
}
|
|
4782
4797
|
x && (E = Math.atan2(
|
|
4783
4798
|
x.position.y - m.y,
|
|
4784
4799
|
x.position.x - m.x
|
|
4785
4800
|
));
|
|
4786
4801
|
}
|
|
4787
|
-
const
|
|
4788
|
-
if (!
|
|
4789
|
-
const A = e.factory.createEnemy(
|
|
4802
|
+
const v = t.behavior.spawnedEnemyIds?.[0];
|
|
4803
|
+
if (!v) continue;
|
|
4804
|
+
const A = e.factory.createEnemy(v, m, {
|
|
4790
4805
|
x: m.x + Math.cos(E) * 500,
|
|
4791
4806
|
y: m.y + Math.sin(E) * 500
|
|
4792
4807
|
});
|
|
@@ -4795,11 +4810,11 @@ class Je {
|
|
|
4795
4810
|
y: Math.sin(E) * y
|
|
4796
4811
|
}, s.push(A);
|
|
4797
4812
|
}
|
|
4798
|
-
const
|
|
4799
|
-
|
|
4813
|
+
const h = Math.min(
|
|
4814
|
+
l.cluster.explosionParticleCount,
|
|
4800
4815
|
Math.max(0, 96 - n.length)
|
|
4801
4816
|
);
|
|
4802
|
-
for (let p = 0; p <
|
|
4817
|
+
for (let p = 0; p < h; p++) {
|
|
4803
4818
|
const g = Math.random() * Math.PI * 2, y = 200 + Math.random() * 300;
|
|
4804
4819
|
n.push({
|
|
4805
4820
|
id: Math.random().toString(),
|
|
@@ -4812,7 +4827,7 @@ class Je {
|
|
|
4812
4827
|
maxLifetime: 0.6
|
|
4813
4828
|
});
|
|
4814
4829
|
}
|
|
4815
|
-
a.length <
|
|
4830
|
+
a.length < l.cluster.maxExplosionFloatingTexts && a.push({
|
|
4816
4831
|
id: Math.random().toString(),
|
|
4817
4832
|
text: "CLUSTER DETONATION",
|
|
4818
4833
|
position: { ...r },
|
|
@@ -4852,9 +4867,9 @@ class je {
|
|
|
4852
4867
|
}
|
|
4853
4868
|
class Qe {
|
|
4854
4869
|
execute(e) {
|
|
4855
|
-
const { thrownEnemy: t, targetEnemy: i, allEnemies: s, particles: o, floatingTexts: n } = e, a = i.position.x - t.position.x, r = i.position.y - t.position.y,
|
|
4856
|
-
for (const [p, g] of
|
|
4857
|
-
const y =
|
|
4870
|
+
const { thrownEnemy: t, targetEnemy: i, allEnemies: s, particles: o, floatingTexts: n } = e, a = i.position.x - t.position.x, r = i.position.y - t.position.y, l = Math.atan2(r, a), c = e.config.shield, d = c.blastSpeed || 1400, h = c.isFanBlast ? [0, -c.fanBlastAngle, c.fanBlastAngle] : [0];
|
|
4871
|
+
for (const [p, g] of h.entries()) {
|
|
4872
|
+
const y = l + g, m = p === 0 ? t : e.factory.createEnemy(
|
|
4858
4873
|
t.type,
|
|
4859
4874
|
{
|
|
4860
4875
|
x: t.position.x + Math.cos(y) * 30,
|
|
@@ -4862,7 +4877,7 @@ class Qe {
|
|
|
4862
4877
|
},
|
|
4863
4878
|
{ x: 0, y: 0 }
|
|
4864
4879
|
);
|
|
4865
|
-
m.isStationaryShield = !1, m.isThrown = !0, m.wasManipulated = !0, m.shieldAngle = y, m.rotation = y, m.launchDelay =
|
|
4880
|
+
m.isStationaryShield = !1, m.isThrown = !0, m.wasManipulated = !0, m.shieldAngle = y, m.rotation = y, m.launchDelay = c.isFanBlast ? p * c.fanBlastInterval : 0, m.velocity = {
|
|
4866
4881
|
x: Math.cos(y) * d,
|
|
4867
4882
|
y: Math.sin(y) * d
|
|
4868
4883
|
}, m !== t && s.push(m);
|
|
@@ -4879,7 +4894,7 @@ class Qe {
|
|
|
4879
4894
|
size: 24
|
|
4880
4895
|
});
|
|
4881
4896
|
for (let p = 0; p < 50; p++) {
|
|
4882
|
-
const g = (Math.random() - 0.5) * 1.5, y =
|
|
4897
|
+
const g = (Math.random() - 0.5) * 1.5, y = l + g, m = 300 + Math.random() * 500;
|
|
4883
4898
|
o.push({
|
|
4884
4899
|
id: Math.random().toString(),
|
|
4885
4900
|
position: { ...t.position },
|
|
@@ -4945,31 +4960,31 @@ class et {
|
|
|
4945
4960
|
}
|
|
4946
4961
|
class tt {
|
|
4947
4962
|
execute(e) {
|
|
4948
|
-
const { thrownEnemy: t, pools: i, shockwaves: s, particles: o, floatingTexts: n, eventBus: a } = e, r = t.position,
|
|
4963
|
+
const { thrownEnemy: t, pools: i, shockwaves: s, particles: o, floatingTexts: n, eventBus: a } = e, r = t.position, l = e.config;
|
|
4949
4964
|
i.push({
|
|
4950
4965
|
id: Math.random().toString(),
|
|
4951
4966
|
position: { ...r },
|
|
4952
|
-
radius: Math.round(
|
|
4967
|
+
radius: Math.round(l.toxicPool.baseRadius * 2),
|
|
4953
4968
|
duration: 0,
|
|
4954
|
-
maxDuration:
|
|
4955
|
-
damage:
|
|
4969
|
+
maxDuration: l.toxicPool.baseDuration * 1.5,
|
|
4970
|
+
damage: l.toxicPool.damage,
|
|
4956
4971
|
sourceType: t.type
|
|
4957
4972
|
}), s.push({
|
|
4958
4973
|
id: Math.random().toString(),
|
|
4959
4974
|
position: { ...r },
|
|
4960
4975
|
radius: 10,
|
|
4961
|
-
maxRadius: Math.round(
|
|
4976
|
+
maxRadius: Math.round(l.toxicPool.baseRadius * 2.2),
|
|
4962
4977
|
color: S.spore,
|
|
4963
4978
|
alpha: 1,
|
|
4964
4979
|
lifetime: 0,
|
|
4965
4980
|
maxLifetime: 0.6
|
|
4966
4981
|
});
|
|
4967
|
-
for (let
|
|
4968
|
-
const d = Math.random() * Math.PI * 2,
|
|
4982
|
+
for (let c = 0; c < 45; c++) {
|
|
4983
|
+
const d = Math.random() * Math.PI * 2, h = 120 + Math.random() * 260;
|
|
4969
4984
|
o.push({
|
|
4970
4985
|
id: Math.random().toString(),
|
|
4971
4986
|
position: { ...r },
|
|
4972
|
-
velocity: { x: Math.cos(d) *
|
|
4987
|
+
velocity: { x: Math.cos(d) * h, y: Math.sin(d) * h },
|
|
4973
4988
|
color: S.spore,
|
|
4974
4989
|
radius: 4 + Math.random() * 5,
|
|
4975
4990
|
alpha: 1,
|
|
@@ -4990,20 +5005,20 @@ class tt {
|
|
|
4990
5005
|
}), t.experienceDropPending = !0, t.active = !1, a.emit("onPoolCreated", { position: r });
|
|
4991
5006
|
}
|
|
4992
5007
|
}
|
|
4993
|
-
const se = (
|
|
5008
|
+
const se = (u, e, t = []) => {
|
|
4994
5009
|
let i = null, s = 1 / 0;
|
|
4995
5010
|
for (const o of e) {
|
|
4996
|
-
if (o ===
|
|
5011
|
+
if (o === u || t.includes(o) || !o.active || o.isGrabbed || o.isDying)
|
|
4997
5012
|
continue;
|
|
4998
5013
|
const n = Math.hypot(
|
|
4999
|
-
o.position.x -
|
|
5000
|
-
o.position.y -
|
|
5014
|
+
o.position.x - u.position.x,
|
|
5015
|
+
o.position.y - u.position.y
|
|
5001
5016
|
);
|
|
5002
5017
|
n < s && (s = n, i = o);
|
|
5003
5018
|
}
|
|
5004
5019
|
return i;
|
|
5005
|
-
}, oe = (
|
|
5006
|
-
|
|
5020
|
+
}, oe = (u, e, t, i, s = e.color) => {
|
|
5021
|
+
u.shockwaves.push({
|
|
5007
5022
|
id: Math.random().toString(),
|
|
5008
5023
|
position: { ...e.position },
|
|
5009
5024
|
radius: 10,
|
|
@@ -5013,10 +5028,10 @@ const se = (h, e, t = []) => {
|
|
|
5013
5028
|
lifetime: 0,
|
|
5014
5029
|
maxLifetime: i
|
|
5015
5030
|
});
|
|
5016
|
-
}, Ee = (
|
|
5031
|
+
}, Ee = (u, e, t, i = e.color) => {
|
|
5017
5032
|
for (let s = 0; s < t; s++) {
|
|
5018
5033
|
const o = Math.random() * Math.PI * 2, n = 180 + Math.random() * 320;
|
|
5019
|
-
|
|
5034
|
+
u.particles.push({
|
|
5020
5035
|
id: Math.random().toString(),
|
|
5021
5036
|
position: { ...e.position },
|
|
5022
5037
|
velocity: { x: Math.cos(o) * n, y: Math.sin(o) * n },
|
|
@@ -5027,71 +5042,71 @@ const se = (h, e, t = []) => {
|
|
|
5027
5042
|
maxLifetime: 0.5
|
|
5028
5043
|
});
|
|
5029
5044
|
}
|
|
5030
|
-
}, it = (
|
|
5031
|
-
|
|
5032
|
-
}, st = (
|
|
5033
|
-
e.config.piercer.hasHoming && (
|
|
5034
|
-
}, ot = (
|
|
5035
|
-
if (!
|
|
5045
|
+
}, it = (u, e) => {
|
|
5046
|
+
u.shieldAngle = u.rotation, u.velocity = { x: 0, y: 0 }, u.isStationaryShield = !0, u.isThrown = !1;
|
|
5047
|
+
}, st = (u, e) => {
|
|
5048
|
+
e.config.piercer.hasHoming && (u.remainingHomingKills = e.config.piercer.homingTargets);
|
|
5049
|
+
}, ot = (u, e) => {
|
|
5050
|
+
if (!u.isThrown || !e.config.piercer.hasHoming || u.remainingHomingKills <= 0)
|
|
5036
5051
|
return;
|
|
5037
|
-
const t = se(
|
|
5052
|
+
const t = se(u, e.enemies);
|
|
5038
5053
|
if (!t) return;
|
|
5039
5054
|
const i = Math.atan2(
|
|
5040
|
-
t.position.y -
|
|
5041
|
-
t.position.x -
|
|
5042
|
-
), s = Math.max(Math.hypot(
|
|
5055
|
+
t.position.y - u.position.y,
|
|
5056
|
+
t.position.x - u.position.x
|
|
5057
|
+
), s = Math.max(Math.hypot(u.velocity.x, u.velocity.y), 1e3), o = Math.atan2(u.velocity.y, u.velocity.x);
|
|
5043
5058
|
let n = i - o;
|
|
5044
5059
|
for (; n < -Math.PI; ) n += Math.PI * 2;
|
|
5045
5060
|
for (; n > Math.PI; ) n -= Math.PI * 2;
|
|
5046
5061
|
const a = o + Math.sign(n) * Math.min(Math.abs(n), 25 * e.dt);
|
|
5047
|
-
|
|
5048
|
-
}, nt = (
|
|
5049
|
-
oe(e,
|
|
5050
|
-
}, at = (
|
|
5062
|
+
u.rotation = a, u.velocity = { x: Math.cos(a) * s, y: Math.sin(a) * s };
|
|
5063
|
+
}, nt = (u, e) => {
|
|
5064
|
+
oe(e, u, 350, 0.6), Ee(e, u, 40);
|
|
5065
|
+
}, at = (u, e) => {
|
|
5051
5066
|
const t = e.config.piercer.terminalAoERadius;
|
|
5052
5067
|
if (!(t <= 0)) {
|
|
5053
|
-
oe(e,
|
|
5054
|
-
for (const i of e.spatialHash.getNearby(
|
|
5068
|
+
oe(e, u, t, 0.6);
|
|
5069
|
+
for (const i of e.spatialHash.getNearby(u.position, t)) {
|
|
5055
5070
|
if (!i.active || i.isGrabbed || i.isDying) continue;
|
|
5056
|
-
const s = i.position.x -
|
|
5057
|
-
s * s + o * o <= t * t && e.killEnemy(i, Math.atan2(o, s),
|
|
5071
|
+
const s = i.position.x - u.position.x, o = i.position.y - u.position.y;
|
|
5072
|
+
s * s + o * o <= t * t && e.killEnemy(i, Math.atan2(o, s), u.type);
|
|
5058
5073
|
}
|
|
5059
5074
|
}
|
|
5060
|
-
}, rt = (
|
|
5061
|
-
const { thrownEnemy: e, targetEnemy: t } =
|
|
5075
|
+
}, rt = (u) => {
|
|
5076
|
+
const { thrownEnemy: e, targetEnemy: t } = u;
|
|
5062
5077
|
return e.strategy ? (t.codexDeathSourceType = e.type, e.strategy.execute({
|
|
5063
5078
|
thrownEnemy: e,
|
|
5064
5079
|
targetEnemy: t,
|
|
5065
|
-
allEnemies:
|
|
5066
|
-
pools:
|
|
5067
|
-
vortices:
|
|
5068
|
-
shockwaves:
|
|
5069
|
-
particles:
|
|
5070
|
-
floatingTexts:
|
|
5071
|
-
eventBus:
|
|
5072
|
-
width:
|
|
5073
|
-
height:
|
|
5074
|
-
factory:
|
|
5075
|
-
config:
|
|
5076
|
-
}), !e.behavior.continuesThroughTargets && e.active && !e.isDying && e.triggerDissolveDeath(!0), t.active && !t.isDying && t.triggerDissolveDeath(!0),
|
|
5077
|
-
}, ct = (
|
|
5080
|
+
allEnemies: u.enemies,
|
|
5081
|
+
pools: u.pools,
|
|
5082
|
+
vortices: u.vortices,
|
|
5083
|
+
shockwaves: u.shockwaves,
|
|
5084
|
+
particles: u.particles,
|
|
5085
|
+
floatingTexts: u.floatingTexts,
|
|
5086
|
+
eventBus: u.eventBus,
|
|
5087
|
+
width: u.width,
|
|
5088
|
+
height: u.height,
|
|
5089
|
+
factory: u.factory,
|
|
5090
|
+
config: u.config
|
|
5091
|
+
}), !e.behavior.continuesThroughTargets && e.active && !e.isDying && e.triggerDissolveDeath(!0), t.active && !t.isDying && t.triggerDissolveDeath(!0), u.currentThrowState.kills += e.behavior.continuesThroughTargets ? 1 : 2, u.onKill?.(), !0) : !1;
|
|
5092
|
+
}, ct = (u) => (u.killEnemy(u.targetEnemy, u.thrownEnemy.rotation, u.thrownEnemy.type), u.thrownEnemy.active && !u.thrownEnemy.isDying && u.thrownEnemy.triggerDissolveDeath(!0), u.currentThrowState.kills += 1, u.juice.triggerHitstop(0.04), u.juice.triggerScreenShake(
|
|
5078
5093
|
{
|
|
5079
|
-
x:
|
|
5080
|
-
y:
|
|
5094
|
+
x: u.targetEnemy.position.x - u.thrownEnemy.position.x,
|
|
5095
|
+
y: u.targetEnemy.position.y - u.thrownEnemy.position.y
|
|
5081
5096
|
},
|
|
5082
5097
|
8
|
|
5083
|
-
),
|
|
5084
|
-
if (
|
|
5085
|
-
const { thrownEnemy: e, targetEnemy: t } =
|
|
5086
|
-
if (
|
|
5098
|
+
), u.onKill(), !0), lt = (u) => {
|
|
5099
|
+
if (u.killEnemy(u.targetEnemy, u.impactAngle, u.thrownEnemy.type), !rt(u)) return !1;
|
|
5100
|
+
const { thrownEnemy: e, targetEnemy: t } = u;
|
|
5101
|
+
if (u.juice.triggerHitstop(0.05), u.juice.triggerScreenShake(
|
|
5087
5102
|
{
|
|
5088
5103
|
x: t.position.x - e.position.x,
|
|
5089
5104
|
y: t.position.y - e.position.y
|
|
5090
5105
|
},
|
|
5091
5106
|
7
|
|
5092
|
-
), oe(
|
|
5107
|
+
), oe(u, t, 180, 0.45), Ee(u, t, 16), e.remainingHomingKills > 0) {
|
|
5093
5108
|
e.remainingHomingKills--;
|
|
5094
|
-
const i = se(e,
|
|
5109
|
+
const i = se(e, u.enemies, [t]);
|
|
5095
5110
|
if (i) {
|
|
5096
5111
|
const s = Math.atan2(
|
|
5097
5112
|
i.position.y - e.position.y,
|
|
@@ -5101,58 +5116,58 @@ const se = (h, e, t = []) => {
|
|
|
5101
5116
|
}
|
|
5102
5117
|
}
|
|
5103
5118
|
return !0;
|
|
5104
|
-
}, dt = (
|
|
5105
|
-
|
|
5106
|
-
const e =
|
|
5107
|
-
|
|
5119
|
+
}, dt = (u) => {
|
|
5120
|
+
u.enemy.triggerDissolveDeath(!0);
|
|
5121
|
+
const e = u.config.toxicPool;
|
|
5122
|
+
u.pools.push({
|
|
5108
5123
|
id: Math.random().toString(),
|
|
5109
|
-
position: { ...
|
|
5124
|
+
position: { ...u.enemy.position },
|
|
5110
5125
|
radius: e.baseRadius,
|
|
5111
5126
|
duration: 0,
|
|
5112
5127
|
maxDuration: e.baseDuration,
|
|
5113
5128
|
damage: e.damage,
|
|
5114
|
-
sourceType:
|
|
5129
|
+
sourceType: u.enemy.type
|
|
5115
5130
|
});
|
|
5116
|
-
}, ht = (
|
|
5117
|
-
|
|
5118
|
-
const e =
|
|
5131
|
+
}, ht = (u) => {
|
|
5132
|
+
u.enemy.triggerDissolveDeath(!0);
|
|
5133
|
+
const e = u.config.cluster, t = u.enemy.behavior.spawnedEnemyIds?.[0];
|
|
5119
5134
|
if (t)
|
|
5120
5135
|
for (let i = 0; i < e.fragmentCount; i++) {
|
|
5121
5136
|
const s = i * Math.PI * 2 / e.fragmentCount, o = {
|
|
5122
|
-
x:
|
|
5123
|
-
y:
|
|
5137
|
+
x: u.enemy.position.x + Math.cos(s) * 40,
|
|
5138
|
+
y: u.enemy.position.y + Math.sin(s) * 40
|
|
5124
5139
|
};
|
|
5125
5140
|
let n = s;
|
|
5126
5141
|
if (e.hasHoming) {
|
|
5127
|
-
const r = se(
|
|
5142
|
+
const r = se(u.enemy, u.enemies);
|
|
5128
5143
|
r && (n = Math.atan2(
|
|
5129
5144
|
r.position.y - o.y,
|
|
5130
5145
|
r.position.x - o.x
|
|
5131
5146
|
));
|
|
5132
5147
|
}
|
|
5133
|
-
const a =
|
|
5148
|
+
const a = u.factory.createEnemy(t, o, {
|
|
5134
5149
|
x: o.x + Math.cos(n) * 500,
|
|
5135
5150
|
y: o.y + Math.sin(n) * 500
|
|
5136
5151
|
});
|
|
5137
5152
|
a.isThrown = !0, a.wasManipulated = !0, a.velocity = {
|
|
5138
5153
|
x: Math.cos(n) * (750 + Math.random() * 250),
|
|
5139
5154
|
y: Math.sin(n) * (750 + Math.random() * 250)
|
|
5140
|
-
},
|
|
5155
|
+
}, u.enemies.push(a);
|
|
5141
5156
|
}
|
|
5142
|
-
}, ut = (
|
|
5143
|
-
|
|
5144
|
-
const e =
|
|
5145
|
-
|
|
5157
|
+
}, ut = (u) => {
|
|
5158
|
+
u.enemy.triggerDissolveDeath(!0);
|
|
5159
|
+
const e = u.config.gravityVortex;
|
|
5160
|
+
u.vortices.push({
|
|
5146
5161
|
id: Math.random().toString(),
|
|
5147
|
-
position: { ...
|
|
5162
|
+
position: { ...u.enemy.position },
|
|
5148
5163
|
radius: e.baseRadius,
|
|
5149
5164
|
duration: 0,
|
|
5150
5165
|
maxDuration: e.baseDuration,
|
|
5151
5166
|
pullForce: e.basePullForce
|
|
5152
5167
|
});
|
|
5153
|
-
}, pt = (
|
|
5154
|
-
|
|
5155
|
-
}, gt = (
|
|
5168
|
+
}, pt = (u) => {
|
|
5169
|
+
u.enemy.triggerSliceDeath(u.angle, !0);
|
|
5170
|
+
}, gt = (u, e) => e !== "toxic-pool" && e !== "gravity-vortex", mt = {
|
|
5156
5171
|
piercer: {
|
|
5157
5172
|
rendererId: "piercer",
|
|
5158
5173
|
rotatesWithVelocity: !0,
|
|
@@ -5164,14 +5179,14 @@ const se = (h, e, t = []) => {
|
|
|
5164
5179
|
onCollision: lt,
|
|
5165
5180
|
onChainReaction: pt,
|
|
5166
5181
|
canInteractWithHazard: gt,
|
|
5167
|
-
synergyKey: (
|
|
5182
|
+
synergyKey: (u) => u.color
|
|
5168
5183
|
},
|
|
5169
5184
|
spore: {
|
|
5170
5185
|
rendererId: "spore",
|
|
5171
5186
|
rotatesWithVelocity: !0,
|
|
5172
5187
|
canBeChainReactionTarget: !0,
|
|
5173
5188
|
onChainReaction: dt,
|
|
5174
|
-
synergyKey: (
|
|
5189
|
+
synergyKey: (u) => u.color
|
|
5175
5190
|
},
|
|
5176
5191
|
cluster: {
|
|
5177
5192
|
rendererId: "cluster",
|
|
@@ -5179,14 +5194,14 @@ const se = (h, e, t = []) => {
|
|
|
5179
5194
|
canBeChainReactionTarget: !0,
|
|
5180
5195
|
onChainReaction: ht,
|
|
5181
5196
|
spawnedEnemyIds: ["micro"],
|
|
5182
|
-
synergyKey: (
|
|
5197
|
+
synergyKey: (u) => u.color
|
|
5183
5198
|
},
|
|
5184
5199
|
parasite: {
|
|
5185
5200
|
rendererId: "parasite",
|
|
5186
5201
|
rotatesWithVelocity: !0,
|
|
5187
5202
|
canBeChainReactionTarget: !0,
|
|
5188
5203
|
onChainReaction: ut,
|
|
5189
|
-
synergyKey: (
|
|
5204
|
+
synergyKey: (u) => u.color
|
|
5190
5205
|
},
|
|
5191
5206
|
heavy: {
|
|
5192
5207
|
rendererId: "heavy",
|
|
@@ -5195,16 +5210,16 @@ const se = (h, e, t = []) => {
|
|
|
5195
5210
|
onRelease: it,
|
|
5196
5211
|
onOutOfBounds: nt,
|
|
5197
5212
|
onCollision: ct,
|
|
5198
|
-
synergyKey: (
|
|
5213
|
+
synergyKey: (u) => u.color
|
|
5199
5214
|
},
|
|
5200
5215
|
micro: {
|
|
5201
5216
|
rendererId: "circle",
|
|
5202
5217
|
rotatesWithVelocity: !0,
|
|
5203
5218
|
canBeChainReactionTarget: !1,
|
|
5204
5219
|
autoDeflectFromCore: !0,
|
|
5205
|
-
synergyKey: (
|
|
5220
|
+
synergyKey: (u) => u.color
|
|
5206
5221
|
}
|
|
5207
|
-
}, U = (
|
|
5222
|
+
}, U = (u) => mt[u] ?? {
|
|
5208
5223
|
rendererId: "circle",
|
|
5209
5224
|
rotatesWithVelocity: !0,
|
|
5210
5225
|
canBeChainReactionTarget: !0,
|
|
@@ -5353,13 +5368,13 @@ class B {
|
|
|
5353
5368
|
if (!o.active || o.isAbsorbing || o.isMerging) continue;
|
|
5354
5369
|
const n = Math.floor(o.position.x / i), a = Math.floor(o.position.y / i);
|
|
5355
5370
|
for (let r = -1; r <= 1; r++)
|
|
5356
|
-
for (let
|
|
5357
|
-
const
|
|
5358
|
-
if (
|
|
5359
|
-
for (const d of
|
|
5371
|
+
for (let l = -1; l <= 1; l++) {
|
|
5372
|
+
const c = s.get(`${n + r}:${a + l}`);
|
|
5373
|
+
if (c)
|
|
5374
|
+
for (const d of c) {
|
|
5360
5375
|
if (d === o || !d.active || d.isAbsorbing || d.isMerging)
|
|
5361
5376
|
continue;
|
|
5362
|
-
const
|
|
5377
|
+
const h = d.position.x - o.position.x, p = d.position.y - o.position.y, g = Math.hypot(h, p), y = Math.min(
|
|
5363
5378
|
12,
|
|
5364
5379
|
Math.max(
|
|
5365
5380
|
0,
|
|
@@ -5378,17 +5393,17 @@ class B {
|
|
|
5378
5393
|
const o = s, n = /* @__PURE__ */ new Map();
|
|
5379
5394
|
for (const a of e) {
|
|
5380
5395
|
if (!a.active || a.isAbsorbing || a.isMerging) continue;
|
|
5381
|
-
const r = B.getCellKey(a.position, o),
|
|
5382
|
-
|
|
5396
|
+
const r = B.getCellKey(a.position, o), l = n.get(r);
|
|
5397
|
+
l ? l.push(a) : n.set(r, [a]);
|
|
5383
5398
|
}
|
|
5384
5399
|
for (const a of e) {
|
|
5385
5400
|
if (!a.active || a.isAbsorbing || a.isMerging) continue;
|
|
5386
|
-
const r = Math.floor(a.position.x / o),
|
|
5387
|
-
for (let
|
|
5401
|
+
const r = Math.floor(a.position.x / o), l = Math.floor(a.position.y / o);
|
|
5402
|
+
for (let c = -1; c <= 1; c++)
|
|
5388
5403
|
for (let d = -1; d <= 1; d++) {
|
|
5389
|
-
const
|
|
5390
|
-
if (
|
|
5391
|
-
for (const p of
|
|
5404
|
+
const h = n.get(`${r + c}:${l + d}`);
|
|
5405
|
+
if (h)
|
|
5406
|
+
for (const p of h) {
|
|
5392
5407
|
if (p === a || !p.active || p.isAbsorbing || p.isMerging || p.id <= a.id)
|
|
5393
5408
|
continue;
|
|
5394
5409
|
const g = p.position.x - a.position.x, y = p.position.y - a.position.y, m = Math.hypot(g, y);
|
|
@@ -5965,13 +5980,13 @@ const St = [
|
|
|
5965
5980
|
<path d="M24 11c4.5 0 8.1 2.9 8.5 6.5.5 4.1-3 8.3-7.4 9.1-4.6.8-8.8-2.3-9.2-6.6-.4-4.1 3.4-8.6 8.1-9Z" stroke="currentColor" stroke-width="1.7" opacity=".82"/>
|
|
5966
5981
|
<path d="M24 17c2.1-.1 3.8 1.2 3.8 2.9 0 1.9-1.8 3.3-3.8 3.2-2.1-.1-3.6-1.6-3.4-3.3.2-1.6 1.5-2.7 3.4-2.8Z" fill="currentColor"/>
|
|
5967
5982
|
<path d="M14 11 8 6M12 20 4 20M16 30 11 37M31 11l6-6M34 21l9 1M30 31l4 8" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>
|
|
5968
|
-
`,
|
|
5983
|
+
`, Mt = () => `
|
|
5969
5984
|
<path d="M15 8c4.3-2.7 10.1-1.5 12.5 2.5 2.1 3.5 1 6.5 4.7 9.1 4.5 3.1 3.8 9.1-.4 12.2-4.3 3.2-8.3.7-12.4 2.8-4.4 2.2-9.9-.3-11.1-5.2-1.1-4.5 2.1-6.6 1.2-10.5-.9-4.1 1.6-8.8 5.5-10.9Z" fill="currentColor" opacity=".18"/>
|
|
5970
5985
|
<path d="M15 8c4.3-2.7 10.1-1.5 12.5 2.5 2.1 3.5 1 6.5 4.7 9.1 4.5 3.1 3.8 9.1-.4 12.2-4.3 3.2-8.3.7-12.4 2.8-4.4 2.2-9.9-.3-11.1-5.2-1.1-4.5 2.1-6.6 1.2-10.5-.9-4.1 1.6-8.8 5.5-10.9Z" stroke="currentColor" stroke-width="2.4" stroke-linejoin="round"/>
|
|
5971
5986
|
<path d="M18 13c3.2 1.7 4.2 4.3 2.8 7.1-1.3 2.7.3 4.9 3.2 6.5M27 12c-1 2.7-1 4.8 1.1 6.5 1.9 1.5 2.3 3.6 1.3 6.1" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
|
5972
5987
|
<circle cx="16" cy="14" r="2.6" fill="currentColor"/>
|
|
5973
5988
|
<circle cx="24" cy="29" r="2.1" fill="currentColor"/>
|
|
5974
|
-
`,
|
|
5989
|
+
`, _t = () => `
|
|
5975
5990
|
<path d="M24 5c4.8-.2 8.8 3.4 9 7.8.2 3.2-1.7 5.2-.8 8.5 1.2 4.5-1.8 9.8-6.8 10.8-4.3.8-6.8-2-10.7-1.2-4.7 1-8.9-2.7-8.4-7.2.4-3.7 3.3-5.1 3.1-8.9-.2-4.8 3.9-9.6 9-9.8 2.1-.1 3.8.1 5.6 0Z" fill="currentColor" opacity=".1"/>
|
|
5976
5991
|
<path d="M24 5c4.8-.2 8.8 3.4 9 7.8.2 3.2-1.7 5.2-.8 8.5 1.2 4.5-1.8 9.8-6.8 10.8-4.3.8-6.8-2-10.7-1.2-4.7 1-8.9-2.7-8.4-7.2.4-3.7 3.3-5.1 3.1-8.9-.2-4.8 3.9-9.6 9-9.8 2.1-.1 3.8.1 5.6 0Z" stroke="currentColor" stroke-width="1.9" stroke-linejoin="round"/>
|
|
5977
5992
|
<path d="M24 12c3.6-.3 6.2 2.1 5.6 5.1-.4 2.1-2.3 3.2-2.4 5.4-.1 2.7-2.3 4.3-4.7 3.8-2.4-.5-3.3-2.7-2.4-4.7.7-1.7-.7-3-1.1-4.8-.6-2.6 1.9-4.6 5-4.8Z" fill="currentColor" opacity=".26" stroke="currentColor" stroke-width="1.7"/>
|
|
@@ -6006,8 +6021,8 @@ const St = [
|
|
|
6006
6021
|
<path d="M14 14c5 2.4 5.6 6.1 2.5 9.4M25 14c-3.5 2.2-3.8 5.2-1.4 8.2M14 29c2.8-1.8 5-1.8 8 .1" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/>
|
|
6007
6022
|
`, Rt = {
|
|
6008
6023
|
"core-nucleus": vt,
|
|
6009
|
-
"unlock-form":
|
|
6010
|
-
"powerup-organ":
|
|
6024
|
+
"unlock-form": Mt,
|
|
6025
|
+
"powerup-organ": _t,
|
|
6011
6026
|
"passive-membrane": It,
|
|
6012
6027
|
"synergy-synapse": Tt,
|
|
6013
6028
|
"area-biome": bt,
|
|
@@ -6019,8 +6034,8 @@ const St = [
|
|
|
6019
6034
|
<path d="M21 25c0-1.2.9-2.1 2-2.1s2 .9 2 2.1c0 .7-.3 1.3-.8 1.7v2.1h-2.4v-2.1c-.5-.4-.8-1-.8-1.7Z" fill="currentColor"/>
|
|
6020
6035
|
<path d="M11 23c-2 1.8-3.2 3.9-3.5 6.5M32 12c2.5.2 4.6 1.4 6 3.4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" opacity=".7"/>
|
|
6021
6036
|
`;
|
|
6022
|
-
function ye(
|
|
6023
|
-
const i = t === "locked" ? Ot : Rt[
|
|
6037
|
+
function ye(u, e, t) {
|
|
6038
|
+
const i = t === "locked" ? Ot : Rt[u];
|
|
6024
6039
|
return `<svg viewBox="0 0 48 48" fill="none" aria-hidden="true" data-genetic-kind="${e}">${i()}</svg>`;
|
|
6025
6040
|
}
|
|
6026
6041
|
class Lt {
|
|
@@ -6072,14 +6087,14 @@ class Pt {
|
|
|
6072
6087
|
return e && t && i && s ? { nodeLayer: e, links: t, map: i, mapContent: s } : null;
|
|
6073
6088
|
}
|
|
6074
6089
|
getGeometry(e, t) {
|
|
6075
|
-
const i = e.map((y) => y.position.x), s = e.map((y) => y.position.y), o = Math.min(...i), n = Math.max(...i), a = Math.min(...s), r = Math.max(...s),
|
|
6090
|
+
const i = e.map((y) => y.position.x), s = e.map((y) => y.position.y), o = Math.min(...i), n = Math.max(...i), a = Math.min(...s), r = Math.max(...s), l = 110, c = Math.max(0, n - o) * J, d = Math.max(0, r - a) * J, h = Math.max(t.clientWidth, c + l * 2), p = Math.max(t.clientHeight, d + l * 2), g = this.getPositions(e, {
|
|
6076
6091
|
minX: o,
|
|
6077
6092
|
minY: a,
|
|
6078
|
-
contentWidth:
|
|
6093
|
+
contentWidth: h,
|
|
6079
6094
|
contentHeight: p,
|
|
6080
6095
|
worldScale: J
|
|
6081
6096
|
});
|
|
6082
|
-
return { contentWidth:
|
|
6097
|
+
return { contentWidth: h, contentHeight: p, positions: g };
|
|
6083
6098
|
}
|
|
6084
6099
|
getPositions(e, t) {
|
|
6085
6100
|
const i = Math.max(...e.map((a) => a.position.x)) - t.minX, s = Math.max(...e.map((a) => a.position.y)) - t.minY, o = (t.contentWidth - i * t.worldScale) / 2, n = (t.contentHeight - s * t.worldScale) / 2;
|
|
@@ -6095,19 +6110,19 @@ class Pt {
|
|
|
6095
6110
|
}
|
|
6096
6111
|
focusMap(e, t, i) {
|
|
6097
6112
|
if (!i) return;
|
|
6098
|
-
const s = this.memory.getLastAcquiredNodeId(), o = s ? t.positions.get(s) : void 0, n = o ? o.x / 100 * t.contentWidth : t.contentWidth / 2, a = o ? o.y / 100 * t.contentHeight : t.contentHeight / 2, r = Math.max(0, t.contentWidth - e.clientWidth),
|
|
6099
|
-
e.scrollLeft = Math.min(r, Math.max(0, n - e.clientWidth / 2)), e.scrollTop = Math.min(
|
|
6113
|
+
const s = this.memory.getLastAcquiredNodeId(), o = s ? t.positions.get(s) : void 0, n = o ? o.x / 100 * t.contentWidth : t.contentWidth / 2, a = o ? o.y / 100 * t.contentHeight : t.contentHeight / 2, r = Math.max(0, t.contentWidth - e.clientWidth), l = Math.max(0, t.contentHeight - e.clientHeight);
|
|
6114
|
+
e.scrollLeft = Math.min(r, Math.max(0, n - e.clientWidth / 2)), e.scrollTop = Math.min(l, Math.max(0, a - e.clientHeight / 2));
|
|
6100
6115
|
}
|
|
6101
6116
|
renderLinks(e, t, i) {
|
|
6102
6117
|
for (const s of e)
|
|
6103
6118
|
for (const o of s.prerequisites) {
|
|
6104
6119
|
const n = e.find((d) => d.id === o), a = n ? i.get(n.id) : void 0, r = i.get(s.id);
|
|
6105
6120
|
if (!a || !r) continue;
|
|
6106
|
-
const
|
|
6107
|
-
|
|
6121
|
+
const l = document.createElementNS("http://www.w3.org/2000/svg", "path"), c = Math.max(4, Math.min(16, Math.abs(r.x - a.x) * 0.3 + 4));
|
|
6122
|
+
l.setAttribute(
|
|
6108
6123
|
"d",
|
|
6109
|
-
`M ${a.x} ${a.y} C ${a.x +
|
|
6110
|
-
),
|
|
6124
|
+
`M ${a.x} ${a.y} C ${a.x + c} ${a.y + (r.y - a.y) * 0.38}, ${r.x - c} ${a.y + (r.y - a.y) * 0.68}, ${r.x} ${r.y}`
|
|
6125
|
+
), l.classList.add("axon-genetic-link"), l.setAttribute("data-state", s.state), l.setAttribute("data-accent", s.accent ?? "fallback"), t.appendChild(l);
|
|
6111
6126
|
}
|
|
6112
6127
|
}
|
|
6113
6128
|
renderNodes(e, t, i) {
|
|
@@ -6246,9 +6261,9 @@ class Dt {
|
|
|
6246
6261
|
}
|
|
6247
6262
|
}
|
|
6248
6263
|
const Nt = {
|
|
6249
|
-
"toxic-radius": (
|
|
6250
|
-
const e =
|
|
6251
|
-
|
|
6264
|
+
"toxic-radius": (u) => {
|
|
6265
|
+
const e = u.getConfig().toxicPool;
|
|
6266
|
+
u.updateConfig({
|
|
6252
6267
|
toxicPool: {
|
|
6253
6268
|
...e,
|
|
6254
6269
|
baseRadius: Math.round(e.baseRadius * 1.12),
|
|
@@ -6256,9 +6271,9 @@ const Nt = {
|
|
|
6256
6271
|
}
|
|
6257
6272
|
});
|
|
6258
6273
|
},
|
|
6259
|
-
"gravity-radius": (
|
|
6260
|
-
const e =
|
|
6261
|
-
|
|
6274
|
+
"gravity-radius": (u) => {
|
|
6275
|
+
const e = u.getConfig().gravityVortex;
|
|
6276
|
+
u.updateConfig({
|
|
6262
6277
|
gravityVortex: {
|
|
6263
6278
|
...e,
|
|
6264
6279
|
baseRadius: Math.round(e.baseRadius * 1.12),
|
|
@@ -6266,21 +6281,21 @@ const Nt = {
|
|
|
6266
6281
|
}
|
|
6267
6282
|
});
|
|
6268
6283
|
},
|
|
6269
|
-
"shield-arc": (
|
|
6270
|
-
const e =
|
|
6271
|
-
|
|
6284
|
+
"shield-arc": (u) => {
|
|
6285
|
+
const e = u.getConfig().shield;
|
|
6286
|
+
u.updateConfig({
|
|
6272
6287
|
shield: {
|
|
6273
6288
|
...e,
|
|
6274
6289
|
protectionArc: Math.min(Math.PI * 1.5, e.protectionArc + Math.PI / 6)
|
|
6275
6290
|
}
|
|
6276
6291
|
});
|
|
6277
6292
|
},
|
|
6278
|
-
"core-life-ring": (
|
|
6279
|
-
|
|
6293
|
+
"core-life-ring": (u) => {
|
|
6294
|
+
u.addCoreRing(1);
|
|
6280
6295
|
}
|
|
6281
6296
|
};
|
|
6282
|
-
function wt(
|
|
6283
|
-
for (const t of
|
|
6297
|
+
function wt(u, e) {
|
|
6298
|
+
for (const t of u.getActivePassiveEffectIds())
|
|
6284
6299
|
Nt[t](e);
|
|
6285
6300
|
}
|
|
6286
6301
|
class ue {
|
|
@@ -6516,10 +6531,10 @@ class L {
|
|
|
6516
6531
|
}
|
|
6517
6532
|
}
|
|
6518
6533
|
}
|
|
6519
|
-
const Q = [10, 50, 150, 400, 1e3, 2500], ee = (
|
|
6520
|
-
id: `piercer-${
|
|
6534
|
+
const Q = [10, 50, 150, 400, 1e3, 2500], ee = (u, e) => e.map((t, i) => ({
|
|
6535
|
+
id: `piercer-${u}-${i + 1}`,
|
|
6521
6536
|
textKey: t,
|
|
6522
|
-
track:
|
|
6537
|
+
track: u,
|
|
6523
6538
|
milestone: i + 1
|
|
6524
6539
|
})), kt = [
|
|
6525
6540
|
{ id: "piercer-intro", textKey: "codexPiercerEntryIntro" },
|
|
@@ -6547,18 +6562,18 @@ const Q = [10, 50, 150, 400, 1e3, 2500], ee = (h, e) => e.map((t, i) => ({
|
|
|
6547
6562
|
"codexPiercerEntryCaused5",
|
|
6548
6563
|
"codexPiercerEntryCaused6"
|
|
6549
6564
|
])
|
|
6550
|
-
], V = (
|
|
6551
|
-
id:
|
|
6565
|
+
], V = (u, e) => ({
|
|
6566
|
+
id: u,
|
|
6552
6567
|
titleKey: e,
|
|
6553
6568
|
loreKey: "codexPendingLore",
|
|
6554
|
-
...
|
|
6569
|
+
...u === "piercer" ? { loreEntries: kt } : {},
|
|
6555
6570
|
milestones: {
|
|
6556
6571
|
controlled: Q,
|
|
6557
6572
|
defeated: Q,
|
|
6558
6573
|
caused: Q
|
|
6559
6574
|
},
|
|
6560
6575
|
requiredFormIds: [],
|
|
6561
|
-
requiredVariantIds: Array.from({ length: 6 }, (t, i) => `${
|
|
6576
|
+
requiredVariantIds: Array.from({ length: 6 }, (t, i) => `${u}-variant-${i + 1}`)
|
|
6562
6577
|
}), Ut = [
|
|
6563
6578
|
V("piercer", "codexPiercerTitle"),
|
|
6564
6579
|
V("spore", "codexSporeTitle"),
|
|
@@ -6603,8 +6618,8 @@ class Ht {
|
|
|
6603
6618
|
if (!t || !i) return;
|
|
6604
6619
|
const s = this.themeManager.getPalette(), o = this.canvas.width, n = this.canvas.height, a = o / 2, r = n / 2;
|
|
6605
6620
|
t.clearRect(0, 0, o, n), this.drawField(t, o, n, s, e), t.save(), t.translate(a, r), this.drawDissectionRings(t, s, e), this.drawViewLayer(t, s);
|
|
6606
|
-
const
|
|
6607
|
-
t.scale(
|
|
6621
|
+
const l = Math.min(o, n) / Math.max(180, i.radius * 5.2);
|
|
6622
|
+
t.scale(l, l), t.globalAlpha = 0.98, this.shapeRenderer.draw(t, i, e, s, i.color), t.restore(), this.drawScanLine(t, o, n, s, e);
|
|
6608
6623
|
}
|
|
6609
6624
|
drawField(e, t, i, s, o) {
|
|
6610
6625
|
const n = e.createRadialGradient(
|
|
@@ -7128,7 +7143,8 @@ class Vt {
|
|
|
7128
7143
|
() => {
|
|
7129
7144
|
this.startMenu.hide(), this.codexOverlay.show();
|
|
7130
7145
|
},
|
|
7131
|
-
() => this.codex.hasUnread()
|
|
7146
|
+
() => this.codex.hasUnread(),
|
|
7147
|
+
this.geneticMemory
|
|
7132
7148
|
), this.unsubscribeCodex = this.codex.subscribe((i) => {
|
|
7133
7149
|
this.startMenu.renderContent(), i.length > 0 && this.codexToast.show();
|
|
7134
7150
|
}), this.initAmbientArena(), this.gameLoop = new Ae(
|
|
@@ -7265,20 +7281,20 @@ class Vt {
|
|
|
7265
7281
|
!this.inputManager.isPointerDown && s && (s.isGrabbed = !1, this.inputManager.grabbedOrb = null);
|
|
7266
7282
|
const o = this.inputManager.pointerPosition;
|
|
7267
7283
|
if (this.inputManager.isPointerDown && !this.inputManager.grabbedOrb && this.rerollsRemaining > 0) {
|
|
7268
|
-
const n = this.canvas.width / 2, a = this.canvas.height / 2 +
|
|
7284
|
+
const n = this.canvas.width / 2, a = this.canvas.height / 2 + 300;
|
|
7269
7285
|
Math.hypot(o.x - n, o.y - a) <= 80 && (this.triggerReroll(), this.inputManager.isPointerDown = !1);
|
|
7270
7286
|
}
|
|
7271
7287
|
for (const n of this.orbitingOrbs) {
|
|
7272
7288
|
const a = o.x - n.position.x, r = o.y - n.position.y;
|
|
7273
7289
|
if (n.isHovered = Math.hypot(a, r) <= n.radius * 1.5, n === s && this.inputManager.isPointerDown) {
|
|
7274
7290
|
n.position = { ...this.inputManager.pointerPosition };
|
|
7275
|
-
const
|
|
7276
|
-
if (Math.hypot(
|
|
7277
|
-
n.definition.apply(this.core), this.core.absorbPowerUpColor(n.definition.color, 0.4), this.juice.triggerFlash(0.8), this.juice.triggerScreenShake({ x:
|
|
7278
|
-
const
|
|
7291
|
+
const l = this.core.position.x - n.position.x, c = this.core.position.y - n.position.y;
|
|
7292
|
+
if (Math.hypot(l, c) <= this.core.radius + n.radius) {
|
|
7293
|
+
n.definition.apply(this.core), this.core.absorbPowerUpColor(n.definition.color, 0.4), this.juice.triggerFlash(0.8), this.juice.triggerScreenShake({ x: l, y: c }, 24);
|
|
7294
|
+
const h = this.i18n.translate(n.definition.titleKey);
|
|
7279
7295
|
this.floatingTexts.push({
|
|
7280
7296
|
id: Math.random().toString(),
|
|
7281
|
-
text: `+ ${
|
|
7297
|
+
text: `+ ${h}`,
|
|
7282
7298
|
position: { ...this.core.position },
|
|
7283
7299
|
velocity: { x: 0, y: -80 },
|
|
7284
7300
|
color: n.definition.color,
|
|
@@ -7514,8 +7530,8 @@ class Vt {
|
|
|
7514
7530
|
this.gameLoop.stop(), this.performanceAudit.destroy(), this.geneticMemoryOverlay.destroy(), this.unsubscribeCodex?.(), this.codexOverlay.destroy(), this.codexToast.destroy(), window.removeEventListener("keydown", this.handleLanguageHold), window.removeEventListener("keyup", this.handleLanguageRelease), this.canvas.remove();
|
|
7515
7531
|
}
|
|
7516
7532
|
}
|
|
7517
|
-
function Ft(
|
|
7518
|
-
return new Vt(
|
|
7533
|
+
function Ft(u) {
|
|
7534
|
+
return new Vt(u);
|
|
7519
7535
|
}
|
|
7520
7536
|
export {
|
|
7521
7537
|
Ze as BrowserPlatform,
|