@gamebob/axon-surge 0.25.0 → 0.26.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 +529 -523
- package/dist/render/CanvasRenderer.d.ts +1 -0
- package/dist/render/CanvasRenderer.d.ts.map +1 -1
- package/dist/styles.css +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;
|
|
@@ -1959,7 +1965,7 @@ class Ke {
|
|
|
1959
1965
|
this.container.innerHTML = `
|
|
1960
1966
|
<div class="axon-title-halo">
|
|
1961
1967
|
<h1 class="axon-title">${this.i18n.translate("title")}</h1>
|
|
1962
|
-
<p class="axon-version-mark">v0.
|
|
1968
|
+
<p class="axon-version-mark">v0.26.0</p>
|
|
1963
1969
|
<button id="axon-start-btn" class="axon-start-button">${this.i18n.translate("startButton")}</button>
|
|
1964
1970
|
<div class="axon-home-secondary-actions">
|
|
1965
1971
|
<button id="axon-genetic-memory-btn" class="axon-home-secondary-button">
|
|
@@ -3739,8 +3745,8 @@ const W = {
|
|
|
3739
3745
|
"ko",
|
|
3740
3746
|
"zh"
|
|
3741
3747
|
];
|
|
3742
|
-
function $(
|
|
3743
|
-
return xe.includes(
|
|
3748
|
+
function $(u) {
|
|
3749
|
+
return xe.includes(u);
|
|
3744
3750
|
}
|
|
3745
3751
|
class Ve {
|
|
3746
3752
|
modal;
|
|
@@ -3757,8 +3763,8 @@ class Ve {
|
|
|
3757
3763
|
this.i18n = t, this.themeManager = i, this.platform = s, this.onLanguageChangedCallback = o, this.onCloseCallback = n, this.onFpsLimitChangedCallback = a;
|
|
3758
3764
|
const r = localStorage.getItem("axon_surge_haptics");
|
|
3759
3765
|
r !== null && (this.hapticsEnabled = r === "true");
|
|
3760
|
-
const
|
|
3761
|
-
(
|
|
3766
|
+
const l = Number(localStorage.getItem("axon_surge_fps_limit"));
|
|
3767
|
+
(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
3768
|
this.onCloseCallback && this.onCloseCallback();
|
|
3763
3769
|
}), this.renderContent();
|
|
3764
3770
|
}
|
|
@@ -3803,10 +3809,10 @@ class Ve {
|
|
|
3803
3809
|
a.className = "axon-select-arrow", a.textContent = "▼", s.appendChild(o), s.appendChild(a), t.appendChild(i), t.appendChild(s);
|
|
3804
3810
|
const r = document.createElement("div");
|
|
3805
3811
|
r.className = "axon-setting-row";
|
|
3806
|
-
const
|
|
3807
|
-
|
|
3808
|
-
const
|
|
3809
|
-
|
|
3812
|
+
const l = document.createElement("span");
|
|
3813
|
+
l.textContent = this.i18n.translate("themeLabel");
|
|
3814
|
+
const c = document.createElement("div");
|
|
3815
|
+
c.className = "axon-toggle-group";
|
|
3810
3816
|
const d = [
|
|
3811
3817
|
{ id: "bioluminescent", label: "BIO" },
|
|
3812
3818
|
{ id: "dark", label: "DARK" }
|
|
@@ -3815,11 +3821,11 @@ class Ve {
|
|
|
3815
3821
|
const b = document.createElement("button");
|
|
3816
3822
|
b.type = "button", b.className = `axon-toggle-btn ${this.themeManager.getTheme() === T.id ? "is-active" : ""}`, b.textContent = T.label, b.addEventListener("click", () => {
|
|
3817
3823
|
this.themeManager.setTheme(T.id), this.renderContent();
|
|
3818
|
-
}),
|
|
3824
|
+
}), c.appendChild(b);
|
|
3819
3825
|
}
|
|
3820
|
-
r.appendChild(
|
|
3821
|
-
const
|
|
3822
|
-
|
|
3826
|
+
r.appendChild(l), r.appendChild(c);
|
|
3827
|
+
const h = document.createElement("div");
|
|
3828
|
+
h.className = "axon-setting-row";
|
|
3823
3829
|
const p = document.createElement("span");
|
|
3824
3830
|
p.textContent = this.i18n.translate("fpsLimitLabel");
|
|
3825
3831
|
const g = document.createElement("div");
|
|
@@ -3835,13 +3841,13 @@ class Ve {
|
|
|
3835
3841
|
this.fpsLimit = T.limit, localStorage.setItem("axon_surge_fps_limit", String(T.limit)), this.onFpsLimitChangedCallback?.(T.limit), this.renderContent();
|
|
3836
3842
|
}), g.appendChild(b);
|
|
3837
3843
|
}
|
|
3838
|
-
|
|
3844
|
+
h.appendChild(p), h.appendChild(g);
|
|
3839
3845
|
const m = document.createElement("div");
|
|
3840
3846
|
m.className = "axon-setting-row";
|
|
3841
3847
|
const E = document.createElement("span");
|
|
3842
3848
|
E.textContent = this.i18n.translate("hapticsLabel");
|
|
3843
|
-
const
|
|
3844
|
-
|
|
3849
|
+
const v = document.createElement("div");
|
|
3850
|
+
v.className = "axon-toggle-group";
|
|
3845
3851
|
const A = [
|
|
3846
3852
|
{ enabled: !0, label: this.i18n.translate("hapticsOn") },
|
|
3847
3853
|
{ enabled: !1, label: this.i18n.translate("hapticsOff") }
|
|
@@ -3850,32 +3856,32 @@ class Ve {
|
|
|
3850
3856
|
const b = document.createElement("button");
|
|
3851
3857
|
b.type = "button", b.className = `axon-toggle-btn ${this.hapticsEnabled === T.enabled ? "is-active" : ""}`, b.textContent = T.label, b.addEventListener("click", () => {
|
|
3852
3858
|
this.hapticsEnabled = T.enabled, localStorage.setItem("axon_surge_haptics", String(T.enabled)), this.hapticsEnabled && this.platform.haptics.selectionChanged(), this.renderContent();
|
|
3853
|
-
}),
|
|
3859
|
+
}), v.appendChild(b);
|
|
3854
3860
|
}
|
|
3855
|
-
m.appendChild(E), m.appendChild(
|
|
3861
|
+
m.appendChild(E), m.appendChild(v);
|
|
3856
3862
|
const x = document.createElement("div");
|
|
3857
3863
|
x.className = "axon-setting-row";
|
|
3858
3864
|
const f = document.createElement("span");
|
|
3859
3865
|
f.textContent = this.i18n.translate("tutorialSettingLabel");
|
|
3860
|
-
const
|
|
3861
|
-
|
|
3862
|
-
const
|
|
3866
|
+
const M = document.createElement("div");
|
|
3867
|
+
M.className = "axon-toggle-group";
|
|
3868
|
+
const _ = localStorage.getItem("axon_surge_show_tutorial") !== "false", I = [
|
|
3863
3869
|
{ enabled: !0, label: this.i18n.translate("hapticsOn") },
|
|
3864
3870
|
{ enabled: !1, label: this.i18n.translate("hapticsOff") }
|
|
3865
3871
|
];
|
|
3866
3872
|
for (const T of I) {
|
|
3867
3873
|
const b = document.createElement("button");
|
|
3868
|
-
b.type = "button", b.className = `axon-toggle-btn ${
|
|
3874
|
+
b.type = "button", b.className = `axon-toggle-btn ${_ === T.enabled ? "is-active" : ""}`, b.textContent = T.label, b.addEventListener("click", () => {
|
|
3869
3875
|
localStorage.setItem("axon_surge_show_tutorial", String(T.enabled)), this.renderContent();
|
|
3870
|
-
}),
|
|
3876
|
+
}), M.appendChild(b);
|
|
3871
3877
|
}
|
|
3872
|
-
x.appendChild(f), x.appendChild(
|
|
3878
|
+
x.appendChild(f), x.appendChild(M);
|
|
3873
3879
|
const C = document.createElement("div");
|
|
3874
3880
|
C.className = "axon-settings-credits", C.textContent = this.i18n.translate("creditsJam");
|
|
3875
3881
|
const R = document.createElement("button");
|
|
3876
3882
|
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
3883
|
this.modal.close();
|
|
3878
|
-
}), this.card.appendChild(e), this.card.appendChild(t), this.card.appendChild(r), this.card.appendChild(
|
|
3884
|
+
}), 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
3885
|
}
|
|
3880
3886
|
isHapticsEnabled() {
|
|
3881
3887
|
return this.hapticsEnabled;
|
|
@@ -3942,7 +3948,7 @@ class Fe {
|
|
|
3942
3948
|
if (!this.isActive || !this.dummyLauncher || !this.dummyTarget) return;
|
|
3943
3949
|
const a = this.dummyLauncher, r = this.dummyTarget;
|
|
3944
3950
|
t.includes(a) || t.push(a), t.includes(r) || t.push(r);
|
|
3945
|
-
const
|
|
3951
|
+
const l = r.position.x - a.position.x, c = r.position.y - a.position.y, d = Math.hypot(l, c);
|
|
3946
3952
|
if (a.isGrabbed) {
|
|
3947
3953
|
if (this.showWarning = !1, d <= a.radius + r.radius + 60) {
|
|
3948
3954
|
n && n(), a.isGrabbed = !1, this.showWarning = !0, this.resetDummies(a, r);
|
|
@@ -3951,8 +3957,8 @@ class Fe {
|
|
|
3951
3957
|
return;
|
|
3952
3958
|
}
|
|
3953
3959
|
if (a.wasManipulated) {
|
|
3954
|
-
const
|
|
3955
|
-
if (!a.isThrown ||
|
|
3960
|
+
const h = Math.hypot(a.velocity.x, a.velocity.y);
|
|
3961
|
+
if (!a.isThrown || h < 70) {
|
|
3956
3962
|
n && n(), this.showWarning = !0, this.resetDummies(a, r);
|
|
3957
3963
|
return;
|
|
3958
3964
|
}
|
|
@@ -3960,7 +3966,7 @@ class Fe {
|
|
|
3960
3966
|
a.triggerDissolveDeath(!0), r.triggerDissolveDeath(!0), this.showWarning = !1, this.isActive = !1, o();
|
|
3961
3967
|
return;
|
|
3962
3968
|
}
|
|
3963
|
-
(a.position.x < -60 || a.position.x > i + 60 || a.position.y < -60 || a.position.y > s + 60 ||
|
|
3969
|
+
(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
3970
|
}
|
|
3965
3971
|
}
|
|
3966
3972
|
resetDummies(e, t) {
|
|
@@ -4582,12 +4588,12 @@ class Ye {
|
|
|
4582
4588
|
(n) => (!n.requiredUnlockId || t?.isUnlocked(n.requiredUnlockId) === !0) && (n.isAvailable?.({ config: i }) ?? !0)
|
|
4583
4589
|
), o = [];
|
|
4584
4590
|
for (let n = 0; n < e && s.length > 0; n++) {
|
|
4585
|
-
const a = s.reduce((
|
|
4591
|
+
const a = s.reduce((l, c) => l + c.rarityWeight, 0);
|
|
4586
4592
|
let r = Math.random() * a;
|
|
4587
|
-
for (let
|
|
4588
|
-
const
|
|
4589
|
-
if (r -=
|
|
4590
|
-
o.push(
|
|
4593
|
+
for (let l = 0; l < s.length; l++) {
|
|
4594
|
+
const c = s[l];
|
|
4595
|
+
if (r -= c.rarityWeight, r <= 0) {
|
|
4596
|
+
o.push(c), s.splice(l, 1);
|
|
4591
4597
|
break;
|
|
4592
4598
|
}
|
|
4593
4599
|
}
|
|
@@ -4751,8 +4757,8 @@ class Je {
|
|
|
4751
4757
|
execute(e) {
|
|
4752
4758
|
const { thrownEnemy: t, targetEnemy: i, allEnemies: s, shockwaves: o, particles: n, floatingTexts: a } = e, r = i.position;
|
|
4753
4759
|
t.experienceDropPending = !0, i.experienceDropPending = !0, t.active = !1, i.active = !1;
|
|
4754
|
-
const
|
|
4755
|
-
o.length <
|
|
4760
|
+
const l = e.config, c = l.cluster.fragmentCount, d = l.cluster.hasHoming;
|
|
4761
|
+
o.length < l.cluster.maxExplosionShockwaves && o.push({
|
|
4756
4762
|
id: Math.random().toString(),
|
|
4757
4763
|
position: { ...r },
|
|
4758
4764
|
radius: 15,
|
|
@@ -4762,31 +4768,31 @@ class Je {
|
|
|
4762
4768
|
lifetime: 0,
|
|
4763
4769
|
maxLifetime: 0.6
|
|
4764
4770
|
});
|
|
4765
|
-
for (let p = 0; p <
|
|
4766
|
-
const g = p * Math.PI * 2 /
|
|
4771
|
+
for (let p = 0; p < c; p++) {
|
|
4772
|
+
const g = p * Math.PI * 2 / c, y = 800 + Math.random() * 300, m = {
|
|
4767
4773
|
x: r.x + Math.cos(g) * 45,
|
|
4768
4774
|
y: r.y + Math.sin(g) * 45
|
|
4769
4775
|
};
|
|
4770
4776
|
let E = g;
|
|
4771
4777
|
if (d) {
|
|
4772
4778
|
let x = null, f = 1 / 0;
|
|
4773
|
-
for (const
|
|
4774
|
-
if (
|
|
4779
|
+
for (const M of s) {
|
|
4780
|
+
if (M === t || M === i || !M.active || M.isGrabbed || M.isDying)
|
|
4775
4781
|
continue;
|
|
4776
|
-
const
|
|
4777
|
-
|
|
4778
|
-
|
|
4782
|
+
const _ = Math.hypot(
|
|
4783
|
+
M.position.x - m.x,
|
|
4784
|
+
M.position.y - m.y
|
|
4779
4785
|
);
|
|
4780
|
-
|
|
4786
|
+
_ < f && (f = _, x = M);
|
|
4781
4787
|
}
|
|
4782
4788
|
x && (E = Math.atan2(
|
|
4783
4789
|
x.position.y - m.y,
|
|
4784
4790
|
x.position.x - m.x
|
|
4785
4791
|
));
|
|
4786
4792
|
}
|
|
4787
|
-
const
|
|
4788
|
-
if (!
|
|
4789
|
-
const A = e.factory.createEnemy(
|
|
4793
|
+
const v = t.behavior.spawnedEnemyIds?.[0];
|
|
4794
|
+
if (!v) continue;
|
|
4795
|
+
const A = e.factory.createEnemy(v, m, {
|
|
4790
4796
|
x: m.x + Math.cos(E) * 500,
|
|
4791
4797
|
y: m.y + Math.sin(E) * 500
|
|
4792
4798
|
});
|
|
@@ -4795,11 +4801,11 @@ class Je {
|
|
|
4795
4801
|
y: Math.sin(E) * y
|
|
4796
4802
|
}, s.push(A);
|
|
4797
4803
|
}
|
|
4798
|
-
const
|
|
4799
|
-
|
|
4804
|
+
const h = Math.min(
|
|
4805
|
+
l.cluster.explosionParticleCount,
|
|
4800
4806
|
Math.max(0, 96 - n.length)
|
|
4801
4807
|
);
|
|
4802
|
-
for (let p = 0; p <
|
|
4808
|
+
for (let p = 0; p < h; p++) {
|
|
4803
4809
|
const g = Math.random() * Math.PI * 2, y = 200 + Math.random() * 300;
|
|
4804
4810
|
n.push({
|
|
4805
4811
|
id: Math.random().toString(),
|
|
@@ -4812,7 +4818,7 @@ class Je {
|
|
|
4812
4818
|
maxLifetime: 0.6
|
|
4813
4819
|
});
|
|
4814
4820
|
}
|
|
4815
|
-
a.length <
|
|
4821
|
+
a.length < l.cluster.maxExplosionFloatingTexts && a.push({
|
|
4816
4822
|
id: Math.random().toString(),
|
|
4817
4823
|
text: "CLUSTER DETONATION",
|
|
4818
4824
|
position: { ...r },
|
|
@@ -4852,9 +4858,9 @@ class je {
|
|
|
4852
4858
|
}
|
|
4853
4859
|
class Qe {
|
|
4854
4860
|
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 =
|
|
4861
|
+
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];
|
|
4862
|
+
for (const [p, g] of h.entries()) {
|
|
4863
|
+
const y = l + g, m = p === 0 ? t : e.factory.createEnemy(
|
|
4858
4864
|
t.type,
|
|
4859
4865
|
{
|
|
4860
4866
|
x: t.position.x + Math.cos(y) * 30,
|
|
@@ -4862,7 +4868,7 @@ class Qe {
|
|
|
4862
4868
|
},
|
|
4863
4869
|
{ x: 0, y: 0 }
|
|
4864
4870
|
);
|
|
4865
|
-
m.isStationaryShield = !1, m.isThrown = !0, m.wasManipulated = !0, m.shieldAngle = y, m.rotation = y, m.launchDelay =
|
|
4871
|
+
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
4872
|
x: Math.cos(y) * d,
|
|
4867
4873
|
y: Math.sin(y) * d
|
|
4868
4874
|
}, m !== t && s.push(m);
|
|
@@ -4879,7 +4885,7 @@ class Qe {
|
|
|
4879
4885
|
size: 24
|
|
4880
4886
|
});
|
|
4881
4887
|
for (let p = 0; p < 50; p++) {
|
|
4882
|
-
const g = (Math.random() - 0.5) * 1.5, y =
|
|
4888
|
+
const g = (Math.random() - 0.5) * 1.5, y = l + g, m = 300 + Math.random() * 500;
|
|
4883
4889
|
o.push({
|
|
4884
4890
|
id: Math.random().toString(),
|
|
4885
4891
|
position: { ...t.position },
|
|
@@ -4945,31 +4951,31 @@ class et {
|
|
|
4945
4951
|
}
|
|
4946
4952
|
class tt {
|
|
4947
4953
|
execute(e) {
|
|
4948
|
-
const { thrownEnemy: t, pools: i, shockwaves: s, particles: o, floatingTexts: n, eventBus: a } = e, r = t.position,
|
|
4954
|
+
const { thrownEnemy: t, pools: i, shockwaves: s, particles: o, floatingTexts: n, eventBus: a } = e, r = t.position, l = e.config;
|
|
4949
4955
|
i.push({
|
|
4950
4956
|
id: Math.random().toString(),
|
|
4951
4957
|
position: { ...r },
|
|
4952
|
-
radius: Math.round(
|
|
4958
|
+
radius: Math.round(l.toxicPool.baseRadius * 2),
|
|
4953
4959
|
duration: 0,
|
|
4954
|
-
maxDuration:
|
|
4955
|
-
damage:
|
|
4960
|
+
maxDuration: l.toxicPool.baseDuration * 1.5,
|
|
4961
|
+
damage: l.toxicPool.damage,
|
|
4956
4962
|
sourceType: t.type
|
|
4957
4963
|
}), s.push({
|
|
4958
4964
|
id: Math.random().toString(),
|
|
4959
4965
|
position: { ...r },
|
|
4960
4966
|
radius: 10,
|
|
4961
|
-
maxRadius: Math.round(
|
|
4967
|
+
maxRadius: Math.round(l.toxicPool.baseRadius * 2.2),
|
|
4962
4968
|
color: S.spore,
|
|
4963
4969
|
alpha: 1,
|
|
4964
4970
|
lifetime: 0,
|
|
4965
4971
|
maxLifetime: 0.6
|
|
4966
4972
|
});
|
|
4967
|
-
for (let
|
|
4968
|
-
const d = Math.random() * Math.PI * 2,
|
|
4973
|
+
for (let c = 0; c < 45; c++) {
|
|
4974
|
+
const d = Math.random() * Math.PI * 2, h = 120 + Math.random() * 260;
|
|
4969
4975
|
o.push({
|
|
4970
4976
|
id: Math.random().toString(),
|
|
4971
4977
|
position: { ...r },
|
|
4972
|
-
velocity: { x: Math.cos(d) *
|
|
4978
|
+
velocity: { x: Math.cos(d) * h, y: Math.sin(d) * h },
|
|
4973
4979
|
color: S.spore,
|
|
4974
4980
|
radius: 4 + Math.random() * 5,
|
|
4975
4981
|
alpha: 1,
|
|
@@ -4990,20 +4996,20 @@ class tt {
|
|
|
4990
4996
|
}), t.experienceDropPending = !0, t.active = !1, a.emit("onPoolCreated", { position: r });
|
|
4991
4997
|
}
|
|
4992
4998
|
}
|
|
4993
|
-
const se = (
|
|
4999
|
+
const se = (u, e, t = []) => {
|
|
4994
5000
|
let i = null, s = 1 / 0;
|
|
4995
5001
|
for (const o of e) {
|
|
4996
|
-
if (o ===
|
|
5002
|
+
if (o === u || t.includes(o) || !o.active || o.isGrabbed || o.isDying)
|
|
4997
5003
|
continue;
|
|
4998
5004
|
const n = Math.hypot(
|
|
4999
|
-
o.position.x -
|
|
5000
|
-
o.position.y -
|
|
5005
|
+
o.position.x - u.position.x,
|
|
5006
|
+
o.position.y - u.position.y
|
|
5001
5007
|
);
|
|
5002
5008
|
n < s && (s = n, i = o);
|
|
5003
5009
|
}
|
|
5004
5010
|
return i;
|
|
5005
|
-
}, oe = (
|
|
5006
|
-
|
|
5011
|
+
}, oe = (u, e, t, i, s = e.color) => {
|
|
5012
|
+
u.shockwaves.push({
|
|
5007
5013
|
id: Math.random().toString(),
|
|
5008
5014
|
position: { ...e.position },
|
|
5009
5015
|
radius: 10,
|
|
@@ -5013,10 +5019,10 @@ const se = (h, e, t = []) => {
|
|
|
5013
5019
|
lifetime: 0,
|
|
5014
5020
|
maxLifetime: i
|
|
5015
5021
|
});
|
|
5016
|
-
}, Ee = (
|
|
5022
|
+
}, Ee = (u, e, t, i = e.color) => {
|
|
5017
5023
|
for (let s = 0; s < t; s++) {
|
|
5018
5024
|
const o = Math.random() * Math.PI * 2, n = 180 + Math.random() * 320;
|
|
5019
|
-
|
|
5025
|
+
u.particles.push({
|
|
5020
5026
|
id: Math.random().toString(),
|
|
5021
5027
|
position: { ...e.position },
|
|
5022
5028
|
velocity: { x: Math.cos(o) * n, y: Math.sin(o) * n },
|
|
@@ -5027,71 +5033,71 @@ const se = (h, e, t = []) => {
|
|
|
5027
5033
|
maxLifetime: 0.5
|
|
5028
5034
|
});
|
|
5029
5035
|
}
|
|
5030
|
-
}, it = (
|
|
5031
|
-
|
|
5032
|
-
}, st = (
|
|
5033
|
-
e.config.piercer.hasHoming && (
|
|
5034
|
-
}, ot = (
|
|
5035
|
-
if (!
|
|
5036
|
+
}, it = (u, e) => {
|
|
5037
|
+
u.shieldAngle = u.rotation, u.velocity = { x: 0, y: 0 }, u.isStationaryShield = !0, u.isThrown = !1;
|
|
5038
|
+
}, st = (u, e) => {
|
|
5039
|
+
e.config.piercer.hasHoming && (u.remainingHomingKills = e.config.piercer.homingTargets);
|
|
5040
|
+
}, ot = (u, e) => {
|
|
5041
|
+
if (!u.isThrown || !e.config.piercer.hasHoming || u.remainingHomingKills <= 0)
|
|
5036
5042
|
return;
|
|
5037
|
-
const t = se(
|
|
5043
|
+
const t = se(u, e.enemies);
|
|
5038
5044
|
if (!t) return;
|
|
5039
5045
|
const i = Math.atan2(
|
|
5040
|
-
t.position.y -
|
|
5041
|
-
t.position.x -
|
|
5042
|
-
), s = Math.max(Math.hypot(
|
|
5046
|
+
t.position.y - u.position.y,
|
|
5047
|
+
t.position.x - u.position.x
|
|
5048
|
+
), s = Math.max(Math.hypot(u.velocity.x, u.velocity.y), 1e3), o = Math.atan2(u.velocity.y, u.velocity.x);
|
|
5043
5049
|
let n = i - o;
|
|
5044
5050
|
for (; n < -Math.PI; ) n += Math.PI * 2;
|
|
5045
5051
|
for (; n > Math.PI; ) n -= Math.PI * 2;
|
|
5046
5052
|
const a = o + Math.sign(n) * Math.min(Math.abs(n), 25 * e.dt);
|
|
5047
|
-
|
|
5048
|
-
}, nt = (
|
|
5049
|
-
oe(e,
|
|
5050
|
-
}, at = (
|
|
5053
|
+
u.rotation = a, u.velocity = { x: Math.cos(a) * s, y: Math.sin(a) * s };
|
|
5054
|
+
}, nt = (u, e) => {
|
|
5055
|
+
oe(e, u, 350, 0.6), Ee(e, u, 40);
|
|
5056
|
+
}, at = (u, e) => {
|
|
5051
5057
|
const t = e.config.piercer.terminalAoERadius;
|
|
5052
5058
|
if (!(t <= 0)) {
|
|
5053
|
-
oe(e,
|
|
5054
|
-
for (const i of e.spatialHash.getNearby(
|
|
5059
|
+
oe(e, u, t, 0.6);
|
|
5060
|
+
for (const i of e.spatialHash.getNearby(u.position, t)) {
|
|
5055
5061
|
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),
|
|
5062
|
+
const s = i.position.x - u.position.x, o = i.position.y - u.position.y;
|
|
5063
|
+
s * s + o * o <= t * t && e.killEnemy(i, Math.atan2(o, s), u.type);
|
|
5058
5064
|
}
|
|
5059
5065
|
}
|
|
5060
|
-
}, rt = (
|
|
5061
|
-
const { thrownEnemy: e, targetEnemy: t } =
|
|
5066
|
+
}, rt = (u) => {
|
|
5067
|
+
const { thrownEnemy: e, targetEnemy: t } = u;
|
|
5062
5068
|
return e.strategy ? (t.codexDeathSourceType = e.type, e.strategy.execute({
|
|
5063
5069
|
thrownEnemy: e,
|
|
5064
5070
|
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 = (
|
|
5071
|
+
allEnemies: u.enemies,
|
|
5072
|
+
pools: u.pools,
|
|
5073
|
+
vortices: u.vortices,
|
|
5074
|
+
shockwaves: u.shockwaves,
|
|
5075
|
+
particles: u.particles,
|
|
5076
|
+
floatingTexts: u.floatingTexts,
|
|
5077
|
+
eventBus: u.eventBus,
|
|
5078
|
+
width: u.width,
|
|
5079
|
+
height: u.height,
|
|
5080
|
+
factory: u.factory,
|
|
5081
|
+
config: u.config
|
|
5082
|
+
}), !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;
|
|
5083
|
+
}, 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
5084
|
{
|
|
5079
|
-
x:
|
|
5080
|
-
y:
|
|
5085
|
+
x: u.targetEnemy.position.x - u.thrownEnemy.position.x,
|
|
5086
|
+
y: u.targetEnemy.position.y - u.thrownEnemy.position.y
|
|
5081
5087
|
},
|
|
5082
5088
|
8
|
|
5083
|
-
),
|
|
5084
|
-
if (
|
|
5085
|
-
const { thrownEnemy: e, targetEnemy: t } =
|
|
5086
|
-
if (
|
|
5089
|
+
), u.onKill(), !0), lt = (u) => {
|
|
5090
|
+
if (u.killEnemy(u.targetEnemy, u.impactAngle, u.thrownEnemy.type), !rt(u)) return !1;
|
|
5091
|
+
const { thrownEnemy: e, targetEnemy: t } = u;
|
|
5092
|
+
if (u.juice.triggerHitstop(0.05), u.juice.triggerScreenShake(
|
|
5087
5093
|
{
|
|
5088
5094
|
x: t.position.x - e.position.x,
|
|
5089
5095
|
y: t.position.y - e.position.y
|
|
5090
5096
|
},
|
|
5091
5097
|
7
|
|
5092
|
-
), oe(
|
|
5098
|
+
), oe(u, t, 180, 0.45), Ee(u, t, 16), e.remainingHomingKills > 0) {
|
|
5093
5099
|
e.remainingHomingKills--;
|
|
5094
|
-
const i = se(e,
|
|
5100
|
+
const i = se(e, u.enemies, [t]);
|
|
5095
5101
|
if (i) {
|
|
5096
5102
|
const s = Math.atan2(
|
|
5097
5103
|
i.position.y - e.position.y,
|
|
@@ -5101,58 +5107,58 @@ const se = (h, e, t = []) => {
|
|
|
5101
5107
|
}
|
|
5102
5108
|
}
|
|
5103
5109
|
return !0;
|
|
5104
|
-
}, dt = (
|
|
5105
|
-
|
|
5106
|
-
const e =
|
|
5107
|
-
|
|
5110
|
+
}, dt = (u) => {
|
|
5111
|
+
u.enemy.triggerDissolveDeath(!0);
|
|
5112
|
+
const e = u.config.toxicPool;
|
|
5113
|
+
u.pools.push({
|
|
5108
5114
|
id: Math.random().toString(),
|
|
5109
|
-
position: { ...
|
|
5115
|
+
position: { ...u.enemy.position },
|
|
5110
5116
|
radius: e.baseRadius,
|
|
5111
5117
|
duration: 0,
|
|
5112
5118
|
maxDuration: e.baseDuration,
|
|
5113
5119
|
damage: e.damage,
|
|
5114
|
-
sourceType:
|
|
5120
|
+
sourceType: u.enemy.type
|
|
5115
5121
|
});
|
|
5116
|
-
}, ht = (
|
|
5117
|
-
|
|
5118
|
-
const e =
|
|
5122
|
+
}, ht = (u) => {
|
|
5123
|
+
u.enemy.triggerDissolveDeath(!0);
|
|
5124
|
+
const e = u.config.cluster, t = u.enemy.behavior.spawnedEnemyIds?.[0];
|
|
5119
5125
|
if (t)
|
|
5120
5126
|
for (let i = 0; i < e.fragmentCount; i++) {
|
|
5121
5127
|
const s = i * Math.PI * 2 / e.fragmentCount, o = {
|
|
5122
|
-
x:
|
|
5123
|
-
y:
|
|
5128
|
+
x: u.enemy.position.x + Math.cos(s) * 40,
|
|
5129
|
+
y: u.enemy.position.y + Math.sin(s) * 40
|
|
5124
5130
|
};
|
|
5125
5131
|
let n = s;
|
|
5126
5132
|
if (e.hasHoming) {
|
|
5127
|
-
const r = se(
|
|
5133
|
+
const r = se(u.enemy, u.enemies);
|
|
5128
5134
|
r && (n = Math.atan2(
|
|
5129
5135
|
r.position.y - o.y,
|
|
5130
5136
|
r.position.x - o.x
|
|
5131
5137
|
));
|
|
5132
5138
|
}
|
|
5133
|
-
const a =
|
|
5139
|
+
const a = u.factory.createEnemy(t, o, {
|
|
5134
5140
|
x: o.x + Math.cos(n) * 500,
|
|
5135
5141
|
y: o.y + Math.sin(n) * 500
|
|
5136
5142
|
});
|
|
5137
5143
|
a.isThrown = !0, a.wasManipulated = !0, a.velocity = {
|
|
5138
5144
|
x: Math.cos(n) * (750 + Math.random() * 250),
|
|
5139
5145
|
y: Math.sin(n) * (750 + Math.random() * 250)
|
|
5140
|
-
},
|
|
5146
|
+
}, u.enemies.push(a);
|
|
5141
5147
|
}
|
|
5142
|
-
}, ut = (
|
|
5143
|
-
|
|
5144
|
-
const e =
|
|
5145
|
-
|
|
5148
|
+
}, ut = (u) => {
|
|
5149
|
+
u.enemy.triggerDissolveDeath(!0);
|
|
5150
|
+
const e = u.config.gravityVortex;
|
|
5151
|
+
u.vortices.push({
|
|
5146
5152
|
id: Math.random().toString(),
|
|
5147
|
-
position: { ...
|
|
5153
|
+
position: { ...u.enemy.position },
|
|
5148
5154
|
radius: e.baseRadius,
|
|
5149
5155
|
duration: 0,
|
|
5150
5156
|
maxDuration: e.baseDuration,
|
|
5151
5157
|
pullForce: e.basePullForce
|
|
5152
5158
|
});
|
|
5153
|
-
}, pt = (
|
|
5154
|
-
|
|
5155
|
-
}, gt = (
|
|
5159
|
+
}, pt = (u) => {
|
|
5160
|
+
u.enemy.triggerSliceDeath(u.angle, !0);
|
|
5161
|
+
}, gt = (u, e) => e !== "toxic-pool" && e !== "gravity-vortex", mt = {
|
|
5156
5162
|
piercer: {
|
|
5157
5163
|
rendererId: "piercer",
|
|
5158
5164
|
rotatesWithVelocity: !0,
|
|
@@ -5164,14 +5170,14 @@ const se = (h, e, t = []) => {
|
|
|
5164
5170
|
onCollision: lt,
|
|
5165
5171
|
onChainReaction: pt,
|
|
5166
5172
|
canInteractWithHazard: gt,
|
|
5167
|
-
synergyKey: (
|
|
5173
|
+
synergyKey: (u) => u.color
|
|
5168
5174
|
},
|
|
5169
5175
|
spore: {
|
|
5170
5176
|
rendererId: "spore",
|
|
5171
5177
|
rotatesWithVelocity: !0,
|
|
5172
5178
|
canBeChainReactionTarget: !0,
|
|
5173
5179
|
onChainReaction: dt,
|
|
5174
|
-
synergyKey: (
|
|
5180
|
+
synergyKey: (u) => u.color
|
|
5175
5181
|
},
|
|
5176
5182
|
cluster: {
|
|
5177
5183
|
rendererId: "cluster",
|
|
@@ -5179,14 +5185,14 @@ const se = (h, e, t = []) => {
|
|
|
5179
5185
|
canBeChainReactionTarget: !0,
|
|
5180
5186
|
onChainReaction: ht,
|
|
5181
5187
|
spawnedEnemyIds: ["micro"],
|
|
5182
|
-
synergyKey: (
|
|
5188
|
+
synergyKey: (u) => u.color
|
|
5183
5189
|
},
|
|
5184
5190
|
parasite: {
|
|
5185
5191
|
rendererId: "parasite",
|
|
5186
5192
|
rotatesWithVelocity: !0,
|
|
5187
5193
|
canBeChainReactionTarget: !0,
|
|
5188
5194
|
onChainReaction: ut,
|
|
5189
|
-
synergyKey: (
|
|
5195
|
+
synergyKey: (u) => u.color
|
|
5190
5196
|
},
|
|
5191
5197
|
heavy: {
|
|
5192
5198
|
rendererId: "heavy",
|
|
@@ -5195,16 +5201,16 @@ const se = (h, e, t = []) => {
|
|
|
5195
5201
|
onRelease: it,
|
|
5196
5202
|
onOutOfBounds: nt,
|
|
5197
5203
|
onCollision: ct,
|
|
5198
|
-
synergyKey: (
|
|
5204
|
+
synergyKey: (u) => u.color
|
|
5199
5205
|
},
|
|
5200
5206
|
micro: {
|
|
5201
5207
|
rendererId: "circle",
|
|
5202
5208
|
rotatesWithVelocity: !0,
|
|
5203
5209
|
canBeChainReactionTarget: !1,
|
|
5204
5210
|
autoDeflectFromCore: !0,
|
|
5205
|
-
synergyKey: (
|
|
5211
|
+
synergyKey: (u) => u.color
|
|
5206
5212
|
}
|
|
5207
|
-
}, U = (
|
|
5213
|
+
}, U = (u) => mt[u] ?? {
|
|
5208
5214
|
rendererId: "circle",
|
|
5209
5215
|
rotatesWithVelocity: !0,
|
|
5210
5216
|
canBeChainReactionTarget: !0,
|
|
@@ -5353,13 +5359,13 @@ class B {
|
|
|
5353
5359
|
if (!o.active || o.isAbsorbing || o.isMerging) continue;
|
|
5354
5360
|
const n = Math.floor(o.position.x / i), a = Math.floor(o.position.y / i);
|
|
5355
5361
|
for (let r = -1; r <= 1; r++)
|
|
5356
|
-
for (let
|
|
5357
|
-
const
|
|
5358
|
-
if (
|
|
5359
|
-
for (const d of
|
|
5362
|
+
for (let l = -1; l <= 1; l++) {
|
|
5363
|
+
const c = s.get(`${n + r}:${a + l}`);
|
|
5364
|
+
if (c)
|
|
5365
|
+
for (const d of c) {
|
|
5360
5366
|
if (d === o || !d.active || d.isAbsorbing || d.isMerging)
|
|
5361
5367
|
continue;
|
|
5362
|
-
const
|
|
5368
|
+
const h = d.position.x - o.position.x, p = d.position.y - o.position.y, g = Math.hypot(h, p), y = Math.min(
|
|
5363
5369
|
12,
|
|
5364
5370
|
Math.max(
|
|
5365
5371
|
0,
|
|
@@ -5378,17 +5384,17 @@ class B {
|
|
|
5378
5384
|
const o = s, n = /* @__PURE__ */ new Map();
|
|
5379
5385
|
for (const a of e) {
|
|
5380
5386
|
if (!a.active || a.isAbsorbing || a.isMerging) continue;
|
|
5381
|
-
const r = B.getCellKey(a.position, o),
|
|
5382
|
-
|
|
5387
|
+
const r = B.getCellKey(a.position, o), l = n.get(r);
|
|
5388
|
+
l ? l.push(a) : n.set(r, [a]);
|
|
5383
5389
|
}
|
|
5384
5390
|
for (const a of e) {
|
|
5385
5391
|
if (!a.active || a.isAbsorbing || a.isMerging) continue;
|
|
5386
|
-
const r = Math.floor(a.position.x / o),
|
|
5387
|
-
for (let
|
|
5392
|
+
const r = Math.floor(a.position.x / o), l = Math.floor(a.position.y / o);
|
|
5393
|
+
for (let c = -1; c <= 1; c++)
|
|
5388
5394
|
for (let d = -1; d <= 1; d++) {
|
|
5389
|
-
const
|
|
5390
|
-
if (
|
|
5391
|
-
for (const p of
|
|
5395
|
+
const h = n.get(`${r + c}:${l + d}`);
|
|
5396
|
+
if (h)
|
|
5397
|
+
for (const p of h) {
|
|
5392
5398
|
if (p === a || !p.active || p.isAbsorbing || p.isMerging || p.id <= a.id)
|
|
5393
5399
|
continue;
|
|
5394
5400
|
const g = p.position.x - a.position.x, y = p.position.y - a.position.y, m = Math.hypot(g, y);
|
|
@@ -5965,13 +5971,13 @@ const St = [
|
|
|
5965
5971
|
<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
5972
|
<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
5973
|
<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
|
-
`,
|
|
5974
|
+
`, Mt = () => `
|
|
5969
5975
|
<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
5976
|
<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
5977
|
<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
5978
|
<circle cx="16" cy="14" r="2.6" fill="currentColor"/>
|
|
5973
5979
|
<circle cx="24" cy="29" r="2.1" fill="currentColor"/>
|
|
5974
|
-
`,
|
|
5980
|
+
`, _t = () => `
|
|
5975
5981
|
<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
5982
|
<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
5983
|
<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 +6012,8 @@ const St = [
|
|
|
6006
6012
|
<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
6013
|
`, Rt = {
|
|
6008
6014
|
"core-nucleus": vt,
|
|
6009
|
-
"unlock-form":
|
|
6010
|
-
"powerup-organ":
|
|
6015
|
+
"unlock-form": Mt,
|
|
6016
|
+
"powerup-organ": _t,
|
|
6011
6017
|
"passive-membrane": It,
|
|
6012
6018
|
"synergy-synapse": Tt,
|
|
6013
6019
|
"area-biome": bt,
|
|
@@ -6019,8 +6025,8 @@ const St = [
|
|
|
6019
6025
|
<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
6026
|
<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
6027
|
`;
|
|
6022
|
-
function ye(
|
|
6023
|
-
const i = t === "locked" ? Ot : Rt[
|
|
6028
|
+
function ye(u, e, t) {
|
|
6029
|
+
const i = t === "locked" ? Ot : Rt[u];
|
|
6024
6030
|
return `<svg viewBox="0 0 48 48" fill="none" aria-hidden="true" data-genetic-kind="${e}">${i()}</svg>`;
|
|
6025
6031
|
}
|
|
6026
6032
|
class Lt {
|
|
@@ -6072,14 +6078,14 @@ class Pt {
|
|
|
6072
6078
|
return e && t && i && s ? { nodeLayer: e, links: t, map: i, mapContent: s } : null;
|
|
6073
6079
|
}
|
|
6074
6080
|
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),
|
|
6081
|
+
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
6082
|
minX: o,
|
|
6077
6083
|
minY: a,
|
|
6078
|
-
contentWidth:
|
|
6084
|
+
contentWidth: h,
|
|
6079
6085
|
contentHeight: p,
|
|
6080
6086
|
worldScale: J
|
|
6081
6087
|
});
|
|
6082
|
-
return { contentWidth:
|
|
6088
|
+
return { contentWidth: h, contentHeight: p, positions: g };
|
|
6083
6089
|
}
|
|
6084
6090
|
getPositions(e, t) {
|
|
6085
6091
|
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 +6101,19 @@ class Pt {
|
|
|
6095
6101
|
}
|
|
6096
6102
|
focusMap(e, t, i) {
|
|
6097
6103
|
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(
|
|
6104
|
+
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);
|
|
6105
|
+
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
6106
|
}
|
|
6101
6107
|
renderLinks(e, t, i) {
|
|
6102
6108
|
for (const s of e)
|
|
6103
6109
|
for (const o of s.prerequisites) {
|
|
6104
6110
|
const n = e.find((d) => d.id === o), a = n ? i.get(n.id) : void 0, r = i.get(s.id);
|
|
6105
6111
|
if (!a || !r) continue;
|
|
6106
|
-
const
|
|
6107
|
-
|
|
6112
|
+
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));
|
|
6113
|
+
l.setAttribute(
|
|
6108
6114
|
"d",
|
|
6109
|
-
`M ${a.x} ${a.y} C ${a.x +
|
|
6110
|
-
),
|
|
6115
|
+
`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}`
|
|
6116
|
+
), l.classList.add("axon-genetic-link"), l.setAttribute("data-state", s.state), l.setAttribute("data-accent", s.accent ?? "fallback"), t.appendChild(l);
|
|
6111
6117
|
}
|
|
6112
6118
|
}
|
|
6113
6119
|
renderNodes(e, t, i) {
|
|
@@ -6246,9 +6252,9 @@ class Dt {
|
|
|
6246
6252
|
}
|
|
6247
6253
|
}
|
|
6248
6254
|
const Nt = {
|
|
6249
|
-
"toxic-radius": (
|
|
6250
|
-
const e =
|
|
6251
|
-
|
|
6255
|
+
"toxic-radius": (u) => {
|
|
6256
|
+
const e = u.getConfig().toxicPool;
|
|
6257
|
+
u.updateConfig({
|
|
6252
6258
|
toxicPool: {
|
|
6253
6259
|
...e,
|
|
6254
6260
|
baseRadius: Math.round(e.baseRadius * 1.12),
|
|
@@ -6256,9 +6262,9 @@ const Nt = {
|
|
|
6256
6262
|
}
|
|
6257
6263
|
});
|
|
6258
6264
|
},
|
|
6259
|
-
"gravity-radius": (
|
|
6260
|
-
const e =
|
|
6261
|
-
|
|
6265
|
+
"gravity-radius": (u) => {
|
|
6266
|
+
const e = u.getConfig().gravityVortex;
|
|
6267
|
+
u.updateConfig({
|
|
6262
6268
|
gravityVortex: {
|
|
6263
6269
|
...e,
|
|
6264
6270
|
baseRadius: Math.round(e.baseRadius * 1.12),
|
|
@@ -6266,21 +6272,21 @@ const Nt = {
|
|
|
6266
6272
|
}
|
|
6267
6273
|
});
|
|
6268
6274
|
},
|
|
6269
|
-
"shield-arc": (
|
|
6270
|
-
const e =
|
|
6271
|
-
|
|
6275
|
+
"shield-arc": (u) => {
|
|
6276
|
+
const e = u.getConfig().shield;
|
|
6277
|
+
u.updateConfig({
|
|
6272
6278
|
shield: {
|
|
6273
6279
|
...e,
|
|
6274
6280
|
protectionArc: Math.min(Math.PI * 1.5, e.protectionArc + Math.PI / 6)
|
|
6275
6281
|
}
|
|
6276
6282
|
});
|
|
6277
6283
|
},
|
|
6278
|
-
"core-life-ring": (
|
|
6279
|
-
|
|
6284
|
+
"core-life-ring": (u) => {
|
|
6285
|
+
u.addCoreRing(1);
|
|
6280
6286
|
}
|
|
6281
6287
|
};
|
|
6282
|
-
function wt(
|
|
6283
|
-
for (const t of
|
|
6288
|
+
function wt(u, e) {
|
|
6289
|
+
for (const t of u.getActivePassiveEffectIds())
|
|
6284
6290
|
Nt[t](e);
|
|
6285
6291
|
}
|
|
6286
6292
|
class ue {
|
|
@@ -6516,10 +6522,10 @@ class L {
|
|
|
6516
6522
|
}
|
|
6517
6523
|
}
|
|
6518
6524
|
}
|
|
6519
|
-
const Q = [10, 50, 150, 400, 1e3, 2500], ee = (
|
|
6520
|
-
id: `piercer-${
|
|
6525
|
+
const Q = [10, 50, 150, 400, 1e3, 2500], ee = (u, e) => e.map((t, i) => ({
|
|
6526
|
+
id: `piercer-${u}-${i + 1}`,
|
|
6521
6527
|
textKey: t,
|
|
6522
|
-
track:
|
|
6528
|
+
track: u,
|
|
6523
6529
|
milestone: i + 1
|
|
6524
6530
|
})), kt = [
|
|
6525
6531
|
{ id: "piercer-intro", textKey: "codexPiercerEntryIntro" },
|
|
@@ -6547,18 +6553,18 @@ const Q = [10, 50, 150, 400, 1e3, 2500], ee = (h, e) => e.map((t, i) => ({
|
|
|
6547
6553
|
"codexPiercerEntryCaused5",
|
|
6548
6554
|
"codexPiercerEntryCaused6"
|
|
6549
6555
|
])
|
|
6550
|
-
], V = (
|
|
6551
|
-
id:
|
|
6556
|
+
], V = (u, e) => ({
|
|
6557
|
+
id: u,
|
|
6552
6558
|
titleKey: e,
|
|
6553
6559
|
loreKey: "codexPendingLore",
|
|
6554
|
-
...
|
|
6560
|
+
...u === "piercer" ? { loreEntries: kt } : {},
|
|
6555
6561
|
milestones: {
|
|
6556
6562
|
controlled: Q,
|
|
6557
6563
|
defeated: Q,
|
|
6558
6564
|
caused: Q
|
|
6559
6565
|
},
|
|
6560
6566
|
requiredFormIds: [],
|
|
6561
|
-
requiredVariantIds: Array.from({ length: 6 }, (t, i) => `${
|
|
6567
|
+
requiredVariantIds: Array.from({ length: 6 }, (t, i) => `${u}-variant-${i + 1}`)
|
|
6562
6568
|
}), Ut = [
|
|
6563
6569
|
V("piercer", "codexPiercerTitle"),
|
|
6564
6570
|
V("spore", "codexSporeTitle"),
|
|
@@ -6603,8 +6609,8 @@ class Ht {
|
|
|
6603
6609
|
if (!t || !i) return;
|
|
6604
6610
|
const s = this.themeManager.getPalette(), o = this.canvas.width, n = this.canvas.height, a = o / 2, r = n / 2;
|
|
6605
6611
|
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(
|
|
6612
|
+
const l = Math.min(o, n) / Math.max(180, i.radius * 5.2);
|
|
6613
|
+
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
6614
|
}
|
|
6609
6615
|
drawField(e, t, i, s, o) {
|
|
6610
6616
|
const n = e.createRadialGradient(
|
|
@@ -7265,20 +7271,20 @@ class Vt {
|
|
|
7265
7271
|
!this.inputManager.isPointerDown && s && (s.isGrabbed = !1, this.inputManager.grabbedOrb = null);
|
|
7266
7272
|
const o = this.inputManager.pointerPosition;
|
|
7267
7273
|
if (this.inputManager.isPointerDown && !this.inputManager.grabbedOrb && this.rerollsRemaining > 0) {
|
|
7268
|
-
const n = this.canvas.width / 2, a = this.canvas.height / 2 +
|
|
7274
|
+
const n = this.canvas.width / 2, a = this.canvas.height / 2 + 300;
|
|
7269
7275
|
Math.hypot(o.x - n, o.y - a) <= 80 && (this.triggerReroll(), this.inputManager.isPointerDown = !1);
|
|
7270
7276
|
}
|
|
7271
7277
|
for (const n of this.orbitingOrbs) {
|
|
7272
7278
|
const a = o.x - n.position.x, r = o.y - n.position.y;
|
|
7273
7279
|
if (n.isHovered = Math.hypot(a, r) <= n.radius * 1.5, n === s && this.inputManager.isPointerDown) {
|
|
7274
7280
|
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
|
|
7281
|
+
const l = this.core.position.x - n.position.x, c = this.core.position.y - n.position.y;
|
|
7282
|
+
if (Math.hypot(l, c) <= this.core.radius + n.radius) {
|
|
7283
|
+
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);
|
|
7284
|
+
const h = this.i18n.translate(n.definition.titleKey);
|
|
7279
7285
|
this.floatingTexts.push({
|
|
7280
7286
|
id: Math.random().toString(),
|
|
7281
|
-
text: `+ ${
|
|
7287
|
+
text: `+ ${h}`,
|
|
7282
7288
|
position: { ...this.core.position },
|
|
7283
7289
|
velocity: { x: 0, y: -80 },
|
|
7284
7290
|
color: n.definition.color,
|
|
@@ -7514,8 +7520,8 @@ class Vt {
|
|
|
7514
7520
|
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
7521
|
}
|
|
7516
7522
|
}
|
|
7517
|
-
function Ft(
|
|
7518
|
-
return new Vt(
|
|
7523
|
+
function Ft(u) {
|
|
7524
|
+
return new Vt(u);
|
|
7519
7525
|
}
|
|
7520
7526
|
export {
|
|
7521
7527
|
Ze as BrowserPlatform,
|