@gamebob/axon-surge 0.12.0 → 0.13.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.
@@ -1,4 +1,4 @@
1
- class J {
1
+ class V {
2
2
  listeners = /* @__PURE__ */ new Map();
3
3
  on(t, e) {
4
4
  return this.listeners.has(t) || this.listeners.set(t, /* @__PURE__ */ new Set()), this.listeners.get(t).add(e), () => this.off(t, e);
@@ -15,7 +15,7 @@ class J {
15
15
  this.listeners.clear();
16
16
  }
17
17
  }
18
- class X {
18
+ class W {
19
19
  animationFrameId = null;
20
20
  lastTime = 0;
21
21
  isRunning = !1;
@@ -36,23 +36,24 @@ class X {
36
36
  this.lastTime = t, this.updateCallback(e), this.renderCallback(), this.animationFrameId = requestAnimationFrame(this.tick);
37
37
  }
38
38
  }
39
- const B = {
39
+ const k = {
40
40
  core: {
41
41
  maxIntegrity: 3,
42
42
  invulnerabilityDuration: 1.5,
43
43
  radius: 32,
44
- vampirismHealProgressRate: 0
44
+ vampirismHealProgressRate: 0,
45
+ hasOffscreenIndicators: !1
45
46
  },
46
47
  toxicPool: {
47
- baseRadius: 110,
48
- synergyRadius: 210,
48
+ baseRadius: 40,
49
+ synergyRadius: 80,
49
50
  baseDuration: 4.5,
50
51
  synergyDuration: 8,
51
52
  damage: 50
52
53
  },
53
54
  gravityVortex: {
54
- baseRadius: 220,
55
- synergyRadius: 360,
55
+ baseRadius: 75,
56
+ synergyRadius: 130,
56
57
  baseDuration: 4,
57
58
  synergyDuration: 6,
58
59
  basePullForce: 2200,
@@ -74,14 +75,14 @@ const B = {
74
75
  homingTargets: 1
75
76
  }
76
77
  };
77
- class A {
78
+ class E {
78
79
  static instance;
79
80
  config;
80
81
  constructor() {
81
- this.config = JSON.parse(JSON.stringify(B));
82
+ this.config = JSON.parse(JSON.stringify(k));
82
83
  }
83
84
  static getInstance() {
84
- return A.instance || (A.instance = new A()), A.instance;
85
+ return E.instance || (E.instance = new E()), E.instance;
85
86
  }
86
87
  getConfig() {
87
88
  return this.config;
@@ -99,10 +100,10 @@ class A {
99
100
  this.config.core.maxIntegrity += t;
100
101
  }
101
102
  resetToDefault() {
102
- this.config = JSON.parse(JSON.stringify(B));
103
+ this.config = JSON.parse(JSON.stringify(k));
103
104
  }
104
105
  }
105
- class z {
106
+ class F {
106
107
  position;
107
108
  radius;
108
109
  integrity;
@@ -113,18 +114,22 @@ class z {
113
114
  maxInvulnerabilityDuration;
114
115
  customColor = { r: 0, g: 240, b: 255 };
115
116
  powerUpCount = 0;
117
+ collectedPowerUpColors = [];
116
118
  constructor(t, e) {
117
- const i = A.getInstance().getConfig().core;
119
+ const i = E.getInstance().getConfig().core;
118
120
  this.position = { x: t, y: e }, this.radius = i.radius, this.integrity = i.maxIntegrity, this.maxIntegrity = i.maxIntegrity, this.maxInvulnerabilityDuration = i.invulnerabilityDuration, this.organicSeed = Math.random() * 100;
119
121
  }
120
122
  absorbPowerUpColor(t, e = 0.35) {
121
- this.powerUpCount++;
123
+ this.powerUpCount++, this.collectedPowerUpColors.push(t);
122
124
  const i = t.replace("#", "");
123
125
  if (i.length === 6) {
124
- const s = parseInt(i.substring(0, 2), 16), a = parseInt(i.substring(2, 4), 16), l = parseInt(i.substring(4, 6), 16);
125
- this.customColor.r = Math.round(this.customColor.r * (1 - e) + s * e), this.customColor.g = Math.round(this.customColor.g * (1 - e) + a * e), this.customColor.b = Math.round(this.customColor.b * (1 - e) + l * e);
126
+ const s = parseInt(i.substring(0, 2), 16), a = parseInt(i.substring(2, 4), 16), c = parseInt(i.substring(4, 6), 16);
127
+ this.customColor.r = Math.round(this.customColor.r * (1 - e) + s * e), this.customColor.g = Math.round(this.customColor.g * (1 - e) + a * e), this.customColor.b = Math.round(this.customColor.b * (1 - e) + c * e);
126
128
  }
127
129
  }
130
+ getHitboxRadius() {
131
+ return this.integrity > 0 ? this.radius + 16 + (this.integrity - 1) * 12 : this.radius;
132
+ }
128
133
  getColorHex() {
129
134
  const t = this.customColor.r.toString(16).padStart(2, "0"), e = this.customColor.g.toString(16).padStart(2, "0"), i = this.customColor.b.toString(16).padStart(2, "0");
130
135
  return `#${t}${e}${i}`;
@@ -138,7 +143,7 @@ class z {
138
143
  }
139
144
  repairProgress = 0;
140
145
  addKillRepair() {
141
- const t = A.getInstance().getConfig().core.vampirismHealProgressRate;
146
+ const t = E.getInstance().getConfig().core.vampirismHealProgressRate;
142
147
  return t <= 0 ? !1 : (this.repairProgress += t, this.repairProgress >= 1 ? (this.integrity += 1, this.integrity > this.maxIntegrity && (this.maxIntegrity = this.integrity), this.repairProgress = 0, !0) : !1);
143
148
  }
144
149
  heal(t = 1) {
@@ -151,11 +156,11 @@ class z {
151
156
  return this.invulnerabilityTimer > 0 ? !1 : this.integrity > 0 ? (this.integrity -= 1, this.invulnerabilityTimer = this.maxInvulnerabilityDuration, !0) : !1;
152
157
  }
153
158
  reset(t, e) {
154
- const i = A.getInstance().getConfig().core;
155
- this.position = { x: t, y: e }, this.radius = i.radius, this.maxIntegrity = i.maxIntegrity, this.integrity = this.maxIntegrity, this.maxInvulnerabilityDuration = i.invulnerabilityDuration, this.pulsePhase = 0, this.invulnerabilityTimer = 0, this.repairProgress = 0, this.powerUpCount = 0, this.customColor = { r: 0, g: 240, b: 255 };
159
+ const i = E.getInstance().getConfig().core;
160
+ this.position = { x: t, y: e }, this.radius = i.radius, this.maxIntegrity = i.maxIntegrity, this.integrity = this.maxIntegrity, this.maxInvulnerabilityDuration = i.invulnerabilityDuration, this.pulsePhase = 0, this.invulnerabilityTimer = 0, this.repairProgress = 0, this.powerUpCount = 0, this.collectedPowerUpColors = [], this.customColor = { r: 0, g: 240, b: 255 };
156
161
  }
157
162
  }
158
- class H {
163
+ class w {
159
164
  id;
160
165
  position = { x: 0, y: 0 };
161
166
  velocity = { x: 0, y: 0 };
@@ -212,7 +217,7 @@ class H {
212
217
  this.active = !1, this.isGrabbed = !1, this.isThrown = !1, this.wasManipulated = !1, this.isDying = !1, this.deathType = "none", this.deathTimer = 0, this.sliceAngle = 0, this.isStationaryShield = !1, this.shieldAngle = 0, this.position = { x: 0, y: 0 }, this.velocity = { x: 0, y: 0 }, this.rotation = 0, this.strategy = null, this.maxSpeed = 200;
213
218
  }
214
219
  }
215
- class K {
220
+ class G {
216
221
  id;
217
222
  definition;
218
223
  position = { x: 0, y: 0 };
@@ -229,7 +234,7 @@ class K {
229
234
  this.active && !this.isGrabbed && !this.isHovered && (this.orbitAngle += t * 0.25, this.position.x = e.x + Math.cos(this.orbitAngle) * this.orbitDistance, this.position.y = e.y + Math.sin(this.orbitAngle) * this.orbitDistance);
230
235
  }
231
236
  }
232
- class $ {
237
+ class Y {
233
238
  pointerPosition = { x: 0, y: 0 };
234
239
  isPointerDown = !1;
235
240
  grabbedEnemy = null;
@@ -241,16 +246,16 @@ class $ {
241
246
  this.canvas = t, this.bindEvents();
242
247
  }
243
248
  updatePointerPos(t, e) {
244
- const i = this.canvas.getBoundingClientRect(), s = i.width > 0 ? this.canvas.width / i.width : 1, a = i.height > 0 ? this.canvas.height / i.height : 1, l = performance.now() / 1e3;
249
+ const i = this.canvas.getBoundingClientRect(), s = i.width > 0 ? this.canvas.width / i.width : 1, a = i.height > 0 ? this.canvas.height / i.height : 1, c = performance.now() / 1e3;
245
250
  this.pointerPosition = {
246
251
  x: (t - i.left) * s,
247
252
  y: (e - i.top) * a
248
253
  }, this.pointerHistory.push({
249
254
  x: this.pointerPosition.x,
250
255
  y: this.pointerPosition.y,
251
- time: l
256
+ time: c
252
257
  });
253
- const n = l - 0.08;
258
+ const n = c - 0.08;
254
259
  this.pointerHistory = this.pointerHistory.filter((o) => o.time >= n), this.grabbedEnemy && (this.grabbedEnemy.position = { ...this.pointerPosition });
255
260
  }
256
261
  bindEvents() {
@@ -291,8 +296,8 @@ class $ {
291
296
  const i = e ? 50 : 20;
292
297
  for (const s of t) {
293
298
  if (!s.active || s.isGrabbed || s.isThrown || s.wasManipulated) continue;
294
- const a = this.pointerPosition.x - s.position.x, l = this.pointerPosition.y - s.position.y;
295
- if (Math.hypot(a, l) <= s.getHitRadius() + i)
299
+ const a = this.pointerPosition.x - s.position.x, c = this.pointerPosition.y - s.position.y;
300
+ if (Math.hypot(a, c) <= s.getHitRadius() + i)
296
301
  return s.isGrabbed = !0, this.grabbedEnemy = s, this.dragStart = { ...this.pointerPosition }, this.pointerHistory = [], s;
297
302
  }
298
303
  return null;
@@ -302,8 +307,8 @@ class $ {
302
307
  const i = e ? 50 : 20;
303
308
  for (const s of t) {
304
309
  if (!s.active || s.isGrabbed) continue;
305
- const a = this.pointerPosition.x - s.position.x, l = this.pointerPosition.y - s.position.y;
306
- if (Math.hypot(a, l) <= s.radius * 1.5 + i)
310
+ const a = this.pointerPosition.x - s.position.x, c = this.pointerPosition.y - s.position.y;
311
+ if (Math.hypot(a, c) <= s.radius * 1.5 + i)
307
312
  return s.isGrabbed = !0, this.grabbedOrb = s, s;
308
313
  }
309
314
  return null;
@@ -313,22 +318,22 @@ class $ {
313
318
  const t = this.grabbedEnemy;
314
319
  t.isGrabbed = !1, t.isThrown = !0, t.wasManipulated = !0;
315
320
  const i = performance.now() / 1e3 - 0.08, s = this.pointerHistory.filter((o) => o.time >= i);
316
- let a = 0, l = 0;
321
+ let a = 0, c = 0;
317
322
  if (s.length >= 2) {
318
- const o = s[0], r = s[s.length - 1], c = Math.max(0.01, r.time - o.time);
319
- a = (r.x - o.x) / c, l = (r.y - o.y) / c;
323
+ const o = s[0], r = s[s.length - 1], l = Math.max(0.01, r.time - o.time);
324
+ a = (r.x - o.x) / l, c = (r.y - o.y) / l;
320
325
  }
321
- const n = Math.hypot(a, l);
326
+ const n = Math.hypot(a, c);
322
327
  if (n > 30) {
323
- const r = Math.min(n * 1.15, 2500), c = Math.atan2(l, a);
328
+ const r = Math.min(n * 1.15, 2500), l = Math.atan2(c, a);
324
329
  t.velocity = {
325
- x: Math.cos(c) * r,
326
- y: Math.sin(c) * r
330
+ x: Math.cos(l) * r,
331
+ y: Math.sin(l) * r
327
332
  };
328
333
  } else if (this.dragStart) {
329
- const o = t.position.x - this.dragStart.x, r = t.position.y - this.dragStart.y, c = Math.hypot(o, r);
330
- if (c > 5) {
331
- const h = Math.atan2(r, o), u = Math.min(c * 4, 600);
334
+ const o = t.position.x - this.dragStart.x, r = t.position.y - this.dragStart.y, l = Math.hypot(o, r);
335
+ if (l > 5) {
336
+ const h = Math.atan2(r, o), u = Math.min(l * 4, 600);
332
337
  t.velocity = {
333
338
  x: Math.cos(h) * u,
334
339
  y: Math.sin(h) * u
@@ -339,7 +344,7 @@ class $ {
339
344
  if (t.type === "heavy")
340
345
  t.shieldAngle = t.rotation, t.velocity = { x: 0, y: 0 }, t.isStationaryShield = !0, t.isThrown = !1;
341
346
  else if (t.type === "piercer") {
342
- const o = A.getInstance().getConfig().piercer;
347
+ const o = E.getInstance().getConfig().piercer;
343
348
  o.hasHoming && (t.remainingHomingKills = o.homingTargets);
344
349
  }
345
350
  return this.grabbedEnemy = null, this.dragStart = null, this.pointerHistory = [], t;
@@ -351,7 +356,7 @@ class $ {
351
356
  this.grabbedEnemy = null, this.grabbedOrb = null, this.dragStart = null, this.pointerHistory = [], this.isPointerDown = !1;
352
357
  }
353
358
  }
354
- class j {
359
+ class Z {
355
360
  cellSize;
356
361
  grid = /* @__PURE__ */ new Map();
357
362
  constructor(t = 100) {
@@ -362,23 +367,23 @@ class j {
362
367
  }
363
368
  insert(t) {
364
369
  const e = Math.floor((t.position.x - t.radius) / this.cellSize), i = Math.floor((t.position.x + t.radius) / this.cellSize), s = Math.floor((t.position.y - t.radius) / this.cellSize), a = Math.floor((t.position.y + t.radius) / this.cellSize);
365
- for (let l = e; l <= i; l++)
370
+ for (let c = e; c <= i; c++)
366
371
  for (let n = s; n <= a; n++) {
367
- const o = `${l}:${n}`;
372
+ const o = `${c}:${n}`;
368
373
  this.grid.has(o) || this.grid.set(o, /* @__PURE__ */ new Set()), this.grid.get(o).add(t);
369
374
  }
370
375
  }
371
376
  getNearby(t, e) {
372
- const i = /* @__PURE__ */ new Set(), s = Math.floor((t.x - e) / this.cellSize), a = Math.floor((t.x + e) / this.cellSize), l = Math.floor((t.y - e) / this.cellSize), n = Math.floor((t.y + e) / this.cellSize);
377
+ const i = /* @__PURE__ */ new Set(), s = Math.floor((t.x - e) / this.cellSize), a = Math.floor((t.x + e) / this.cellSize), c = Math.floor((t.y - e) / this.cellSize), n = Math.floor((t.y + e) / this.cellSize);
373
378
  for (let o = s; o <= a; o++)
374
- for (let r = l; r <= n; r++) {
375
- const c = `${o}:${r}`, h = this.grid.get(c);
379
+ for (let r = c; r <= n; r++) {
380
+ const l = `${o}:${r}`, h = this.grid.get(l);
376
381
  h && h.forEach((u) => i.add(u));
377
382
  }
378
383
  return i;
379
384
  }
380
385
  }
381
- class q {
386
+ class J {
382
387
  hitstopTime = 0;
383
388
  shakeTime = 0;
384
389
  shakeDuration = 0.14;
@@ -386,7 +391,7 @@ class q {
386
391
  shakeVector = { x: 0, y: 0 };
387
392
  flashAlpha = 0;
388
393
  triggerHitstop(t = 0.06) {
389
- this.hitstopTime = t;
394
+ this.hitstopTime = 0;
390
395
  }
391
396
  triggerFlash(t = 0.4) {
392
397
  this.flashAlpha = t;
@@ -399,7 +404,7 @@ class q {
399
404
  }, this.shakeIntensity = s, this.shakeTime = this.shakeDuration;
400
405
  }
401
406
  update(t, e, i) {
402
- this.hitstopTime > 0 && (this.hitstopTime -= t), this.shakeTime > 0 && (this.shakeTime -= t), this.flashAlpha > 0 && (this.flashAlpha = Math.max(0, this.flashAlpha - t * 4));
407
+ this.hitstopTime > 0 && (this.hitstopTime -= t), this.shakeTime > 0 && (this.shakeTime -= t), this.flashAlpha > 0 && (this.flashAlpha = Math.max(0, this.flashAlpha - t * 4)), e.length > 25 && e.splice(0, e.length - 25), i.length > 120 && i.splice(0, i.length - 120);
403
408
  for (let s = e.length - 1; s >= 0; s--) {
404
409
  const a = e[s];
405
410
  a && (a.lifetime += t, a.position.x += a.velocity.x * t, a.position.y += a.velocity.y * t, a.alpha = 1 - a.lifetime / a.maxLifetime, a.lifetime >= a.maxLifetime && e.splice(s, 1));
@@ -418,7 +423,7 @@ class q {
418
423
  };
419
424
  }
420
425
  }
421
- const N = {
426
+ const O = {
422
427
  es: {
423
428
  title: "AXON SURGE",
424
429
  startButton: "INICIAR ENLACE",
@@ -444,11 +449,11 @@ const N = {
444
449
  levelUpChoose: "¡NIVEL {level}! ELIGE UN MODIFICADOR",
445
450
  rerollButton: "🎲 REROLL (1 DISPONIBLE)",
446
451
  pu_spore_radius_title: "EXPANSIÓN ÁCIDA",
447
- pu_spore_radius_desc: "+30% Radio Ácido",
452
+ pu_spore_radius_desc: "+12% Radio Ácido",
448
453
  pu_spore_duration_title: "LONGEVIDAD ÁCIDA",
449
454
  pu_spore_duration_desc: "+3.0s Duración Ácido",
450
455
  pu_vortex_radius_title: "EXPANSIÓN DE SINGULARIDAD",
451
- pu_vortex_radius_desc: "+25% Radio Vórtice",
456
+ pu_vortex_radius_desc: "+12% Radio Vórtice",
452
457
  pu_vortex_duration_title: "LONGEVIDAD GRAVITATORIA",
453
458
  pu_vortex_duration_desc: "+2.5s Duración Vórtice",
454
459
  pu_vortex_power_title: "SOBRECARGA GRAVITATORIA",
@@ -472,7 +477,9 @@ const N = {
472
477
  pu_vampirism_boost_title: "IMPULSO VAMPÍRICO",
473
478
  pu_vampirism_boost_desc: "+0.3% Curación por baja",
474
479
  pu_core_ring_title: "SOBRECARGA DE NÚCLEO",
475
- pu_core_ring_desc: "+1 Anillo de Vida"
480
+ pu_core_ring_desc: "+1 Anillo de Vida",
481
+ pu_offscreen_radar_title: "RADAR PSÍONICO",
482
+ pu_offscreen_radar_desc: "Detecta enemigos fuera de pantalla"
476
483
  },
477
484
  en: {
478
485
  title: "AXON SURGE",
@@ -499,11 +506,11 @@ const N = {
499
506
  levelUpChoose: "LEVEL {level}! CHOOSE MODIFIER",
500
507
  rerollButton: "🎲 REROLL (1 AVAILABLE)",
501
508
  pu_spore_radius_title: "ACID EXPANSION",
502
- pu_spore_radius_desc: "+30% Acid Radius",
509
+ pu_spore_radius_desc: "+12% Acid Radius",
503
510
  pu_spore_duration_title: "ACID LINGER",
504
511
  pu_spore_duration_desc: "+3.0s Acid Duration",
505
512
  pu_vortex_radius_title: "SINGULARITY EXPANSION",
506
- pu_vortex_radius_desc: "+25% Vortex Radius",
513
+ pu_vortex_radius_desc: "+12% Vortex Radius",
507
514
  pu_vortex_duration_title: "GRAVITY LINGER",
508
515
  pu_vortex_duration_desc: "+2.5s Vortex Duration",
509
516
  pu_vortex_power_title: "GRAVITY SURGE",
@@ -527,7 +534,9 @@ const N = {
527
534
  pu_vampirism_boost_title: "VAMPIRIC SURGE",
528
535
  pu_vampirism_boost_desc: "+0.3% Heal per kill",
529
536
  pu_core_ring_title: "NUCLEUS OVERCHARGE",
530
- pu_core_ring_desc: "+1 Life Ring"
537
+ pu_core_ring_desc: "+1 Life Ring",
538
+ pu_offscreen_radar_title: "PSIONIC RADAR",
539
+ pu_offscreen_radar_desc: "Detect off-screen enemies"
531
540
  },
532
541
  fr: {
533
542
  title: "AXON SURGE",
@@ -1244,7 +1253,7 @@ const N = {
1244
1253
  pu_core_ring_title: "核心过载",
1245
1254
  pu_core_ring_desc: "+1 生命环"
1246
1255
  }
1247
- }, Y = [
1256
+ }, K = [
1248
1257
  "es",
1249
1258
  "en",
1250
1259
  "fr",
@@ -1261,18 +1270,18 @@ const N = {
1261
1270
  "ko",
1262
1271
  "zh"
1263
1272
  ];
1264
- function P(E) {
1265
- return Y.includes(E);
1273
+ function P(y) {
1274
+ return K.includes(y);
1266
1275
  }
1267
- const V = "axon_surge_language";
1268
- class Q {
1276
+ const U = "axon_surge_language";
1277
+ class z {
1269
1278
  currentLanguage;
1270
1279
  constructor(t) {
1271
1280
  this.currentLanguage = this.detectLanguage(t);
1272
1281
  }
1273
1282
  detectLanguage(t) {
1274
1283
  try {
1275
- const e = localStorage.getItem(V);
1284
+ const e = localStorage.getItem(U);
1276
1285
  if (e && P(e))
1277
1286
  return e;
1278
1287
  } catch {
@@ -1300,10 +1309,10 @@ class Q {
1300
1309
  return "en";
1301
1310
  }
1302
1311
  setLanguage(t) {
1303
- if (N[t]) {
1312
+ if (O[t]) {
1304
1313
  this.currentLanguage = t;
1305
1314
  try {
1306
- localStorage.setItem(V, t);
1315
+ localStorage.setItem(U, t);
1307
1316
  } catch {
1308
1317
  }
1309
1318
  }
@@ -1312,33 +1321,33 @@ class Q {
1312
1321
  return this.currentLanguage;
1313
1322
  }
1314
1323
  translate(t, e) {
1315
- let s = (N[this.currentLanguage] || N.en)[t] || N.en[t] || String(t);
1316
- return e && Object.entries(e).forEach(([a, l]) => {
1317
- s = s.replace(`{${a}}`, String(l));
1324
+ let s = (O[this.currentLanguage] || O.en)[t] || O.en[t] || String(t);
1325
+ return e && Object.entries(e).forEach(([a, c]) => {
1326
+ s = s.replace(`{${a}}`, String(c));
1318
1327
  }), s;
1319
1328
  }
1320
1329
  }
1321
- class tt {
1330
+ class $ {
1322
1331
  static update(t, e, i) {
1323
- const s = A.getInstance().getConfig();
1332
+ const s = E.getInstance().getConfig();
1324
1333
  for (let a = t.length - 1; a >= 0; a--) {
1325
- const l = t[a];
1326
- if (l) {
1327
- l.duration += i;
1334
+ const c = t[a];
1335
+ if (c) {
1336
+ c.duration += i;
1328
1337
  for (const n of e) {
1329
1338
  if (!n.active || n.isGrabbed || n.isDying || n.isStationaryShield || n.isThrown && n.type === "piercer") continue;
1330
- const o = l.position.x - n.position.x, r = l.position.y - n.position.y, c = Math.hypot(o, r);
1331
- if (c > 2 && c <= l.radius) {
1332
- const h = Math.pow(1 - c / l.radius, 0.7), u = l.pullForce * h, p = Math.atan2(r, o);
1339
+ const o = c.position.x - n.position.x, r = c.position.y - n.position.y, l = Math.hypot(o, r);
1340
+ if (l > 2 && l <= c.radius) {
1341
+ const h = Math.pow(1 - l / c.radius, 0.7), u = c.pullForce * h, p = Math.atan2(r, o);
1333
1342
  n.velocity.x += Math.cos(p) * u * i, n.velocity.y += Math.sin(p) * u * i, n.position.x += Math.cos(p) * u * i * 0.8, n.position.y += Math.sin(p) * u * i * 0.8;
1334
1343
  }
1335
1344
  }
1336
- if (l.duration >= l.maxDuration) {
1345
+ if (c.duration >= c.maxDuration) {
1337
1346
  if (s.gravityVortex.hasImplosionLaunch)
1338
1347
  for (const n of e) {
1339
1348
  if (!n.active || n.isDying) continue;
1340
- const o = n.position.x - l.position.x, r = n.position.y - l.position.y;
1341
- if (Math.hypot(o, r) <= l.radius) {
1349
+ const o = n.position.x - c.position.x, r = n.position.y - c.position.y;
1350
+ if (Math.hypot(o, r) <= c.radius) {
1342
1351
  const h = Math.atan2(r, o), u = 1200;
1343
1352
  n.isThrown = !0, n.wasManipulated = !0, n.velocity = {
1344
1353
  x: Math.cos(h) * u,
@@ -1352,32 +1361,32 @@ class tt {
1352
1361
  }
1353
1362
  }
1354
1363
  }
1355
- class et {
1356
- static update(t, e, i, s, a, l, n, o, r, c) {
1364
+ class X {
1365
+ static update(t, e, i, s, a, c, n, o, r, l) {
1357
1366
  for (const h of e) {
1358
1367
  if (!h.active || h.isGrabbed || h.isDying) continue;
1359
1368
  const u = t.position.x - h.position.x, p = t.position.y - h.position.y;
1360
- if (Math.hypot(u, p) <= t.radius + h.radius) {
1369
+ if (Math.hypot(u, p) <= t.getHitboxRadius() + h.radius) {
1361
1370
  if (h.active = !1, t.takeDamage()) {
1362
1371
  n.emit("onCoreDamaged", { currentIntegrity: t.integrity }), i.push({
1363
1372
  id: Math.random().toString(),
1364
1373
  position: { ...t.position },
1365
1374
  radius: 20,
1366
- maxRadius: Math.max(r, c) * 1.3,
1375
+ maxRadius: Math.max(r, l) * 1.3,
1367
1376
  color: "#00f0ff",
1368
1377
  alpha: 1,
1369
1378
  lifetime: 0,
1370
1379
  maxLifetime: 0.8
1371
- }), l.triggerScreenShake({ x: u, y: p }, 25), l.triggerHitstop(0.15), l.triggerFlash(0.6);
1372
- for (const g of e)
1373
- if (g.active && !g.isGrabbed) {
1374
- g.triggerDissolveDeath();
1375
- for (let f = 0; f < 8; f++) {
1376
- const x = Math.random() * Math.PI * 2, b = 100 + Math.random() * 200;
1380
+ }), c.triggerScreenShake({ x: u, y: p }, 25), c.triggerHitstop(0.15), c.triggerFlash(0.6);
1381
+ for (const d of e)
1382
+ if (d.active && !d.isGrabbed) {
1383
+ d.triggerDissolveDeath();
1384
+ for (let m = 0; m < 8; m++) {
1385
+ const x = Math.random() * Math.PI * 2, A = 100 + Math.random() * 200;
1377
1386
  s.push({
1378
1387
  id: Math.random().toString(),
1379
- position: { ...g.position },
1380
- velocity: { x: Math.cos(x) * b, y: Math.sin(x) * b },
1388
+ position: { ...d.position },
1389
+ velocity: { x: Math.cos(x) * A, y: Math.sin(x) * A },
1381
1390
  color: "#00f0ff",
1382
1391
  radius: 3 + Math.random() * 3,
1383
1392
  alpha: 1,
@@ -1403,9 +1412,9 @@ class et {
1403
1412
  }
1404
1413
  }
1405
1414
  }
1406
- class it {
1415
+ class j {
1407
1416
  execute(t) {
1408
- const { thrownEnemy: e, targetEnemy: i, shockwaves: s, particles: a, floatingTexts: l } = t;
1417
+ const { thrownEnemy: e, targetEnemy: i, shockwaves: s, particles: a, floatingTexts: c } = t;
1409
1418
  i.active = !1, s.push({
1410
1419
  id: Math.random().toString(),
1411
1420
  position: { ...i.position },
@@ -1429,7 +1438,7 @@ class it {
1429
1438
  maxLifetime: 0.5
1430
1439
  });
1431
1440
  }
1432
- l.push({
1441
+ c.push({
1433
1442
  id: Math.random().toString(),
1434
1443
  text: "PIERCING SLICE",
1435
1444
  position: { ...i.position },
@@ -1442,32 +1451,32 @@ class it {
1442
1451
  });
1443
1452
  }
1444
1453
  }
1445
- class st {
1454
+ class q {
1446
1455
  execute(t) {
1447
- const { thrownEnemy: e, pools: i, shockwaves: s, particles: a, floatingTexts: l, eventBus: n } = t, o = e.position;
1456
+ const { thrownEnemy: e, pools: i, shockwaves: s, particles: a, floatingTexts: c, eventBus: n } = t, o = e.position, r = E.getInstance().getConfig();
1448
1457
  i.push({
1449
1458
  id: Math.random().toString(),
1450
1459
  position: { ...o },
1451
- radius: 220,
1460
+ radius: Math.round(r.toxicPool.baseRadius * 2),
1452
1461
  duration: 0,
1453
- maxDuration: 7,
1454
- damage: 50
1462
+ maxDuration: r.toxicPool.baseDuration * 1.5,
1463
+ damage: r.toxicPool.damage
1455
1464
  }), s.push({
1456
1465
  id: Math.random().toString(),
1457
1466
  position: { ...o },
1458
1467
  radius: 10,
1459
- maxRadius: 240,
1468
+ maxRadius: Math.round(r.toxicPool.baseRadius * 2.2),
1460
1469
  color: "#39ff14",
1461
1470
  alpha: 1,
1462
1471
  lifetime: 0,
1463
1472
  maxLifetime: 0.6
1464
1473
  });
1465
- for (let r = 0; r < 45; r++) {
1466
- const c = Math.random() * Math.PI * 2, h = 120 + Math.random() * 260;
1474
+ for (let l = 0; l < 45; l++) {
1475
+ const h = Math.random() * Math.PI * 2, u = 120 + Math.random() * 260;
1467
1476
  a.push({
1468
1477
  id: Math.random().toString(),
1469
1478
  position: { ...o },
1470
- velocity: { x: Math.cos(c) * h, y: Math.sin(c) * h },
1479
+ velocity: { x: Math.cos(h) * u, y: Math.sin(h) * u },
1471
1480
  color: "#39ff14",
1472
1481
  radius: 4 + Math.random() * 5,
1473
1482
  alpha: 1,
@@ -1475,7 +1484,7 @@ class st {
1475
1484
  maxLifetime: 0.9
1476
1485
  });
1477
1486
  }
1478
- l.push({
1487
+ c.push({
1479
1488
  id: Math.random().toString(),
1480
1489
  text: "MASSIVE SPORE NEBULA",
1481
1490
  position: { ...o },
@@ -1488,9 +1497,9 @@ class st {
1488
1497
  }), e.active = !1, n.emit("onPoolCreated", { position: o });
1489
1498
  }
1490
1499
  }
1491
- class at {
1500
+ class Q {
1492
1501
  execute(t) {
1493
- const { thrownEnemy: e, targetEnemy: i, allEnemies: s, shockwaves: a, particles: l, floatingTexts: n } = t, o = i.position;
1502
+ const { thrownEnemy: e, targetEnemy: i, allEnemies: s, shockwaves: a, particles: c, floatingTexts: n } = t, o = i.position;
1494
1503
  e.active = !1, i.active = !1, a.push({
1495
1504
  id: Math.random().toString(),
1496
1505
  position: { ...o },
@@ -1501,34 +1510,34 @@ class at {
1501
1510
  lifetime: 0,
1502
1511
  maxLifetime: 0.6
1503
1512
  });
1504
- const r = A.getInstance().getConfig(), c = r.cluster.fragmentCount, h = r.cluster.hasHoming;
1505
- for (let u = 0; u < c; u++) {
1506
- const p = u * Math.PI * 2 / c, _ = 800 + Math.random() * 300, d = {
1513
+ const r = E.getInstance().getConfig(), l = r.cluster.fragmentCount, h = r.cluster.hasHoming;
1514
+ for (let u = 0; u < l; u++) {
1515
+ const p = u * Math.PI * 2 / l, _ = 800 + Math.random() * 300, g = {
1507
1516
  x: o.x + Math.cos(p) * 45,
1508
1517
  y: o.y + Math.sin(p) * 45
1509
1518
  };
1510
- let g = p;
1519
+ let d = p;
1511
1520
  if (h) {
1512
- let x = null, b = 1 / 0;
1513
- for (const S of s) {
1514
- if (S === e || S === i || !S.active || S.isGrabbed || S.isDying) continue;
1515
- const I = Math.hypot(S.position.x - d.x, S.position.y - d.y);
1516
- I < b && (b = I, x = S);
1521
+ let x = null, A = 1 / 0;
1522
+ for (const b of s) {
1523
+ if (b === e || b === i || !b.active || b.isGrabbed || b.isDying) continue;
1524
+ const I = Math.hypot(b.position.x - g.x, b.position.y - g.y);
1525
+ I < A && (A = I, x = b);
1517
1526
  }
1518
- x && (g = Math.atan2(x.position.y - d.y, x.position.x - d.x));
1527
+ x && (d = Math.atan2(x.position.y - g.y, x.position.x - g.x));
1519
1528
  }
1520
- const f = M.createEnemy("micro", d, {
1521
- x: d.x + Math.cos(g) * 500,
1522
- y: d.y + Math.sin(g) * 500
1529
+ const m = M.createEnemy("micro", g, {
1530
+ x: g.x + Math.cos(d) * 500,
1531
+ y: g.y + Math.sin(d) * 500
1523
1532
  });
1524
- f.isThrown = !0, f.wasManipulated = !0, f.velocity = {
1525
- x: Math.cos(g) * _,
1526
- y: Math.sin(g) * _
1527
- }, s.push(f);
1533
+ m.isThrown = !0, m.wasManipulated = !0, m.velocity = {
1534
+ x: Math.cos(d) * _,
1535
+ y: Math.sin(d) * _
1536
+ }, s.push(m);
1528
1537
  }
1529
1538
  for (let u = 0; u < 35; u++) {
1530
1539
  const p = Math.random() * Math.PI * 2, _ = 200 + Math.random() * 300;
1531
- l.push({
1540
+ c.push({
1532
1541
  id: Math.random().toString(),
1533
1542
  position: { ...o },
1534
1543
  velocity: { x: Math.cos(p) * _, y: Math.sin(p) * _ },
@@ -1552,24 +1561,24 @@ class at {
1552
1561
  });
1553
1562
  }
1554
1563
  }
1555
- class ot {
1564
+ class tt {
1556
1565
  execute(t) {
1557
- const { thrownEnemy: e, targetEnemy: i, vortices: s, shockwaves: a } = t, l = {
1566
+ const { thrownEnemy: e, targetEnemy: i, vortices: s, shockwaves: a } = t, c = E.getInstance().getConfig(), n = {
1558
1567
  x: (e.position.x + i.position.x) / 2,
1559
1568
  y: (e.position.y + i.position.y) / 2
1560
1569
  };
1561
1570
  s.push({
1562
1571
  id: Math.random().toString(),
1563
- position: l,
1564
- radius: 480,
1572
+ position: n,
1573
+ radius: Math.round(c.gravityVortex.baseRadius * 2.2),
1565
1574
  duration: 0,
1566
- maxDuration: 6,
1567
- pullForce: 3500
1575
+ maxDuration: c.gravityVortex.baseDuration * 1.5,
1576
+ pullForce: c.gravityVortex.basePullForce * 1.6
1568
1577
  }), a.push({
1569
1578
  id: Math.random().toString(),
1570
- position: l,
1579
+ position: n,
1571
1580
  radius: 20,
1572
- maxRadius: 480,
1581
+ maxRadius: Math.round(c.gravityVortex.baseRadius * 2.2),
1573
1582
  color: "#9d4edd",
1574
1583
  alpha: 1,
1575
1584
  lifetime: 0,
@@ -1577,23 +1586,23 @@ class ot {
1577
1586
  }), e.triggerDissolveDeath(), i.triggerDissolveDeath();
1578
1587
  }
1579
1588
  }
1580
- class nt {
1589
+ class et {
1581
1590
  execute(t) {
1582
- const { thrownEnemy: e, targetEnemy: i, allEnemies: s, shockwaves: a, particles: l, floatingTexts: n } = t, o = i.position.x - e.position.x, r = i.position.y - e.position.y, c = Math.atan2(r, o), h = A.getInstance().getConfig().shield, u = h.blastSpeed || 1400;
1583
- if (e.isStationaryShield = !1, e.isThrown = !0, e.wasManipulated = !0, e.rotation = c, e.velocity = {
1584
- x: Math.cos(c) * u,
1585
- y: Math.sin(c) * u
1591
+ const { thrownEnemy: e, targetEnemy: i, allEnemies: s, shockwaves: a, particles: c, floatingTexts: n } = t, o = i.position.x - e.position.x, r = i.position.y - e.position.y, l = Math.atan2(r, o), h = E.getInstance().getConfig().shield, u = h.blastSpeed || 1400;
1592
+ if (e.isStationaryShield = !1, e.isThrown = !0, e.wasManipulated = !0, e.rotation = l, e.velocity = {
1593
+ x: Math.cos(l) * u,
1594
+ y: Math.sin(l) * u
1586
1595
  }, h.isFanBlast) {
1587
1596
  const p = [-Math.PI / 4, Math.PI / 4];
1588
1597
  for (const _ of p) {
1589
- const d = c + _, g = M.createEnemy("heavy", {
1590
- x: e.position.x + Math.cos(d) * 30,
1591
- y: e.position.y + Math.sin(d) * 30
1598
+ const g = l + _, d = M.createEnemy("heavy", {
1599
+ x: e.position.x + Math.cos(g) * 30,
1600
+ y: e.position.y + Math.sin(g) * 30
1592
1601
  }, { x: 0, y: 0 });
1593
- g.isStationaryShield = !1, g.isThrown = !0, g.wasManipulated = !0, g.shieldAngle = d, g.rotation = d, g.velocity = {
1594
- x: Math.cos(d) * u,
1595
- y: Math.sin(d) * u
1596
- }, s.push(g);
1602
+ d.isStationaryShield = !1, d.isThrown = !0, d.wasManipulated = !0, d.shieldAngle = g, d.rotation = g, d.velocity = {
1603
+ x: Math.cos(g) * u,
1604
+ y: Math.sin(g) * u
1605
+ }, s.push(d);
1597
1606
  }
1598
1607
  }
1599
1608
  i.active = !1, i.triggerDissolveDeath(), n.push({
@@ -1608,11 +1617,11 @@ class nt {
1608
1617
  size: 24
1609
1618
  });
1610
1619
  for (let p = 0; p < 50; p++) {
1611
- const _ = (Math.random() - 0.5) * 1.5, d = c + _, g = 300 + Math.random() * 500;
1612
- l.push({
1620
+ const _ = (Math.random() - 0.5) * 1.5, g = l + _, d = 300 + Math.random() * 500;
1621
+ c.push({
1613
1622
  id: Math.random().toString(),
1614
1623
  position: { ...e.position },
1615
- velocity: { x: Math.cos(d) * g, y: Math.sin(d) * g },
1624
+ velocity: { x: Math.cos(g) * d, y: Math.sin(g) * d },
1616
1625
  color: "#00f5ff",
1617
1626
  radius: 4 + Math.random() * 6,
1618
1627
  alpha: 1,
@@ -1635,23 +1644,23 @@ class nt {
1635
1644
  }
1636
1645
  class M {
1637
1646
  static createEnemy(t, e, i) {
1638
- const s = `enemy_${Date.now()}_${Math.random()}`, a = new H(s);
1647
+ const s = `enemy_${Date.now()}_${Math.random()}`, a = new w(s);
1639
1648
  return this.configureEnemy(a, t, e, i), a;
1640
1649
  }
1641
1650
  static configureEnemy(t, e, i, s) {
1642
1651
  t.type = e, t.position = { ...i }, t.active = !0, t.isGrabbed = !1, t.isThrown = !1;
1643
- const a = s.x - i.x, l = s.y - i.y, n = Math.atan2(l, a);
1644
- let o = 70, r = 100, c = 20, h = "#ff2a5f", u = null;
1645
- e === "piercer" ? (o = 95, r = 140, c = 18, h = "#ff2a5f", u = new it()) : e === "spore" ? (o = 65, r = 90, c = 24, h = "#39ff14", u = new st()) : e === "cluster" ? (o = 50, r = 75, c = 26, h = "#ffd700", u = new at()) : e === "parasite" ? (o = 80, r = 110, c = 22, h = "#9d4edd", u = new ot()) : e === "heavy" ? (o = 35, r = 50, c = 34, h = "#00f5ff", u = new nt(), t.rotation = Math.random() * Math.PI * 2) : e === "micro" && (o = 130, r = 160, c = 12, h = "#ffd700"), t.radius = c, t.color = h, t.strategy = u, t.maxSpeed = r, t.velocity = {
1652
+ const a = s.x - i.x, c = s.y - i.y, n = Math.atan2(c, a);
1653
+ let o = 70, r = 100, l = 20, h = "#ff2a5f", u = null;
1654
+ e === "piercer" ? (o = 95, r = 140, l = 18, h = "#ff2a5f", u = new j()) : e === "spore" ? (o = 65, r = 90, l = 24, h = "#39ff14", u = new q()) : e === "cluster" ? (o = 50, r = 75, l = 26, h = "#ffd700", u = new Q()) : e === "parasite" ? (o = 80, r = 110, l = 22, h = "#9d4edd", u = new tt()) : e === "heavy" ? (o = 35, r = 50, l = 34, h = "#00f5ff", u = new et(), t.rotation = Math.random() * Math.PI * 2) : e === "micro" && (o = 130, r = 160, l = 12, h = "#ffd700"), t.radius = l, t.color = h, t.strategy = u, t.maxSpeed = r, t.velocity = {
1646
1655
  x: Math.cos(n) * o,
1647
1656
  y: Math.sin(n) * o
1648
1657
  };
1649
1658
  }
1650
1659
  }
1651
- class L {
1652
- static killEnemy(t, e, i, s, a, l) {
1660
+ class T {
1661
+ static killEnemy(t, e, i, s, a, c) {
1653
1662
  if (!t.active || t.isDying) return;
1654
- const n = A.getInstance().getConfig();
1663
+ const n = E.getInstance().getConfig();
1655
1664
  if (a.push({
1656
1665
  id: Math.random().toString(),
1657
1666
  position: { ...t.position },
@@ -1673,29 +1682,29 @@ class L {
1673
1682
  else if (t.type === "cluster") {
1674
1683
  t.triggerDissolveDeath();
1675
1684
  const o = n.cluster.fragmentCount, r = n.cluster.hasHoming;
1676
- for (let c = 0; c < o; c++) {
1677
- const h = c * Math.PI * 2 / o, u = 750 + Math.random() * 250, p = {
1685
+ for (let l = 0; l < o; l++) {
1686
+ const h = l * Math.PI * 2 / o, u = 750 + Math.random() * 250, p = {
1678
1687
  x: t.position.x + Math.cos(h) * 40,
1679
1688
  y: t.position.y + Math.sin(h) * 40
1680
1689
  };
1681
1690
  let _ = h;
1682
1691
  if (r) {
1683
- let g = null, f = 1 / 0;
1684
- for (const x of l) {
1692
+ let d = null, m = 1 / 0;
1693
+ for (const x of c) {
1685
1694
  if (x === t || !x.active || x.isGrabbed || x.isDying) continue;
1686
- const b = Math.hypot(x.position.x - p.x, x.position.y - p.y);
1687
- b < f && (f = b, g = x);
1695
+ const A = Math.hypot(x.position.x - p.x, x.position.y - p.y);
1696
+ A < m && (m = A, d = x);
1688
1697
  }
1689
- g && (_ = Math.atan2(g.position.y - p.y, g.position.x - p.x));
1698
+ d && (_ = Math.atan2(d.position.y - p.y, d.position.x - p.x));
1690
1699
  }
1691
- const d = M.createEnemy("micro", p, {
1700
+ const g = M.createEnemy("micro", p, {
1692
1701
  x: p.x + Math.cos(_) * 500,
1693
1702
  y: p.y + Math.sin(_) * 500
1694
1703
  });
1695
- d.isThrown = !0, d.wasManipulated = !0, d.velocity = {
1704
+ g.isThrown = !0, g.wasManipulated = !0, g.velocity = {
1696
1705
  x: Math.cos(_) * u,
1697
1706
  y: Math.sin(_) * u
1698
- }, l.push(d);
1707
+ }, c.push(g);
1699
1708
  }
1700
1709
  } else t.type === "parasite" ? (t.triggerDissolveDeath(), s.push({
1701
1710
  id: Math.random().toString(),
@@ -1707,16 +1716,16 @@ class L {
1707
1716
  })) : t.type === "piercer" ? t.triggerSliceDeath(e) : t.triggerDissolveDeath();
1708
1717
  }
1709
1718
  }
1710
- class rt {
1711
- static update(t, e, i, s, a, l, n, o, r, c, h, u, p) {
1719
+ class it {
1720
+ static update(t, e, i, s, a, c, n, o, r, l, h, u, p) {
1712
1721
  let _ = !1;
1713
- for (const d of t)
1714
- if (!(!d.active || !d.isThrown || d.isDying)) {
1715
- if (_ = !0, d.position.x < -120 || d.position.x > c + 120 || d.position.y < -120 || d.position.y > h + 120) {
1716
- if (d.type === "heavy") {
1722
+ for (const g of t)
1723
+ if (!(!g.active || !g.isThrown || g.isDying)) {
1724
+ if (_ = !0, g.position.x < -120 || g.position.x > l + 120 || g.position.y < -120 || g.position.y > h + 120) {
1725
+ if (g.type === "heavy") {
1717
1726
  s.push({
1718
1727
  id: Math.random().toString(),
1719
- position: { ...d.position },
1728
+ position: { ...g.position },
1720
1729
  radius: 20,
1721
1730
  maxRadius: 350,
1722
1731
  color: "#00f5ff",
@@ -1724,12 +1733,12 @@ class rt {
1724
1733
  lifetime: 0,
1725
1734
  maxLifetime: 0.6
1726
1735
  });
1727
- for (let g = 0; g < 40; g++) {
1728
- const f = Math.random() * Math.PI * 2, x = 250 + Math.random() * 450;
1736
+ for (let d = 0; d < 40; d++) {
1737
+ const m = Math.random() * Math.PI * 2, x = 250 + Math.random() * 450;
1729
1738
  a.push({
1730
1739
  id: Math.random().toString(),
1731
- position: { ...d.position },
1732
- velocity: { x: Math.cos(f) * x, y: Math.sin(f) * x },
1740
+ position: { ...g.position },
1741
+ velocity: { x: Math.cos(m) * x, y: Math.sin(m) * x },
1733
1742
  color: "#00f5ff",
1734
1743
  radius: 4 + Math.random() * 5,
1735
1744
  alpha: 1,
@@ -1737,15 +1746,15 @@ class rt {
1737
1746
  maxLifetime: 0.6
1738
1747
  });
1739
1748
  }
1740
- } else if (d.type === "piercer") {
1741
- const g = A.getInstance().getConfig().piercer;
1742
- if (g.terminalAoERadius > 0) {
1743
- const f = g.terminalAoERadius;
1749
+ } else if (g.type === "piercer") {
1750
+ const d = E.getInstance().getConfig().piercer;
1751
+ if (d.terminalAoERadius > 0) {
1752
+ const m = d.terminalAoERadius;
1744
1753
  s.push({
1745
1754
  id: Math.random().toString(),
1746
- position: { ...d.position },
1755
+ position: { ...g.position },
1747
1756
  radius: 20,
1748
- maxRadius: f,
1757
+ maxRadius: m,
1749
1758
  color: "#ff2a5f",
1750
1759
  alpha: 1,
1751
1760
  lifetime: 0,
@@ -1753,28 +1762,28 @@ class rt {
1753
1762
  });
1754
1763
  for (const x of t) {
1755
1764
  if (!x.active || x.isGrabbed || x.isDying) continue;
1756
- const b = x.position.x - d.position.x, S = x.position.y - d.position.y;
1757
- Math.hypot(b, S) <= f && L.killEnemy(x, Math.atan2(S, b), e, i, s, t);
1765
+ const A = x.position.x - g.position.x, b = x.position.y - g.position.y;
1766
+ Math.hypot(A, b) <= m && T.killEnemy(x, Math.atan2(b, A), e, i, s, t);
1758
1767
  }
1759
1768
  }
1760
1769
  }
1761
- d.active = !1, d.isThrown = !1;
1770
+ g.active = !1, g.isThrown = !1;
1762
1771
  continue;
1763
1772
  }
1764
- for (const g of t) {
1765
- if (g === d || !g.active || g.isGrabbed || g.isDying) continue;
1766
- const f = g.position.x - d.position.x, x = g.position.y - d.position.y;
1767
- if (Math.hypot(f, x) <= d.getHitRadius() + g.getHitRadius()) {
1768
- u.pos = { x: d.position.x, y: d.position.y };
1769
- const S = Math.atan2(d.velocity.y, d.velocity.x);
1770
- if (d.type === "heavy") {
1771
- u.kills++, L.killEnemy(g, d.rotation, e, i, s, t), n.triggerHitstop(0.04), n.triggerScreenShake({ x: f, y: x }, 8);
1773
+ for (const d of t) {
1774
+ if (d === g || !d.active || d.isGrabbed || d.isDying) continue;
1775
+ const m = d.position.x - g.position.x, x = d.position.y - g.position.y;
1776
+ if (Math.hypot(m, x) <= g.getHitRadius() + d.getHitRadius()) {
1777
+ u.pos = { x: g.position.x, y: g.position.y };
1778
+ const b = Math.atan2(g.velocity.y, g.velocity.x);
1779
+ if (g.type === "heavy") {
1780
+ u.kills++, T.killEnemy(d, g.rotation, e, i, s, t), n.triggerHitstop(0.04), n.triggerScreenShake({ x: m, y: x }, 8);
1772
1781
  for (let I = 0; I < 8; I++) {
1773
- const v = d.rotation + (Math.random() - 0.5), m = 200 + Math.random() * 350;
1782
+ const S = g.rotation + (Math.random() - 0.5), f = 200 + Math.random() * 350;
1774
1783
  a.push({
1775
1784
  id: Math.random().toString(),
1776
- position: { ...g.position },
1777
- velocity: { x: Math.cos(v) * m, y: Math.sin(v) * m },
1785
+ position: { ...d.position },
1786
+ velocity: { x: Math.cos(S) * f, y: Math.sin(S) * f },
1778
1787
  color: "#00f5ff",
1779
1788
  radius: 3 + Math.random() * 4,
1780
1789
  alpha: 1,
@@ -1783,10 +1792,10 @@ class rt {
1783
1792
  });
1784
1793
  }
1785
1794
  p && p();
1786
- } else if (d.type === "piercer") {
1787
- u.kills++, L.killEnemy(g, S, e, i, s, t), n.triggerHitstop(0.05), n.triggerScreenShake({ x: f, y: x }, 7), s.push({
1795
+ } else if (g.type === "piercer") {
1796
+ u.kills++, T.killEnemy(d, b, e, i, s, t), n.triggerHitstop(0.05), n.triggerScreenShake({ x: m, y: x }, 7), s.push({
1788
1797
  id: Math.random().toString(),
1789
- position: { ...g.position },
1798
+ position: { ...d.position },
1790
1799
  radius: 10,
1791
1800
  maxRadius: 180,
1792
1801
  color: "#ff2a5f",
@@ -1795,11 +1804,11 @@ class rt {
1795
1804
  maxLifetime: 0.45
1796
1805
  });
1797
1806
  for (let I = 0; I < 16; I++) {
1798
- const v = Math.random() * Math.PI * 2, m = 150 + Math.random() * 300;
1807
+ const S = Math.random() * Math.PI * 2, f = 150 + Math.random() * 300;
1799
1808
  a.push({
1800
1809
  id: Math.random().toString(),
1801
- position: { ...g.position },
1802
- velocity: { x: Math.cos(v) * m, y: Math.sin(v) * m },
1810
+ position: { ...d.position },
1811
+ velocity: { x: Math.cos(S) * f, y: Math.sin(S) * f },
1803
1812
  color: "#ff2a5f",
1804
1813
  radius: 3 + Math.random() * 3,
1805
1814
  alpha: 1,
@@ -1807,98 +1816,98 @@ class rt {
1807
1816
  maxLifetime: 0.4
1808
1817
  });
1809
1818
  }
1810
- if (d.remainingHomingKills > 0) {
1811
- d.remainingHomingKills--;
1812
- let I = null, v = 1 / 0;
1813
- for (const m of t) {
1814
- if (m === d || m === g || !m.active || m.isGrabbed || m.isDying) continue;
1815
- const y = m.position.x - d.position.x, T = m.position.y - d.position.y, R = Math.hypot(y, T);
1816
- R < v && (v = R, I = m);
1819
+ if (g.remainingHomingKills > 0) {
1820
+ g.remainingHomingKills--;
1821
+ let I = null, S = 1 / 0;
1822
+ for (const f of t) {
1823
+ if (f === g || f === d || !f.active || f.isGrabbed || f.isDying) continue;
1824
+ const v = f.position.x - g.position.x, L = f.position.y - g.position.y, D = Math.hypot(v, L);
1825
+ D < S && (S = D, I = f);
1817
1826
  }
1818
1827
  if (I) {
1819
- const m = Math.atan2(I.position.y - d.position.y, I.position.x - d.position.x), y = Math.hypot(d.velocity.x, d.velocity.y) || 1200;
1820
- d.rotation = m, d.velocity = {
1821
- x: Math.cos(m) * y,
1822
- y: Math.sin(m) * y
1828
+ const f = Math.atan2(I.position.y - g.position.y, I.position.x - g.position.x), v = Math.hypot(g.velocity.x, g.velocity.y) || 1200;
1829
+ g.rotation = f, g.velocity = {
1830
+ x: Math.cos(f) * v,
1831
+ y: Math.sin(f) * v
1823
1832
  };
1824
1833
  }
1825
1834
  }
1826
1835
  p && p();
1827
1836
  } else {
1828
- const I = d.type === g.type, v = I ? 360 : 250;
1837
+ const I = g.type === d.type, S = I ? 360 : 250;
1829
1838
  s.push({
1830
1839
  id: Math.random().toString(),
1831
1840
  position: { ...u.pos },
1832
1841
  radius: 15,
1833
- maxRadius: v,
1834
- color: d.color,
1842
+ maxRadius: S,
1843
+ color: g.color,
1835
1844
  alpha: 1,
1836
1845
  lifetime: 0,
1837
1846
  maxLifetime: 0.55
1838
1847
  });
1839
- for (let m = 0; m < 45; m++) {
1840
- const y = Math.random() * Math.PI * 2, T = 200 + Math.random() * 450;
1848
+ for (let f = 0; f < 45; f++) {
1849
+ const v = Math.random() * Math.PI * 2, L = 200 + Math.random() * 450;
1841
1850
  a.push({
1842
1851
  id: Math.random().toString(),
1843
1852
  position: { ...u.pos },
1844
- velocity: { x: Math.cos(y) * T, y: Math.sin(y) * T },
1845
- color: d.color,
1853
+ velocity: { x: Math.cos(v) * L, y: Math.sin(v) * L },
1854
+ color: g.color,
1846
1855
  radius: 4 + Math.random() * 6,
1847
1856
  alpha: 1,
1848
1857
  lifetime: 0,
1849
1858
  maxLifetime: 0.7
1850
1859
  });
1851
1860
  }
1852
- if (d.strategy) {
1853
- d.strategy.execute({
1854
- thrownEnemy: d,
1855
- targetEnemy: g,
1861
+ if (g.strategy) {
1862
+ g.strategy.execute({
1863
+ thrownEnemy: g,
1864
+ targetEnemy: d,
1856
1865
  allEnemies: t,
1857
1866
  pools: e,
1858
1867
  vortices: i,
1859
1868
  shockwaves: s,
1860
1869
  particles: a,
1861
- floatingTexts: l,
1870
+ floatingTexts: c,
1862
1871
  eventBus: o,
1863
- width: c,
1872
+ width: l,
1864
1873
  height: h
1865
1874
  }), u.kills += 2, p && p();
1866
1875
  break;
1867
1876
  }
1868
1877
  if (I) {
1869
- u.kills += 2, n.triggerHitstop(0.14), n.triggerFlash(0.5), n.triggerScreenShake({ x: f, y: x }, 16), l.push({
1878
+ u.kills += 2, n.triggerHitstop(0.14), n.triggerFlash(0.5), n.triggerScreenShake({ x: m, y: x }, 16), c.push({
1870
1879
  id: Math.random().toString(),
1871
1880
  text: "COLOR SYNERGY!",
1872
1881
  position: { ...u.pos },
1873
1882
  velocity: { x: 0, y: -80 },
1874
- color: d.color,
1883
+ color: g.color,
1875
1884
  alpha: 1,
1876
1885
  lifetime: 0,
1877
1886
  maxLifetime: 1.2,
1878
1887
  size: 26
1879
1888
  });
1880
- const m = A.getInstance().getConfig();
1881
- d.type === "spore" ? e.push({
1889
+ const f = E.getInstance().getConfig();
1890
+ g.type === "spore" ? e.push({
1882
1891
  id: Math.random().toString(),
1883
1892
  position: { ...u.pos },
1884
- radius: m.toxicPool.synergyRadius,
1893
+ radius: Math.round(f.toxicPool.baseRadius * 2),
1885
1894
  duration: 0,
1886
- maxDuration: m.toxicPool.synergyDuration,
1887
- damage: m.toxicPool.damage * 2
1888
- }) : d.type === "parasite" && i.push({
1895
+ maxDuration: f.toxicPool.synergyDuration,
1896
+ damage: f.toxicPool.damage * 2
1897
+ }) : g.type === "parasite" && i.push({
1889
1898
  id: Math.random().toString(),
1890
1899
  position: { ...u.pos },
1891
- radius: m.gravityVortex.synergyRadius,
1900
+ radius: Math.round(f.gravityVortex.baseRadius * 1.8),
1892
1901
  duration: 0,
1893
- maxDuration: m.gravityVortex.synergyDuration,
1894
- pullForce: m.gravityVortex.synergyPullForce
1895
- }), L.killEnemy(d, S, e, i, s, t), L.killEnemy(g, S, e, i, s, t);
1902
+ maxDuration: f.gravityVortex.synergyDuration,
1903
+ pullForce: f.gravityVortex.synergyPullForce
1904
+ }), T.killEnemy(g, b, e, i, s, t), T.killEnemy(d, b, e, i, s, t);
1896
1905
  } else
1897
- u.kills += 2, n.triggerHitstop(0.08), n.triggerFlash(0.35), n.triggerScreenShake({ x: f, y: x }, 10), L.killEnemy(d, S, e, i, s, t), L.killEnemy(g, S, e, i, s, t);
1898
- for (const m of t) {
1899
- if (m === d || m === g || !m.active || m.isGrabbed || m.isDying) continue;
1900
- const y = m.position.x - u.pos.x, T = m.position.y - u.pos.y;
1901
- Math.hypot(y, T) <= v && m.type !== "micro" && (L.killEnemy(m, S, e, i, s, t), u.kills++);
1906
+ u.kills += 2, n.triggerHitstop(0.08), n.triggerFlash(0.35), n.triggerScreenShake({ x: m, y: x }, 10), T.killEnemy(g, b, e, i, s, t), T.killEnemy(d, b, e, i, s, t);
1907
+ for (const f of t) {
1908
+ if (f === g || f === d || !f.active || f.isGrabbed || f.isDying) continue;
1909
+ const v = f.position.x - u.pos.x, L = f.position.y - u.pos.y;
1910
+ Math.hypot(v, L) <= S && f.type !== "micro" && (T.killEnemy(f, b, e, i, s, t), u.kills++);
1902
1911
  }
1903
1912
  p && p();
1904
1913
  break;
@@ -1906,7 +1915,7 @@ class rt {
1906
1915
  }
1907
1916
  }
1908
1917
  }
1909
- r.value = u.kills, !_ && u.kills > 0 && (u.kills >= 2 && u.pos && l.push({
1918
+ r.value = u.kills, !_ && u.kills > 0 && (u.kills >= 2 && u.pos && c.push({
1910
1919
  id: Math.random().toString(),
1911
1920
  text: `MULTIKILL x${u.kills}!`,
1912
1921
  position: { ...u.pos },
@@ -1919,30 +1928,30 @@ class rt {
1919
1928
  }), o.emit("onComboUpdated", { combo: r.value }), u.kills = 0, u.pos = null);
1920
1929
  }
1921
1930
  }
1922
- class lt {
1923
- static update(t, e, i, s, a, l, n, o) {
1931
+ class st {
1932
+ static update(t, e, i, s, a, c, n, o) {
1924
1933
  for (let r = t.length - 1; r >= 0; r--) {
1925
- const c = t[r];
1926
- if (c) {
1927
- c.duration += l;
1934
+ const l = t[r];
1935
+ if (l) {
1936
+ l.duration += c;
1928
1937
  for (const h of e) {
1929
1938
  if (!h.active || h.isGrabbed || h.isDying || h.isThrown && h.type === "piercer") continue;
1930
- const u = h.position.x - c.position.x, p = h.position.y - c.position.y;
1931
- Math.hypot(u, p) <= c.radius && (L.killEnemy(h, 0, t, i, s, e), n.kills++, o && o());
1939
+ const u = h.position.x - l.position.x, p = h.position.y - l.position.y;
1940
+ Math.hypot(u, p) <= l.radius && (T.killEnemy(h, 0, t, i, s, e), n.kills++, o && o());
1932
1941
  }
1933
- c.duration >= c.maxDuration && t.splice(r, 1);
1942
+ l.duration >= l.maxDuration && t.splice(r, 1);
1934
1943
  }
1935
1944
  }
1936
1945
  }
1937
1946
  }
1938
- class ct {
1939
- static update(t, e, i, s, a, l, n, o, r, c, h, u) {
1947
+ class at {
1948
+ static update(t, e, i, s, a, c, n, o, r, l, h, u) {
1940
1949
  for (const p of t)
1941
1950
  if (!(!p.active || !p.isStationaryShield || p.isDying))
1942
1951
  for (const _ of t) {
1943
1952
  if (_ === p || !_.active || _.isGrabbed || _.isDying) continue;
1944
- const d = _.position.x - p.position.x, g = _.position.y - p.position.y;
1945
- if (Math.hypot(d, g) <= p.getHitRadius() + _.getHitRadius()) {
1953
+ const g = _.position.x - p.position.x, d = _.position.y - p.position.y;
1954
+ if (Math.hypot(g, d) <= p.getHitRadius() + _.getHitRadius()) {
1946
1955
  p.isStationaryShield = !1, p.strategy && p.strategy.execute({
1947
1956
  thrownEnemy: p,
1948
1957
  targetEnemy: _,
@@ -1951,61 +1960,76 @@ class ct {
1951
1960
  vortices: i,
1952
1961
  shockwaves: s,
1953
1962
  particles: a,
1954
- floatingTexts: l,
1963
+ floatingTexts: c,
1955
1964
  eventBus: o,
1956
- width: c,
1965
+ width: l,
1957
1966
  height: h
1958
- }), r.kills += 2, n.triggerHitstop(0.12), n.triggerScreenShake({ x: d, y: g }, 18), u && u();
1967
+ }), r.kills += 2, n.triggerHitstop(0.12), n.triggerScreenShake({ x: g, y: d }, 18), u && u();
1959
1968
  break;
1960
1969
  }
1961
1970
  }
1962
1971
  }
1963
1972
  }
1964
- class ht {
1973
+ class ot {
1965
1974
  spatialHash;
1966
1975
  eventBus;
1967
1976
  i18n;
1968
1977
  throwState = { kills: 0, pos: null };
1969
1978
  constructor(t, e) {
1970
- this.spatialHash = new j(100), this.eventBus = t, this.i18n = e;
1979
+ this.spatialHash = new Z(100), this.eventBus = t, this.i18n = e;
1971
1980
  }
1972
- update(t, e, i, s, a, l, n, o, r, c, h, u, p, _) {
1981
+ update(t, e, i, s, a, c, n, o, r, l, h, u, p, _) {
1973
1982
  this.spatialHash.clear();
1974
- const d = A.getInstance().getConfig().piercer;
1975
- for (const g of i)
1976
- if (g.active && !g.isDying) {
1977
- if (g.isThrown && g.type === "piercer" && d.hasHoming && g.remainingHomingKills > 0) {
1978
- let f = null, x = 1 / 0;
1979
- for (const b of i) {
1980
- if (b === g || !b.active || b.isGrabbed || b.isDying) continue;
1981
- const S = b.position.x - g.position.x, I = b.position.y - g.position.y, v = Math.hypot(S, I);
1982
- v < x && (x = v, f = b);
1983
+ const g = E.getInstance().getConfig().piercer;
1984
+ for (const d of i)
1985
+ if (d.active && !d.isDying) {
1986
+ if (d.isThrown && d.type === "piercer" && g.hasHoming && d.remainingHomingKills > 0) {
1987
+ let m = null, x = 1 / 0;
1988
+ for (const A of i) {
1989
+ if (A === d || !A.active || A.isGrabbed || A.isDying) continue;
1990
+ const b = A.position.x - d.position.x, I = A.position.y - d.position.y, S = Math.hypot(b, I);
1991
+ S < x && (x = S, m = A);
1983
1992
  }
1984
- if (f) {
1985
- const b = Math.atan2(f.position.y - g.position.y, f.position.x - g.position.x), S = Math.max(Math.hypot(g.velocity.x, g.velocity.y), 1e3), I = 25 * t, v = Math.atan2(g.velocity.y, g.velocity.x);
1986
- let m = b - v;
1987
- for (; m < -Math.PI; ) m += Math.PI * 2;
1988
- for (; m > Math.PI; ) m -= Math.PI * 2;
1989
- const y = v + Math.sign(m) * Math.min(Math.abs(m), I);
1990
- g.rotation = y, g.velocity = {
1991
- x: Math.cos(y) * S,
1992
- y: Math.sin(y) * S
1993
+ if (m) {
1994
+ const A = Math.atan2(m.position.y - d.position.y, m.position.x - d.position.x), b = Math.max(Math.hypot(d.velocity.x, d.velocity.y), 1e3), I = 25 * t, S = Math.atan2(d.velocity.y, d.velocity.x);
1995
+ let f = A - S;
1996
+ for (; f < -Math.PI; ) f += Math.PI * 2;
1997
+ for (; f > Math.PI; ) f -= Math.PI * 2;
1998
+ const v = S + Math.sign(f) * Math.min(Math.abs(f), I);
1999
+ d.rotation = v, d.velocity = {
2000
+ x: Math.cos(v) * b,
2001
+ y: Math.sin(v) * b
1993
2002
  };
1994
2003
  }
1995
2004
  }
1996
- g.update(t), this.spatialHash.insert(g);
1997
- } else g.active && g.isDying && g.update(t);
1998
- for (let g = l.length - 1; g >= 0; g--) {
1999
- const f = l[g];
2000
- if (!f) continue;
2001
- f.lifetime += t;
2002
- const x = f.lifetime / f.maxLifetime;
2003
- f.radius = f.maxRadius * x, f.alpha = Math.max(0, 1 - x), f.lifetime >= f.maxLifetime && l.splice(g, 1);
2004
- }
2005
- tt.update(a, i, t), et.update(
2005
+ if (d.isStationaryShield) {
2006
+ let m = null, x = 1 / 0;
2007
+ for (const A of i) {
2008
+ if (A === d || !A.active || A.isGrabbed || A.isDying || A.isStationaryShield) continue;
2009
+ const b = A.position.x - d.position.x, I = A.position.y - d.position.y, S = Math.hypot(b, I);
2010
+ S < x && (x = S, m = A);
2011
+ }
2012
+ if (m) {
2013
+ let b = Math.atan2(m.position.y - d.position.y, m.position.x - d.position.x) - d.rotation;
2014
+ for (; b < -Math.PI; ) b += Math.PI * 2;
2015
+ for (; b > Math.PI; ) b -= Math.PI * 2;
2016
+ const I = 5 * t;
2017
+ d.rotation += Math.sign(b) * Math.min(Math.abs(b), I);
2018
+ }
2019
+ }
2020
+ d.update(t), this.spatialHash.insert(d);
2021
+ } else d.active && d.isDying && d.update(t);
2022
+ for (let d = c.length - 1; d >= 0; d--) {
2023
+ const m = c[d];
2024
+ if (!m) continue;
2025
+ m.lifetime += t;
2026
+ const x = m.lifetime / m.maxLifetime;
2027
+ m.radius = m.maxRadius * x, m.alpha = Math.max(0, 1 - x), m.lifetime >= m.maxLifetime && c.splice(d, 1);
2028
+ }
2029
+ $.update(a, i, t), X.update(
2006
2030
  e,
2007
2031
  i,
2008
- l,
2032
+ c,
2009
2033
  n,
2010
2034
  o,
2011
2035
  r,
@@ -2013,34 +2037,34 @@ class ht {
2013
2037
  h,
2014
2038
  u,
2015
2039
  p
2016
- ), rt.update(
2040
+ ), it.update(
2017
2041
  i,
2018
2042
  s,
2019
2043
  a,
2020
- l,
2044
+ c,
2021
2045
  n,
2022
2046
  o,
2023
2047
  r,
2024
2048
  this.eventBus,
2025
- c,
2049
+ l,
2026
2050
  u,
2027
2051
  p,
2028
2052
  this.throwState,
2029
2053
  _
2030
- ), lt.update(
2054
+ ), st.update(
2031
2055
  s,
2032
2056
  i,
2033
2057
  a,
2034
- l,
2058
+ c,
2035
2059
  n,
2036
2060
  t,
2037
2061
  this.throwState,
2038
2062
  _
2039
- ), ct.update(
2063
+ ), at.update(
2040
2064
  i,
2041
2065
  s,
2042
2066
  a,
2043
- l,
2067
+ c,
2044
2068
  n,
2045
2069
  o,
2046
2070
  r,
@@ -2052,11 +2076,11 @@ class ht {
2052
2076
  );
2053
2077
  }
2054
2078
  }
2055
- class ut {
2079
+ class nt {
2056
2080
  pool = [];
2057
2081
  constructor(t = 500) {
2058
2082
  for (let e = 0; e < t; e++) {
2059
- const i = new H(`pool_enemy_${e}`);
2083
+ const i = new w(`pool_enemy_${e}`);
2060
2084
  this.pool.push(i);
2061
2085
  }
2062
2086
  }
@@ -2064,7 +2088,7 @@ class ut {
2064
2088
  for (const e of this.pool)
2065
2089
  if (!e.active)
2066
2090
  return e.reset(), e;
2067
- const t = new H(`fallback_enemy_${Date.now()}_${Math.random()}`);
2091
+ const t = new w(`fallback_enemy_${Date.now()}_${Math.random()}`);
2068
2092
  return this.pool.push(t), t;
2069
2093
  }
2070
2094
  resetAll() {
@@ -2072,7 +2096,7 @@ class ut {
2072
2096
  t.reset();
2073
2097
  }
2074
2098
  }
2075
- class C {
2099
+ class R {
2076
2100
  static getOffscreenPosition(t, e) {
2077
2101
  const i = Math.floor(Math.random() * 4), s = 70;
2078
2102
  return i === 0 ? { x: Math.random() * t, y: -s } : i === 1 ? { x: t + s, y: Math.random() * e } : i === 2 ? { x: Math.random() * t, y: e + s } : { x: -s, y: Math.random() * e };
@@ -2080,11 +2104,11 @@ class C {
2080
2104
  static spawnCircleOfDeath(t, e, i, s) {
2081
2105
  const a = [], n = Math.max(i, s) * 0.55 + 80;
2082
2106
  for (let o = 0; o < 18; o++) {
2083
- const r = o * Math.PI * 2 / 18, c = {
2107
+ const r = o * Math.PI * 2 / 18, l = {
2084
2108
  x: e.x + Math.cos(r) * n,
2085
2109
  y: e.y + Math.sin(r) * n
2086
2110
  }, h = t.get(), u = ["piercer", "spore", "cluster", "parasite"], p = u[o % u.length];
2087
- M.configureEnemy(h, p, c, e), h.velocity = {
2111
+ M.configureEnemy(h, p, l, e), h.velocity = {
2088
2112
  x: Math.cos(r + Math.PI) * 55,
2089
2113
  y: Math.sin(r + Math.PI) * 55
2090
2114
  }, a.push(h);
@@ -2096,15 +2120,15 @@ class C {
2096
2120
  let o = { x: -60, y: -60 };
2097
2121
  n === 0 ? o = { x: Math.random() * e, y: -80 } : n === 1 ? o = { x: e + 80, y: Math.random() * i } : n === 2 ? o = { x: Math.random() * e, y: i + 80 } : o = { x: -80, y: Math.random() * i };
2098
2122
  for (let r = 0; r < 14; r++) {
2099
- const c = {
2123
+ const l = {
2100
2124
  x: (Math.random() - 0.5) * 60,
2101
2125
  y: (Math.random() - 0.5) * 60
2102
- }, h = { x: o.x + c.x, y: o.y + c.y }, u = t.get();
2126
+ }, h = { x: o.x + l.x, y: o.y + l.y }, u = t.get();
2103
2127
  M.configureEnemy(u, "spore", h, s);
2104
- const p = s.x - h.x, _ = s.y - h.y, d = Math.atan2(_, p);
2128
+ const p = s.x - h.x, _ = s.y - h.y, g = Math.atan2(_, p);
2105
2129
  u.velocity = {
2106
- x: Math.cos(d) * (50 + Math.random() * 20),
2107
- y: Math.sin(d) * (50 + Math.random() * 20)
2130
+ x: Math.cos(g) * (50 + Math.random() * 20),
2131
+ y: Math.sin(g) * (50 + Math.random() * 20)
2108
2132
  }, a.push(u);
2109
2133
  }
2110
2134
  return a;
@@ -2115,17 +2139,17 @@ class C {
2115
2139
  const r = {
2116
2140
  x: -60 - o * 40,
2117
2141
  y: n + Math.sin(o * 0.45) * 70
2118
- }, c = t.get();
2119
- M.configureEnemy(c, "cluster", r, s), c.velocity = { x: 75, y: Math.cos(o * 0.45) * 30 }, a.push(c);
2142
+ }, l = t.get();
2143
+ M.configureEnemy(l, "cluster", r, s), l.velocity = { x: 75, y: Math.cos(o * 0.45) * 30 }, a.push(l);
2120
2144
  }
2121
2145
  return a;
2122
2146
  }
2123
2147
  static spawnDoubleSpiral(t, e, i, s) {
2124
2148
  const a = [];
2125
2149
  for (let n = 0; n < 14; n++) {
2126
- const o = n / 14, r = o * Math.PI * 4, c = 120 + o * 450, h = {
2127
- x: e + Math.cos(r) * c,
2128
- y: -60 + Math.sin(r) * c
2150
+ const o = n / 14, r = o * Math.PI * 4, l = 120 + o * 450, h = {
2151
+ x: e + Math.cos(r) * l,
2152
+ y: -60 + Math.sin(r) * l
2129
2153
  }, u = t.get();
2130
2154
  M.configureEnemy(u, "parasite", h, s), a.push(u);
2131
2155
  }
@@ -2134,11 +2158,11 @@ class C {
2134
2158
  static spawnMarchingWall(t, e, i, s) {
2135
2159
  const a = [], n = Math.random() > 0.5;
2136
2160
  for (let o = 0; o < 12; o++) {
2137
- const r = o / 11 * i, c = {
2161
+ const r = o / 11 * i, l = {
2138
2162
  x: n ? -60 : e + 60,
2139
2163
  y: r
2140
2164
  }, h = t.get();
2141
- M.configureEnemy(h, "piercer", c, s), h.velocity = {
2165
+ M.configureEnemy(h, "piercer", l, s), h.velocity = {
2142
2166
  x: n ? 70 : -70,
2143
2167
  y: 0
2144
2168
  }, a.push(h);
@@ -2150,13 +2174,13 @@ class C {
2150
2174
  for (let n = 0; n < 10; n++) {
2151
2175
  const o = { x: -50 - n * 35, y: -50 - n * 35 }, r = t.get();
2152
2176
  M.configureEnemy(r, "spore", o, s), a.push(r);
2153
- const c = { x: e + 50 + n * 35, y: i + 50 + n * 35 }, h = t.get();
2154
- M.configureEnemy(h, "cluster", c, s), a.push(h);
2177
+ const l = { x: e + 50 + n * 35, y: i + 50 + n * 35 }, h = t.get();
2178
+ M.configureEnemy(h, "cluster", l, s), a.push(h);
2155
2179
  }
2156
2180
  return a;
2157
2181
  }
2158
2182
  }
2159
- class pt {
2183
+ class rt {
2160
2184
  wave = 1;
2161
2185
  pool;
2162
2186
  spawnTimer = 0;
@@ -2164,63 +2188,63 @@ class pt {
2164
2188
  patternCooldown = 0;
2165
2189
  initialGracePeriod = 6;
2166
2190
  constructor() {
2167
- this.pool = new ut(500);
2191
+ this.pool = new nt(500);
2168
2192
  }
2169
2193
  reset() {
2170
2194
  this.wave = 1, this.spawnTimer = 0, this.waveTimer = 0, this.patternCooldown = 0;
2171
2195
  }
2172
2196
  update(t, e, i, s, a) {
2173
2197
  this.waveTimer += t, this.spawnTimer += t, this.patternCooldown += t, this.applyFlockingBehaviors(e, t, a);
2174
- const l = e.filter((r) => r.active).length, n = Math.max(0.9, 2.2 - (this.wave - 1) * 0.18);
2175
- if (this.waveTimer > this.initialGracePeriod && this.patternCooldown > Math.max(12 - this.wave, 6) && l < 35) {
2198
+ const c = e.filter((r) => r.active).length, n = Math.max(0.9, 2.2 - (this.wave - 1) * 0.18);
2199
+ if (this.waveTimer > this.initialGracePeriod && this.patternCooldown > Math.max(12 - this.wave, 6) && c < 35) {
2176
2200
  this.patternCooldown = 0;
2177
2201
  const r = this.spawnPatternFormation(i, s, a);
2178
- for (const c of r)
2179
- e.push(c);
2202
+ for (const l of r)
2203
+ e.push(l);
2180
2204
  }
2181
2205
  const o = Math.min(18 + this.wave * 4, 80);
2182
- return this.spawnTimer >= n && l < o ? (this.spawnTimer = 0, this.spawnSingleEnemy(i, s, a)) : null;
2206
+ return this.spawnTimer >= n && c < o ? (this.spawnTimer = 0, this.spawnSingleEnemy(i, s, a)) : null;
2183
2207
  }
2184
2208
  spawnSingleEnemy(t, e, i) {
2185
- const s = C.getOffscreenPosition(t, e), a = Math.random();
2186
- let l = "piercer";
2187
- a > 0.75 ? l = "heavy" : a > 0.55 ? l = "parasite" : a > 0.35 ? l = "cluster" : a > 0.15 && (l = "spore");
2209
+ const s = R.getOffscreenPosition(t, e), a = Math.random();
2210
+ let c = "piercer";
2211
+ a > 0.75 ? c = "heavy" : a > 0.55 ? c = "parasite" : a > 0.35 ? c = "cluster" : a > 0.15 && (c = "spore");
2188
2212
  const n = this.pool.get();
2189
- return M.configureEnemy(n, l, s, i), n;
2213
+ return M.configureEnemy(n, c, s, i), n;
2190
2214
  }
2191
2215
  spawnPatternFormation(t, e, i) {
2192
2216
  const s = Math.random();
2193
- return s < 0.25 ? C.spawnCircleOfDeath(this.pool, i, t, e) : s < 0.5 ? C.spawnDenseCluster(this.pool, t, e, i) : s < 0.75 ? C.spawnSineSnake(this.pool, t, e, i) : C.spawnMarchingWall(this.pool, t, e, i);
2217
+ return s < 0.25 ? R.spawnCircleOfDeath(this.pool, i, t, e) : s < 0.5 ? R.spawnDenseCluster(this.pool, t, e, i) : s < 0.75 ? R.spawnSineSnake(this.pool, t, e, i) : R.spawnMarchingWall(this.pool, t, e, i);
2194
2218
  }
2195
2219
  applyFlockingBehaviors(t, e, i) {
2196
2220
  for (let a = 0; a < t.length; a++) {
2197
- const l = t[a];
2198
- if (!l.active || l.isGrabbed || l.isThrown || l.isDying) continue;
2221
+ const c = t[a];
2222
+ if (!c.active || c.isGrabbed || c.isThrown || c.isDying) continue;
2199
2223
  let n = 0, o = 0, r = 0;
2200
2224
  for (let p = 0; p < t.length; p++) {
2201
2225
  if (a === p) continue;
2202
2226
  const _ = t[p];
2203
2227
  if (!_.active || _.isGrabbed || _.isDying) continue;
2204
- const d = l.position.x - _.position.x, g = l.position.y - _.position.y, f = Math.hypot(d, g);
2205
- f > 0 && f < 70 && (n += d / f, o += g / f, r++);
2228
+ const g = c.position.x - _.position.x, d = c.position.y - _.position.y, m = Math.hypot(g, d);
2229
+ m > 0 && m < 70 && (n += g / m, o += d / m, r++);
2206
2230
  }
2207
- r > 0 && (n /= r, o /= r, l.velocity.x += n * 60 * e, l.velocity.y += o * 60 * e);
2208
- const c = i.x - l.position.x, h = i.y - l.position.y, u = Math.hypot(c, h);
2231
+ r > 0 && (n /= r, o /= r, c.velocity.x += n * 60 * e, c.velocity.y += o * 60 * e);
2232
+ const l = i.x - c.position.x, h = i.y - c.position.y, u = Math.hypot(l, h);
2209
2233
  if (u > 0) {
2210
2234
  const p = 80 + Math.min(this.wave * 4, 40);
2211
- l.velocity.x += c / u * p * e, l.velocity.y += h / u * p * e;
2235
+ c.velocity.x += l / u * p * e, c.velocity.y += h / u * p * e;
2212
2236
  }
2213
- if (l.maxSpeed > 0) {
2214
- const p = Math.hypot(l.velocity.x, l.velocity.y);
2215
- if (p > l.maxSpeed) {
2216
- const _ = l.maxSpeed / p;
2217
- l.velocity.x *= _, l.velocity.y *= _;
2237
+ if (c.maxSpeed > 0) {
2238
+ const p = Math.hypot(c.velocity.x, c.velocity.y);
2239
+ if (p > c.maxSpeed) {
2240
+ const _ = c.maxSpeed / p;
2241
+ c.velocity.x *= _, c.velocity.y *= _;
2218
2242
  }
2219
2243
  }
2220
2244
  }
2221
2245
  }
2222
2246
  }
2223
- const O = {
2247
+ const C = {
2224
2248
  bioluminescent: {
2225
2249
  bgInner: "#081220",
2226
2250
  bgMid: "#050b16",
@@ -2235,7 +2259,13 @@ const O = {
2235
2259
  corePrimary: "#00f0ff",
2236
2260
  coreGlow: "rgba(0, 240, 255, 0.85)",
2237
2261
  tendrilMagenta: "#ff00dd",
2238
- tendrilCyan: "#00ffff"
2262
+ tendrilCyan: "#00ffff",
2263
+ effectHighlight: "#ffffff",
2264
+ effectInk: "#ffffff",
2265
+ effectShadow: "#000000",
2266
+ effectPanel: "rgba(0, 0, 0, 0.65)",
2267
+ vortexCore: "#000000",
2268
+ vortexMid: "#140028"
2239
2269
  },
2240
2270
  dark: {
2241
2271
  bgInner: "#0d0f17",
@@ -2251,7 +2281,13 @@ const O = {
2251
2281
  corePrimary: "#00b4d8",
2252
2282
  coreGlow: "rgba(0, 180, 216, 0.85)",
2253
2283
  tendrilMagenta: "#d800a6",
2254
- tendrilCyan: "#00b4d8"
2284
+ tendrilCyan: "#00b4d8",
2285
+ effectHighlight: "#ffffff",
2286
+ effectInk: "#ffffff",
2287
+ effectShadow: "#000000",
2288
+ effectPanel: "rgba(0, 0, 0, 0.65)",
2289
+ vortexCore: "#000000",
2290
+ vortexMid: "#140028"
2255
2291
  },
2256
2292
  light: {
2257
2293
  bgInner: "#f1f5f9",
@@ -2267,24 +2303,30 @@ const O = {
2267
2303
  corePrimary: "#0077b6",
2268
2304
  coreGlow: "rgba(0, 119, 182, 0.85)",
2269
2305
  tendrilMagenta: "#b5008c",
2270
- tendrilCyan: "#0077b6"
2271
- }
2272
- }, U = "axon_surge_theme";
2273
- class dt {
2306
+ tendrilCyan: "#0077b6",
2307
+ effectHighlight: "#fffaf2",
2308
+ effectInk: "#17324d",
2309
+ effectShadow: "#18334c",
2310
+ effectPanel: "rgba(255, 255, 255, 0.82)",
2311
+ vortexCore: "#274760",
2312
+ vortexMid: "#577c9e"
2313
+ }
2314
+ }, N = "axon_surge_theme";
2315
+ class lt {
2274
2316
  currentTheme = "dark";
2275
2317
  isExplicit = !1;
2276
2318
  targetElement;
2277
2319
  constructor(t, e) {
2278
2320
  e !== void 0 && (this.targetElement = e);
2279
2321
  try {
2280
- const i = localStorage.getItem(U);
2281
- if (i && O[i]) {
2322
+ const i = localStorage.getItem(N);
2323
+ if (i && C[i]) {
2282
2324
  this.currentTheme = i, this.isExplicit = !0, this.applyThemeToDOM();
2283
2325
  return;
2284
2326
  }
2285
2327
  } catch {
2286
2328
  }
2287
- if (t && O[t]) {
2329
+ if (t && C[t]) {
2288
2330
  this.currentTheme = t, this.isExplicit = !0, this.applyThemeToDOM();
2289
2331
  return;
2290
2332
  }
@@ -2294,10 +2336,10 @@ class dt {
2294
2336
  this.targetElement = t, this.isExplicit ? this.applyThemeToDOM() : this.currentTheme = this.detectParentOrSystemTheme();
2295
2337
  }
2296
2338
  setTheme(t) {
2297
- if (O[t]) {
2339
+ if (C[t]) {
2298
2340
  this.currentTheme = t, this.isExplicit = !0, this.applyThemeToDOM();
2299
2341
  try {
2300
- localStorage.setItem(U, t);
2342
+ localStorage.setItem(N, t);
2301
2343
  } catch {
2302
2344
  }
2303
2345
  }
@@ -2305,7 +2347,7 @@ class dt {
2305
2347
  clearExplicitTheme() {
2306
2348
  this.isExplicit = !1;
2307
2349
  try {
2308
- localStorage.removeItem(U);
2350
+ localStorage.removeItem(N);
2309
2351
  } catch {
2310
2352
  }
2311
2353
  this.removeThemeClasses(), this.currentTheme = this.detectParentOrSystemTheme();
@@ -2314,7 +2356,7 @@ class dt {
2314
2356
  return this.isExplicit || (this.currentTheme = this.detectParentOrSystemTheme()), this.currentTheme;
2315
2357
  }
2316
2358
  getPalette() {
2317
- return O[this.getTheme()] || O.dark;
2359
+ return C[this.getTheme()] || C.dark;
2318
2360
  }
2319
2361
  detectParentOrSystemTheme() {
2320
2362
  try {
@@ -2352,69 +2394,110 @@ class dt {
2352
2394
  this.targetElement.classList.add(t);
2353
2395
  }
2354
2396
  }
2355
- class gt {
2356
- maxDistance = 450;
2357
- maxThickness = 28;
2358
- minThickness = 4;
2359
- maxLength = 140;
2360
- minLength = 40;
2361
- render(t, e, i, s) {
2362
- for (const a of e) {
2363
- if (!a.active || a.isGrabbed || a.isDying) continue;
2364
- const l = a.position.x, n = a.position.y;
2365
- if (l >= 0 && l <= i && n >= 0 && n <= s) continue;
2366
- const o = Math.min(i, Math.max(0, l)), r = Math.min(s, Math.max(0, n)), c = Math.hypot(l - o, n - r);
2367
- if (c <= 0 || c > this.maxDistance) continue;
2368
- const h = Math.min(1, Math.max(0, c / this.maxDistance)), u = this.minThickness + (this.maxThickness - this.minThickness) * h, p = this.minLength + (this.maxLength - this.minLength) * h, _ = 0.35 + (1 - h) * 0.55;
2369
- if (t.save(), t.globalAlpha = _, t.shadowColor = a.color, t.shadowBlur = 12 + (1 - h) * 16, t.strokeStyle = a.color, t.lineWidth = u, t.lineCap = "round", t.beginPath(), o === 0 || o === i) {
2370
- const d = Math.max(0, r - p / 2), g = Math.min(s, r + p / 2);
2371
- t.moveTo(o, d), t.lineTo(o, g);
2397
+ class ct {
2398
+ maxDistance = 800;
2399
+ maxThickness = 18;
2400
+ minThickness = 5;
2401
+ maxLength = 110;
2402
+ minLength = 50;
2403
+ render(t, e, i, s, a) {
2404
+ for (const c of e) {
2405
+ if (!c.active || c.isGrabbed || c.isDying) continue;
2406
+ const n = c.position.x, o = c.position.y;
2407
+ if (n >= 0 && n <= i && o >= 0 && o <= s) continue;
2408
+ const r = Math.min(i, Math.max(0, n)), l = Math.min(s, Math.max(0, o)), h = Math.hypot(n - r, o - l);
2409
+ if (h <= 0 || h > this.maxDistance) continue;
2410
+ const u = Math.min(1, Math.max(0, h / this.maxDistance)), p = this.minThickness + (this.maxThickness - this.minThickness) * (1 - u), _ = this.minLength + (this.maxLength - this.minLength) * (1 - u), g = 0.55 + (1 - u) * 0.35;
2411
+ if (t.save(), t.globalAlpha = g, t.shadowColor = c.color, t.shadowBlur = 14, t.strokeStyle = c.color, t.lineWidth = p, t.lineCap = "round", t.beginPath(), r === 0 || r === i) {
2412
+ const d = Math.max(0, l - _ / 2), m = Math.min(s, l + _ / 2);
2413
+ t.moveTo(r, d), t.lineTo(r, m);
2372
2414
  } else {
2373
- const d = Math.max(0, o - p / 2), g = Math.min(i, o + p / 2);
2374
- t.moveTo(d, r), t.lineTo(g, r);
2415
+ const d = Math.max(0, r - _ / 2), m = Math.min(i, r + _ / 2);
2416
+ t.moveTo(d, l), t.lineTo(m, l);
2375
2417
  }
2376
- t.stroke(), t.strokeStyle = "#ffffff", t.lineWidth = Math.max(1.5, u * 0.25), t.globalAlpha = _ * 0.8, t.stroke(), t.restore();
2418
+ t.stroke(), t.strokeStyle = a.effectHighlight, t.lineWidth = Math.max(1.8, p * 0.28), t.globalAlpha = g * 0.9, t.stroke(), t.restore();
2377
2419
  }
2378
2420
  }
2379
2421
  }
2380
- class _t {
2381
- render(t, e, i, s, a, l = !1) {
2382
- const n = (210 + (a - 1) * 38 + Math.sin(s * 0.12) * 15) % 360;
2383
- if (l) {
2384
- const S = `hsl(${n}, 50%, 94%)`, I = `hsl(${(n + 25) % 360}, 45%, 89%)`, v = `hsl(${(n + 50) % 360}, 40%, 82%)`, m = t.createRadialGradient(e / 2, i / 2, 40, e / 2, i / 2, Math.max(e, i));
2385
- m.addColorStop(0, S), m.addColorStop(0.55, I), m.addColorStop(1, v), t.fillStyle = m, t.fillRect(0, 0, e, i);
2386
- const y = (n + 75) % 360, T = e * 0.35 + Math.sin(s * 0.25) * 70, R = i * 0.45 + Math.cos(s * 0.2) * 60, D = t.createRadialGradient(T, R, 20, T, R, 400);
2387
- D.addColorStop(0, `hsla(${y}, 65%, 78%, 0.35)`), D.addColorStop(1, "rgba(255, 255, 255, 0)"), t.fillStyle = D, t.beginPath(), t.arc(T, R, 400, 0, Math.PI * 2), t.fill();
2388
- const Z = (n + 160) % 360, w = e * 0.68 + Math.cos(s * 0.28) * 60, k = i * 0.55 + Math.sin(s * 0.22) * 55, G = t.createRadialGradient(w, k, 20, w, k, 440);
2389
- G.addColorStop(0, `hsla(${Z}, 60%, 75%, 0.3)`), G.addColorStop(1, "rgba(255, 255, 255, 0)"), t.fillStyle = G, t.beginPath(), t.arc(w, k, 440, 0, Math.PI * 2), t.fill();
2390
- return;
2422
+ class ht {
2423
+ render(t, e, i, s, a, c, n = !1) {
2424
+ const o = Math.max(1, a), r = Math.min(1, (o - 1) / 8), l = this.wrapHue(190 + (o - 1) * 34 + Math.sin(s * 0.1) * 5), h = this.wrapHue(l + 42), u = this.wrapHue(l + 150), p = e / 2, _ = i / 2, g = Math.max(e, i) * 0.82, d = t.createRadialGradient(p, _, 20, p, _, g);
2425
+ n ? (d.addColorStop(0, `hsl(${l}, 42%, 91%)`), d.addColorStop(0.42, `hsl(${h}, 42%, 86%)`), d.addColorStop(0.78, `hsl(${u}, 38%, 81%)`), d.addColorStop(1, c.bgOuter)) : (d.addColorStop(0, `hsl(${l}, 42%, 11%)`), d.addColorStop(0.42, `hsl(${h}, 48%, 8%)`), d.addColorStop(0.78, `hsl(${u}, 42%, 5%)`), d.addColorStop(1, `hsl(${u}, 48%, 2.5%)`)), t.fillStyle = d, t.fillRect(0, 0, e, i);
2426
+ const m = Math.min(e, i) * 0.055;
2427
+ this.drawNebula(
2428
+ t,
2429
+ e * 0.22 + Math.sin(s * 0.18) * m,
2430
+ i * 0.28 + Math.cos(s * 0.15) * m,
2431
+ Math.max(e, i) * 0.42,
2432
+ l,
2433
+ n ? 0.27 : 0.23,
2434
+ n
2435
+ ), this.drawNebula(
2436
+ t,
2437
+ e * 0.8 + Math.cos(s * 0.14) * m,
2438
+ i * 0.7 + Math.sin(s * 0.17) * m,
2439
+ Math.max(e, i) * 0.48,
2440
+ h,
2441
+ n ? 0.23 : 0.2,
2442
+ n
2443
+ ), this.drawNebula(
2444
+ t,
2445
+ e * 0.86 + Math.sin(s * 0.11) * m * 0.7,
2446
+ i * 0.16 + Math.cos(s * 0.13) * m * 0.7,
2447
+ Math.max(e, i) * 0.3,
2448
+ u,
2449
+ n ? 0.17 : 0.14,
2450
+ n
2451
+ ), this.drawSoftFlows(t, e, i, s, l, r, n), this.drawParticleField(t, e, i, s, l, h, o, n);
2452
+ const x = t.createRadialGradient(p, _, Math.min(e, i) * 0.28, p, _, g);
2453
+ x.addColorStop(0, "rgba(0, 0, 0, 0)"), x.addColorStop(1, n ? "rgba(40, 60, 90, 0.09)" : "rgba(0, 0, 0, 0.2)"), t.fillStyle = x, t.fillRect(0, 0, e, i);
2454
+ }
2455
+ drawNebula(t, e, i, s, a, c, n) {
2456
+ const o = t.createRadialGradient(e, i, 0, e, i, s), r = n ? 52 : 60;
2457
+ o.addColorStop(0, `hsla(${a}, ${n ? 88 : 80}%, ${r}%, ${c})`), o.addColorStop(0.38, `hsla(${a}, ${n ? 82 : 75}%, ${r - (n ? 7 : 12)}%, ${c * 0.5})`), o.addColorStop(1, "rgba(0, 0, 0, 0)"), t.fillStyle = o, t.beginPath(), t.arc(e, i, s, 0, Math.PI * 2), t.fill();
2458
+ }
2459
+ drawSoftFlows(t, e, i, s, a, c, n) {
2460
+ t.save();
2461
+ const o = Math.min(e, i), r = o * 0.035;
2462
+ t.globalAlpha = n ? 0.15 : 0.12, t.lineWidth = Math.max(1.3, o * 17e-4), t.lineCap = "round", t.shadowBlur = o * 0.02, t.shadowColor = `hsla(${a}, 85%, ${n ? 52 : 62}%, 0.28)`;
2463
+ for (let l = 0; l < 3; l++) {
2464
+ const h = (l - 1) * o * 0.075 + Math.sin(s * 0.06 + l) * r, u = l * 28 + c * 18;
2465
+ t.strokeStyle = `hsla(${this.wrapHue(a + u)}, ${n ? 78 : 74}%, ${n ? 47 : 62}%, ${0.52 - l * 0.08})`, t.beginPath(), t.moveTo(-o * 0.12, i * 0.2 + h), t.bezierCurveTo(e * 0.2, i * 0.02 + h, e * 0.47, i * 0.2 - h, e * 0.73, i * 0.07 + h), t.bezierCurveTo(e * 0.94, -o * 0.02 + h, e * 1.04, i * 0.16 + h, e * 1.1, i * 0.36 + h), t.stroke(), t.beginPath(), t.moveTo(-o * 0.1, i * 0.8 - h), t.bezierCurveTo(e * 0.2, i * 0.98 - h, e * 0.48, i * 0.8 + h, e * 0.75, i * 0.93 - h), t.bezierCurveTo(e * 0.94, i * 1.02 - h, e * 1.04, i * 0.84 - h, e * 1.1, i * 0.65 - h), t.stroke();
2466
+ }
2467
+ t.restore();
2468
+ }
2469
+ drawParticleField(t, e, i, s, a, c, n, o) {
2470
+ const r = 44 + Math.min(24, n * 2), l = e / 2, h = i / 2, u = Math.min(e, i) * 0.17;
2471
+ for (let p = 0; p < r; p++) {
2472
+ const _ = p + n * 17, g = this.unitNoise(_ * 1.7) * e, d = this.unitNoise(_ * 2.9 + 13) * i, m = Math.hypot(g - l, d - h), x = Math.min(1, Math.max(0, (m - u) / (Math.min(e, i) * 0.28))), A = 0.7 + Math.sin(s * (0.6 + p % 4 * 0.08) + _) * 0.3, b = (o ? 0.34 : 0.3) * x * A, I = 0.65 + p % 3 * 0.45;
2473
+ t.fillStyle = `hsla(${p % 3 === 0 ? c : a}, ${o ? 82 : 78}%, ${o ? 40 : 70}%, ${b})`, t.beginPath(), t.arc(g, d, I, 0, Math.PI * 2), t.fill();
2391
2474
  }
2392
- const o = `hsl(${n}, 45%, 8%)`, r = `hsl(${(n + 30) % 360}, 40%, 4%)`, c = `hsl(${(n + 60) % 360}, 50%, 2%)`, h = t.createRadialGradient(e / 2, i / 2, 40, e / 2, i / 2, Math.max(e, i));
2393
- h.addColorStop(0, o), h.addColorStop(0.55, r), h.addColorStop(1, c), t.fillStyle = h, t.fillRect(0, 0, e, i);
2394
- const u = (n + 75) % 360, p = e * 0.35 + Math.sin(s * 0.25) * 70, _ = i * 0.45 + Math.cos(s * 0.2) * 60, d = t.createRadialGradient(p, _, 20, p, _, 400);
2395
- d.addColorStop(0, `hsla(${u}, 65%, 12%, 0.35)`), d.addColorStop(1, "rgba(0, 0, 0, 0)"), t.fillStyle = d, t.beginPath(), t.arc(p, _, 400, 0, Math.PI * 2), t.fill();
2396
- const g = (n + 160) % 360, f = e * 0.68 + Math.cos(s * 0.28) * 60, x = i * 0.55 + Math.sin(s * 0.22) * 55, b = t.createRadialGradient(f, x, 20, f, x, 440);
2397
- b.addColorStop(0, `hsla(${g}, 60%, 10%, 0.3)`), b.addColorStop(1, "rgba(0, 0, 0, 0)"), t.fillStyle = b, t.beginPath(), t.arc(f, x, 440, 0, Math.PI * 2), t.fill();
2475
+ }
2476
+ unitNoise(t) {
2477
+ return (Math.sin(t * 12.9898) * 43758.5453 % 1 + 1) % 1;
2478
+ }
2479
+ wrapHue(t) {
2480
+ return (t % 360 + 360) % 360;
2398
2481
  }
2399
2482
  }
2400
- class mt {
2483
+ class ut {
2401
2484
  render(t, e, i) {
2402
2485
  if (!e.isActive) return;
2403
2486
  const s = e.getLauncher(), a = e.getTarget();
2404
2487
  if (!s || !a || !s.active || !a.active) return;
2405
- const l = e.getStep();
2406
- if (t.save(), l === 1) {
2488
+ const c = e.getStep();
2489
+ if (t.save(), c === 1) {
2407
2490
  const n = Math.sin(i * 6) * 10, o = s.position.x, r = s.position.y - 65 + n;
2408
2491
  t.shadowColor = "#00f0ff", t.shadowBlur = 20, t.fillStyle = "#00f0ff", t.beginPath(), t.moveTo(o, r + 20), t.lineTo(o - 16, r - 12), t.lineTo(o - 6, r - 12), t.lineTo(o - 6, r - 32), t.lineTo(o + 6, r - 32), t.lineTo(o + 6, r - 12), t.lineTo(o + 16, r - 12), t.closePath(), t.fill();
2409
- const c = s.radius * (1.6 + Math.sin(i * 8) * 0.3);
2410
- t.strokeStyle = "rgba(0, 240, 255, 0.8)", t.lineWidth = 3, t.beginPath(), t.arc(s.position.x, s.position.y, c, 0, Math.PI * 2), t.stroke();
2411
- } else if (l === 2) {
2492
+ const l = s.radius * (1.6 + Math.sin(i * 8) * 0.3);
2493
+ t.strokeStyle = "rgba(0, 240, 255, 0.8)", t.lineWidth = 3, t.beginPath(), t.arc(s.position.x, s.position.y, l, 0, Math.PI * 2), t.stroke();
2494
+ } else if (c === 2) {
2412
2495
  const n = a.position.x - s.position.x, o = a.position.y - s.position.y;
2413
2496
  if (Math.hypot(n, o) > 10) {
2414
- const c = Math.atan2(o, n);
2497
+ const l = Math.atan2(o, n);
2415
2498
  t.shadowColor = "#ff00dd", t.shadowBlur = 22, t.strokeStyle = "#ff00dd", t.lineWidth = 4, t.setLineDash([12, 8]), t.beginPath(), t.moveTo(s.position.x, s.position.y), t.lineTo(a.position.x, a.position.y), t.stroke(), t.setLineDash([]);
2416
- const h = a.position.x - Math.cos(c) * (a.radius + 10), u = a.position.y - Math.sin(c) * (a.radius + 10);
2417
- t.fillStyle = "#ff00dd", t.beginPath(), t.moveTo(h, u), t.lineTo(h - Math.cos(c - 0.4) * 24, u - Math.sin(c - 0.4) * 24), t.lineTo(h - Math.cos(c + 0.4) * 24, u - Math.sin(c + 0.4) * 24), t.closePath(), t.fill();
2499
+ const h = a.position.x - Math.cos(l) * (a.radius + 10), u = a.position.y - Math.sin(l) * (a.radius + 10);
2500
+ t.fillStyle = "#ff00dd", t.beginPath(), t.moveTo(h, u), t.lineTo(h - Math.cos(l - 0.4) * 24, u - Math.sin(l - 0.4) * 24), t.lineTo(h - Math.cos(l + 0.4) * 24, u - Math.sin(l + 0.4) * 24), t.closePath(), t.fill();
2418
2501
  const p = a.radius * (1.8 + Math.cos(i * 10) * 0.3);
2419
2502
  t.strokeStyle = "rgba(255, 0, 221, 0.9)", t.lineWidth = 3.5, t.beginPath(), t.arc(a.position.x, a.position.y, p, 0, Math.PI * 2), t.stroke();
2420
2503
  }
@@ -2422,7 +2505,7 @@ class mt {
2422
2505
  t.restore();
2423
2506
  }
2424
2507
  }
2425
- class ft {
2508
+ class pt {
2426
2509
  canvas;
2427
2510
  ctx;
2428
2511
  themeManager;
@@ -2430,83 +2513,95 @@ class ft {
2430
2513
  bgRenderer;
2431
2514
  tutorialArrowRenderer;
2432
2515
  constructor(t, e) {
2433
- this.canvas = t, this.ctx = t.getContext("2d"), this.themeManager = e, this.indicatorRenderer = new gt(), this.bgRenderer = new _t(), this.tutorialArrowRenderer = new mt();
2516
+ this.canvas = t, this.ctx = t.getContext("2d"), this.themeManager = e, this.indicatorRenderer = new ct(), this.bgRenderer = new ht(), this.tutorialArrowRenderer = new ut();
2434
2517
  }
2435
- render(t, e, i, s, a, l, n, o, r, c, h = 1, u) {
2518
+ render(t, e, i, s, a, c, n, o, r, l, h = 1, u) {
2436
2519
  if (!this.ctx) return;
2437
- const p = this.themeManager.getPalette(), { width: _, height: d } = this.canvas, g = o.getShakeOffset();
2438
- this.ctx.save(), this.ctx.translate(g.x, g.y), this.bgRenderer.render(this.ctx, _, d, t.pulsePhase, h, this.themeManager.getTheme() === "light"), this.drawToxicPools(i, t.pulsePhase), this.drawGravityVortices(s, t.pulsePhase), this.drawShockwaves(a), this.drawCoreFilaments(t, p), this.drawParticles(l), this.indicatorRenderer.render(this.ctx, e, _, d), this.drawOrganicEnemies(e, t.pulsePhase, p), u && this.tutorialArrowRenderer.render(this.ctx, u, t.pulsePhase), r ? this.drawPsionicTendril(t.position, r.position, p) : t && this.drawHoverTendril(t.position, c, e, p), this.drawOrganicConsciousnessCore(t, p), this.drawFloatingTexts(n), o.flashAlpha > 0 && (this.ctx.fillStyle = `rgba(255, 255, 255, ${o.flashAlpha})`, this.ctx.fillRect(0, 0, _, d)), this.ctx.restore();
2520
+ const p = this.themeManager.getPalette(), { width: _, height: g } = this.canvas, d = o.getShakeOffset();
2521
+ this.ctx.save(), this.ctx.translate(d.x, d.y), this.bgRenderer.render(
2522
+ this.ctx,
2523
+ _,
2524
+ g,
2525
+ t.pulsePhase,
2526
+ h,
2527
+ p,
2528
+ this.themeManager.getTheme() === "light"
2529
+ ), this.drawToxicPools(i, t.pulsePhase), this.drawGravityVortices(s, t.pulsePhase), this.drawShockwaves(a), this.drawCoreFilaments(t, p), this.drawParticles(c), E.getInstance().getConfig().core.hasOffscreenIndicators && this.indicatorRenderer.render(this.ctx, e, _, g, p), this.drawOrganicEnemies(e, t.pulsePhase, p), u && this.tutorialArrowRenderer.render(this.ctx, u, t.pulsePhase), r ? this.drawPsionicTendril(t.position, r.position, p) : t && this.drawHoverTendril(t.position, l, e, p), this.drawOrganicConsciousnessCore(t, p), this.drawFloatingTexts(n), o.flashAlpha > 0 && (this.ctx.fillStyle = `rgba(255, 255, 255, ${o.flashAlpha})`, this.ctx.fillRect(0, 0, _, g)), this.ctx.restore();
2439
2530
  }
2440
2531
  drawToxicPools(t, e) {
2441
2532
  if (this.ctx)
2442
2533
  for (const i of t) {
2443
- const s = i.duration / i.maxDuration, a = Math.min(0.7, (1 - s) * 0.7), { x: l, y: n } = i.position;
2534
+ const s = i.duration / i.maxDuration, a = Math.min(0.7, (1 - s) * 0.7), { x: c, y: n } = i.position;
2444
2535
  this.ctx.save();
2445
- const o = this.ctx.createRadialGradient(l, n, 10, l, n, i.radius * 1.2);
2536
+ const o = this.ctx.createRadialGradient(c, n, 10, c, n, i.radius * 1.2);
2446
2537
  o.addColorStop(0, `rgba(57, 255, 20, ${a * 0.9})`), o.addColorStop(0.4, `rgba(16, 185, 129, ${a * 0.65})`), o.addColorStop(0.8, `rgba(5, 80, 45, ${a * 0.35})`), o.addColorStop(1, "rgba(2, 35, 15, 0)"), this.ctx.fillStyle = o, this.ctx.shadowColor = "#39ff14", this.ctx.shadowBlur = 30, this.ctx.beginPath();
2447
2538
  const r = 70;
2448
- for (let c = 0; c <= r; c++) {
2449
- const h = c * Math.PI * 2 / r, u = Math.sin(h * 5 + e * 3) * 14, p = Math.cos(h * 3 - e * 2) * 9, _ = i.radius + u + p, d = l + Math.cos(h) * _, g = n + Math.sin(h) * _;
2450
- c === 0 ? this.ctx.moveTo(d, g) : this.ctx.lineTo(d, g);
2539
+ for (let l = 0; l <= r; l++) {
2540
+ const h = l * Math.PI * 2 / r, u = Math.sin(h * 5 + e * 3) * 14, p = Math.cos(h * 3 - e * 2) * 9, _ = i.radius + u + p, g = c + Math.cos(h) * _, d = n + Math.sin(h) * _;
2541
+ l === 0 ? this.ctx.moveTo(g, d) : this.ctx.lineTo(g, d);
2451
2542
  }
2452
2543
  this.ctx.closePath(), this.ctx.fill(), this.ctx.strokeStyle = `rgba(57, 255, 20, ${a * 0.8})`, this.ctx.lineWidth = 2.5, this.ctx.beginPath();
2453
- for (let c = 0; c <= r; c++) {
2454
- const h = c * Math.PI * 2 / r, u = Math.sin(h * 6 + e * 4) * 8, p = i.radius * 0.75 + u, _ = l + Math.cos(h) * p, d = n + Math.sin(h) * p;
2455
- c === 0 ? this.ctx.moveTo(_, d) : this.ctx.lineTo(_, d);
2544
+ for (let l = 0; l <= r; l++) {
2545
+ const h = l * Math.PI * 2 / r, u = Math.sin(h * 6 + e * 4) * 8, p = i.radius * 0.75 + u, _ = c + Math.cos(h) * p, g = n + Math.sin(h) * p;
2546
+ l === 0 ? this.ctx.moveTo(_, g) : this.ctx.lineTo(_, g);
2456
2547
  }
2457
2548
  this.ctx.closePath(), this.ctx.stroke();
2458
- for (let c = 0; c < 6; c++) {
2459
- const h = c * Math.PI * 0.33 + e * 1.5, u = i.radius * 0.5 * (0.3 + Math.sin(e * 2 + c) * 0.3), p = l + Math.cos(h) * u, _ = n + Math.sin(h) * u, d = 3 + Math.sin(e * 3 + c) * 2;
2460
- this.ctx.fillStyle = `rgba(255, 255, 255, ${a * 0.8})`, this.ctx.beginPath(), this.ctx.arc(p, _, Math.max(1, d), 0, Math.PI * 2), this.ctx.fill();
2549
+ for (let l = 0; l < 6; l++) {
2550
+ const h = l * Math.PI * 0.33 + e * 1.5, u = i.radius * 0.5 * (0.3 + Math.sin(e * 2 + l) * 0.3), p = c + Math.cos(h) * u, _ = n + Math.sin(h) * u, g = 3 + Math.sin(e * 3 + l) * 2;
2551
+ this.ctx.fillStyle = `rgba(255, 255, 255, ${a * 0.8})`, this.ctx.beginPath(), this.ctx.arc(p, _, Math.max(1, g), 0, Math.PI * 2), this.ctx.fill();
2461
2552
  }
2462
2553
  this.ctx.restore();
2463
2554
  }
2464
2555
  }
2465
2556
  drawShockwaves(t) {
2466
- if (this.ctx)
2467
- for (const e of t) {
2468
- this.ctx.save(), this.ctx.globalAlpha = e.alpha;
2469
- const i = this.ctx.createRadialGradient(
2470
- e.position.x,
2471
- e.position.y,
2472
- 0,
2473
- e.position.x,
2474
- e.position.y,
2475
- e.radius
2476
- );
2477
- i.addColorStop(0, "rgba(255, 255, 255, 0.4)"), i.addColorStop(0.7, e.color), i.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = i, this.ctx.beginPath(), this.ctx.arc(e.position.x, e.position.y, e.radius, 0, Math.PI * 2), this.ctx.fill(), this.ctx.strokeStyle = "#ffffff", this.ctx.lineWidth = 4, this.ctx.shadowColor = e.color, this.ctx.shadowBlur = 24, this.ctx.beginPath(), this.ctx.arc(e.position.x, e.position.y, e.radius, 0, Math.PI * 2), this.ctx.stroke(), this.ctx.restore();
2478
- }
2557
+ if (!this.ctx) return;
2558
+ const e = this.themeManager.getTheme() === "light";
2559
+ for (const i of t) {
2560
+ this.ctx.save(), this.ctx.globalAlpha = i.alpha;
2561
+ const s = this.ctx.createRadialGradient(
2562
+ i.position.x,
2563
+ i.position.y,
2564
+ 0,
2565
+ i.position.x,
2566
+ i.position.y,
2567
+ i.radius
2568
+ );
2569
+ s.addColorStop(0, e ? "rgba(255, 255, 255, 0.72)" : "rgba(255, 255, 255, 0.4)"), s.addColorStop(0.7, i.color), s.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = s, this.ctx.beginPath(), this.ctx.arc(i.position.x, i.position.y, i.radius, 0, Math.PI * 2), this.ctx.fill(), this.ctx.strokeStyle = e ? i.color : "#ffffff", this.ctx.lineWidth = 4, this.ctx.shadowColor = i.color, this.ctx.shadowBlur = 24, this.ctx.beginPath(), this.ctx.arc(i.position.x, i.position.y, i.radius, 0, Math.PI * 2), this.ctx.stroke(), this.ctx.restore();
2570
+ }
2479
2571
  }
2480
2572
  drawGravityVortices(t, e) {
2481
- if (this.ctx)
2482
- for (const i of t) {
2483
- const s = Math.min(0.85, (1 - i.duration / i.maxDuration) * 0.85), a = i.radius * (1 - i.duration / i.maxDuration * 0.1), { x: l, y: n } = i.position;
2484
- this.ctx.save();
2485
- const o = this.ctx.createRadialGradient(l, n, 0, l, n, 60);
2486
- o.addColorStop(0, `rgba(0, 0, 0, ${s})`), o.addColorStop(0.7, `rgba(20, 0, 40, ${s})`), o.addColorStop(1, `rgba(157, 78, 221, ${s * 0.5})`), this.ctx.fillStyle = o, this.ctx.beginPath(), this.ctx.arc(l, n, 60, 0, Math.PI * 2), this.ctx.fill(), this.ctx.strokeStyle = `rgba(157, 78, 221, ${s})`, this.ctx.lineWidth = 5, this.ctx.shadowColor = "#9d4edd", this.ctx.shadowBlur = 32;
2487
- for (let r = 1; r <= 5; r++) {
2488
- const c = a * r / 5, h = e * r * 2.2;
2489
- this.ctx.beginPath(), this.ctx.arc(l, n, c, h, h + Math.PI * 1.5), this.ctx.stroke();
2490
- }
2491
- this.ctx.restore();
2573
+ if (!this.ctx) return;
2574
+ const i = this.themeManager.getPalette();
2575
+ for (const s of t) {
2576
+ const a = Math.min(0.85, (1 - s.duration / s.maxDuration) * 0.85), c = s.radius * (1 - s.duration / s.maxDuration * 0.1), { x: n, y: o } = s.position;
2577
+ this.ctx.save();
2578
+ const r = this.ctx.createRadialGradient(n, o, 0, n, o, 60);
2579
+ r.addColorStop(0, this.colorWithAlpha(i.vortexCore, a)), r.addColorStop(0.7, this.colorWithAlpha(i.vortexMid, a)), r.addColorStop(1, `rgba(157, 78, 221, ${a * 0.5})`), this.ctx.fillStyle = r, this.ctx.beginPath(), this.ctx.arc(n, o, 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;
2580
+ for (let l = 1; l <= 5; l++) {
2581
+ const h = c * l / 5, u = e * l * 2.2;
2582
+ this.ctx.beginPath(), this.ctx.arc(n, o, h, u, u + Math.PI * 1.5), this.ctx.stroke();
2492
2583
  }
2584
+ this.ctx.restore();
2585
+ }
2493
2586
  }
2494
2587
  drawFluidCosmosBackground(t, e, i, s) {
2495
2588
  if (!this.ctx) return;
2496
2589
  const a = this.ctx.createRadialGradient(t / 2, e / 2, 40, t / 2, e / 2, Math.max(t, e));
2497
2590
  a.addColorStop(0, s.bgInner), a.addColorStop(0.5, s.bgMid), a.addColorStop(1, s.bgOuter), this.ctx.fillStyle = a, this.ctx.fillRect(0, 0, t, e);
2498
- const l = t * 0.35 + Math.sin(i * 0.3) * 60, n = e * 0.45 + Math.cos(i * 0.25) * 50, o = this.ctx.createRadialGradient(l, n, 20, l, n, 380);
2499
- o.addColorStop(0, s.nebulaCyan), o.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = o, this.ctx.beginPath(), this.ctx.arc(l, n, 380, 0, Math.PI * 2), this.ctx.fill();
2500
- const r = t * 0.68 + Math.cos(i * 0.35) * 50, c = e * 0.55 + Math.sin(i * 0.3) * 45, h = this.ctx.createRadialGradient(r, c, 20, r, c, 420);
2501
- h.addColorStop(0, s.nebulaMagenta), h.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = h, this.ctx.beginPath(), this.ctx.arc(r, c, 420, 0, Math.PI * 2), this.ctx.fill();
2591
+ const c = t * 0.35 + Math.sin(i * 0.3) * 60, n = e * 0.45 + Math.cos(i * 0.25) * 50, o = this.ctx.createRadialGradient(c, n, 20, c, n, 380);
2592
+ o.addColorStop(0, s.nebulaCyan), o.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = o, this.ctx.beginPath(), this.ctx.arc(c, n, 380, 0, Math.PI * 2), this.ctx.fill();
2593
+ const r = t * 0.68 + Math.cos(i * 0.35) * 50, l = e * 0.55 + Math.sin(i * 0.3) * 45, h = this.ctx.createRadialGradient(r, l, 20, r, l, 420);
2594
+ h.addColorStop(0, s.nebulaMagenta), h.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = h, this.ctx.beginPath(), this.ctx.arc(r, l, 420, 0, Math.PI * 2), this.ctx.fill();
2502
2595
  }
2503
2596
  drawCoreFilaments(t, e) {
2504
2597
  if (!this.ctx) return;
2505
- const i = 12;
2506
- this.ctx.lineWidth = 1.5, this.ctx.strokeStyle = e.nebulaCyan;
2598
+ const i = t.powerUpCount;
2599
+ this.ctx.lineWidth = 1.5;
2507
2600
  for (let s = 0; s < i; s++) {
2508
- const a = s * Math.PI * 2 / i + t.pulsePhase * 0.12, l = 85 + Math.sin(t.pulsePhase * 1.5 + s) * 25, n = t.position.x + Math.cos(a) * l, o = t.position.y + Math.sin(a) * l, r = t.position.x + Math.cos(a + 0.4) * 48, c = t.position.y + Math.sin(a + 0.4) * 48;
2509
- this.ctx.beginPath(), this.ctx.moveTo(t.position.x, t.position.y), this.ctx.quadraticCurveTo(r, c, n, o), this.ctx.stroke(), this.ctx.fillStyle = e.sporeColor, this.ctx.beginPath(), this.ctx.arc(n, o, 3.5, 0, Math.PI * 2), this.ctx.fill();
2601
+ const a = t.collectedPowerUpColors[s] || e.nebulaCyan;
2602
+ this.ctx.strokeStyle = a;
2603
+ const c = s * Math.PI * 2 / i + t.pulsePhase * 0.12, n = 85 + Math.sin(t.pulsePhase * 1.5 + s) * 25, o = t.position.x + Math.cos(c) * n, r = t.position.y + Math.sin(c) * n, l = t.position.x + Math.cos(c + 0.4) * 48, h = t.position.y + Math.sin(c + 0.4) * 48;
2604
+ this.ctx.beginPath(), this.ctx.moveTo(t.position.x, t.position.y), this.ctx.quadraticCurveTo(l, h, o, r), this.ctx.stroke(), this.ctx.fillStyle = a, this.ctx.beginPath(), this.ctx.arc(o, r, 3.5, 0, Math.PI * 2), this.ctx.fill();
2510
2605
  }
2511
2606
  }
2512
2607
  drawOrganicConsciousnessCore(t, e) {
@@ -2518,55 +2613,55 @@ class ft {
2518
2613
  }
2519
2614
  const a = t.getColorHex();
2520
2615
  for (let r = 0; r < t.integrity; r++) {
2521
- const c = t.radius + 16 + r * 12;
2616
+ const l = t.radius + 16 + r * 12;
2522
2617
  this.ctx.strokeStyle = a, this.ctx.lineWidth = 2.2, this.ctx.shadowColor = a, this.ctx.shadowBlur = 12, this.ctx.beginPath();
2523
2618
  const h = 60;
2524
2619
  for (let u = 0; u <= h; u++) {
2525
- const p = u * Math.PI * 2 / h, _ = c + Math.sin(p * 4 + t.pulsePhase * 2 + r) * 3, d = i + Math.cos(p) * _, g = s + Math.sin(p) * _;
2526
- u === 0 ? this.ctx.moveTo(d, g) : this.ctx.lineTo(d, g);
2620
+ const p = u * Math.PI * 2 / h, _ = l + Math.sin(p * 4 + t.pulsePhase * 2 + r) * 3, g = i + Math.cos(p) * _, d = s + Math.sin(p) * _;
2621
+ u === 0 ? this.ctx.moveTo(g, d) : this.ctx.lineTo(g, d);
2527
2622
  }
2528
2623
  this.ctx.closePath(), this.ctx.stroke();
2529
2624
  }
2530
2625
  if (t.repairProgress > 0) {
2531
- const r = t.integrity, c = t.radius + 16 + r * 12;
2626
+ const r = t.integrity, l = t.radius + 16 + r * 12;
2532
2627
  this.ctx.save(), this.ctx.globalAlpha = Math.max(0.15, t.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();
2533
2628
  const h = 60;
2534
2629
  for (let u = 0; u <= h; u++) {
2535
- const p = u * Math.PI * 2 / h, _ = c + Math.sin(p * 4 + t.pulsePhase * 2 + r) * 3, d = i + Math.cos(p) * _, g = s + Math.sin(p) * _;
2536
- u === 0 ? this.ctx.moveTo(d, g) : this.ctx.lineTo(d, g);
2630
+ const p = u * Math.PI * 2 / h, _ = l + Math.sin(p * 4 + t.pulsePhase * 2 + r) * 3, g = i + Math.cos(p) * _, d = s + Math.sin(p) * _;
2631
+ u === 0 ? this.ctx.moveTo(g, d) : this.ctx.lineTo(g, d);
2537
2632
  }
2538
2633
  this.ctx.closePath(), this.ctx.stroke(), this.ctx.restore();
2539
2634
  }
2540
- const l = this.ctx.createRadialGradient(i, s, 5, i, s, t.radius * 2.2);
2541
- l.addColorStop(0, a), l.addColorStop(0.5, e.nebulaMagenta), l.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = l, this.ctx.beginPath(), this.ctx.arc(i, s, t.radius * 2.2, 0, Math.PI * 2), this.ctx.fill(), this.ctx.save(), this.ctx.translate(i, s), this.ctx.strokeStyle = a, this.ctx.lineWidth = 3, this.ctx.fillStyle = a, this.ctx.shadowColor = a, this.ctx.shadowBlur = 20, this.ctx.beginPath();
2635
+ const c = this.ctx.createRadialGradient(i, s, 5, i, s, t.radius * 2.2);
2636
+ c.addColorStop(0, a), c.addColorStop(0.5, e.nebulaMagenta), c.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = c, this.ctx.beginPath(), this.ctx.arc(i, s, t.radius * 2.2, 0, Math.PI * 2), this.ctx.fill(), this.ctx.save(), this.ctx.translate(i, s), this.ctx.strokeStyle = a, this.ctx.lineWidth = 3, this.ctx.fillStyle = a, this.ctx.shadowColor = a, this.ctx.shadowBlur = 20, this.ctx.beginPath();
2542
2637
  const n = 80;
2543
2638
  for (let r = 0; r <= n; r++) {
2544
- const c = r * Math.PI * 2 / n, h = t.getMembraneRadius(c), u = Math.cos(c) * h, p = Math.sin(c) * h;
2639
+ const l = r * Math.PI * 2 / n, h = t.getMembraneRadius(l), u = Math.cos(l) * h, p = Math.sin(l) * h;
2545
2640
  r === 0 ? this.ctx.moveTo(u, p) : this.ctx.lineTo(u, p);
2546
2641
  }
2547
2642
  this.ctx.closePath(), this.ctx.fill(), this.ctx.stroke();
2548
2643
  const o = t.powerUpCount;
2549
2644
  if (o > 0) {
2550
- this.ctx.strokeStyle = "#ffffff", this.ctx.lineWidth = 1.8, this.ctx.shadowColor = a, this.ctx.shadowBlur = 10;
2645
+ this.ctx.strokeStyle = e.effectHighlight, this.ctx.lineWidth = 1.8, this.ctx.shadowColor = a, this.ctx.shadowBlur = 10;
2551
2646
  for (let r = 0; r < o; r++) {
2552
- const c = r * Math.PI * 2 / o + t.pulsePhase * 0.4, h = t.radius * (0.45 + Math.sin(t.pulsePhase * 2 + r) * 0.15);
2647
+ const l = r * Math.PI * 2 / o + t.pulsePhase * 0.4, h = t.radius * (0.45 + Math.sin(t.pulsePhase * 2 + r) * 0.15);
2553
2648
  this.ctx.beginPath(), this.ctx.moveTo(0, 0);
2554
- const u = Math.cos(c + Math.sin(t.pulsePhase + r) * 0.4) * (h * 0.6), p = Math.sin(c + Math.cos(t.pulsePhase + r) * 0.4) * (h * 0.6), _ = Math.cos(c) * h, d = Math.sin(c) * h;
2555
- this.ctx.quadraticCurveTo(u, p, _, d), this.ctx.stroke(), this.ctx.fillStyle = a, this.ctx.beginPath(), this.ctx.arc(_, d, 2.5, 0, Math.PI * 2), this.ctx.fill();
2649
+ const u = Math.cos(l + Math.sin(t.pulsePhase + r) * 0.4) * (h * 0.6), p = Math.sin(l + Math.cos(t.pulsePhase + r) * 0.4) * (h * 0.6), _ = Math.cos(l) * h, g = Math.sin(l) * h;
2650
+ this.ctx.quadraticCurveTo(u, p, _, g), this.ctx.stroke(), this.ctx.fillStyle = a, this.ctx.beginPath(), this.ctx.arc(_, g, 2.5, 0, Math.PI * 2), this.ctx.fill();
2556
2651
  }
2557
2652
  }
2558
- this.ctx.fillStyle = "#ffffff", this.ctx.beginPath(), this.ctx.arc(0, 0, t.radius * 0.3, 0, Math.PI * 2), this.ctx.fill(), this.ctx.restore(), this.ctx.restore();
2653
+ this.ctx.fillStyle = e.effectHighlight, this.ctx.beginPath(), this.ctx.arc(0, 0, t.radius * 0.3, 0, Math.PI * 2), this.ctx.fill(), this.ctx.restore(), this.ctx.restore();
2559
2654
  }
2560
2655
  drawPsionicTendril(t, e, i) {
2561
2656
  if (!this.ctx) return;
2562
2657
  this.ctx.save();
2563
2658
  const s = e.x - t.x, a = e.y - t.y;
2564
2659
  this.ctx.strokeStyle = i.tendrilMagenta, this.ctx.lineWidth = 9, this.ctx.shadowColor = i.tendrilMagenta, this.ctx.shadowBlur = 20, this.ctx.beginPath(), this.ctx.moveTo(t.x, t.y);
2565
- const l = (t.x + e.x) / 2 + Math.sin(Date.now() * 0.02) * 16, n = (t.y + e.y) / 2 + Math.cos(Date.now() * 0.02) * 16;
2566
- this.ctx.quadraticCurveTo(l, n, e.x, e.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(t.x, t.y), this.ctx.lineTo(e.x, e.y), this.ctx.stroke();
2660
+ const c = (t.x + e.x) / 2 + Math.sin(Date.now() * 0.02) * 16, n = (t.y + e.y) / 2 + Math.cos(Date.now() * 0.02) * 16;
2661
+ this.ctx.quadraticCurveTo(c, n, e.x, e.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(t.x, t.y), this.ctx.lineTo(e.x, e.y), this.ctx.stroke();
2567
2662
  for (let o = 0; o < 6; o++) {
2568
- const r = Math.random(), c = t.x + s * r + (Math.random() - 0.5) * 24, h = t.y + a * r + (Math.random() - 0.5) * 24;
2569
- this.ctx.fillStyle = "#ffffff", this.ctx.beginPath(), this.ctx.arc(c, h, 2.5 + Math.random() * 2.5, 0, Math.PI * 2), this.ctx.fill();
2663
+ const r = Math.random(), l = t.x + s * r + (Math.random() - 0.5) * 24, h = t.y + a * r + (Math.random() - 0.5) * 24;
2664
+ this.ctx.fillStyle = i.effectHighlight, this.ctx.beginPath(), this.ctx.arc(l, h, 2.5 + Math.random() * 2.5, 0, Math.PI * 2), this.ctx.fill();
2570
2665
  }
2571
2666
  this.ctx.restore();
2572
2667
  }
@@ -2574,8 +2669,8 @@ class ft {
2574
2669
  if (this.ctx)
2575
2670
  for (const a of i) {
2576
2671
  if (!a.active || a.isGrabbed || a.isThrown || a.wasManipulated || a.isDying) continue;
2577
- const l = e.x - a.position.x, n = e.y - a.position.y;
2578
- if (Math.hypot(l, n) <= a.getHitRadius()) {
2672
+ const c = e.x - a.position.x, n = e.y - a.position.y;
2673
+ if (Math.hypot(c, n) <= a.getHitRadius()) {
2579
2674
  this.ctx.strokeStyle = s.tendrilMagenta, this.ctx.lineWidth = 2.5, this.ctx.beginPath(), this.ctx.moveTo(t.x, t.y), this.ctx.lineTo(a.position.x, a.position.y), this.ctx.stroke();
2580
2675
  break;
2581
2676
  }
@@ -2587,8 +2682,8 @@ class ft {
2587
2682
  if (!s.active) continue;
2588
2683
  let a = s.color;
2589
2684
  s.type === "piercer" ? a = i.piercerColor : s.type === "spore" ? a = i.sporeColor : s.type === "cluster" ? a = i.clusterColor : s.type === "parasite" ? a = i.parasiteColor : s.type === "micro" && (a = i.microColor);
2590
- const { x: l, y: n } = s.position;
2591
- if (this.ctx.save(), this.ctx.translate(l, n), s.wasManipulated && !s.isDying) {
2685
+ const { x: c, y: n } = s.position;
2686
+ if (this.ctx.save(), this.ctx.translate(c, n), s.wasManipulated && !s.isDying) {
2592
2687
  const o = s.radius * 1.5 + Math.sin(e * 6) * 4;
2593
2688
  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, o, 0, Math.PI * 2), this.ctx.stroke();
2594
2689
  const r = s.radius * 1.8 + Math.cos(e * 8) * 3;
@@ -2597,16 +2692,16 @@ class ft {
2597
2692
  if (s.isDying) {
2598
2693
  const o = s.deathTimer / s.maxDeathTimer, r = Math.max(0, 1 - o);
2599
2694
  if (this.ctx.globalAlpha = r, s.deathType === "dissolve") {
2600
- const c = s.radius * (1 - o * 0.7);
2601
- 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();
2695
+ const l = s.radius * (1 - o * 0.7);
2696
+ this.ctx.fillStyle = i.sporeColor, this.ctx.shadowColor = i.sporeColor, this.ctx.shadowBlur = 20, this.ctx.beginPath(), this.ctx.arc(0, 0, l, 0, Math.PI * 2), this.ctx.fill();
2602
2697
  for (let h = 0; h < 4; h++) {
2603
- const u = h * Math.PI * 0.5 + o * 4, p = c * 0.8 * o;
2604
- this.ctx.fillStyle = "#ffffff", this.ctx.beginPath(), this.ctx.arc(Math.cos(u) * p, Math.sin(u) * p, 3, 0, Math.PI * 2), this.ctx.fill();
2698
+ const u = h * Math.PI * 0.5 + o * 4, p = l * 0.8 * o;
2699
+ this.ctx.fillStyle = i.effectHighlight, this.ctx.beginPath(), this.ctx.arc(Math.cos(u) * p, Math.sin(u) * p, 3, 0, Math.PI * 2), this.ctx.fill();
2605
2700
  }
2606
2701
  this.ctx.restore();
2607
2702
  continue;
2608
2703
  } else if (s.deathType === "sliced") {
2609
- const c = o * 24, h = s.sliceAngle + Math.PI / 2, u = Math.cos(h) * c, p = Math.sin(h) * c;
2704
+ const l = o * 24, h = s.sliceAngle + Math.PI / 2, u = Math.cos(h) * l, p = Math.sin(h) * l;
2610
2705
  this.ctx.shadowColor = "#ff2a5f", this.ctx.shadowBlur = 22, this.ctx.fillStyle = a, this.ctx.save(), this.ctx.translate(u, 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(-u, -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();
2611
2706
  continue;
2612
2707
  }
@@ -2615,18 +2710,18 @@ class ft {
2615
2710
  this.ctx.rotate(s.rotation), this.ctx.beginPath();
2616
2711
  const o = 12;
2617
2712
  for (let r = 0; r <= o; r++) {
2618
- const c = r * Math.PI * 2 / o, h = s.radius * 1.6 + Math.sin(c * 3 + e * 4) * 3, u = s.radius * 0.6 + Math.cos(c * 2 + e * 3) * 2, p = Math.cos(c) * h, _ = Math.sin(c) * u;
2713
+ const l = r * Math.PI * 2 / o, h = s.radius * 1.6 + Math.sin(l * 3 + e * 4) * 3, u = s.radius * 0.6 + Math.cos(l * 2 + e * 3) * 2, p = Math.cos(l) * h, _ = Math.sin(l) * u;
2619
2714
  r === 0 ? this.ctx.moveTo(p, _) : this.ctx.lineTo(p, _);
2620
2715
  }
2621
- this.ctx.closePath(), this.ctx.fill(), this.ctx.fillStyle = "#ffffff", this.ctx.beginPath(), this.ctx.arc(4, 0, 4, 0, Math.PI * 2), this.ctx.fill();
2716
+ this.ctx.closePath(), this.ctx.fill(), this.ctx.fillStyle = i.effectHighlight, this.ctx.beginPath(), this.ctx.arc(4, 0, 4, 0, Math.PI * 2), this.ctx.fill();
2622
2717
  } else if (s.type === "spore") {
2623
2718
  this.ctx.beginPath();
2624
2719
  const o = 8;
2625
2720
  for (let r = 0; r < o; r++) {
2626
- const c = r * Math.PI * 2 / o, h = s.radius + Math.sin(c * 4 + e * 3 + s.position.x) * 4, u = Math.cos(c) * h, p = Math.sin(c) * h;
2721
+ const l = r * Math.PI * 2 / o, h = s.radius + Math.sin(l * 4 + e * 3 + s.position.x) * 4, u = Math.cos(l) * h, p = Math.sin(l) * h;
2627
2722
  r === 0 ? this.ctx.moveTo(u, p) : this.ctx.lineTo(u, p);
2628
2723
  }
2629
- this.ctx.closePath(), this.ctx.fill(), this.ctx.fillStyle = "rgba(255, 255, 255, 0.7)", this.ctx.beginPath(), this.ctx.arc(-4, -4, 5, 0, Math.PI * 2), this.ctx.arc(5, 3, 4, 0, Math.PI * 2), this.ctx.fill();
2724
+ this.ctx.closePath(), this.ctx.fill(), this.ctx.fillStyle = i.effectHighlight, this.ctx.beginPath(), this.ctx.arc(-4, -4, 5, 0, Math.PI * 2), this.ctx.arc(5, 3, 4, 0, Math.PI * 2), this.ctx.fill();
2630
2725
  } else if (s.type === "cluster") {
2631
2726
  this.ctx.beginPath();
2632
2727
  const o = Math.sin(e * 3) * 2;
@@ -2635,19 +2730,19 @@ class ft {
2635
2730
  this.ctx.beginPath();
2636
2731
  const o = 14;
2637
2732
  for (let r = 0; r <= o; r++) {
2638
- const c = r * Math.PI * 2 / o, h = s.radius + Math.sin(c * 5 - e * 5) * 3, u = Math.cos(c) * h, p = Math.sin(c) * h;
2733
+ const l = r * Math.PI * 2 / o, h = s.radius + Math.sin(l * 5 - e * 5) * 3, u = Math.cos(l) * h, p = Math.sin(l) * h;
2639
2734
  r === 0 ? this.ctx.moveTo(u, p) : this.ctx.lineTo(u, p);
2640
2735
  }
2641
2736
  this.ctx.closePath(), this.ctx.fill(), this.ctx.fillStyle = i.bgOuter, this.ctx.beginPath(), this.ctx.arc(0, 0, s.radius * 0.45, 0, Math.PI * 2), this.ctx.fill();
2642
2737
  } else if (s.type === "heavy") {
2643
2738
  this.ctx.rotate(s.rotation);
2644
- const o = Math.PI * 0.75, r = s.radius * 1.35, c = s.radius * 0.75;
2739
+ const o = Math.PI * 0.75, r = s.radius * 1.35, l = s.radius * 0.75;
2645
2740
  this.ctx.beginPath(), this.ctx.arc(0, 0, r, -o / 2, o / 2, !1);
2646
- const h = Math.cos(o / 2) * c, u = Math.sin(o / 2) * c;
2647
- this.ctx.lineTo(h, u), this.ctx.arc(0, 0, c, o / 2, -o / 2, !0), this.ctx.closePath(), this.ctx.fillStyle = s.isStationaryShield ? "#00f5ff" : a, this.ctx.shadowColor = "#00f5ff", this.ctx.shadowBlur = s.isStationaryShield ? 28 : 16, this.ctx.fill(), this.ctx.strokeStyle = "#ffffff", this.ctx.lineWidth = 3, this.ctx.beginPath(), this.ctx.arc(0, 0, r + Math.sin(e * 4) * 2, -o / 2 + 0.1, o / 2 - 0.1), this.ctx.stroke();
2741
+ const h = Math.cos(o / 2) * l, u = Math.sin(o / 2) * l;
2742
+ this.ctx.lineTo(h, u), this.ctx.arc(0, 0, l, o / 2, -o / 2, !0), this.ctx.closePath(), this.ctx.fillStyle = s.isStationaryShield ? i.corePrimary : a, this.ctx.shadowColor = i.corePrimary, this.ctx.shadowBlur = s.isStationaryShield ? 28 : 16, this.ctx.fill(), this.ctx.strokeStyle = i.effectHighlight, this.ctx.lineWidth = 3, this.ctx.beginPath(), this.ctx.arc(0, 0, r + Math.sin(e * 4) * 2, -o / 2 + 0.1, o / 2 - 0.1), this.ctx.stroke();
2648
2743
  for (let p = -2; p <= 2; p++) {
2649
- const _ = p * o / 6, d = Math.cos(_) * (c + 6), g = Math.sin(_) * (c + 6);
2650
- this.ctx.fillStyle = "#ffffff", this.ctx.beginPath(), this.ctx.arc(d, g, 3, 0, Math.PI * 2), this.ctx.fill();
2744
+ const _ = p * o / 6, g = Math.cos(_) * (l + 6), d = Math.sin(_) * (l + 6);
2745
+ this.ctx.fillStyle = i.effectHighlight, this.ctx.beginPath(), this.ctx.arc(g, d, 3, 0, Math.PI * 2), this.ctx.fill();
2651
2746
  }
2652
2747
  } else
2653
2748
  this.ctx.beginPath(), this.ctx.arc(0, 0, s.radius, 0, Math.PI * 2), this.ctx.fill();
@@ -2665,29 +2760,35 @@ class ft {
2665
2760
  this.ctx.save(), this.ctx.globalAlpha = e.alpha, this.ctx.fillStyle = e.color, this.ctx.font = `900 ${e.size}px Orbitron, sans-serif`, this.ctx.textAlign = "center", this.ctx.shadowColor = e.color, this.ctx.shadowBlur = 12, this.ctx.fillText(e.text, e.position.x, e.position.y), this.ctx.restore();
2666
2761
  }
2667
2762
  drawOrbitingModifierOrbs(t, e, i, s = !0) {
2668
- if (this.ctx) {
2669
- for (const a of t) {
2670
- if (!a.active) continue;
2671
- const { x: l, y: n } = a.position, o = a.definition.color, r = a.definition.rarity, c = r === "legendary" ? "#ff00ff" : r === "epic" ? "#ffd700" : r === "rare" ? "#9d4edd" : "#00f5ff", h = a.radius + Math.sin(e * 6 + a.orbitAngle) * 3;
2672
- if (this.ctx.save(), this.ctx.shadowColor = c, this.ctx.shadowBlur = a.isGrabbed ? 36 : r === "legendary" ? 28 : 16, r === "legendary" || r === "epic") {
2673
- const _ = h + 12, d = this.ctx.createRadialGradient(l, n, h, l, n, _);
2674
- d.addColorStop(0, c), d.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = d, this.ctx.beginPath(), this.ctx.arc(l, n, _, 0, Math.PI * 2), this.ctx.fill();
2675
- }
2676
- const u = this.ctx.createRadialGradient(l, n, 2, l, n, h * 1.4);
2677
- u.addColorStop(0, "#ffffff"), u.addColorStop(0.4, o), u.addColorStop(1, "rgba(0, 0, 0, 0.5)"), this.ctx.fillStyle = u, this.ctx.beginPath(), this.ctx.arc(l, n, h, 0, Math.PI * 2), this.ctx.fill(), this.ctx.strokeStyle = c, this.ctx.lineWidth = r === "legendary" ? 3.5 : 2.5, this.ctx.beginPath(), this.ctx.arc(l, n, h + 4, e * 3, e * 3 + Math.PI * 1.2), this.ctx.stroke(), (r === "legendary" || r === "epic") && (this.ctx.strokeStyle = "#ffffff", this.ctx.lineWidth = 1.5, this.ctx.beginPath(), this.ctx.arc(l, n, h + 8, -e * 2, -e * 2 + Math.PI * 0.9), this.ctx.stroke()), this.ctx.font = "900 14px Orbitron, sans-serif", this.ctx.textAlign = "center", this.ctx.textBaseline = "middle", this.ctx.fillStyle = "#ffffff", this.ctx.shadowColor = "#000000", this.ctx.shadowBlur = 6, this.ctx.fillText(a.definition.badge, l, n);
2678
- const p = i ? i.translate(a.definition.titleKey) : a.definition.badge;
2679
- this.ctx.textBaseline = "alphabetic", this.ctx.font = "900 16px Orbitron, sans-serif", this.ctx.fillStyle = "#ffffff", this.ctx.shadowColor = c, this.ctx.shadowBlur = 14, this.ctx.fillText(p, l, n - h - 14), this.ctx.restore();
2680
- }
2681
- if (i && s) {
2682
- const a = this.canvas.width / 2, l = this.canvas.height / 2 + 210, n = i.translate("rerollButton");
2683
- this.ctx.save(), this.ctx.font = "900 14px Orbitron, sans-serif", this.ctx.textAlign = "center", this.ctx.textBaseline = "middle", this.ctx.fillStyle = "rgba(0, 0, 0, 0.65)", this.ctx.strokeStyle = "#00f0ff", this.ctx.lineWidth = 2, this.ctx.shadowColor = "#00f0ff", this.ctx.shadowBlur = 12;
2684
- const c = this.ctx.measureText(n).width + 20 * 2, h = 38;
2685
- this.ctx.beginPath(), this.ctx.roundRect(a - c / 2, l - h / 2, c, h, 8), this.ctx.fill(), this.ctx.stroke(), this.ctx.fillStyle = "#ffffff", this.ctx.shadowColor = "#000000", this.ctx.shadowBlur = 4, this.ctx.fillText(n, a, l), this.ctx.restore();
2763
+ if (!this.ctx) return;
2764
+ const a = this.themeManager.getPalette(), c = this.themeManager.getTheme() === "light";
2765
+ for (const n of t) {
2766
+ if (!n.active) continue;
2767
+ const { x: o, y: r } = n.position, l = n.definition.color, h = n.definition.rarity, u = h === "legendary" ? "#ff00ff" : h === "epic" ? "#ffd700" : h === "rare" ? "#9d4edd" : "#00f5ff", p = n.radius + Math.sin(e * 6 + n.orbitAngle) * 3;
2768
+ if (this.ctx.save(), this.ctx.shadowColor = u, this.ctx.shadowBlur = n.isGrabbed ? 36 : h === "legendary" ? 28 : 16, h === "legendary" || h === "epic") {
2769
+ const d = p + 12, m = this.ctx.createRadialGradient(o, r, p, o, r, d);
2770
+ m.addColorStop(0, u), m.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = m, this.ctx.beginPath(), this.ctx.arc(o, r, d, 0, Math.PI * 2), this.ctx.fill();
2686
2771
  }
2772
+ const _ = this.ctx.createRadialGradient(o, r, 2, o, r, p * 1.4);
2773
+ _.addColorStop(0, a.effectHighlight), _.addColorStop(0.4, l), _.addColorStop(1, c ? "rgba(23, 50, 77, 0.24)" : "rgba(0, 0, 0, 0.5)"), this.ctx.fillStyle = _, this.ctx.beginPath(), this.ctx.arc(o, r, p, 0, Math.PI * 2), this.ctx.fill(), this.ctx.strokeStyle = u, this.ctx.lineWidth = h === "legendary" ? 3.5 : 2.5, this.ctx.beginPath(), this.ctx.arc(o, r, p + 4, e * 3, e * 3 + Math.PI * 1.2), this.ctx.stroke(), (h === "legendary" || h === "epic") && (this.ctx.strokeStyle = c ? u : a.effectHighlight, this.ctx.lineWidth = 1.5, this.ctx.beginPath(), this.ctx.arc(o, r, p + 8, -e * 2, -e * 2 + Math.PI * 0.9), this.ctx.stroke()), this.ctx.font = "900 14px Orbitron, sans-serif", this.ctx.textAlign = "center", this.ctx.textBaseline = "middle", this.ctx.fillStyle = a.effectInk, this.ctx.shadowColor = a.effectShadow, this.ctx.shadowBlur = 6, this.ctx.fillText(n.definition.badge, o, r);
2774
+ const g = i ? i.translate(n.definition.titleKey) : n.definition.badge;
2775
+ this.ctx.textBaseline = "alphabetic", this.ctx.font = "900 16px Orbitron, sans-serif", this.ctx.fillStyle = a.effectInk, this.ctx.shadowColor = u, this.ctx.shadowBlur = 14, this.ctx.fillText(g, o, r - p - 14), this.ctx.restore();
2687
2776
  }
2777
+ if (i && s) {
2778
+ const n = this.canvas.width / 2, o = this.canvas.height / 2 + 210, r = i.translate("rerollButton");
2779
+ this.ctx.save(), this.ctx.font = "900 14px Orbitron, sans-serif", this.ctx.textAlign = "center", this.ctx.textBaseline = "middle", this.ctx.fillStyle = a.effectPanel, this.ctx.strokeStyle = a.tendrilCyan, this.ctx.lineWidth = 2, this.ctx.shadowColor = a.tendrilCyan, this.ctx.shadowBlur = 12;
2780
+ const u = this.ctx.measureText(r).width + 20 * 2, p = 38;
2781
+ this.ctx.beginPath(), this.ctx.roundRect(n - u / 2, o - p / 2, u, p, 8), this.ctx.fill(), this.ctx.stroke(), this.ctx.fillStyle = a.effectInk, this.ctx.shadowColor = a.effectShadow, this.ctx.shadowBlur = 4, this.ctx.fillText(r, n, o), this.ctx.restore();
2782
+ }
2783
+ }
2784
+ colorWithAlpha(t, e) {
2785
+ const i = t.replace("#", "");
2786
+ if (i.length !== 6) return t;
2787
+ const s = Number.parseInt(i.slice(0, 2), 16), a = Number.parseInt(i.slice(2, 4), 16), c = Number.parseInt(i.slice(4, 6), 16);
2788
+ return `rgba(${s}, ${a}, ${c}, ${e})`;
2688
2789
  }
2689
2790
  }
2690
- class xt {
2791
+ class dt {
2691
2792
  container;
2692
2793
  i18n;
2693
2794
  waveLabelElement;
@@ -2719,7 +2820,7 @@ class xt {
2719
2820
  this.container.style.display = "none";
2720
2821
  }
2721
2822
  }
2722
- class Et {
2823
+ class gt {
2723
2824
  container;
2724
2825
  i18n;
2725
2826
  onStartCallback;
@@ -2745,7 +2846,7 @@ class Et {
2745
2846
  this.container.style.display = "none";
2746
2847
  }
2747
2848
  }
2748
- class yt {
2849
+ class _t {
2749
2850
  modal;
2750
2851
  card;
2751
2852
  i18n;
@@ -2754,8 +2855,8 @@ class yt {
2754
2855
  onLanguageChangedCallback;
2755
2856
  onCloseCallback;
2756
2857
  hapticsEnabled = !0;
2757
- constructor(t, e, i, s, a, l) {
2758
- this.i18n = e, this.themeManager = i, this.platform = s, this.onLanguageChangedCallback = a, this.onCloseCallback = l;
2858
+ constructor(t, e, i, s, a, c) {
2859
+ this.i18n = e, this.themeManager = i, this.platform = s, this.onLanguageChangedCallback = a, this.onCloseCallback = c;
2759
2860
  const n = localStorage.getItem("axon_surge_haptics");
2760
2861
  n !== null && (this.hapticsEnabled = n === "true"), 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), t.appendChild(this.modal), this.modal.addEventListener("close", () => {
2761
2862
  this.onCloseCallback && this.onCloseCallback();
@@ -2773,7 +2874,7 @@ class yt {
2773
2874
  s.className = "axon-select-wrapper";
2774
2875
  const a = document.createElement("select");
2775
2876
  a.className = "axon-select";
2776
- const l = {
2877
+ const c = {
2777
2878
  es: "ESPAÑOL (ES)",
2778
2879
  en: "ENGLISH (EN)",
2779
2880
  fr: "FRANÇAIS (FR)",
@@ -2790,13 +2891,13 @@ class yt {
2790
2891
  ko: "한국어 (KO)",
2791
2892
  zh: "中文 (ZH)"
2792
2893
  };
2793
- for (const m of Y) {
2794
- const y = document.createElement("option");
2795
- y.value = m, y.textContent = l[m], this.i18n.getLanguage() === m && (y.selected = !0), a.appendChild(y);
2894
+ for (const f of K) {
2895
+ const v = document.createElement("option");
2896
+ v.value = f, v.textContent = c[f], this.i18n.getLanguage() === f && (v.selected = !0), a.appendChild(v);
2796
2897
  }
2797
2898
  a.addEventListener("change", () => {
2798
- const m = a.value;
2799
- this.i18n.setLanguage(m), this.onLanguageChangedCallback && this.onLanguageChangedCallback(m), this.renderContent();
2899
+ const f = a.value;
2900
+ this.i18n.setLanguage(f), this.onLanguageChangedCallback && this.onLanguageChangedCallback(f), this.renderContent();
2800
2901
  });
2801
2902
  const n = document.createElement("span");
2802
2903
  n.className = "axon-select-arrow", n.textContent = "▼", s.appendChild(a), s.appendChild(n), e.appendChild(i), e.appendChild(s);
@@ -2804,60 +2905,60 @@ class yt {
2804
2905
  o.className = "axon-setting-row";
2805
2906
  const r = document.createElement("span");
2806
2907
  r.textContent = this.i18n.translate("themeLabel");
2807
- const c = document.createElement("div");
2808
- c.className = "axon-toggle-group";
2908
+ const l = document.createElement("div");
2909
+ l.className = "axon-toggle-group";
2809
2910
  const h = [
2810
2911
  { id: "bioluminescent", label: "BIO" },
2811
2912
  { id: "dark", label: "DARK" },
2812
2913
  { id: "light", label: "LIGHT" }
2813
2914
  ];
2814
- for (const m of h) {
2815
- const y = document.createElement("button");
2816
- y.type = "button", y.className = `axon-toggle-btn ${this.themeManager.getTheme() === m.id ? "active" : ""}`, y.textContent = m.label, y.addEventListener("click", () => {
2817
- this.themeManager.setTheme(m.id), this.renderContent();
2818
- }), c.appendChild(y);
2915
+ for (const f of h) {
2916
+ const v = document.createElement("button");
2917
+ v.type = "button", v.className = `axon-toggle-btn ${this.themeManager.getTheme() === f.id ? "active" : ""}`, v.textContent = f.label, v.addEventListener("click", () => {
2918
+ this.themeManager.setTheme(f.id), this.renderContent();
2919
+ }), l.appendChild(v);
2819
2920
  }
2820
- o.appendChild(r), o.appendChild(c);
2921
+ o.appendChild(r), o.appendChild(l);
2821
2922
  const u = document.createElement("div");
2822
2923
  u.className = "axon-setting-row";
2823
2924
  const p = document.createElement("span");
2824
2925
  p.textContent = this.i18n.translate("hapticsLabel");
2825
2926
  const _ = document.createElement("div");
2826
2927
  _.className = "axon-toggle-group";
2827
- const d = [
2928
+ const g = [
2828
2929
  { enabled: !0, label: this.i18n.translate("hapticsOn") },
2829
2930
  { enabled: !1, label: this.i18n.translate("hapticsOff") }
2830
2931
  ];
2831
- for (const m of d) {
2832
- const y = document.createElement("button");
2833
- y.type = "button", y.className = `axon-toggle-btn ${this.hapticsEnabled === m.enabled ? "active" : ""}`, y.textContent = m.label, y.addEventListener("click", () => {
2834
- this.hapticsEnabled = m.enabled, localStorage.setItem("axon_surge_haptics", String(m.enabled)), this.hapticsEnabled && this.platform.haptics.selectionChanged(), this.renderContent();
2835
- }), _.appendChild(y);
2932
+ for (const f of g) {
2933
+ const v = document.createElement("button");
2934
+ v.type = "button", v.className = `axon-toggle-btn ${this.hapticsEnabled === f.enabled ? "active" : ""}`, v.textContent = f.label, v.addEventListener("click", () => {
2935
+ this.hapticsEnabled = f.enabled, localStorage.setItem("axon_surge_haptics", String(f.enabled)), this.hapticsEnabled && this.platform.haptics.selectionChanged(), this.renderContent();
2936
+ }), _.appendChild(v);
2836
2937
  }
2837
2938
  u.appendChild(p), u.appendChild(_);
2838
- const g = document.createElement("div");
2839
- g.className = "axon-setting-row";
2840
- const f = document.createElement("span");
2841
- f.textContent = this.i18n.translate("tutorialSettingLabel");
2939
+ const d = document.createElement("div");
2940
+ d.className = "axon-setting-row";
2941
+ const m = document.createElement("span");
2942
+ m.textContent = this.i18n.translate("tutorialSettingLabel");
2842
2943
  const x = document.createElement("div");
2843
2944
  x.className = "axon-toggle-group";
2844
- const b = localStorage.getItem("axon_surge_show_tutorial") !== "false", S = [
2945
+ const A = localStorage.getItem("axon_surge_show_tutorial") !== "false", b = [
2845
2946
  { enabled: !0, label: this.i18n.translate("hapticsOn") },
2846
2947
  { enabled: !1, label: this.i18n.translate("hapticsOff") }
2847
2948
  ];
2848
- for (const m of S) {
2849
- const y = document.createElement("button");
2850
- y.type = "button", y.className = `axon-toggle-btn ${b === m.enabled ? "active" : ""}`, y.textContent = m.label, y.addEventListener("click", () => {
2851
- localStorage.setItem("axon_surge_show_tutorial", String(m.enabled)), this.renderContent();
2852
- }), x.appendChild(y);
2949
+ for (const f of b) {
2950
+ const v = document.createElement("button");
2951
+ v.type = "button", v.className = `axon-toggle-btn ${A === f.enabled ? "active" : ""}`, v.textContent = f.label, v.addEventListener("click", () => {
2952
+ localStorage.setItem("axon_surge_show_tutorial", String(f.enabled)), this.renderContent();
2953
+ }), x.appendChild(v);
2853
2954
  }
2854
- g.appendChild(f), g.appendChild(x);
2955
+ d.appendChild(m), d.appendChild(x);
2855
2956
  const I = document.createElement("div");
2856
2957
  I.className = "axon-settings-credits", I.textContent = this.i18n.translate("creditsJam");
2857
- const v = document.createElement("button");
2858
- v.type = "button", v.className = "axon-start-button", v.style.padding = "12px 36px", v.style.fontSize = "14px", v.textContent = this.i18n.translate("closeButton"), v.addEventListener("click", () => {
2958
+ const S = document.createElement("button");
2959
+ S.type = "button", S.className = "axon-start-button", S.style.padding = "12px 36px", S.style.fontSize = "14px", S.textContent = this.i18n.translate("closeButton"), S.addEventListener("click", () => {
2859
2960
  this.modal.close();
2860
- }), this.card.appendChild(t), this.card.appendChild(e), this.card.appendChild(o), this.card.appendChild(u), this.card.appendChild(g), this.card.appendChild(I), this.card.appendChild(v);
2961
+ }), this.card.appendChild(t), this.card.appendChild(e), this.card.appendChild(o), this.card.appendChild(u), this.card.appendChild(d), this.card.appendChild(I), this.card.appendChild(S);
2861
2962
  }
2862
2963
  isHapticsEnabled() {
2863
2964
  return this.hapticsEnabled;
@@ -2869,8 +2970,8 @@ class yt {
2869
2970
  this.modal.close();
2870
2971
  }
2871
2972
  }
2872
- const W = "axon_surge_show_tutorial";
2873
- class At {
2973
+ const H = "axon_surge_show_tutorial";
2974
+ class mt {
2874
2975
  isActive = !1;
2875
2976
  showWarning = !1;
2876
2977
  dummyLauncher = null;
@@ -2879,14 +2980,14 @@ class At {
2879
2980
  initialTargetPos = { x: 0, y: 0 };
2880
2981
  isTutorialEnabled() {
2881
2982
  try {
2882
- return localStorage.getItem(W) !== "false";
2983
+ return localStorage.getItem(H) !== "false";
2883
2984
  } catch {
2884
2985
  return !0;
2885
2986
  }
2886
2987
  }
2887
2988
  setTutorialEnabled(t) {
2888
2989
  try {
2889
- localStorage.setItem(W, String(t));
2990
+ localStorage.setItem(H, String(t));
2890
2991
  } catch {
2891
2992
  }
2892
2993
  }
@@ -2914,14 +3015,14 @@ class At {
2914
3015
  this.initialLauncherPos
2915
3016
  ), this.dummyTarget.velocity = { x: 0, y: 0 }, i.push(this.dummyLauncher), i.push(this.dummyTarget);
2916
3017
  }
2917
- update(t, e, i, s, a, l) {
3018
+ update(t, e, i, s, a, c) {
2918
3019
  if (!this.isActive || !this.dummyLauncher || !this.dummyTarget) return;
2919
3020
  const n = this.dummyLauncher, o = this.dummyTarget;
2920
3021
  e.includes(n) || e.push(n), e.includes(o) || e.push(o);
2921
- const r = o.position.x - n.position.x, c = o.position.y - n.position.y, h = Math.hypot(r, c);
3022
+ const r = o.position.x - n.position.x, l = o.position.y - n.position.y, h = Math.hypot(r, l);
2922
3023
  if (n.isGrabbed) {
2923
3024
  if (this.showWarning = !1, h <= n.radius + o.radius + 60) {
2924
- l && l(), n.isGrabbed = !1, this.showWarning = !0, this.resetDummies(n, o);
3025
+ c && c(), n.isGrabbed = !1, this.showWarning = !0, this.resetDummies(n, o);
2925
3026
  return;
2926
3027
  }
2927
3028
  return;
@@ -2929,14 +3030,14 @@ class At {
2929
3030
  if (n.wasManipulated) {
2930
3031
  const u = Math.hypot(n.velocity.x, n.velocity.y);
2931
3032
  if (!n.isThrown || u < 70) {
2932
- l && l(), this.showWarning = !0, this.resetDummies(n, o);
3033
+ c && c(), this.showWarning = !0, this.resetDummies(n, o);
2933
3034
  return;
2934
3035
  }
2935
3036
  if (h <= n.getHitRadius() + o.getHitRadius()) {
2936
3037
  n.triggerDissolveDeath(), o.triggerDissolveDeath(), this.showWarning = !1, this.isActive = !1, a();
2937
3038
  return;
2938
3039
  }
2939
- (n.position.x < -60 || n.position.x > i + 60 || n.position.y < -60 || n.position.y > s + 60 || u < 40) && (l && l(), this.showWarning = !0, this.resetDummies(n, o));
3040
+ (n.position.x < -60 || n.position.x > i + 60 || n.position.y < -60 || n.position.y > s + 60 || u < 40) && (c && c(), this.showWarning = !0, this.resetDummies(n, o));
2940
3041
  }
2941
3042
  }
2942
3043
  resetDummies(t, e) {
@@ -2946,7 +3047,7 @@ class At {
2946
3047
  this.isActive = !1, this.showWarning = !1;
2947
3048
  }
2948
3049
  }
2949
- class bt {
3050
+ class ft {
2950
3051
  container;
2951
3052
  i18n;
2952
3053
  tutorialManager;
@@ -2982,7 +3083,7 @@ class bt {
2982
3083
  this.container.style.display = "none";
2983
3084
  }
2984
3085
  }
2985
- class St {
3086
+ class xt {
2986
3087
  fillElement;
2987
3088
  killsCount = 0;
2988
3089
  currentLevel = 1;
@@ -3013,24 +3114,24 @@ class St {
3013
3114
  this.fillElement && this.fillElement.parentElement && (this.fillElement.parentElement.style.display = "none");
3014
3115
  }
3015
3116
  }
3016
- class F {
3117
+ class B {
3017
3118
  static powerUps = [
3018
3119
  {
3019
3120
  id: "spore_radius",
3020
3121
  titleKey: "pu_spore_radius_title",
3021
3122
  descKey: "pu_spore_radius_desc",
3022
- badge: "+30% RAD",
3123
+ badge: "+12% RAD",
3023
3124
  category: "radius",
3024
3125
  rarity: "common",
3025
3126
  rarityWeight: 35,
3026
3127
  color: "#39ff14",
3027
3128
  apply: () => {
3028
- const t = A.getInstance(), e = t.getConfig().toxicPool;
3129
+ const t = E.getInstance(), e = t.getConfig().toxicPool;
3029
3130
  t.updateConfig({
3030
3131
  toxicPool: {
3031
3132
  ...e,
3032
- baseRadius: Math.round(e.baseRadius * 1.3),
3033
- synergyRadius: Math.round(e.synergyRadius * 1.3)
3133
+ baseRadius: Math.round(e.baseRadius * 1.12),
3134
+ synergyRadius: Math.round(e.synergyRadius * 1.12)
3034
3135
  }
3035
3136
  });
3036
3137
  }
@@ -3045,7 +3146,7 @@ class F {
3045
3146
  rarityWeight: 35,
3046
3147
  color: "#39ff14",
3047
3148
  apply: () => {
3048
- const t = A.getInstance(), e = t.getConfig().toxicPool;
3149
+ const t = E.getInstance(), e = t.getConfig().toxicPool;
3049
3150
  t.updateConfig({
3050
3151
  toxicPool: {
3051
3152
  ...e,
@@ -3059,18 +3160,18 @@ class F {
3059
3160
  id: "vortex_radius",
3060
3161
  titleKey: "pu_vortex_radius_title",
3061
3162
  descKey: "pu_vortex_radius_desc",
3062
- badge: "+25% RAD",
3163
+ badge: "+12% RAD",
3063
3164
  category: "radius",
3064
3165
  rarity: "common",
3065
3166
  rarityWeight: 35,
3066
3167
  color: "#9d4edd",
3067
3168
  apply: () => {
3068
- const t = A.getInstance(), e = t.getConfig().gravityVortex;
3169
+ const t = E.getInstance(), e = t.getConfig().gravityVortex;
3069
3170
  t.updateConfig({
3070
3171
  gravityVortex: {
3071
3172
  ...e,
3072
- baseRadius: Math.round(e.baseRadius * 1.25),
3073
- synergyRadius: Math.round(e.synergyRadius * 1.25)
3173
+ baseRadius: Math.round(e.baseRadius * 1.12),
3174
+ synergyRadius: Math.round(e.synergyRadius * 1.12)
3074
3175
  }
3075
3176
  });
3076
3177
  }
@@ -3085,7 +3186,7 @@ class F {
3085
3186
  rarityWeight: 35,
3086
3187
  color: "#9d4edd",
3087
3188
  apply: () => {
3088
- const t = A.getInstance(), e = t.getConfig().gravityVortex;
3189
+ const t = E.getInstance(), e = t.getConfig().gravityVortex;
3089
3190
  t.updateConfig({
3090
3191
  gravityVortex: {
3091
3192
  ...e,
@@ -3105,7 +3206,7 @@ class F {
3105
3206
  rarityWeight: 25,
3106
3207
  color: "#9d4edd",
3107
3208
  apply: () => {
3108
- const t = A.getInstance(), e = t.getConfig().gravityVortex;
3209
+ const t = E.getInstance(), e = t.getConfig().gravityVortex;
3109
3210
  t.updateConfig({
3110
3211
  gravityVortex: {
3111
3212
  ...e,
@@ -3125,7 +3226,7 @@ class F {
3125
3226
  rarityWeight: 5,
3126
3227
  color: "#9d4edd",
3127
3228
  apply: () => {
3128
- const t = A.getInstance(), e = t.getConfig().gravityVortex;
3229
+ const t = E.getInstance(), e = t.getConfig().gravityVortex;
3129
3230
  t.updateConfig({
3130
3231
  gravityVortex: {
3131
3232
  ...e,
@@ -3144,7 +3245,7 @@ class F {
3144
3245
  rarityWeight: 5,
3145
3246
  color: "#00f5ff",
3146
3247
  apply: () => {
3147
- const t = A.getInstance(), e = t.getConfig().shield;
3248
+ const t = E.getInstance(), e = t.getConfig().shield;
3148
3249
  t.updateConfig({
3149
3250
  shield: {
3150
3251
  ...e,
@@ -3163,7 +3264,7 @@ class F {
3163
3264
  rarityWeight: 25,
3164
3265
  color: "#ffcc00",
3165
3266
  apply: () => {
3166
- const t = A.getInstance(), e = t.getConfig().cluster;
3267
+ const t = E.getInstance(), e = t.getConfig().cluster;
3167
3268
  t.updateConfig({
3168
3269
  cluster: {
3169
3270
  ...e,
@@ -3182,7 +3283,7 @@ class F {
3182
3283
  rarityWeight: 5,
3183
3284
  color: "#ffcc00",
3184
3285
  apply: () => {
3185
- const t = A.getInstance(), e = t.getConfig().cluster;
3286
+ const t = E.getInstance(), e = t.getConfig().cluster;
3186
3287
  t.updateConfig({
3187
3288
  cluster: {
3188
3289
  ...e,
@@ -3201,7 +3302,7 @@ class F {
3201
3302
  rarityWeight: 15,
3202
3303
  color: "#ff3366",
3203
3304
  apply: () => {
3204
- const t = A.getInstance(), e = t.getConfig().piercer;
3305
+ const t = E.getInstance(), e = t.getConfig().piercer;
3205
3306
  t.updateConfig({
3206
3307
  piercer: {
3207
3308
  ...e,
@@ -3220,7 +3321,7 @@ class F {
3220
3321
  rarityWeight: 5,
3221
3322
  color: "#ff2a5f",
3222
3323
  apply: () => {
3223
- const t = A.getInstance(), e = t.getConfig().piercer;
3324
+ const t = E.getInstance(), e = t.getConfig().piercer;
3224
3325
  t.updateConfig({
3225
3326
  piercer: {
3226
3327
  ...e,
@@ -3229,6 +3330,25 @@ class F {
3229
3330
  });
3230
3331
  }
3231
3332
  },
3333
+ {
3334
+ id: "offscreen_radar",
3335
+ titleKey: "pu_offscreen_radar_title",
3336
+ descKey: "pu_offscreen_radar_desc",
3337
+ badge: "RADAR",
3338
+ category: "defense",
3339
+ rarity: "legendary",
3340
+ rarityWeight: 5,
3341
+ color: "#00f0ff",
3342
+ apply: () => {
3343
+ const t = E.getInstance(), e = t.getConfig().core;
3344
+ t.updateConfig({
3345
+ core: {
3346
+ ...e,
3347
+ hasOffscreenIndicators: !0
3348
+ }
3349
+ });
3350
+ }
3351
+ },
3232
3352
  {
3233
3353
  id: "piercer_homing_target",
3234
3354
  titleKey: "pu_piercer_homing_target_title",
@@ -3239,7 +3359,7 @@ class F {
3239
3359
  rarityWeight: 15,
3240
3360
  color: "#ff2a5f",
3241
3361
  apply: () => {
3242
- const t = A.getInstance(), e = t.getConfig().piercer;
3362
+ const t = E.getInstance(), e = t.getConfig().piercer;
3243
3363
  t.updateConfig({
3244
3364
  piercer: {
3245
3365
  ...e,
@@ -3258,7 +3378,7 @@ class F {
3258
3378
  rarityWeight: 15,
3259
3379
  color: "#00f5ff",
3260
3380
  apply: () => {
3261
- const t = A.getInstance(), e = t.getConfig().core;
3381
+ const t = E.getInstance(), e = t.getConfig().core;
3262
3382
  t.updateConfig({
3263
3383
  core: {
3264
3384
  ...e,
@@ -3277,7 +3397,7 @@ class F {
3277
3397
  rarityWeight: 25,
3278
3398
  color: "#00f5ff",
3279
3399
  apply: () => {
3280
- const t = A.getInstance(), e = t.getConfig().core;
3400
+ const t = E.getInstance(), e = t.getConfig().core;
3281
3401
  t.updateConfig({
3282
3402
  core: {
3283
3403
  ...e,
@@ -3296,15 +3416,15 @@ class F {
3296
3416
  rarityWeight: 20,
3297
3417
  color: "#00f5ff",
3298
3418
  apply: (t) => {
3299
- A.getInstance().addCoreRing(1), t && t.addMaxRing(1);
3419
+ E.getInstance().addCoreRing(1), t && t.addMaxRing(1);
3300
3420
  }
3301
3421
  }
3302
3422
  ];
3303
3423
  static getRandomOptions(t = 3) {
3304
- const e = A.getInstance().getConfig(), i = this.powerUps.filter((a) => !(a.id === "vampirism_unlock" && e.core.vampirismHealProgressRate > 0 || a.id === "vampirism_boost" && e.core.vampirismHealProgressRate <= 0 || a.id === "piercer_homing" && e.piercer.hasHoming || a.id === "piercer_homing_target" && !e.piercer.hasHoming || a.id === "vortex_pocket" && e.gravityVortex.hasImplosionLaunch || a.id === "shield_fan" && e.shield.isFanBlast || a.id === "cluster_homing" && e.cluster.hasHoming)), s = [];
3424
+ const e = E.getInstance().getConfig(), i = this.powerUps.filter((a) => !(a.id === "vampirism_unlock" && e.core.vampirismHealProgressRate > 0 || a.id === "vampirism_boost" && e.core.vampirismHealProgressRate <= 0 || a.id === "piercer_homing" && e.piercer.hasHoming || a.id === "piercer_homing_target" && !e.piercer.hasHoming || a.id === "vortex_pocket" && e.gravityVortex.hasImplosionLaunch || a.id === "shield_fan" && e.shield.isFanBlast || a.id === "cluster_homing" && e.cluster.hasHoming || a.id === "offscreen_radar" && e.core.hasOffscreenIndicators)), s = [];
3305
3425
  for (let a = 0; a < t && i.length > 0; a++) {
3306
- const l = i.reduce((o, r) => o + r.rarityWeight, 0);
3307
- let n = Math.random() * l;
3426
+ const c = i.reduce((o, r) => o + r.rarityWeight, 0);
3427
+ let n = Math.random() * c;
3308
3428
  for (let o = 0; o < i.length; o++) {
3309
3429
  const r = i[o];
3310
3430
  if (n -= r.rarityWeight, n <= 0) {
@@ -3319,7 +3439,7 @@ class F {
3319
3439
  this.powerUps.push(t);
3320
3440
  }
3321
3441
  }
3322
- class vt {
3442
+ class yt {
3323
3443
  haptics = {
3324
3444
  impact: async (t) => {
3325
3445
  if ("vibrate" in navigator) {
@@ -3359,7 +3479,7 @@ class vt {
3359
3479
  }
3360
3480
  };
3361
3481
  }
3362
- class It {
3482
+ class Et {
3363
3483
  container;
3364
3484
  canvas;
3365
3485
  i18n;
@@ -3394,7 +3514,7 @@ class It {
3394
3514
  isRunning = !1;
3395
3515
  isPaused = !1;
3396
3516
  constructor(t) {
3397
- this.container = t.root, this.container.classList.add("axon-game-root"), this.i18n = new Q(t.language), this.themeManager = new dt(t.theme, this.container), this.platform = t.platform || new vt(), this.canvas = document.createElement("canvas"), this.canvas.className = "axon-canvas", this.container.appendChild(this.canvas), this.resizeCanvas(), window.addEventListener("resize", () => this.resizeCanvas()), this.eventBus = new J(), this.core = new z(this.canvas.width / 2, this.canvas.height / 2), this.inputManager = new $(this.canvas), this.physicsEngine = new ht(this.eventBus, this.i18n), this.waveDirector = new pt(), this.renderer = new ft(this.canvas, this.themeManager), this.juice = new q(), this.settingsModal = new yt(
3517
+ this.container = t.root, this.container.classList.add("axon-game-root"), this.i18n = new z(t.language), this.themeManager = new lt(t.theme, this.container), this.platform = t.platform || new yt(), this.canvas = document.createElement("canvas"), this.canvas.className = "axon-canvas", this.container.appendChild(this.canvas), this.resizeCanvas(), window.addEventListener("resize", () => this.resizeCanvas()), this.eventBus = new V(), this.core = new F(this.canvas.width / 2, this.canvas.height / 2), this.inputManager = new Y(this.canvas), this.physicsEngine = new ot(this.eventBus, this.i18n), this.waveDirector = new rt(), this.renderer = new pt(this.canvas, this.themeManager), this.juice = new J(), this.settingsModal = new _t(
3398
3518
  this.container,
3399
3519
  this.i18n,
3400
3520
  this.themeManager,
@@ -3403,11 +3523,11 @@ class It {
3403
3523
  () => {
3404
3524
  this.isPaused = !1;
3405
3525
  }
3406
- ), this.interactiveTutorial = new At(), this.tutorialOverlay = new bt(this.container, this.i18n, this.interactiveTutorial), this.hud = new xt(this.container, this.i18n, () => {
3526
+ ), this.interactiveTutorial = new mt(), this.tutorialOverlay = new ft(this.container, this.i18n, this.interactiveTutorial), this.hud = new dt(this.container, this.i18n, () => {
3407
3527
  this.isPaused = !0, this.settingsModal.show();
3408
- }), this.hud.show(), this.progressBar = new St(this.hud.progressSlot, (e) => {
3528
+ }), this.hud.show(), this.progressBar = new xt(this.hud.progressSlot, (e) => {
3409
3529
  this.waveDirector.wave = e, this.triggerLevelUp(e);
3410
- }), this.startMenu = new Et(this.container, this.i18n, () => this.startGame()), this.initAmbientArena(), this.gameLoop = new X(
3530
+ }), this.startMenu = new gt(this.container, this.i18n, () => this.startGame()), this.initAmbientArena(), this.gameLoop = new W(
3411
3531
  (e) => this.update(e),
3412
3532
  () => this.render()
3413
3533
  ), this.setupEvents(), this.gameLoop.start();
@@ -3431,12 +3551,12 @@ class It {
3431
3551
  this.ambientEnemies = [];
3432
3552
  const t = ["piercer", "spore", "cluster", "parasite"];
3433
3553
  for (let e = 0; e < 16; e++) {
3434
- const i = t[e % t.length], s = e * Math.PI * 2 / 16, a = 180 + Math.random() * 220, l = {
3554
+ const i = t[e % t.length], s = e * Math.PI * 2 / 16, a = 180 + Math.random() * 220, c = {
3435
3555
  x: this.canvas.width / 2 + Math.cos(s) * a,
3436
3556
  y: this.canvas.height / 2 + Math.sin(s) * a
3437
- }, n = M.createEnemy(i, l, {
3438
- x: l.x + Math.sin(s) * 100,
3439
- y: l.y - Math.cos(s) * 100
3557
+ }, n = M.createEnemy(i, c, {
3558
+ x: c.x + Math.sin(s) * 100,
3559
+ y: c.y - Math.cos(s) * 100
3440
3560
  });
3441
3561
  this.ambientEnemies.push(n);
3442
3562
  }
@@ -3465,7 +3585,7 @@ class It {
3465
3585
  }), this.canvas.addEventListener("touchstart", () => t(!0), { passive: !0 }), this.canvas.addEventListener("touchend", e, { passive: !0 }), this.canvas.addEventListener("touchcancel", e, { passive: !0 });
3466
3586
  }
3467
3587
  startGame() {
3468
- this.score.value = 0, this.combo.value = 0, this.enemies = [], this.ambientEnemies = [], this.pools = [], this.vortices = [], this.shockwaves = [], this.particles = [], this.floatingTexts = [], this.core.reset(this.canvas.width / 2, this.canvas.height / 2), this.waveDirector.reset(), this.inputManager.reset(), this.hud.show(), this.hud.update(1, 0), this.progressBar.reset(), this.progressBar.show(), this.isPaused = !1, this.isRunning = !0, this.interactiveTutorial.isTutorialEnabled() ? (this.interactiveTutorial.start(this.canvas.width, this.canvas.height, this.enemies), this.tutorialOverlay.show()) : (this.interactiveTutorial.isActive = !1, this.tutorialOverlay.hide());
3588
+ E.getInstance().resetToDefault(), this.score.value = 0, this.combo.value = 0, this.enemies = [], this.ambientEnemies = [], this.pools = [], this.vortices = [], this.shockwaves = [], this.particles = [], this.floatingTexts = [], this.orbitingOrbs = [], this.isLevelUpActive = !1, this.hasRerolledThisLevel = !1, this.core.reset(this.canvas.width / 2, this.canvas.height / 2), this.waveDirector.reset(), this.inputManager.reset(), this.hud.show(), this.hud.update(1, 0), this.progressBar.reset(), this.progressBar.show(), this.isPaused = !1, this.isRunning = !0, this.interactiveTutorial.isTutorialEnabled() ? (this.interactiveTutorial.start(this.canvas.width, this.canvas.height, this.enemies), this.tutorialOverlay.show()) : (this.interactiveTutorial.isActive = !1, this.tutorialOverlay.hide());
3469
3589
  }
3470
3590
  update(t) {
3471
3591
  if (this.core.update(t), !this.isRunning || this.isPaused) {
@@ -3504,16 +3624,16 @@ class It {
3504
3624
  Math.hypot(i.x - s, i.y - a) <= 80 && (this.triggerReroll(), this.inputManager.isPointerDown = !1);
3505
3625
  }
3506
3626
  for (const s of this.orbitingOrbs) {
3507
- const a = i.x - s.position.x, l = i.y - s.position.y;
3508
- if (s.isHovered = Math.hypot(a, l) <= s.radius * 1.5, s === e && this.inputManager.isPointerDown) {
3627
+ const a = i.x - s.position.x, c = i.y - s.position.y;
3628
+ if (s.isHovered = Math.hypot(a, c) <= s.radius * 1.5, s === e && this.inputManager.isPointerDown) {
3509
3629
  s.position = { ...this.inputManager.pointerPosition };
3510
3630
  const n = this.core.position.x - s.position.x, o = this.core.position.y - s.position.y;
3511
3631
  if (Math.hypot(n, o) <= this.core.radius + s.radius) {
3512
3632
  s.definition.apply(this.core), this.core.absorbPowerUpColor(s.definition.color, 0.4), this.juice.triggerFlash(0.8), this.juice.triggerScreenShake({ x: n, y: o }, 24);
3513
- const c = this.i18n.translate(s.definition.titleKey);
3633
+ const l = this.i18n.translate(s.definition.titleKey);
3514
3634
  this.floatingTexts.push({
3515
3635
  id: Math.random().toString(),
3516
- text: `+ ${c}`,
3636
+ text: `+ ${l}`,
3517
3637
  position: { ...this.core.position },
3518
3638
  velocity: { x: 0, y: -80 },
3519
3639
  color: s.definition.color,
@@ -3576,11 +3696,11 @@ class It {
3576
3696
  if (i.active) {
3577
3697
  i.triggerDissolveDeath();
3578
3698
  for (let s = 0; s < 6; s++) {
3579
- const a = Math.random() * Math.PI * 2, l = 100 + Math.random() * 200;
3699
+ const a = Math.random() * Math.PI * 2, c = 100 + Math.random() * 200;
3580
3700
  this.particles.push({
3581
3701
  id: Math.random().toString(),
3582
3702
  position: { ...i.position },
3583
- velocity: { x: Math.cos(a) * l, y: Math.sin(a) * l },
3703
+ velocity: { x: Math.cos(a) * c, y: Math.sin(a) * c },
3584
3704
  color: "#00f0ff",
3585
3705
  radius: 3 + Math.random() * 3,
3586
3706
  alpha: 1,
@@ -3609,19 +3729,19 @@ class It {
3609
3729
  maxLifetime: 2,
3610
3730
  size: 30
3611
3731
  });
3612
- const e = F.getRandomOptions(3);
3732
+ const e = B.getRandomOptions(3);
3613
3733
  this.orbitingOrbs = e.map((i, s) => {
3614
3734
  const a = s * Math.PI * 2 / e.length;
3615
- return new K(`orb_${Date.now()}_${s}`, i, a);
3735
+ return new G(`orb_${Date.now()}_${s}`, i, a);
3616
3736
  }), this.hasRerolledThisLevel = !1;
3617
3737
  }
3618
3738
  triggerReroll() {
3619
3739
  if (this.hasRerolledThisLevel) return;
3620
3740
  this.hasRerolledThisLevel = !0, this.juice.triggerFlash(0.4);
3621
- const t = F.getRandomOptions(3);
3741
+ const t = B.getRandomOptions(3);
3622
3742
  this.orbitingOrbs = t.map((e, i) => {
3623
3743
  const s = i * Math.PI * 2 / t.length;
3624
- return new K(`orb_${Date.now()}_${i}`, e, s);
3744
+ return new G(`orb_${Date.now()}_${i}`, e, s);
3625
3745
  });
3626
3746
  }
3627
3747
  render() {
@@ -3645,14 +3765,14 @@ class It {
3645
3765
  this.gameLoop.stop(), this.canvas.remove();
3646
3766
  }
3647
3767
  }
3648
- function Mt(E) {
3649
- return new It(E);
3768
+ function At(y) {
3769
+ return new Et(y);
3650
3770
  }
3651
3771
  export {
3652
- vt as BrowserPlatform,
3653
- It as GameEngine,
3654
- Y as LANGUAGES,
3655
- dt as ThemeManager,
3656
- Mt as createAxonSurge,
3772
+ yt as BrowserPlatform,
3773
+ Et as GameEngine,
3774
+ K as LANGUAGES,
3775
+ lt as ThemeManager,
3776
+ At as createAxonSurge,
3657
3777
  P as isLanguage
3658
3778
  };