@gamebob/axon-surge 0.13.0 → 0.14.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.
@@ -73,6 +73,12 @@ const k = {
73
73
  terminalAoERadius: 0,
74
74
  hasHoming: !1,
75
75
  homingTargets: 1
76
+ },
77
+ magnet: {
78
+ pickupRadius: 0,
79
+ psionicRadius: 70,
80
+ corePickupRadius: 120,
81
+ absorptionSpeed: 680
76
82
  }
77
83
  };
78
84
  class E {
@@ -123,8 +129,8 @@ class F {
123
129
  this.powerUpCount++, this.collectedPowerUpColors.push(t);
124
130
  const i = t.replace("#", "");
125
131
  if (i.length === 6) {
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);
132
+ const s = parseInt(i.substring(0, 2), 16), a = parseInt(i.substring(2, 4), 16), l = parseInt(i.substring(4, 6), 16);
133
+ 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);
128
134
  }
129
135
  }
130
136
  getHitboxRadius() {
@@ -160,7 +166,7 @@ class F {
160
166
  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 };
161
167
  }
162
168
  }
163
- class w {
169
+ class D {
164
170
  id;
165
171
  position = { x: 0, y: 0 };
166
172
  velocity = { x: 0, y: 0 };
@@ -178,6 +184,7 @@ class w {
178
184
  isStationaryShield = !1;
179
185
  shieldAngle = 0;
180
186
  remainingHomingKills = 0;
187
+ experienceDropPending = !1;
181
188
  isDying = !1;
182
189
  deathType = "none";
183
190
  deathTimer = 0;
@@ -189,11 +196,11 @@ class w {
189
196
  getHitRadius() {
190
197
  return this.radius * (1 + this.hitRadiusPadding);
191
198
  }
192
- triggerDissolveDeath() {
193
- this.isDying || (this.isDying = !0, this.deathType = "dissolve", this.deathTimer = 0, this.maxDeathTimer = 0.45, this.velocity = { x: 0, y: 0 });
199
+ triggerDissolveDeath(t = !1) {
200
+ t && (this.experienceDropPending = !0), !this.isDying && (this.isDying = !0, this.deathType = "dissolve", this.deathTimer = 0, this.maxDeathTimer = 0.45, this.velocity = { x: 0, y: 0 });
194
201
  }
195
- triggerSliceDeath(t) {
196
- this.isDying || (this.isDying = !0, this.deathType = "sliced", this.deathTimer = 0, this.maxDeathTimer = 0.35, this.sliceAngle = t, this.velocity = { x: 0, y: 0 });
202
+ triggerSliceDeath(t, e = !1) {
203
+ e && (this.experienceDropPending = !0), !this.isDying && (this.isDying = !0, this.deathType = "sliced", this.deathTimer = 0, this.maxDeathTimer = 0.35, this.sliceAngle = t, this.velocity = { x: 0, y: 0 });
197
204
  }
198
205
  update(t) {
199
206
  if (this.active) {
@@ -214,7 +221,7 @@ class w {
214
221
  }
215
222
  }
216
223
  reset() {
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;
224
+ 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.experienceDropPending = !1, this.position = { x: 0, y: 0 }, this.velocity = { x: 0, y: 0 }, this.rotation = 0, this.strategy = null, this.maxSpeed = 200;
218
225
  }
219
226
  }
220
227
  class G {
@@ -246,16 +253,16 @@ class Y {
246
253
  this.canvas = t, this.bindEvents();
247
254
  }
248
255
  updatePointerPos(t, e) {
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;
256
+ 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;
250
257
  this.pointerPosition = {
251
258
  x: (t - i.left) * s,
252
259
  y: (e - i.top) * a
253
260
  }, this.pointerHistory.push({
254
261
  x: this.pointerPosition.x,
255
262
  y: this.pointerPosition.y,
256
- time: c
263
+ time: l
257
264
  });
258
- const n = c - 0.08;
265
+ const n = l - 0.08;
259
266
  this.pointerHistory = this.pointerHistory.filter((o) => o.time >= n), this.grabbedEnemy && (this.grabbedEnemy.position = { ...this.pointerPosition });
260
267
  }
261
268
  bindEvents() {
@@ -296,8 +303,8 @@ class Y {
296
303
  const i = e ? 50 : 20;
297
304
  for (const s of t) {
298
305
  if (!s.active || s.isGrabbed || s.isThrown || s.wasManipulated) continue;
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)
306
+ const a = this.pointerPosition.x - s.position.x, l = this.pointerPosition.y - s.position.y;
307
+ if (Math.hypot(a, l) <= s.getHitRadius() + i)
301
308
  return s.isGrabbed = !0, this.grabbedEnemy = s, this.dragStart = { ...this.pointerPosition }, this.pointerHistory = [], s;
302
309
  }
303
310
  return null;
@@ -307,8 +314,8 @@ class Y {
307
314
  const i = e ? 50 : 20;
308
315
  for (const s of t) {
309
316
  if (!s.active || s.isGrabbed) continue;
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)
317
+ const a = this.pointerPosition.x - s.position.x, l = this.pointerPosition.y - s.position.y;
318
+ if (Math.hypot(a, l) <= s.radius * 1.5 + i)
312
319
  return s.isGrabbed = !0, this.grabbedOrb = s, s;
313
320
  }
314
321
  return null;
@@ -318,22 +325,22 @@ class Y {
318
325
  const t = this.grabbedEnemy;
319
326
  t.isGrabbed = !1, t.isThrown = !0, t.wasManipulated = !0;
320
327
  const i = performance.now() / 1e3 - 0.08, s = this.pointerHistory.filter((o) => o.time >= i);
321
- let a = 0, c = 0;
328
+ let a = 0, l = 0;
322
329
  if (s.length >= 2) {
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;
330
+ const o = s[0], r = s[s.length - 1], c = Math.max(0.01, r.time - o.time);
331
+ a = (r.x - o.x) / c, l = (r.y - o.y) / c;
325
332
  }
326
- const n = Math.hypot(a, c);
333
+ const n = Math.hypot(a, l);
327
334
  if (n > 30) {
328
- const r = Math.min(n * 1.15, 2500), l = Math.atan2(c, a);
335
+ const r = Math.min(n * 1.15, 2500), c = Math.atan2(l, a);
329
336
  t.velocity = {
330
- x: Math.cos(l) * r,
331
- y: Math.sin(l) * r
337
+ x: Math.cos(c) * r,
338
+ y: Math.sin(c) * r
332
339
  };
333
340
  } else if (this.dragStart) {
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);
341
+ const o = t.position.x - this.dragStart.x, r = t.position.y - this.dragStart.y, c = Math.hypot(o, r);
342
+ if (c > 5) {
343
+ const h = Math.atan2(r, o), u = Math.min(c * 4, 600);
337
344
  t.velocity = {
338
345
  x: Math.cos(h) * u,
339
346
  y: Math.sin(h) * u
@@ -367,23 +374,23 @@ class Z {
367
374
  }
368
375
  insert(t) {
369
376
  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);
370
- for (let c = e; c <= i; c++)
377
+ for (let l = e; l <= i; l++)
371
378
  for (let n = s; n <= a; n++) {
372
- const o = `${c}:${n}`;
379
+ const o = `${l}:${n}`;
373
380
  this.grid.has(o) || this.grid.set(o, /* @__PURE__ */ new Set()), this.grid.get(o).add(t);
374
381
  }
375
382
  }
376
383
  getNearby(t, e) {
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);
384
+ 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);
378
385
  for (let o = s; o <= a; o++)
379
- for (let r = c; r <= n; r++) {
380
- const l = `${o}:${r}`, h = this.grid.get(l);
386
+ for (let r = l; r <= n; r++) {
387
+ const c = `${o}:${r}`, h = this.grid.get(c);
381
388
  h && h.forEach((u) => i.add(u));
382
389
  }
383
390
  return i;
384
391
  }
385
392
  }
386
- class J {
393
+ class z {
387
394
  hitstopTime = 0;
388
395
  shakeTime = 0;
389
396
  shakeDuration = 0.14;
@@ -423,7 +430,7 @@ class J {
423
430
  };
424
431
  }
425
432
  }
426
- const O = {
433
+ const P = {
427
434
  es: {
428
435
  title: "AXON SURGE",
429
436
  startButton: "INICIAR ENLACE",
@@ -447,7 +454,7 @@ const O = {
447
454
  tutorialStep2Text: "PASO 2: LÁNZALO CON IMPULSO HACIA EL OBJETIVO",
448
455
  tutorialDragWarning: "¡LA MEJOR ESTRATEGIA ES LANZARLOS! LÁNZALO CON IMPULSO",
449
456
  levelUpChoose: "¡NIVEL {level}! ELIGE UN MODIFICADOR",
450
- rerollButton: "🎲 REROLL (1 DISPONIBLE)",
457
+ rerollButton: "🎲 REROLL ({count} DISPONIBLE)",
451
458
  pu_spore_radius_title: "EXPANSIÓN ÁCIDA",
452
459
  pu_spore_radius_desc: "+12% Radio Ácido",
453
460
  pu_spore_duration_title: "LONGEVIDAD ÁCIDA",
@@ -478,6 +485,10 @@ const O = {
478
485
  pu_vampirism_boost_desc: "+0.3% Curación por baja",
479
486
  pu_core_ring_title: "SOBRECARGA DE NÚCLEO",
480
487
  pu_core_ring_desc: "+1 Anillo de Vida",
488
+ pu_magnet_radius_title: "CAMPO MAGNÉTICO",
489
+ pu_magnet_radius_desc: "+60 Radio de recogida de experiencia",
490
+ pu_magnet_strength_title: "ATRACCIÓN MAGNÉTICA",
491
+ pu_magnet_strength_desc: "+25% Velocidad de absorción de experiencia",
481
492
  pu_offscreen_radar_title: "RADAR PSÍONICO",
482
493
  pu_offscreen_radar_desc: "Detecta enemigos fuera de pantalla"
483
494
  },
@@ -504,7 +515,7 @@ const O = {
504
515
  tutorialStep2Text: "STEP 2: FLICK TOWARD TARGET WITH SWIPE SPEED",
505
516
  tutorialDragWarning: "THE BEST STRATEGY IS TO FLICK THEM! THROW WITH SWIPE SPEED",
506
517
  levelUpChoose: "LEVEL {level}! CHOOSE MODIFIER",
507
- rerollButton: "🎲 REROLL (1 AVAILABLE)",
518
+ rerollButton: "🎲 REROLL ({count} AVAILABLE)",
508
519
  pu_spore_radius_title: "ACID EXPANSION",
509
520
  pu_spore_radius_desc: "+12% Acid Radius",
510
521
  pu_spore_duration_title: "ACID LINGER",
@@ -535,6 +546,10 @@ const O = {
535
546
  pu_vampirism_boost_desc: "+0.3% Heal per kill",
536
547
  pu_core_ring_title: "NUCLEUS OVERCHARGE",
537
548
  pu_core_ring_desc: "+1 Life Ring",
549
+ pu_magnet_radius_title: "MAGNETIC FIELD",
550
+ pu_magnet_radius_desc: "+60 Experience pickup range",
551
+ pu_magnet_strength_title: "MAGNETIC PULL",
552
+ pu_magnet_strength_desc: "+25% Experience absorption speed",
538
553
  pu_offscreen_radar_title: "PSIONIC RADAR",
539
554
  pu_offscreen_radar_desc: "Detect off-screen enemies"
540
555
  },
@@ -561,7 +576,7 @@ const O = {
561
576
  tutorialStep2Text: "ETAPE 2: LANCEZ AVEC VITESSE VERS LA CIBLE",
562
577
  tutorialDragWarning: "LA MEILLEURE STRATEGIE EST DE LES LANCER !",
563
578
  levelUpChoose: "NIVEAU {level} ! CHOISISSEZ UN MODIFICATEUR",
564
- rerollButton: "🎲 RELANCER (1 DISPONIBLE)",
579
+ rerollButton: "🎲 RELANCER ({count} DISPONIBLE)",
565
580
  pu_spore_radius_title: "EXPANSION ACIDE",
566
581
  pu_spore_radius_desc: "+30% Rayon d'acide",
567
582
  pu_spore_duration_title: "LONGEVITE ACIDE",
@@ -616,7 +631,7 @@ const O = {
616
631
  tutorialStep2Text: "SCHRITT 2: SCHLEUDERE MIT SCHWUNG AUF DAS ZIEL",
617
632
  tutorialDragWarning: "DIE BESTE STRATEGIE IST ES SIE ZU SCHLEUDERN!",
618
633
  levelUpChoose: "LEVEL {level}! MODIFIKATOR WÄHLEN",
619
- rerollButton: "🎲 NEU WÜRFELN (1 VERFÜGBAR)",
634
+ rerollButton: "🎲 NEU WÜRFELN ({count} VERFÜGBAR)",
620
635
  pu_spore_radius_title: "SÄURE-EXPANSION",
621
636
  pu_spore_radius_desc: "+30% Säureradius",
622
637
  pu_spore_duration_title: "SÄURE-DAUER",
@@ -671,7 +686,7 @@ const O = {
671
686
  tutorialStep2Text: "PASSO 2: LANCIA CON VELOCITA VERSO IL BERSAGLIO",
672
687
  tutorialDragWarning: "LA STRATEGIA MIGLIORE E LANCIARLI!",
673
688
  levelUpChoose: "LIVELLO {level}! SCEGLI UN MODIFICATORE",
674
- rerollButton: "🎲 RILANCIA (1 DISPONIBILE)",
689
+ rerollButton: "🎲 RILANCIA ({count} DISPONIBILE)",
675
690
  pu_spore_radius_title: "ESPANSIONE ACIDA",
676
691
  pu_spore_radius_desc: "+30% Raggio Acido",
677
692
  pu_spore_duration_title: "DURATA ACIDA",
@@ -726,7 +741,7 @@ const O = {
726
741
  tutorialStep2Text: "PASSO 2: LANCE COM IMPULSO EM DIRECAO AO ALVO",
727
742
  tutorialDragWarning: "A MELHOR ESTRATEGIA E LANCA-LOS!",
728
743
  levelUpChoose: "NÍVEL {level}! ESCOLHA UM MODIFICADOR",
729
- rerollButton: "🎲 REROLAR (1 DISPONÍVEL)",
744
+ rerollButton: "🎲 REROLAR ({count} DISPONÍVEL)",
730
745
  pu_spore_radius_title: "EXPANSÃO ÁCIDA",
731
746
  pu_spore_radius_desc: "+30% Raio Ácido",
732
747
  pu_spore_duration_title: "LONGEVIDADE ÁCIDA",
@@ -781,7 +796,7 @@ const O = {
781
796
  tutorialStep2Text: "STAP 2: GOOI MET SNELHEID NAAR HET DOEL",
782
797
  tutorialDragWarning: "DE BESTE STRATEGIE IS OM ZE TE GOOIEN!",
783
798
  levelUpChoose: "NIVEAU {level}! KIES EEN MODIFICATOR",
784
- rerollButton: "🎲 HERROL (1 BESCHIKBAAR)",
799
+ rerollButton: "🎲 HERROL ({count} BESCHIKBAAR)",
785
800
  pu_spore_radius_title: "ZURE EXPANSIE",
786
801
  pu_spore_radius_desc: "+30% Zuurstraal",
787
802
  pu_spore_duration_title: "ZURE DUUR",
@@ -836,7 +851,7 @@ const O = {
836
851
  tutorialStep2Text: "STEG 2: KASTA MED HASTIGHET MOT MÅLET",
837
852
  tutorialDragWarning: "DEN BÄSTA STRATEGIN ÄR ATT KASTA DEM!",
838
853
  levelUpChoose: "NIVÅ {level}! VÄLJ MODIFIERARE",
839
- rerollButton: "🎲 SLÅ OM (1 TILLGÄNGLIG)",
854
+ rerollButton: "🎲 SLÅ OM ({count} TILLGÄNGLIG)",
840
855
  pu_spore_radius_title: "SYRA-EXPANSION",
841
856
  pu_spore_radius_desc: "+30% Syraradie",
842
857
  pu_spore_duration_title: "SYRA-VARAKTIGHET",
@@ -891,7 +906,7 @@ const O = {
891
906
  tutorialStep2Text: "KROK 2: RZUĆ Z PRĘDKOŚCIĄ W STRONĘ CELU",
892
907
  tutorialDragWarning: "NAJLEPSZA STRATEGIA TO RZUCANIE NIMI!",
893
908
  levelUpChoose: "POZIOM {level}! WYBIERZ MODYFIKATOR",
894
- rerollButton: "🎲 PRZEROSZADA (1 DOSTĘPNA)",
909
+ rerollButton: "🎲 PRZEROSZADA ({count} DOSTĘPNA)",
895
910
  pu_spore_radius_title: "EKSPANSJA KWASOWA",
896
911
  pu_spore_radius_desc: "+30% Promień kwasu",
897
912
  pu_spore_duration_title: "TRWAŁOŚĆ KWASOWA",
@@ -946,7 +961,7 @@ const O = {
946
961
  tutorialStep2Text: "LANGKAH 2: LEMPAR DENGAN KECEPATAN KE TARGET",
947
962
  tutorialDragWarning: "STRATEGI TERBAIK ADALAH MELEMPAR MEREKA!",
948
963
  levelUpChoose: "TINGKAT {level}! PILIH MODIFIKASI",
949
- rerollButton: "🎲 ACAK ULANG (1 TERSEDIA)",
964
+ rerollButton: "🎲 ACAK ULANG ({count} TERSEDIA)",
950
965
  pu_spore_radius_title: "EKSPANSI ASAM",
951
966
  pu_spore_radius_desc: "+30% Radius Asam",
952
967
  pu_spore_duration_title: "DURASI ASAM",
@@ -1001,7 +1016,7 @@ const O = {
1001
1016
  tutorialStep2Text: "ADIM 2: HEDEFE HIZLA FIRLATIN",
1002
1017
  tutorialDragWarning: "EN İYİ STRATEJİ ONLARI FIRLATMAKTIR!",
1003
1018
  levelUpChoose: "SEVİYE {level}! GÜÇLENDİRME SEÇ",
1004
- rerollButton: "🎲 YENİDEN ZAR AT (1 HAKK)",
1019
+ rerollButton: "🎲 YENİDEN ZAR AT ({count} HAKK)",
1005
1020
  pu_spore_radius_title: "ASİT GENİŞLEMESİ",
1006
1021
  pu_spore_radius_desc: "+30% Asit Yarıçapı",
1007
1022
  pu_spore_duration_title: "ASİT SÜRESİ",
@@ -1056,7 +1071,7 @@ const O = {
1056
1071
  tutorialStep2Text: "ШАГ 2: БРОСАЙТЕ С ИМПУЛЬСОМ В ЦЕЛЬ",
1057
1072
  tutorialDragWarning: "ЛУЧШАЯ СТРАТЕГИЯ - БРОСАТЬ ИХ С ИМПУЛЬСОМ!",
1058
1073
  levelUpChoose: "УРОВЕНЬ {level}! ВЫБЕРИТЕ МОДИФИКАТОР",
1059
- rerollButton: "🎲 ПЕРЕБРОСИТЬ (1 ДОСТУПЕН)",
1074
+ rerollButton: "🎲 ПЕРЕБРОСИТЬ ({count} ДОСТУПЕН)",
1060
1075
  pu_spore_radius_title: "КИСЛОТНОЕ РАСШИРЕНИЕ",
1061
1076
  pu_spore_radius_desc: "+30% Радиус кислоты",
1062
1077
  pu_spore_duration_title: "КИСЛОТНАЯ ДЛИТЕЛЬНОСТЬ",
@@ -1111,7 +1126,7 @@ const O = {
1111
1126
  tutorialStep2Text: "ステップ2: ターゲットに向けて勢いよくフリック",
1112
1127
  tutorialDragWarning: "最高の戦略は勢いよく投げることです!",
1113
1128
  levelUpChoose: "レベル {level}! 強化を選択",
1114
- rerollButton: "🎲 リロール (残り1回)",
1129
+ rerollButton: "🎲 リロール (残り{count}回)",
1115
1130
  pu_spore_radius_title: "アシッド拡大",
1116
1131
  pu_spore_radius_desc: "+30% アシッド範囲",
1117
1132
  pu_spore_duration_title: "アシッド持続",
@@ -1166,7 +1181,7 @@ const O = {
1166
1181
  tutorialStep2Text: "2단계: 표적을 향해 빠르게 튕기세요",
1167
1182
  tutorialDragWarning: "최선의 전략은 적을 튕겨 던지는 것입니다!",
1168
1183
  levelUpChoose: "레벨 {level}! 강화 선택",
1169
- rerollButton: "🎲 리롤 (1회 가능)",
1184
+ rerollButton: "🎲 리롤 ({count}회 가능)",
1170
1185
  pu_spore_radius_title: "산성 확장",
1171
1186
  pu_spore_radius_desc: "+30% 산성 범주",
1172
1187
  pu_spore_duration_title: "산성 지속",
@@ -1221,7 +1236,7 @@ const O = {
1221
1236
  tutorialStep2Text: "步骤 2: 朝目标快速挥动抛投",
1222
1237
  tutorialDragWarning: "最佳策略是快速挥动抛投!",
1223
1238
  levelUpChoose: "等级 {level}! 选择强化",
1224
- rerollButton: "🎲 重刷 (剩余1次)",
1239
+ rerollButton: "🎲 重刷 (剩余{count}次)",
1225
1240
  pu_spore_radius_title: "酸液扩张",
1226
1241
  pu_spore_radius_desc: "+30% 酸液范围",
1227
1242
  pu_spore_duration_title: "酸液持久",
@@ -1270,11 +1285,11 @@ const O = {
1270
1285
  "ko",
1271
1286
  "zh"
1272
1287
  ];
1273
- function P(y) {
1288
+ function O(y) {
1274
1289
  return K.includes(y);
1275
1290
  }
1276
1291
  const U = "axon_surge_language";
1277
- class z {
1292
+ class J {
1278
1293
  currentLanguage;
1279
1294
  constructor(t) {
1280
1295
  this.currentLanguage = this.detectLanguage(t);
@@ -1282,17 +1297,17 @@ class z {
1282
1297
  detectLanguage(t) {
1283
1298
  try {
1284
1299
  const e = localStorage.getItem(U);
1285
- if (e && P(e))
1300
+ if (e && O(e))
1286
1301
  return e;
1287
1302
  } catch {
1288
1303
  }
1289
- if (t && P(t))
1304
+ if (t && O(t))
1290
1305
  return t;
1291
1306
  try {
1292
1307
  const e = (document.documentElement.lang || document.body?.getAttribute("lang") || document.documentElement.getAttribute("data-lang") || "").toLowerCase();
1293
1308
  if (e) {
1294
1309
  const i = e.split("-")[0];
1295
- if (i && P(i))
1310
+ if (i && O(i))
1296
1311
  return i;
1297
1312
  }
1298
1313
  } catch {
@@ -1301,7 +1316,7 @@ class z {
1301
1316
  const e = (navigator.language || navigator.languages && navigator.languages[0] || "").toLowerCase();
1302
1317
  if (e) {
1303
1318
  const i = e.split("-")[0];
1304
- if (i && P(i))
1319
+ if (i && O(i))
1305
1320
  return i;
1306
1321
  }
1307
1322
  } catch {
@@ -1309,7 +1324,7 @@ class z {
1309
1324
  return "en";
1310
1325
  }
1311
1326
  setLanguage(t) {
1312
- if (O[t]) {
1327
+ if (P[t]) {
1313
1328
  this.currentLanguage = t;
1314
1329
  try {
1315
1330
  localStorage.setItem(U, t);
@@ -1321,9 +1336,9 @@ class z {
1321
1336
  return this.currentLanguage;
1322
1337
  }
1323
1338
  translate(t, e) {
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));
1339
+ let s = (P[this.currentLanguage] || P.en)[t] || P.en[t] || String(t);
1340
+ return e && Object.entries(e).forEach(([a, l]) => {
1341
+ s = s.replace(`{${a}}`, String(l));
1327
1342
  }), s;
1328
1343
  }
1329
1344
  }
@@ -1331,23 +1346,23 @@ class $ {
1331
1346
  static update(t, e, i) {
1332
1347
  const s = E.getInstance().getConfig();
1333
1348
  for (let a = t.length - 1; a >= 0; a--) {
1334
- const c = t[a];
1335
- if (c) {
1336
- c.duration += i;
1349
+ const l = t[a];
1350
+ if (l) {
1351
+ l.duration += i;
1337
1352
  for (const n of e) {
1338
1353
  if (!n.active || n.isGrabbed || n.isDying || n.isStationaryShield || n.isThrown && n.type === "piercer") continue;
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);
1354
+ const o = l.position.x - n.position.x, r = l.position.y - n.position.y, c = Math.hypot(o, r);
1355
+ if (c > 2 && c <= l.radius) {
1356
+ const h = Math.pow(1 - c / l.radius, 0.7), u = l.pullForce * h, p = Math.atan2(r, o);
1342
1357
  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;
1343
1358
  }
1344
1359
  }
1345
- if (c.duration >= c.maxDuration) {
1360
+ if (l.duration >= l.maxDuration) {
1346
1361
  if (s.gravityVortex.hasImplosionLaunch)
1347
1362
  for (const n of e) {
1348
1363
  if (!n.active || n.isDying) continue;
1349
- const o = n.position.x - c.position.x, r = n.position.y - c.position.y;
1350
- if (Math.hypot(o, r) <= c.radius) {
1364
+ const o = n.position.x - l.position.x, r = n.position.y - l.position.y;
1365
+ if (Math.hypot(o, r) <= l.radius) {
1351
1366
  const h = Math.atan2(r, o), u = 1200;
1352
1367
  n.isThrown = !0, n.wasManipulated = !0, n.velocity = {
1353
1368
  x: Math.cos(h) * u,
@@ -1362,7 +1377,7 @@ class $ {
1362
1377
  }
1363
1378
  }
1364
1379
  class X {
1365
- static update(t, e, i, s, a, c, n, o, r, l) {
1380
+ static update(t, e, i, s, a, l, n, o, r, c) {
1366
1381
  for (const h of e) {
1367
1382
  if (!h.active || h.isGrabbed || h.isDying) continue;
1368
1383
  const u = t.position.x - h.position.x, p = t.position.y - h.position.y;
@@ -1372,12 +1387,12 @@ class X {
1372
1387
  id: Math.random().toString(),
1373
1388
  position: { ...t.position },
1374
1389
  radius: 20,
1375
- maxRadius: Math.max(r, l) * 1.3,
1390
+ maxRadius: Math.max(r, c) * 1.3,
1376
1391
  color: "#00f0ff",
1377
1392
  alpha: 1,
1378
1393
  lifetime: 0,
1379
1394
  maxLifetime: 0.8
1380
- }), c.triggerScreenShake({ x: u, y: p }, 25), c.triggerHitstop(0.15), c.triggerFlash(0.6);
1395
+ }), l.triggerScreenShake({ x: u, y: p }, 25), l.triggerHitstop(0.15), l.triggerFlash(0.6);
1381
1396
  for (const d of e)
1382
1397
  if (d.active && !d.isGrabbed) {
1383
1398
  d.triggerDissolveDeath();
@@ -1414,8 +1429,8 @@ class X {
1414
1429
  }
1415
1430
  class j {
1416
1431
  execute(t) {
1417
- const { thrownEnemy: e, targetEnemy: i, shockwaves: s, particles: a, floatingTexts: c } = t;
1418
- i.active = !1, s.push({
1432
+ const { thrownEnemy: e, targetEnemy: i, shockwaves: s, particles: a, floatingTexts: l } = t;
1433
+ i.experienceDropPending = !0, i.active = !1, s.push({
1419
1434
  id: Math.random().toString(),
1420
1435
  position: { ...i.position },
1421
1436
  radius: 10,
@@ -1438,7 +1453,7 @@ class j {
1438
1453
  maxLifetime: 0.5
1439
1454
  });
1440
1455
  }
1441
- c.push({
1456
+ l.push({
1442
1457
  id: Math.random().toString(),
1443
1458
  text: "PIERCING SLICE",
1444
1459
  position: { ...i.position },
@@ -1453,7 +1468,7 @@ class j {
1453
1468
  }
1454
1469
  class q {
1455
1470
  execute(t) {
1456
- const { thrownEnemy: e, pools: i, shockwaves: s, particles: a, floatingTexts: c, eventBus: n } = t, o = e.position, r = E.getInstance().getConfig();
1471
+ const { thrownEnemy: e, pools: i, shockwaves: s, particles: a, floatingTexts: l, eventBus: n } = t, o = e.position, r = E.getInstance().getConfig();
1457
1472
  i.push({
1458
1473
  id: Math.random().toString(),
1459
1474
  position: { ...o },
@@ -1471,7 +1486,7 @@ class q {
1471
1486
  lifetime: 0,
1472
1487
  maxLifetime: 0.6
1473
1488
  });
1474
- for (let l = 0; l < 45; l++) {
1489
+ for (let c = 0; c < 45; c++) {
1475
1490
  const h = Math.random() * Math.PI * 2, u = 120 + Math.random() * 260;
1476
1491
  a.push({
1477
1492
  id: Math.random().toString(),
@@ -1484,7 +1499,7 @@ class q {
1484
1499
  maxLifetime: 0.9
1485
1500
  });
1486
1501
  }
1487
- c.push({
1502
+ l.push({
1488
1503
  id: Math.random().toString(),
1489
1504
  text: "MASSIVE SPORE NEBULA",
1490
1505
  position: { ...o },
@@ -1494,13 +1509,13 @@ class q {
1494
1509
  lifetime: 0,
1495
1510
  maxLifetime: 1.2,
1496
1511
  size: 26
1497
- }), e.active = !1, n.emit("onPoolCreated", { position: o });
1512
+ }), e.experienceDropPending = !0, e.active = !1, n.emit("onPoolCreated", { position: o });
1498
1513
  }
1499
1514
  }
1500
1515
  class Q {
1501
1516
  execute(t) {
1502
- const { thrownEnemy: e, targetEnemy: i, allEnemies: s, shockwaves: a, particles: c, floatingTexts: n } = t, o = i.position;
1503
- e.active = !1, i.active = !1, a.push({
1517
+ const { thrownEnemy: e, targetEnemy: i, allEnemies: s, shockwaves: a, particles: l, floatingTexts: n } = t, o = i.position;
1518
+ e.experienceDropPending = !0, i.experienceDropPending = !0, e.active = !1, i.active = !1, a.push({
1504
1519
  id: Math.random().toString(),
1505
1520
  position: { ...o },
1506
1521
  radius: 15,
@@ -1510,9 +1525,9 @@ class Q {
1510
1525
  lifetime: 0,
1511
1526
  maxLifetime: 0.6
1512
1527
  });
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 = {
1528
+ const r = E.getInstance().getConfig(), c = r.cluster.fragmentCount, h = r.cluster.hasHoming;
1529
+ for (let u = 0; u < c; u++) {
1530
+ const p = u * Math.PI * 2 / c, _ = 800 + Math.random() * 300, g = {
1516
1531
  x: o.x + Math.cos(p) * 45,
1517
1532
  y: o.y + Math.sin(p) * 45
1518
1533
  };
@@ -1537,7 +1552,7 @@ class Q {
1537
1552
  }
1538
1553
  for (let u = 0; u < 35; u++) {
1539
1554
  const p = Math.random() * Math.PI * 2, _ = 200 + Math.random() * 300;
1540
- c.push({
1555
+ l.push({
1541
1556
  id: Math.random().toString(),
1542
1557
  position: { ...o },
1543
1558
  velocity: { x: Math.cos(p) * _, y: Math.sin(p) * _ },
@@ -1563,49 +1578,47 @@ class Q {
1563
1578
  }
1564
1579
  class tt {
1565
1580
  execute(t) {
1566
- const { thrownEnemy: e, targetEnemy: i, vortices: s, shockwaves: a } = t, c = E.getInstance().getConfig(), n = {
1581
+ const { thrownEnemy: e, targetEnemy: i, vortices: s, shockwaves: a } = t, l = E.getInstance().getConfig(), n = {
1567
1582
  x: (e.position.x + i.position.x) / 2,
1568
1583
  y: (e.position.y + i.position.y) / 2
1569
1584
  };
1570
1585
  s.push({
1571
1586
  id: Math.random().toString(),
1572
1587
  position: n,
1573
- radius: Math.round(c.gravityVortex.baseRadius * 2.2),
1588
+ radius: Math.round(l.gravityVortex.baseRadius * 2.2),
1574
1589
  duration: 0,
1575
- maxDuration: c.gravityVortex.baseDuration * 1.5,
1576
- pullForce: c.gravityVortex.basePullForce * 1.6
1590
+ maxDuration: l.gravityVortex.baseDuration * 1.5,
1591
+ pullForce: l.gravityVortex.basePullForce * 1.6
1577
1592
  }), a.push({
1578
1593
  id: Math.random().toString(),
1579
1594
  position: n,
1580
1595
  radius: 20,
1581
- maxRadius: Math.round(c.gravityVortex.baseRadius * 2.2),
1596
+ maxRadius: Math.round(l.gravityVortex.baseRadius * 2.2),
1582
1597
  color: "#9d4edd",
1583
1598
  alpha: 1,
1584
1599
  lifetime: 0,
1585
1600
  maxLifetime: 0.65
1586
- }), e.triggerDissolveDeath(), i.triggerDissolveDeath();
1601
+ }), e.triggerDissolveDeath(!0), i.triggerDissolveDeath(!0);
1587
1602
  }
1588
1603
  }
1589
1604
  class et {
1590
1605
  execute(t) {
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
1595
- }, h.isFanBlast) {
1596
- const p = [-Math.PI / 4, Math.PI / 4];
1597
- for (const _ of p) {
1598
- const g = l + _, d = M.createEnemy("heavy", {
1606
+ 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 = E.getInstance().getConfig().shield, u = h.blastSpeed || 1400, p = h.isFanBlast ? [-Math.PI / 4, 0, Math.PI / 4] : [0];
1607
+ for (const _ of p) {
1608
+ const g = c + _, d = _ === 0 ? e : M.createEnemy(
1609
+ "heavy",
1610
+ {
1599
1611
  x: e.position.x + Math.cos(g) * 30,
1600
1612
  y: e.position.y + Math.sin(g) * 30
1601
- }, { x: 0, y: 0 });
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);
1606
- }
1613
+ },
1614
+ { x: 0, y: 0 }
1615
+ );
1616
+ d.isStationaryShield = !1, d.isThrown = !0, d.wasManipulated = !0, d.shieldAngle = g, d.rotation = g, d.velocity = {
1617
+ x: Math.cos(g) * u,
1618
+ y: Math.sin(g) * u
1619
+ }, d !== e && s.push(d);
1607
1620
  }
1608
- i.active = !1, i.triggerDissolveDeath(), n.push({
1621
+ i.active = !1, i.triggerDissolveDeath(!0), n.push({
1609
1622
  id: Math.random().toString(),
1610
1623
  text: "ARC BLAST!",
1611
1624
  position: { ...e.position },
@@ -1616,12 +1629,12 @@ class et {
1616
1629
  maxLifetime: 0.9,
1617
1630
  size: 24
1618
1631
  });
1619
- for (let p = 0; p < 50; p++) {
1620
- const _ = (Math.random() - 0.5) * 1.5, g = l + _, d = 300 + Math.random() * 500;
1621
- c.push({
1632
+ for (let _ = 0; _ < 50; _++) {
1633
+ const g = (Math.random() - 0.5) * 1.5, d = c + g, m = 300 + Math.random() * 500;
1634
+ l.push({
1622
1635
  id: Math.random().toString(),
1623
1636
  position: { ...e.position },
1624
- velocity: { x: Math.cos(g) * d, y: Math.sin(g) * d },
1637
+ velocity: { x: Math.cos(d) * m, y: Math.sin(d) * m },
1625
1638
  color: "#00f5ff",
1626
1639
  radius: 4 + Math.random() * 6,
1627
1640
  alpha: 1,
@@ -1644,24 +1657,24 @@ class et {
1644
1657
  }
1645
1658
  class M {
1646
1659
  static createEnemy(t, e, i) {
1647
- const s = `enemy_${Date.now()}_${Math.random()}`, a = new w(s);
1660
+ const s = `enemy_${Date.now()}_${Math.random()}`, a = new D(s);
1648
1661
  return this.configureEnemy(a, t, e, i), a;
1649
1662
  }
1650
1663
  static configureEnemy(t, e, i, s) {
1651
1664
  t.type = e, t.position = { ...i }, t.active = !0, t.isGrabbed = !1, t.isThrown = !1;
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 = {
1665
+ const a = s.x - i.x, l = s.y - i.y, n = Math.atan2(l, a);
1666
+ let o = 70, r = 100, c = 20, h = "#ff2a5f", u = null;
1667
+ e === "piercer" ? (o = 95, r = 140, c = 18, h = "#ff2a5f", u = new j()) : e === "spore" ? (o = 65, r = 90, c = 24, h = "#39ff14", u = new q()) : e === "cluster" ? (o = 50, r = 75, c = 26, h = "#ffd700", u = new Q()) : e === "parasite" ? (o = 80, r = 110, c = 22, h = "#9d4edd", u = new tt()) : e === "heavy" ? (o = 35, r = 50, c = 34, h = "#00f5ff", u = new et(), 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 = {
1655
1668
  x: Math.cos(n) * o,
1656
1669
  y: Math.sin(n) * o
1657
1670
  };
1658
1671
  }
1659
1672
  }
1660
1673
  class T {
1661
- static killEnemy(t, e, i, s, a, c) {
1674
+ static killEnemy(t, e, i, s, a, l) {
1662
1675
  if (!t.active || t.isDying) return;
1663
1676
  const n = E.getInstance().getConfig();
1664
- if (a.push({
1677
+ if (t.experienceDropPending = !0, a.push({
1665
1678
  id: Math.random().toString(),
1666
1679
  position: { ...t.position },
1667
1680
  radius: 10,
@@ -1671,7 +1684,7 @@ class T {
1671
1684
  lifetime: 0,
1672
1685
  maxLifetime: 0.5
1673
1686
  }), t.type === "spore")
1674
- t.triggerDissolveDeath(), i.push({
1687
+ t.triggerDissolveDeath(!0), i.push({
1675
1688
  id: Math.random().toString(),
1676
1689
  position: { ...t.position },
1677
1690
  radius: n.toxicPool.baseRadius,
@@ -1680,17 +1693,17 @@ class T {
1680
1693
  damage: n.toxicPool.damage
1681
1694
  });
1682
1695
  else if (t.type === "cluster") {
1683
- t.triggerDissolveDeath();
1696
+ t.triggerDissolveDeath(!0);
1684
1697
  const o = n.cluster.fragmentCount, r = n.cluster.hasHoming;
1685
- for (let l = 0; l < o; l++) {
1686
- const h = l * Math.PI * 2 / o, u = 750 + Math.random() * 250, p = {
1698
+ for (let c = 0; c < o; c++) {
1699
+ const h = c * Math.PI * 2 / o, u = 750 + Math.random() * 250, p = {
1687
1700
  x: t.position.x + Math.cos(h) * 40,
1688
1701
  y: t.position.y + Math.sin(h) * 40
1689
1702
  };
1690
1703
  let _ = h;
1691
1704
  if (r) {
1692
1705
  let d = null, m = 1 / 0;
1693
- for (const x of c) {
1706
+ for (const x of l) {
1694
1707
  if (x === t || !x.active || x.isGrabbed || x.isDying) continue;
1695
1708
  const A = Math.hypot(x.position.x - p.x, x.position.y - p.y);
1696
1709
  A < m && (m = A, d = x);
@@ -1704,24 +1717,24 @@ class T {
1704
1717
  g.isThrown = !0, g.wasManipulated = !0, g.velocity = {
1705
1718
  x: Math.cos(_) * u,
1706
1719
  y: Math.sin(_) * u
1707
- }, c.push(g);
1720
+ }, l.push(g);
1708
1721
  }
1709
- } else t.type === "parasite" ? (t.triggerDissolveDeath(), s.push({
1722
+ } else t.type === "parasite" ? (t.triggerDissolveDeath(!0), s.push({
1710
1723
  id: Math.random().toString(),
1711
1724
  position: { ...t.position },
1712
1725
  radius: n.gravityVortex.baseRadius,
1713
1726
  duration: 0,
1714
1727
  maxDuration: n.gravityVortex.baseDuration,
1715
1728
  pullForce: n.gravityVortex.basePullForce
1716
- })) : t.type === "piercer" ? t.triggerSliceDeath(e) : t.triggerDissolveDeath();
1729
+ })) : t.type === "piercer" ? t.triggerSliceDeath(e, !0) : t.triggerDissolveDeath(!0);
1717
1730
  }
1718
1731
  }
1719
1732
  class it {
1720
- static update(t, e, i, s, a, c, n, o, r, l, h, u, p) {
1733
+ static update(t, e, i, s, a, l, n, o, r, c, h, u, p) {
1721
1734
  let _ = !1;
1722
1735
  for (const g of t)
1723
1736
  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) {
1737
+ if (_ = !0, g.position.x < -120 || g.position.x > c + 120 || g.position.y < -120 || g.position.y > h + 120) {
1725
1738
  if (g.type === "heavy") {
1726
1739
  s.push({
1727
1740
  id: Math.random().toString(),
@@ -1821,8 +1834,8 @@ class it {
1821
1834
  let I = null, S = 1 / 0;
1822
1835
  for (const f of t) {
1823
1836
  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);
1837
+ const v = f.position.x - g.position.x, L = f.position.y - g.position.y, w = Math.hypot(v, L);
1838
+ w < S && (S = w, I = f);
1826
1839
  }
1827
1840
  if (I) {
1828
1841
  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;
@@ -1867,15 +1880,15 @@ class it {
1867
1880
  vortices: i,
1868
1881
  shockwaves: s,
1869
1882
  particles: a,
1870
- floatingTexts: c,
1883
+ floatingTexts: l,
1871
1884
  eventBus: o,
1872
- width: l,
1885
+ width: c,
1873
1886
  height: h
1874
1887
  }), u.kills += 2, p && p();
1875
1888
  break;
1876
1889
  }
1877
1890
  if (I) {
1878
- u.kills += 2, n.triggerHitstop(0.14), n.triggerFlash(0.5), n.triggerScreenShake({ x: m, y: x }, 16), c.push({
1891
+ u.kills += 2, n.triggerHitstop(0.14), n.triggerFlash(0.5), n.triggerScreenShake({ x: m, y: x }, 16), l.push({
1879
1892
  id: Math.random().toString(),
1880
1893
  text: "COLOR SYNERGY!",
1881
1894
  position: { ...u.pos },
@@ -1915,7 +1928,7 @@ class it {
1915
1928
  }
1916
1929
  }
1917
1930
  }
1918
- r.value = u.kills, !_ && u.kills > 0 && (u.kills >= 2 && u.pos && c.push({
1931
+ r.value = u.kills, !_ && u.kills > 0 && (u.kills >= 2 && u.pos && l.push({
1919
1932
  id: Math.random().toString(),
1920
1933
  text: `MULTIKILL x${u.kills}!`,
1921
1934
  position: { ...u.pos },
@@ -1929,23 +1942,23 @@ class it {
1929
1942
  }
1930
1943
  }
1931
1944
  class st {
1932
- static update(t, e, i, s, a, c, n, o) {
1945
+ static update(t, e, i, s, a, l, n, o) {
1933
1946
  for (let r = t.length - 1; r >= 0; r--) {
1934
- const l = t[r];
1935
- if (l) {
1936
- l.duration += c;
1947
+ const c = t[r];
1948
+ if (c) {
1949
+ c.duration += l;
1937
1950
  for (const h of e) {
1938
1951
  if (!h.active || h.isGrabbed || h.isDying || h.isThrown && h.type === "piercer") continue;
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());
1952
+ const u = h.position.x - c.position.x, p = h.position.y - c.position.y;
1953
+ Math.hypot(u, p) <= c.radius && (T.killEnemy(h, 0, t, i, s, e), n.kills++, o && o());
1941
1954
  }
1942
- l.duration >= l.maxDuration && t.splice(r, 1);
1955
+ c.duration >= c.maxDuration && t.splice(r, 1);
1943
1956
  }
1944
1957
  }
1945
1958
  }
1946
1959
  }
1947
1960
  class at {
1948
- static update(t, e, i, s, a, c, n, o, r, l, h, u) {
1961
+ static update(t, e, i, s, a, l, n, o, r, c, h, u) {
1949
1962
  for (const p of t)
1950
1963
  if (!(!p.active || !p.isStationaryShield || p.isDying))
1951
1964
  for (const _ of t) {
@@ -1960,9 +1973,9 @@ class at {
1960
1973
  vortices: i,
1961
1974
  shockwaves: s,
1962
1975
  particles: a,
1963
- floatingTexts: c,
1976
+ floatingTexts: l,
1964
1977
  eventBus: o,
1965
- width: l,
1978
+ width: c,
1966
1979
  height: h
1967
1980
  }), r.kills += 2, n.triggerHitstop(0.12), n.triggerScreenShake({ x: g, y: d }, 18), u && u();
1968
1981
  break;
@@ -1978,7 +1991,7 @@ class ot {
1978
1991
  constructor(t, e) {
1979
1992
  this.spatialHash = new Z(100), this.eventBus = t, this.i18n = e;
1980
1993
  }
1981
- update(t, e, i, s, a, c, n, o, r, l, h, u, p, _) {
1994
+ update(t, e, i, s, a, l, n, o, r, c, h, u, p, _) {
1982
1995
  this.spatialHash.clear();
1983
1996
  const g = E.getInstance().getConfig().piercer;
1984
1997
  for (const d of i)
@@ -2019,17 +2032,17 @@ class ot {
2019
2032
  }
2020
2033
  d.update(t), this.spatialHash.insert(d);
2021
2034
  } else d.active && d.isDying && d.update(t);
2022
- for (let d = c.length - 1; d >= 0; d--) {
2023
- const m = c[d];
2035
+ for (let d = l.length - 1; d >= 0; d--) {
2036
+ const m = l[d];
2024
2037
  if (!m) continue;
2025
2038
  m.lifetime += t;
2026
2039
  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);
2040
+ m.radius = m.maxRadius * x, m.alpha = Math.max(0, 1 - x), m.lifetime >= m.maxLifetime && l.splice(d, 1);
2028
2041
  }
2029
2042
  $.update(a, i, t), X.update(
2030
2043
  e,
2031
2044
  i,
2032
- c,
2045
+ l,
2033
2046
  n,
2034
2047
  o,
2035
2048
  r,
@@ -2041,12 +2054,12 @@ class ot {
2041
2054
  i,
2042
2055
  s,
2043
2056
  a,
2044
- c,
2057
+ l,
2045
2058
  n,
2046
2059
  o,
2047
2060
  r,
2048
2061
  this.eventBus,
2049
- l,
2062
+ c,
2050
2063
  u,
2051
2064
  p,
2052
2065
  this.throwState,
@@ -2055,7 +2068,7 @@ class ot {
2055
2068
  s,
2056
2069
  i,
2057
2070
  a,
2058
- c,
2071
+ l,
2059
2072
  n,
2060
2073
  t,
2061
2074
  this.throwState,
@@ -2064,7 +2077,7 @@ class ot {
2064
2077
  i,
2065
2078
  s,
2066
2079
  a,
2067
- c,
2080
+ l,
2068
2081
  n,
2069
2082
  o,
2070
2083
  r,
@@ -2080,7 +2093,7 @@ class nt {
2080
2093
  pool = [];
2081
2094
  constructor(t = 500) {
2082
2095
  for (let e = 0; e < t; e++) {
2083
- const i = new w(`pool_enemy_${e}`);
2096
+ const i = new D(`pool_enemy_${e}`);
2084
2097
  this.pool.push(i);
2085
2098
  }
2086
2099
  }
@@ -2088,7 +2101,7 @@ class nt {
2088
2101
  for (const e of this.pool)
2089
2102
  if (!e.active)
2090
2103
  return e.reset(), e;
2091
- const t = new w(`fallback_enemy_${Date.now()}_${Math.random()}`);
2104
+ const t = new D(`fallback_enemy_${Date.now()}_${Math.random()}`);
2092
2105
  return this.pool.push(t), t;
2093
2106
  }
2094
2107
  resetAll() {
@@ -2104,11 +2117,11 @@ class R {
2104
2117
  static spawnCircleOfDeath(t, e, i, s) {
2105
2118
  const a = [], n = Math.max(i, s) * 0.55 + 80;
2106
2119
  for (let o = 0; o < 18; o++) {
2107
- const r = o * Math.PI * 2 / 18, l = {
2120
+ const r = o * Math.PI * 2 / 18, c = {
2108
2121
  x: e.x + Math.cos(r) * n,
2109
2122
  y: e.y + Math.sin(r) * n
2110
2123
  }, h = t.get(), u = ["piercer", "spore", "cluster", "parasite"], p = u[o % u.length];
2111
- M.configureEnemy(h, p, l, e), h.velocity = {
2124
+ M.configureEnemy(h, p, c, e), h.velocity = {
2112
2125
  x: Math.cos(r + Math.PI) * 55,
2113
2126
  y: Math.sin(r + Math.PI) * 55
2114
2127
  }, a.push(h);
@@ -2120,10 +2133,10 @@ class R {
2120
2133
  let o = { x: -60, y: -60 };
2121
2134
  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 };
2122
2135
  for (let r = 0; r < 14; r++) {
2123
- const l = {
2136
+ const c = {
2124
2137
  x: (Math.random() - 0.5) * 60,
2125
2138
  y: (Math.random() - 0.5) * 60
2126
- }, h = { x: o.x + l.x, y: o.y + l.y }, u = t.get();
2139
+ }, h = { x: o.x + c.x, y: o.y + c.y }, u = t.get();
2127
2140
  M.configureEnemy(u, "spore", h, s);
2128
2141
  const p = s.x - h.x, _ = s.y - h.y, g = Math.atan2(_, p);
2129
2142
  u.velocity = {
@@ -2139,17 +2152,17 @@ class R {
2139
2152
  const r = {
2140
2153
  x: -60 - o * 40,
2141
2154
  y: n + Math.sin(o * 0.45) * 70
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);
2155
+ }, c = t.get();
2156
+ M.configureEnemy(c, "cluster", r, s), c.velocity = { x: 75, y: Math.cos(o * 0.45) * 30 }, a.push(c);
2144
2157
  }
2145
2158
  return a;
2146
2159
  }
2147
2160
  static spawnDoubleSpiral(t, e, i, s) {
2148
2161
  const a = [];
2149
2162
  for (let n = 0; n < 14; n++) {
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
2163
+ const o = n / 14, r = o * Math.PI * 4, c = 120 + o * 450, h = {
2164
+ x: e + Math.cos(r) * c,
2165
+ y: -60 + Math.sin(r) * c
2153
2166
  }, u = t.get();
2154
2167
  M.configureEnemy(u, "parasite", h, s), a.push(u);
2155
2168
  }
@@ -2158,11 +2171,11 @@ class R {
2158
2171
  static spawnMarchingWall(t, e, i, s) {
2159
2172
  const a = [], n = Math.random() > 0.5;
2160
2173
  for (let o = 0; o < 12; o++) {
2161
- const r = o / 11 * i, l = {
2174
+ const r = o / 11 * i, c = {
2162
2175
  x: n ? -60 : e + 60,
2163
2176
  y: r
2164
2177
  }, h = t.get();
2165
- M.configureEnemy(h, "piercer", l, s), h.velocity = {
2178
+ M.configureEnemy(h, "piercer", c, s), h.velocity = {
2166
2179
  x: n ? 70 : -70,
2167
2180
  y: 0
2168
2181
  }, a.push(h);
@@ -2174,8 +2187,8 @@ class R {
2174
2187
  for (let n = 0; n < 10; n++) {
2175
2188
  const o = { x: -50 - n * 35, y: -50 - n * 35 }, r = t.get();
2176
2189
  M.configureEnemy(r, "spore", o, s), a.push(r);
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);
2190
+ const c = { x: e + 50 + n * 35, y: i + 50 + n * 35 }, h = t.get();
2191
+ M.configureEnemy(h, "cluster", c, s), a.push(h);
2179
2192
  }
2180
2193
  return a;
2181
2194
  }
@@ -2195,22 +2208,22 @@ class rt {
2195
2208
  }
2196
2209
  update(t, e, i, s, a) {
2197
2210
  this.waveTimer += t, this.spawnTimer += t, this.patternCooldown += t, this.applyFlockingBehaviors(e, t, a);
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) {
2211
+ const l = e.filter((r) => r.active).length, n = Math.max(0.9, 2.2 - (this.wave - 1) * 0.18);
2212
+ if (this.waveTimer > this.initialGracePeriod && this.patternCooldown > Math.max(12 - this.wave, 6) && l < 35) {
2200
2213
  this.patternCooldown = 0;
2201
2214
  const r = this.spawnPatternFormation(i, s, a);
2202
- for (const l of r)
2203
- e.push(l);
2215
+ for (const c of r)
2216
+ e.push(c);
2204
2217
  }
2205
2218
  const o = Math.min(18 + this.wave * 4, 80);
2206
- return this.spawnTimer >= n && c < o ? (this.spawnTimer = 0, this.spawnSingleEnemy(i, s, a)) : null;
2219
+ return this.spawnTimer >= n && l < o ? (this.spawnTimer = 0, this.spawnSingleEnemy(i, s, a)) : null;
2207
2220
  }
2208
2221
  spawnSingleEnemy(t, e, i) {
2209
2222
  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");
2223
+ let l = "piercer";
2224
+ a > 0.75 ? l = "heavy" : a > 0.55 ? l = "parasite" : a > 0.35 ? l = "cluster" : a > 0.15 && (l = "spore");
2212
2225
  const n = this.pool.get();
2213
- return M.configureEnemy(n, c, s, i), n;
2226
+ return M.configureEnemy(n, l, s, i), n;
2214
2227
  }
2215
2228
  spawnPatternFormation(t, e, i) {
2216
2229
  const s = Math.random();
@@ -2218,32 +2231,72 @@ class rt {
2218
2231
  }
2219
2232
  applyFlockingBehaviors(t, e, i) {
2220
2233
  for (let a = 0; a < t.length; a++) {
2221
- const c = t[a];
2222
- if (!c.active || c.isGrabbed || c.isThrown || c.isDying) continue;
2234
+ const l = t[a];
2235
+ if (!l.active || l.isGrabbed || l.isThrown || l.isDying) continue;
2223
2236
  let n = 0, o = 0, r = 0;
2224
2237
  for (let p = 0; p < t.length; p++) {
2225
2238
  if (a === p) continue;
2226
2239
  const _ = t[p];
2227
2240
  if (!_.active || _.isGrabbed || _.isDying) continue;
2228
- const g = c.position.x - _.position.x, d = c.position.y - _.position.y, m = Math.hypot(g, d);
2241
+ const g = l.position.x - _.position.x, d = l.position.y - _.position.y, m = Math.hypot(g, d);
2229
2242
  m > 0 && m < 70 && (n += g / m, o += d / m, r++);
2230
2243
  }
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);
2244
+ r > 0 && (n /= r, o /= r, l.velocity.x += n * 60 * e, l.velocity.y += o * 60 * e);
2245
+ const c = i.x - l.position.x, h = i.y - l.position.y, u = Math.hypot(c, h);
2233
2246
  if (u > 0) {
2234
2247
  const p = 80 + Math.min(this.wave * 4, 40);
2235
- c.velocity.x += l / u * p * e, c.velocity.y += h / u * p * e;
2248
+ l.velocity.x += c / u * p * e, l.velocity.y += h / u * p * e;
2236
2249
  }
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 *= _;
2250
+ if (l.maxSpeed > 0) {
2251
+ const p = Math.hypot(l.velocity.x, l.velocity.y);
2252
+ if (p > l.maxSpeed) {
2253
+ const _ = l.maxSpeed / p;
2254
+ l.velocity.x *= _, l.velocity.y *= _;
2242
2255
  }
2243
2256
  }
2244
2257
  }
2245
2258
  }
2246
2259
  }
2260
+ class lt {
2261
+ id;
2262
+ position;
2263
+ velocity;
2264
+ value;
2265
+ radius = 5;
2266
+ active = !0;
2267
+ isAbsorbing = !1;
2268
+ constructor(t, e = 1) {
2269
+ this.id = `xp_${Date.now()}_${Math.random()}`, this.position = { ...t }, this.value = e;
2270
+ const i = Math.random() * Math.PI * 2, s = 25 + Math.random() * 45;
2271
+ this.velocity = {
2272
+ x: Math.cos(i) * s,
2273
+ y: Math.sin(i) * s
2274
+ };
2275
+ }
2276
+ beginAbsorption() {
2277
+ this.active && (this.isAbsorbing = !0);
2278
+ }
2279
+ update(t, e, i, s) {
2280
+ if (this.active) {
2281
+ if (this.isAbsorbing) {
2282
+ const a = e.x - this.position.x, l = e.y - this.position.y, n = Math.hypot(a, l);
2283
+ if (n <= i + this.radius) {
2284
+ this.position = { ...e }, this.active = !1;
2285
+ return;
2286
+ }
2287
+ const o = Math.min(s + n * 0.7, 1600);
2288
+ this.velocity = {
2289
+ x: a / n * o,
2290
+ y: l / n * o
2291
+ };
2292
+ } else {
2293
+ const a = Math.pow(0.04, t);
2294
+ this.velocity.x *= a, this.velocity.y *= a;
2295
+ }
2296
+ this.position.x += this.velocity.x * t, this.position.y += this.velocity.y * t;
2297
+ }
2298
+ }
2299
+ }
2247
2300
  const C = {
2248
2301
  bioluminescent: {
2249
2302
  bgInner: "#081220",
@@ -2312,7 +2365,7 @@ const C = {
2312
2365
  vortexMid: "#577c9e"
2313
2366
  }
2314
2367
  }, N = "axon_surge_theme";
2315
- class lt {
2368
+ class ct {
2316
2369
  currentTheme = "dark";
2317
2370
  isExplicit = !1;
2318
2371
  targetElement;
@@ -2394,42 +2447,42 @@ class lt {
2394
2447
  this.targetElement.classList.add(t);
2395
2448
  }
2396
2449
  }
2397
- class ct {
2450
+ class ht {
2398
2451
  maxDistance = 800;
2399
2452
  maxThickness = 18;
2400
2453
  minThickness = 5;
2401
2454
  maxLength = 110;
2402
2455
  minLength = 50;
2403
2456
  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;
2457
+ for (const l of e) {
2458
+ if (!l.active || l.isGrabbed || l.isDying) continue;
2459
+ const n = l.position.x, o = l.position.y;
2407
2460
  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);
2461
+ const r = Math.min(i, Math.max(0, n)), c = Math.min(s, Math.max(0, o)), h = Math.hypot(n - r, o - c);
2409
2462
  if (h <= 0 || h > this.maxDistance) continue;
2410
2463
  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);
2464
+ if (t.save(), t.globalAlpha = g, t.shadowColor = l.color, t.shadowBlur = 14, t.strokeStyle = l.color, t.lineWidth = p, t.lineCap = "round", t.beginPath(), r === 0 || r === i) {
2465
+ const d = Math.max(0, c - _ / 2), m = Math.min(s, c + _ / 2);
2413
2466
  t.moveTo(r, d), t.lineTo(r, m);
2414
2467
  } else {
2415
2468
  const d = Math.max(0, r - _ / 2), m = Math.min(i, r + _ / 2);
2416
- t.moveTo(d, l), t.lineTo(m, l);
2469
+ t.moveTo(d, c), t.lineTo(m, c);
2417
2470
  }
2418
2471
  t.stroke(), t.strokeStyle = a.effectHighlight, t.lineWidth = Math.max(1.8, p * 0.28), t.globalAlpha = g * 0.9, t.stroke(), t.restore();
2419
2472
  }
2420
2473
  }
2421
2474
  }
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);
2475
+ class ut {
2476
+ render(t, e, i, s, a, l, n = !1) {
2477
+ const o = Math.max(1, a), r = Math.min(1, (o - 1) / 8), c = this.wrapHue(190 + (o - 1) * 34 + Math.sin(s * 0.1) * 5), h = this.wrapHue(c + 42), u = this.wrapHue(c + 150), p = e / 2, _ = i / 2, g = Math.max(e, i) * 0.82, d = t.createRadialGradient(p, _, 20, p, _, g);
2478
+ n ? (d.addColorStop(0, `hsl(${c}, 42%, 91%)`), d.addColorStop(0.42, `hsl(${h}, 42%, 86%)`), d.addColorStop(0.78, `hsl(${u}, 38%, 81%)`), d.addColorStop(1, l.bgOuter)) : (d.addColorStop(0, `hsl(${c}, 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
2479
  const m = Math.min(e, i) * 0.055;
2427
2480
  this.drawNebula(
2428
2481
  t,
2429
2482
  e * 0.22 + Math.sin(s * 0.18) * m,
2430
2483
  i * 0.28 + Math.cos(s * 0.15) * m,
2431
2484
  Math.max(e, i) * 0.42,
2432
- l,
2485
+ c,
2433
2486
  n ? 0.27 : 0.23,
2434
2487
  n
2435
2488
  ), this.drawNebula(
@@ -2448,29 +2501,29 @@ class ht {
2448
2501
  u,
2449
2502
  n ? 0.17 : 0.14,
2450
2503
  n
2451
- ), this.drawSoftFlows(t, e, i, s, l, r, n), this.drawParticleField(t, e, i, s, l, h, o, n);
2504
+ ), this.drawSoftFlows(t, e, i, s, c, r, n), this.drawParticleField(t, e, i, s, c, h, o, n);
2452
2505
  const x = t.createRadialGradient(p, _, Math.min(e, i) * 0.28, p, _, g);
2453
2506
  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
2507
  }
2455
- drawNebula(t, e, i, s, a, c, n) {
2508
+ drawNebula(t, e, i, s, a, l, n) {
2456
2509
  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();
2510
+ o.addColorStop(0, `hsla(${a}, ${n ? 88 : 80}%, ${r}%, ${l})`), o.addColorStop(0.38, `hsla(${a}, ${n ? 82 : 75}%, ${r - (n ? 7 : 12)}%, ${l * 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
2511
  }
2459
- drawSoftFlows(t, e, i, s, a, c, n) {
2512
+ drawSoftFlows(t, e, i, s, a, l, n) {
2460
2513
  t.save();
2461
2514
  const o = Math.min(e, i), r = o * 0.035;
2462
2515
  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();
2516
+ for (let c = 0; c < 3; c++) {
2517
+ const h = (c - 1) * o * 0.075 + Math.sin(s * 0.06 + c) * r, u = c * 28 + l * 18;
2518
+ t.strokeStyle = `hsla(${this.wrapHue(a + u)}, ${n ? 78 : 74}%, ${n ? 47 : 62}%, ${0.52 - c * 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
2519
  }
2467
2520
  t.restore();
2468
2521
  }
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;
2522
+ drawParticleField(t, e, i, s, a, l, n, o) {
2523
+ const r = 44 + Math.min(24, n * 2), c = e / 2, h = i / 2, u = Math.min(e, i) * 0.17;
2471
2524
  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();
2525
+ const _ = p + n * 17, g = this.unitNoise(_ * 1.7) * e, d = this.unitNoise(_ * 2.9 + 13) * i, m = Math.hypot(g - c, 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;
2526
+ t.fillStyle = `hsla(${p % 3 === 0 ? l : a}, ${o ? 82 : 78}%, ${o ? 40 : 70}%, ${b})`, t.beginPath(), t.arc(g, d, I, 0, Math.PI * 2), t.fill();
2474
2527
  }
2475
2528
  }
2476
2529
  unitNoise(t) {
@@ -2480,24 +2533,24 @@ class ht {
2480
2533
  return (t % 360 + 360) % 360;
2481
2534
  }
2482
2535
  }
2483
- class ut {
2536
+ class pt {
2484
2537
  render(t, e, i) {
2485
2538
  if (!e.isActive) return;
2486
2539
  const s = e.getLauncher(), a = e.getTarget();
2487
2540
  if (!s || !a || !s.active || !a.active) return;
2488
- const c = e.getStep();
2489
- if (t.save(), c === 1) {
2541
+ const l = e.getStep();
2542
+ if (t.save(), l === 1) {
2490
2543
  const n = Math.sin(i * 6) * 10, o = s.position.x, r = s.position.y - 65 + n;
2491
2544
  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();
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) {
2545
+ const c = s.radius * (1.6 + Math.sin(i * 8) * 0.3);
2546
+ 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();
2547
+ } else if (l === 2) {
2495
2548
  const n = a.position.x - s.position.x, o = a.position.y - s.position.y;
2496
2549
  if (Math.hypot(n, o) > 10) {
2497
- const l = Math.atan2(o, n);
2550
+ const c = Math.atan2(o, n);
2498
2551
  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([]);
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();
2552
+ const h = a.position.x - Math.cos(c) * (a.radius + 10), u = a.position.y - Math.sin(c) * (a.radius + 10);
2553
+ 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();
2501
2554
  const p = a.radius * (1.8 + Math.cos(i * 10) * 0.3);
2502
2555
  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();
2503
2556
  }
@@ -2505,7 +2558,7 @@ class ut {
2505
2558
  t.restore();
2506
2559
  }
2507
2560
  }
2508
- class pt {
2561
+ class dt {
2509
2562
  canvas;
2510
2563
  ctx;
2511
2564
  themeManager;
@@ -2513,41 +2566,51 @@ class pt {
2513
2566
  bgRenderer;
2514
2567
  tutorialArrowRenderer;
2515
2568
  constructor(t, e) {
2516
- this.canvas = t, this.ctx = t.getContext("2d"), this.themeManager = e, this.indicatorRenderer = new ct(), this.bgRenderer = new ht(), this.tutorialArrowRenderer = new ut();
2569
+ this.canvas = t, this.ctx = t.getContext("2d"), this.themeManager = e, this.indicatorRenderer = new ht(), this.bgRenderer = new ut(), this.tutorialArrowRenderer = new pt();
2517
2570
  }
2518
- render(t, e, i, s, a, c, n, o, r, l, h = 1, u) {
2571
+ render(t, e, i, s, a, l, n, o, r, c, h, u = 1, p) {
2519
2572
  if (!this.ctx) return;
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(
2573
+ const _ = this.themeManager.getPalette(), { width: g, height: d } = this.canvas, m = r.getShakeOffset();
2574
+ this.ctx.save(), this.ctx.translate(m.x, m.y), this.bgRenderer.render(
2522
2575
  this.ctx,
2523
- _,
2524
2576
  g,
2577
+ d,
2525
2578
  t.pulsePhase,
2526
- h,
2527
- p,
2579
+ u,
2580
+ _,
2528
2581
  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();
2582
+ ), this.drawExperienceOrbs(i, t.position, t.pulsePhase, _), this.drawToxicPools(s, t.pulsePhase), this.drawGravityVortices(a, t.pulsePhase), this.drawShockwaves(l), this.drawCoreFilaments(t, _), this.drawParticles(n), E.getInstance().getConfig().core.hasOffscreenIndicators && this.indicatorRenderer.render(this.ctx, e, g, d, _), this.drawOrganicEnemies(e, t.pulsePhase, _), p && this.tutorialArrowRenderer.render(this.ctx, p, t.pulsePhase), c ? this.drawPsionicTendril(t.position, c.position, _) : t && this.drawHoverTendril(t.position, h, e, _), this.drawOrganicConsciousnessCore(t, _), this.drawFloatingTexts(o), r.flashAlpha > 0 && (this.ctx.fillStyle = `rgba(255, 255, 255, ${r.flashAlpha})`, this.ctx.fillRect(0, 0, g, d)), this.ctx.restore();
2583
+ }
2584
+ drawExperienceOrbs(t, e, i, s) {
2585
+ if (this.ctx)
2586
+ for (const a of t) {
2587
+ if (!a.active) continue;
2588
+ const l = a.radius + Math.sin(i * 7 + a.position.x * 0.01) * 0.8, { x: n, y: o } = a.position;
2589
+ this.ctx.save(), this.ctx.shadowColor = s.corePrimary, this.ctx.shadowBlur = a.isAbsorbing ? 18 : 10, a.isAbsorbing && (this.ctx.globalAlpha = 0.35, this.ctx.strokeStyle = s.tendrilCyan, this.ctx.lineWidth = 1, this.ctx.setLineDash([4, 7]), this.ctx.beginPath(), this.ctx.moveTo(n, o), this.ctx.lineTo(e.x, e.y), this.ctx.stroke(), this.ctx.setLineDash([]), this.ctx.globalAlpha = 1);
2590
+ const r = this.ctx.createRadialGradient(n - 1, o - 1, 1, n, o, l * 1.6);
2591
+ r.addColorStop(0, s.effectHighlight), r.addColorStop(0.4, s.corePrimary), r.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = r, this.ctx.beginPath(), this.ctx.arc(n, o, l * 1.6, 0, Math.PI * 2), this.ctx.fill(), this.ctx.fillStyle = s.effectHighlight, this.ctx.beginPath(), this.ctx.arc(n, o, l * 0.65, 0, Math.PI * 2), this.ctx.fill(), this.ctx.strokeStyle = s.tendrilCyan, this.ctx.lineWidth = 1, this.ctx.beginPath(), this.ctx.arc(n, o, l + 3, -i * 2, -i * 2 + Math.PI * 1.4), this.ctx.stroke(), this.ctx.restore();
2592
+ }
2530
2593
  }
2531
2594
  drawToxicPools(t, e) {
2532
2595
  if (this.ctx)
2533
2596
  for (const i of t) {
2534
- const s = i.duration / i.maxDuration, a = Math.min(0.7, (1 - s) * 0.7), { x: c, y: n } = i.position;
2597
+ const s = i.duration / i.maxDuration, a = Math.min(0.7, (1 - s) * 0.7), { x: l, y: n } = i.position;
2535
2598
  this.ctx.save();
2536
- const o = this.ctx.createRadialGradient(c, n, 10, c, n, i.radius * 1.2);
2599
+ const o = this.ctx.createRadialGradient(l, n, 10, l, n, i.radius * 1.2);
2537
2600
  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();
2538
2601
  const r = 70;
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);
2602
+ for (let c = 0; c <= r; c++) {
2603
+ 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, g = l + Math.cos(h) * _, d = n + Math.sin(h) * _;
2604
+ c === 0 ? this.ctx.moveTo(g, d) : this.ctx.lineTo(g, d);
2542
2605
  }
2543
2606
  this.ctx.closePath(), this.ctx.fill(), this.ctx.strokeStyle = `rgba(57, 255, 20, ${a * 0.8})`, this.ctx.lineWidth = 2.5, this.ctx.beginPath();
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);
2607
+ for (let c = 0; c <= r; c++) {
2608
+ 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, g = n + Math.sin(h) * p;
2609
+ c === 0 ? this.ctx.moveTo(_, g) : this.ctx.lineTo(_, g);
2547
2610
  }
2548
2611
  this.ctx.closePath(), this.ctx.stroke();
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;
2612
+ for (let c = 0; c < 6; c++) {
2613
+ 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, g = 3 + Math.sin(e * 3 + c) * 2;
2551
2614
  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();
2552
2615
  }
2553
2616
  this.ctx.restore();
@@ -2573,12 +2636,12 @@ class pt {
2573
2636
  if (!this.ctx) return;
2574
2637
  const i = this.themeManager.getPalette();
2575
2638
  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;
2639
+ const a = Math.min(0.85, (1 - s.duration / s.maxDuration) * 0.85), l = s.radius * (1 - s.duration / s.maxDuration * 0.1), { x: n, y: o } = s.position;
2577
2640
  this.ctx.save();
2578
2641
  const r = this.ctx.createRadialGradient(n, o, 0, n, o, 60);
2579
2642
  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;
2643
+ for (let c = 1; c <= 5; c++) {
2644
+ const h = l * c / 5, u = e * c * 2.2;
2582
2645
  this.ctx.beginPath(), this.ctx.arc(n, o, h, u, u + Math.PI * 1.5), this.ctx.stroke();
2583
2646
  }
2584
2647
  this.ctx.restore();
@@ -2588,10 +2651,10 @@ class pt {
2588
2651
  if (!this.ctx) return;
2589
2652
  const a = this.ctx.createRadialGradient(t / 2, e / 2, 40, t / 2, e / 2, Math.max(t, e));
2590
2653
  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);
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();
2654
+ 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);
2655
+ 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();
2656
+ 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);
2657
+ 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();
2595
2658
  }
2596
2659
  drawCoreFilaments(t, e) {
2597
2660
  if (!this.ctx) return;
@@ -2600,8 +2663,8 @@ class pt {
2600
2663
  for (let s = 0; s < i; s++) {
2601
2664
  const a = t.collectedPowerUpColors[s] || e.nebulaCyan;
2602
2665
  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();
2666
+ const l = 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(l) * n, r = t.position.y + Math.sin(l) * n, c = t.position.x + Math.cos(l + 0.4) * 48, h = t.position.y + Math.sin(l + 0.4) * 48;
2667
+ this.ctx.beginPath(), this.ctx.moveTo(t.position.x, t.position.y), this.ctx.quadraticCurveTo(c, 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();
2605
2668
  }
2606
2669
  }
2607
2670
  drawOrganicConsciousnessCore(t, e) {
@@ -2613,30 +2676,30 @@ class pt {
2613
2676
  }
2614
2677
  const a = t.getColorHex();
2615
2678
  for (let r = 0; r < t.integrity; r++) {
2616
- const l = t.radius + 16 + r * 12;
2679
+ const c = t.radius + 16 + r * 12;
2617
2680
  this.ctx.strokeStyle = a, this.ctx.lineWidth = 2.2, this.ctx.shadowColor = a, this.ctx.shadowBlur = 12, this.ctx.beginPath();
2618
2681
  const h = 60;
2619
2682
  for (let u = 0; u <= h; u++) {
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) * _;
2683
+ const p = u * Math.PI * 2 / h, _ = c + Math.sin(p * 4 + t.pulsePhase * 2 + r) * 3, g = i + Math.cos(p) * _, d = s + Math.sin(p) * _;
2621
2684
  u === 0 ? this.ctx.moveTo(g, d) : this.ctx.lineTo(g, d);
2622
2685
  }
2623
2686
  this.ctx.closePath(), this.ctx.stroke();
2624
2687
  }
2625
2688
  if (t.repairProgress > 0) {
2626
- const r = t.integrity, l = t.radius + 16 + r * 12;
2689
+ const r = t.integrity, c = t.radius + 16 + r * 12;
2627
2690
  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();
2628
2691
  const h = 60;
2629
2692
  for (let u = 0; u <= h; u++) {
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) * _;
2693
+ const p = u * Math.PI * 2 / h, _ = c + Math.sin(p * 4 + t.pulsePhase * 2 + r) * 3, g = i + Math.cos(p) * _, d = s + Math.sin(p) * _;
2631
2694
  u === 0 ? this.ctx.moveTo(g, d) : this.ctx.lineTo(g, d);
2632
2695
  }
2633
2696
  this.ctx.closePath(), this.ctx.stroke(), this.ctx.restore();
2634
2697
  }
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();
2698
+ const l = this.ctx.createRadialGradient(i, s, 5, i, s, t.radius * 2.2);
2699
+ 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();
2637
2700
  const n = 80;
2638
2701
  for (let r = 0; r <= n; r++) {
2639
- const l = r * Math.PI * 2 / n, h = t.getMembraneRadius(l), u = Math.cos(l) * h, p = Math.sin(l) * h;
2702
+ const c = r * Math.PI * 2 / n, h = t.getMembraneRadius(c), u = Math.cos(c) * h, p = Math.sin(c) * h;
2640
2703
  r === 0 ? this.ctx.moveTo(u, p) : this.ctx.lineTo(u, p);
2641
2704
  }
2642
2705
  this.ctx.closePath(), this.ctx.fill(), this.ctx.stroke();
@@ -2644,9 +2707,9 @@ class pt {
2644
2707
  if (o > 0) {
2645
2708
  this.ctx.strokeStyle = e.effectHighlight, this.ctx.lineWidth = 1.8, this.ctx.shadowColor = a, this.ctx.shadowBlur = 10;
2646
2709
  for (let r = 0; r < o; r++) {
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);
2710
+ const c = r * Math.PI * 2 / o + t.pulsePhase * 0.4, h = t.radius * (0.45 + Math.sin(t.pulsePhase * 2 + r) * 0.15);
2648
2711
  this.ctx.beginPath(), this.ctx.moveTo(0, 0);
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;
2712
+ 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, g = Math.sin(c) * h;
2650
2713
  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();
2651
2714
  }
2652
2715
  }
@@ -2657,11 +2720,11 @@ class pt {
2657
2720
  this.ctx.save();
2658
2721
  const s = e.x - t.x, a = e.y - t.y;
2659
2722
  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);
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();
2723
+ 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;
2724
+ 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();
2662
2725
  for (let o = 0; o < 6; o++) {
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();
2726
+ const r = Math.random(), c = t.x + s * r + (Math.random() - 0.5) * 24, h = t.y + a * r + (Math.random() - 0.5) * 24;
2727
+ this.ctx.fillStyle = i.effectHighlight, this.ctx.beginPath(), this.ctx.arc(c, h, 2.5 + Math.random() * 2.5, 0, Math.PI * 2), this.ctx.fill();
2665
2728
  }
2666
2729
  this.ctx.restore();
2667
2730
  }
@@ -2669,8 +2732,8 @@ class pt {
2669
2732
  if (this.ctx)
2670
2733
  for (const a of i) {
2671
2734
  if (!a.active || a.isGrabbed || a.isThrown || a.wasManipulated || a.isDying) continue;
2672
- const c = e.x - a.position.x, n = e.y - a.position.y;
2673
- if (Math.hypot(c, n) <= a.getHitRadius()) {
2735
+ const l = e.x - a.position.x, n = e.y - a.position.y;
2736
+ if (Math.hypot(l, n) <= a.getHitRadius()) {
2674
2737
  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();
2675
2738
  break;
2676
2739
  }
@@ -2682,8 +2745,8 @@ class pt {
2682
2745
  if (!s.active) continue;
2683
2746
  let a = s.color;
2684
2747
  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);
2685
- const { x: c, y: n } = s.position;
2686
- if (this.ctx.save(), this.ctx.translate(c, n), s.wasManipulated && !s.isDying) {
2748
+ const { x: l, y: n } = s.position;
2749
+ if (this.ctx.save(), this.ctx.translate(l, n), s.wasManipulated && !s.isDying) {
2687
2750
  const o = s.radius * 1.5 + Math.sin(e * 6) * 4;
2688
2751
  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();
2689
2752
  const r = s.radius * 1.8 + Math.cos(e * 8) * 3;
@@ -2692,16 +2755,16 @@ class pt {
2692
2755
  if (s.isDying) {
2693
2756
  const o = s.deathTimer / s.maxDeathTimer, r = Math.max(0, 1 - o);
2694
2757
  if (this.ctx.globalAlpha = r, s.deathType === "dissolve") {
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();
2758
+ const c = s.radius * (1 - o * 0.7);
2759
+ 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();
2697
2760
  for (let h = 0; h < 4; h++) {
2698
- const u = h * Math.PI * 0.5 + o * 4, p = l * 0.8 * o;
2761
+ const u = h * Math.PI * 0.5 + o * 4, p = c * 0.8 * o;
2699
2762
  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();
2700
2763
  }
2701
2764
  this.ctx.restore();
2702
2765
  continue;
2703
2766
  } else if (s.deathType === "sliced") {
2704
- const l = o * 24, h = s.sliceAngle + Math.PI / 2, u = Math.cos(h) * l, p = Math.sin(h) * l;
2767
+ const c = o * 24, h = s.sliceAngle + Math.PI / 2, u = Math.cos(h) * c, p = Math.sin(h) * c;
2705
2768
  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();
2706
2769
  continue;
2707
2770
  }
@@ -2710,7 +2773,7 @@ class pt {
2710
2773
  this.ctx.rotate(s.rotation), this.ctx.beginPath();
2711
2774
  const o = 12;
2712
2775
  for (let r = 0; r <= o; r++) {
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;
2776
+ 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;
2714
2777
  r === 0 ? this.ctx.moveTo(p, _) : this.ctx.lineTo(p, _);
2715
2778
  }
2716
2779
  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();
@@ -2718,7 +2781,7 @@ class pt {
2718
2781
  this.ctx.beginPath();
2719
2782
  const o = 8;
2720
2783
  for (let r = 0; r < o; r++) {
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;
2784
+ 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;
2722
2785
  r === 0 ? this.ctx.moveTo(u, p) : this.ctx.lineTo(u, p);
2723
2786
  }
2724
2787
  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();
@@ -2730,18 +2793,18 @@ class pt {
2730
2793
  this.ctx.beginPath();
2731
2794
  const o = 14;
2732
2795
  for (let r = 0; r <= o; r++) {
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;
2796
+ 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;
2734
2797
  r === 0 ? this.ctx.moveTo(u, p) : this.ctx.lineTo(u, p);
2735
2798
  }
2736
2799
  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();
2737
2800
  } else if (s.type === "heavy") {
2738
2801
  this.ctx.rotate(s.rotation);
2739
- const o = Math.PI * 0.75, r = s.radius * 1.35, l = s.radius * 0.75;
2802
+ const o = Math.PI * 0.75, r = s.radius * 1.35, c = s.radius * 0.75;
2740
2803
  this.ctx.beginPath(), this.ctx.arc(0, 0, r, -o / 2, o / 2, !1);
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();
2804
+ const h = Math.cos(o / 2) * c, u = Math.sin(o / 2) * c;
2805
+ this.ctx.lineTo(h, u), this.ctx.arc(0, 0, c, 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();
2743
2806
  for (let p = -2; p <= 2; p++) {
2744
- const _ = p * o / 6, g = Math.cos(_) * (l + 6), d = Math.sin(_) * (l + 6);
2807
+ const _ = p * o / 6, g = Math.cos(_) * (c + 6), d = Math.sin(_) * (c + 6);
2745
2808
  this.ctx.fillStyle = i.effectHighlight, this.ctx.beginPath(), this.ctx.arc(g, d, 3, 0, Math.PI * 2), this.ctx.fill();
2746
2809
  }
2747
2810
  } else
@@ -2759,36 +2822,36 @@ class pt {
2759
2822
  for (const e of t)
2760
2823
  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();
2761
2824
  }
2762
- drawOrbitingModifierOrbs(t, e, i, s = !0) {
2825
+ drawOrbitingModifierOrbs(t, e, i, s = !0, a = 1) {
2763
2826
  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();
2827
+ const l = this.themeManager.getPalette(), n = this.themeManager.getTheme() === "light";
2828
+ for (const o of t) {
2829
+ if (!o.active) continue;
2830
+ const { x: r, y: c } = o.position, h = o.definition.color, u = o.definition.rarity, p = u === "legendary" ? "#ff00ff" : u === "epic" ? "#ffd700" : u === "rare" ? "#9d4edd" : "#00f5ff", _ = o.radius + Math.sin(e * 6 + o.orbitAngle) * 3;
2831
+ if (this.ctx.save(), this.ctx.shadowColor = p, this.ctx.shadowBlur = o.isGrabbed ? 36 : u === "legendary" ? 28 : 16, u === "legendary" || u === "epic") {
2832
+ const m = _ + 12, x = this.ctx.createRadialGradient(r, c, _, r, c, m);
2833
+ x.addColorStop(0, p), x.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = x, this.ctx.beginPath(), this.ctx.arc(r, c, m, 0, Math.PI * 2), this.ctx.fill();
2771
2834
  }
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();
2835
+ const g = this.ctx.createRadialGradient(r, c, 2, r, c, _ * 1.4);
2836
+ g.addColorStop(0, l.effectHighlight), g.addColorStop(0.4, h), g.addColorStop(1, n ? "rgba(23, 50, 77, 0.24)" : "rgba(0, 0, 0, 0.5)"), this.ctx.fillStyle = g, this.ctx.beginPath(), this.ctx.arc(r, c, _, 0, Math.PI * 2), this.ctx.fill(), this.ctx.strokeStyle = p, this.ctx.lineWidth = u === "legendary" ? 3.5 : 2.5, this.ctx.beginPath(), this.ctx.arc(r, c, _ + 4, e * 3, e * 3 + Math.PI * 1.2), this.ctx.stroke(), (u === "legendary" || u === "epic") && (this.ctx.strokeStyle = n ? p : l.effectHighlight, this.ctx.lineWidth = 1.5, this.ctx.beginPath(), this.ctx.arc(r, c, _ + 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 = l.effectInk, this.ctx.shadowColor = l.effectShadow, this.ctx.shadowBlur = 6, this.ctx.fillText(o.definition.badge, r, c);
2837
+ const d = i ? i.translate(o.definition.titleKey) : o.definition.badge;
2838
+ this.ctx.textBaseline = "alphabetic", this.ctx.font = "900 16px Orbitron, sans-serif", this.ctx.fillStyle = l.effectInk, this.ctx.shadowColor = p, this.ctx.shadowBlur = 14, this.ctx.fillText(d, r, c - _ - 14), this.ctx.restore();
2776
2839
  }
2777
2840
  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();
2841
+ const o = this.canvas.width / 2, r = this.canvas.height / 2 + 210, c = i.translate("rerollButton", { count: a });
2842
+ this.ctx.save(), this.ctx.font = "900 14px Orbitron, sans-serif", this.ctx.textAlign = "center", this.ctx.textBaseline = "middle", this.ctx.fillStyle = l.effectPanel, this.ctx.strokeStyle = l.tendrilCyan, this.ctx.lineWidth = 2, this.ctx.shadowColor = l.tendrilCyan, this.ctx.shadowBlur = 12;
2843
+ const p = this.ctx.measureText(c).width + 20 * 2, _ = 38;
2844
+ this.ctx.beginPath(), this.ctx.roundRect(o - p / 2, r - _ / 2, p, _, 8), this.ctx.fill(), this.ctx.stroke(), this.ctx.fillStyle = l.effectInk, this.ctx.shadowColor = l.effectShadow, this.ctx.shadowBlur = 4, this.ctx.fillText(c, o, r), this.ctx.restore();
2782
2845
  }
2783
2846
  }
2784
2847
  colorWithAlpha(t, e) {
2785
2848
  const i = t.replace("#", "");
2786
2849
  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})`;
2850
+ const s = Number.parseInt(i.slice(0, 2), 16), a = Number.parseInt(i.slice(2, 4), 16), l = Number.parseInt(i.slice(4, 6), 16);
2851
+ return `rgba(${s}, ${a}, ${l}, ${e})`;
2789
2852
  }
2790
2853
  }
2791
- class dt {
2854
+ class gt {
2792
2855
  container;
2793
2856
  i18n;
2794
2857
  waveLabelElement;
@@ -2820,7 +2883,7 @@ class dt {
2820
2883
  this.container.style.display = "none";
2821
2884
  }
2822
2885
  }
2823
- class gt {
2886
+ class _t {
2824
2887
  container;
2825
2888
  i18n;
2826
2889
  onStartCallback;
@@ -2846,7 +2909,7 @@ class gt {
2846
2909
  this.container.style.display = "none";
2847
2910
  }
2848
2911
  }
2849
- class _t {
2912
+ class mt {
2850
2913
  modal;
2851
2914
  card;
2852
2915
  i18n;
@@ -2855,8 +2918,8 @@ class _t {
2855
2918
  onLanguageChangedCallback;
2856
2919
  onCloseCallback;
2857
2920
  hapticsEnabled = !0;
2858
- constructor(t, e, i, s, a, c) {
2859
- this.i18n = e, this.themeManager = i, this.platform = s, this.onLanguageChangedCallback = a, this.onCloseCallback = c;
2921
+ constructor(t, e, i, s, a, l) {
2922
+ this.i18n = e, this.themeManager = i, this.platform = s, this.onLanguageChangedCallback = a, this.onCloseCallback = l;
2860
2923
  const n = localStorage.getItem("axon_surge_haptics");
2861
2924
  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", () => {
2862
2925
  this.onCloseCallback && this.onCloseCallback();
@@ -2874,7 +2937,7 @@ class _t {
2874
2937
  s.className = "axon-select-wrapper";
2875
2938
  const a = document.createElement("select");
2876
2939
  a.className = "axon-select";
2877
- const c = {
2940
+ const l = {
2878
2941
  es: "ESPAÑOL (ES)",
2879
2942
  en: "ENGLISH (EN)",
2880
2943
  fr: "FRANÇAIS (FR)",
@@ -2893,7 +2956,7 @@ class _t {
2893
2956
  };
2894
2957
  for (const f of K) {
2895
2958
  const v = document.createElement("option");
2896
- v.value = f, v.textContent = c[f], this.i18n.getLanguage() === f && (v.selected = !0), a.appendChild(v);
2959
+ v.value = f, v.textContent = l[f], this.i18n.getLanguage() === f && (v.selected = !0), a.appendChild(v);
2897
2960
  }
2898
2961
  a.addEventListener("change", () => {
2899
2962
  const f = a.value;
@@ -2905,8 +2968,8 @@ class _t {
2905
2968
  o.className = "axon-setting-row";
2906
2969
  const r = document.createElement("span");
2907
2970
  r.textContent = this.i18n.translate("themeLabel");
2908
- const l = document.createElement("div");
2909
- l.className = "axon-toggle-group";
2971
+ const c = document.createElement("div");
2972
+ c.className = "axon-toggle-group";
2910
2973
  const h = [
2911
2974
  { id: "bioluminescent", label: "BIO" },
2912
2975
  { id: "dark", label: "DARK" },
@@ -2916,9 +2979,9 @@ class _t {
2916
2979
  const v = document.createElement("button");
2917
2980
  v.type = "button", v.className = `axon-toggle-btn ${this.themeManager.getTheme() === f.id ? "active" : ""}`, v.textContent = f.label, v.addEventListener("click", () => {
2918
2981
  this.themeManager.setTheme(f.id), this.renderContent();
2919
- }), l.appendChild(v);
2982
+ }), c.appendChild(v);
2920
2983
  }
2921
- o.appendChild(r), o.appendChild(l);
2984
+ o.appendChild(r), o.appendChild(c);
2922
2985
  const u = document.createElement("div");
2923
2986
  u.className = "axon-setting-row";
2924
2987
  const p = document.createElement("span");
@@ -2971,7 +3034,7 @@ class _t {
2971
3034
  }
2972
3035
  }
2973
3036
  const H = "axon_surge_show_tutorial";
2974
- class mt {
3037
+ class ft {
2975
3038
  isActive = !1;
2976
3039
  showWarning = !1;
2977
3040
  dummyLauncher = null;
@@ -3015,14 +3078,14 @@ class mt {
3015
3078
  this.initialLauncherPos
3016
3079
  ), this.dummyTarget.velocity = { x: 0, y: 0 }, i.push(this.dummyLauncher), i.push(this.dummyTarget);
3017
3080
  }
3018
- update(t, e, i, s, a, c) {
3081
+ update(t, e, i, s, a, l) {
3019
3082
  if (!this.isActive || !this.dummyLauncher || !this.dummyTarget) return;
3020
3083
  const n = this.dummyLauncher, o = this.dummyTarget;
3021
3084
  e.includes(n) || e.push(n), e.includes(o) || e.push(o);
3022
- const r = o.position.x - n.position.x, l = o.position.y - n.position.y, h = Math.hypot(r, l);
3085
+ const r = o.position.x - n.position.x, c = o.position.y - n.position.y, h = Math.hypot(r, c);
3023
3086
  if (n.isGrabbed) {
3024
3087
  if (this.showWarning = !1, h <= n.radius + o.radius + 60) {
3025
- c && c(), n.isGrabbed = !1, this.showWarning = !0, this.resetDummies(n, o);
3088
+ l && l(), n.isGrabbed = !1, this.showWarning = !0, this.resetDummies(n, o);
3026
3089
  return;
3027
3090
  }
3028
3091
  return;
@@ -3030,14 +3093,14 @@ class mt {
3030
3093
  if (n.wasManipulated) {
3031
3094
  const u = Math.hypot(n.velocity.x, n.velocity.y);
3032
3095
  if (!n.isThrown || u < 70) {
3033
- c && c(), this.showWarning = !0, this.resetDummies(n, o);
3096
+ l && l(), this.showWarning = !0, this.resetDummies(n, o);
3034
3097
  return;
3035
3098
  }
3036
3099
  if (h <= n.getHitRadius() + o.getHitRadius()) {
3037
- n.triggerDissolveDeath(), o.triggerDissolveDeath(), this.showWarning = !1, this.isActive = !1, a();
3100
+ n.triggerDissolveDeath(!0), o.triggerDissolveDeath(!0), this.showWarning = !1, this.isActive = !1, a();
3038
3101
  return;
3039
3102
  }
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));
3103
+ (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));
3041
3104
  }
3042
3105
  }
3043
3106
  resetDummies(t, e) {
@@ -3047,7 +3110,7 @@ class mt {
3047
3110
  this.isActive = !1, this.showWarning = !1;
3048
3111
  }
3049
3112
  }
3050
- class ft {
3113
+ class xt {
3051
3114
  container;
3052
3115
  i18n;
3053
3116
  tutorialManager;
@@ -3083,9 +3146,9 @@ class ft {
3083
3146
  this.container.style.display = "none";
3084
3147
  }
3085
3148
  }
3086
- class xt {
3149
+ class yt {
3087
3150
  fillElement;
3088
- killsCount = 0;
3151
+ experienceCount = 0;
3089
3152
  currentLevel = 1;
3090
3153
  onLevelUpCallback;
3091
3154
  constructor(t, e) {
@@ -3093,19 +3156,25 @@ class xt {
3093
3156
  const i = document.createElement("div");
3094
3157
  i.className = "axon-hud-level-track", this.fillElement = document.createElement("div"), this.fillElement.className = "axon-hud-level-fill", i.appendChild(this.fillElement), t.appendChild(i);
3095
3158
  }
3096
- getKillsRequiredForLevel(t) {
3159
+ getExperienceRequiredForLevel(t) {
3097
3160
  return t === 1 ? 3 : t === 2 ? 6 : t === 3 ? 10 : 10 + (t - 3) * 6;
3098
3161
  }
3162
+ addExperience(t = 1) {
3163
+ this.experienceCount += Math.max(0, t);
3164
+ let e = this.getExperienceRequiredForLevel(this.currentLevel);
3165
+ for (; this.experienceCount >= e; )
3166
+ this.experienceCount -= e, this.currentLevel++, this.onLevelUpCallback && this.onLevelUpCallback(this.currentLevel), e = this.getExperienceRequiredForLevel(this.currentLevel);
3167
+ const i = Math.min(100, this.experienceCount / e * 100);
3168
+ this.fillElement.style.width = `${i}%`;
3169
+ }
3099
3170
  addKill() {
3100
- this.killsCount++;
3101
- const t = this.getKillsRequiredForLevel(this.currentLevel), e = Math.min(100, this.killsCount / t * 100);
3102
- this.fillElement.style.width = `${e}%`, this.killsCount >= t && (this.currentLevel++, this.killsCount = 0, this.fillElement.style.width = "0%", this.onLevelUpCallback && this.onLevelUpCallback(this.currentLevel));
3171
+ this.addExperience(1);
3103
3172
  }
3104
3173
  getLevel() {
3105
3174
  return this.currentLevel;
3106
3175
  }
3107
3176
  reset() {
3108
- this.killsCount = 0, this.currentLevel = 1, this.fillElement.style.width = "0%";
3177
+ this.experienceCount = 0, this.currentLevel = 1, this.fillElement.style.width = "0%";
3109
3178
  }
3110
3179
  show() {
3111
3180
  this.fillElement && this.fillElement.parentElement && (this.fillElement.parentElement.style.display = "block");
@@ -3418,13 +3487,51 @@ class B {
3418
3487
  apply: (t) => {
3419
3488
  E.getInstance().addCoreRing(1), t && t.addMaxRing(1);
3420
3489
  }
3490
+ },
3491
+ {
3492
+ id: "magnet_radius",
3493
+ titleKey: "pu_magnet_radius_title",
3494
+ descKey: "pu_magnet_radius_desc",
3495
+ badge: "+60 MAGNET",
3496
+ category: "magnet",
3497
+ rarity: "common",
3498
+ rarityWeight: 35,
3499
+ color: "#00f5ff",
3500
+ apply: () => {
3501
+ const t = E.getInstance(), e = t.getConfig().magnet;
3502
+ t.updateConfig({
3503
+ magnet: {
3504
+ ...e,
3505
+ pickupRadius: e.pickupRadius + 60
3506
+ }
3507
+ });
3508
+ }
3509
+ },
3510
+ {
3511
+ id: "magnet_strength",
3512
+ titleKey: "pu_magnet_strength_title",
3513
+ descKey: "pu_magnet_strength_desc",
3514
+ badge: "+25% PULL",
3515
+ category: "magnet",
3516
+ rarity: "rare",
3517
+ rarityWeight: 25,
3518
+ color: "#00f5ff",
3519
+ apply: () => {
3520
+ const t = E.getInstance(), e = t.getConfig().magnet;
3521
+ t.updateConfig({
3522
+ magnet: {
3523
+ ...e,
3524
+ absorptionSpeed: Math.round(e.absorptionSpeed * 1.25)
3525
+ }
3526
+ });
3527
+ }
3421
3528
  }
3422
3529
  ];
3423
3530
  static getRandomOptions(t = 3) {
3424
3531
  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 = [];
3425
3532
  for (let a = 0; a < t && i.length > 0; a++) {
3426
- const c = i.reduce((o, r) => o + r.rarityWeight, 0);
3427
- let n = Math.random() * c;
3533
+ const l = i.reduce((o, r) => o + r.rarityWeight, 0);
3534
+ let n = Math.random() * l;
3428
3535
  for (let o = 0; o < i.length; o++) {
3429
3536
  const r = i[o];
3430
3537
  if (n -= r.rarityWeight, n <= 0) {
@@ -3439,7 +3546,7 @@ class B {
3439
3546
  this.powerUps.push(t);
3440
3547
  }
3441
3548
  }
3442
- class yt {
3549
+ class Et {
3443
3550
  haptics = {
3444
3551
  impact: async (t) => {
3445
3552
  if ("vibrate" in navigator) {
@@ -3479,7 +3586,7 @@ class yt {
3479
3586
  }
3480
3587
  };
3481
3588
  }
3482
- class Et {
3589
+ class At {
3483
3590
  container;
3484
3591
  canvas;
3485
3592
  i18n;
@@ -3506,15 +3613,18 @@ class Et {
3506
3613
  shockwaves = [];
3507
3614
  particles = [];
3508
3615
  floatingTexts = [];
3616
+ experienceOrbs = [];
3509
3617
  orbitingOrbs = [];
3510
3618
  isLevelUpActive = !1;
3511
- hasRerolledThisLevel = !1;
3619
+ pendingLevelUps = [];
3620
+ debugRerollsEnabled = typeof window < "u" && window.location.hostname === "localhost" && new URLSearchParams(window.location.search).has("debug");
3621
+ rerollsRemaining = 1;
3512
3622
  score = { value: 0 };
3513
3623
  combo = { value: 0 };
3514
3624
  isRunning = !1;
3515
3625
  isPaused = !1;
3516
3626
  constructor(t) {
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(
3627
+ this.container = t.root, this.container.classList.add("axon-game-root"), this.i18n = new J(t.language), this.themeManager = new ct(t.theme, this.container), this.platform = t.platform || new Et(), 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 dt(this.canvas, this.themeManager), this.juice = new z(), this.settingsModal = new mt(
3518
3628
  this.container,
3519
3629
  this.i18n,
3520
3630
  this.themeManager,
@@ -3523,11 +3633,11 @@ class Et {
3523
3633
  () => {
3524
3634
  this.isPaused = !1;
3525
3635
  }
3526
- ), this.interactiveTutorial = new mt(), this.tutorialOverlay = new ft(this.container, this.i18n, this.interactiveTutorial), this.hud = new dt(this.container, this.i18n, () => {
3636
+ ), this.interactiveTutorial = new ft(), this.tutorialOverlay = new xt(this.container, this.i18n, this.interactiveTutorial), this.hud = new gt(this.container, this.i18n, () => {
3527
3637
  this.isPaused = !0, this.settingsModal.show();
3528
- }), this.hud.show(), this.progressBar = new xt(this.hud.progressSlot, (e) => {
3638
+ }), this.hud.show(), this.progressBar = new yt(this.hud.progressSlot, (e) => {
3529
3639
  this.waveDirector.wave = e, this.triggerLevelUp(e);
3530
- }), this.startMenu = new gt(this.container, this.i18n, () => this.startGame()), this.initAmbientArena(), this.gameLoop = new W(
3640
+ }), this.startMenu = new _t(this.container, this.i18n, () => this.startGame()), this.initAmbientArena(), this.gameLoop = new W(
3531
3641
  (e) => this.update(e),
3532
3642
  () => this.render()
3533
3643
  ), this.setupEvents(), this.gameLoop.start();
@@ -3551,12 +3661,12 @@ class Et {
3551
3661
  this.ambientEnemies = [];
3552
3662
  const t = ["piercer", "spore", "cluster", "parasite"];
3553
3663
  for (let e = 0; e < 16; e++) {
3554
- const i = t[e % t.length], s = e * Math.PI * 2 / 16, a = 180 + Math.random() * 220, c = {
3664
+ const i = t[e % t.length], s = e * Math.PI * 2 / 16, a = 180 + Math.random() * 220, l = {
3555
3665
  x: this.canvas.width / 2 + Math.cos(s) * a,
3556
3666
  y: this.canvas.height / 2 + Math.sin(s) * a
3557
- }, n = M.createEnemy(i, c, {
3558
- x: c.x + Math.sin(s) * 100,
3559
- y: c.y - Math.cos(s) * 100
3667
+ }, n = M.createEnemy(i, l, {
3668
+ x: l.x + Math.sin(s) * 100,
3669
+ y: l.y - Math.cos(s) * 100
3560
3670
  });
3561
3671
  this.ambientEnemies.push(n);
3562
3672
  }
@@ -3569,13 +3679,13 @@ class Et {
3569
3679
  this.eventBus.on("onCoreDamaged", () => {
3570
3680
  this.settingsModal.isHapticsEnabled() && this.platform.haptics.notification("error");
3571
3681
  }), this.eventBus.on("onGameOver", () => {
3572
- this.isRunning = !1, this.tutorialOverlay.hide(), this.progressBar.hide(), this.initAmbientArena(), this.startMenu.show();
3682
+ this.isRunning = !1, this.experienceOrbs = [], this.pendingLevelUps = [], this.tutorialOverlay.hide(), this.progressBar.hide(), this.initAmbientArena(), this.startMenu.show();
3573
3683
  });
3574
3684
  const t = (i = !1) => {
3575
- if (!this.isRunning || this.isPaused) return;
3685
+ if (!this.isRunning || this.isPaused || this.isLevelUpActive) return;
3576
3686
  this.inputManager.tryGrab(this.enemies, i) && this.settingsModal.isHapticsEnabled() && this.platform.haptics.impact("light");
3577
3687
  }, e = () => {
3578
- if (!this.isRunning || this.isPaused) return;
3688
+ if (!this.isRunning || this.isPaused || this.isLevelUpActive) return;
3579
3689
  this.inputManager.releaseAndThrow() && this.settingsModal.isHapticsEnabled() && this.platform.haptics.impact("medium");
3580
3690
  };
3581
3691
  this.canvas.addEventListener("mousedown", (i) => {
@@ -3585,7 +3695,7 @@ class Et {
3585
3695
  }), this.canvas.addEventListener("touchstart", () => t(!0), { passive: !0 }), this.canvas.addEventListener("touchend", e, { passive: !0 }), this.canvas.addEventListener("touchcancel", e, { passive: !0 });
3586
3696
  }
3587
3697
  startGame() {
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());
3698
+ 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.experienceOrbs = [], this.orbitingOrbs = [], this.isLevelUpActive = !1, this.pendingLevelUps = [], this.rerollsRemaining = this.getRerollLimit(), 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());
3589
3699
  }
3590
3700
  update(t) {
3591
3701
  if (this.core.update(t), !this.isRunning || this.isPaused) {
@@ -3619,21 +3729,21 @@ class Et {
3619
3729
  const e = this.inputManager.grabbedOrb;
3620
3730
  !this.inputManager.isPointerDown && e && (e.isGrabbed = !1, this.inputManager.grabbedOrb = null);
3621
3731
  const i = this.inputManager.pointerPosition;
3622
- if (this.inputManager.isPointerDown && !this.inputManager.grabbedOrb && !this.hasRerolledThisLevel) {
3732
+ if (this.inputManager.isPointerDown && !this.inputManager.grabbedOrb && this.rerollsRemaining > 0) {
3623
3733
  const s = this.canvas.width / 2, a = this.canvas.height / 2 + 210;
3624
3734
  Math.hypot(i.x - s, i.y - a) <= 80 && (this.triggerReroll(), this.inputManager.isPointerDown = !1);
3625
3735
  }
3626
3736
  for (const s of this.orbitingOrbs) {
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) {
3737
+ const a = i.x - s.position.x, l = i.y - s.position.y;
3738
+ if (s.isHovered = Math.hypot(a, l) <= s.radius * 1.5, s === e && this.inputManager.isPointerDown) {
3629
3739
  s.position = { ...this.inputManager.pointerPosition };
3630
3740
  const n = this.core.position.x - s.position.x, o = this.core.position.y - s.position.y;
3631
3741
  if (Math.hypot(n, o) <= this.core.radius + s.radius) {
3632
3742
  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);
3633
- const l = this.i18n.translate(s.definition.titleKey);
3743
+ const c = this.i18n.translate(s.definition.titleKey);
3634
3744
  this.floatingTexts.push({
3635
3745
  id: Math.random().toString(),
3636
- text: `+ ${l}`,
3746
+ text: `+ ${c}`,
3637
3747
  position: { ...this.core.position },
3638
3748
  velocity: { x: 0, y: -80 },
3639
3749
  color: s.definition.color,
@@ -3655,13 +3765,13 @@ class Et {
3655
3765
  maxLifetime: 0.7
3656
3766
  });
3657
3767
  }
3658
- this.inputManager.forceRelease(), this.orbitingOrbs = [], this.isLevelUpActive = !1;
3768
+ this.inputManager.forceRelease(), this.orbitingOrbs = [], this.presentNextLevelUp();
3659
3769
  }
3660
3770
  } else
3661
3771
  s.update(t, this.core.position);
3662
3772
  }
3663
3773
  }
3664
- this.juice.hitstopTime <= 0 && this.physicsEngine.update(
3774
+ !this.isLevelUpActive && this.juice.hitstopTime <= 0 && this.physicsEngine.update(
3665
3775
  t,
3666
3776
  this.core,
3667
3777
  this.enemies,
@@ -3676,7 +3786,7 @@ class Et {
3676
3786
  this.canvas.width,
3677
3787
  this.canvas.height,
3678
3788
  () => {
3679
- this.progressBar.addKill(), this.core.addKillRepair() && (this.juice.triggerFlash(0.4), this.floatingTexts.push({
3789
+ this.core.addKillRepair() && (this.juice.triggerFlash(0.4), this.floatingTexts.push({
3680
3790
  id: Math.random().toString(),
3681
3791
  text: "RING RESTORED!",
3682
3792
  position: { ...this.core.position },
@@ -3688,37 +3798,18 @@ class Et {
3688
3798
  size: 22
3689
3799
  }));
3690
3800
  }
3691
- ), this.hud.update(this.progressBar.getLevel(), this.combo.value), this.juice.update(t, this.floatingTexts, this.particles), this.enemies = this.enemies.filter((e) => e.active);
3801
+ ), this.spawnExperienceDrops(), this.isLevelUpActive || this.updateExperienceOrbs(t), this.hud.update(this.progressBar.getLevel(), this.combo.value), this.juice.update(t, this.floatingTexts, this.particles), this.enemies = this.enemies.filter((e) => e.active);
3692
3802
  }
3693
3803
  triggerLevelUp(t) {
3694
- this.isLevelUpActive = !0;
3695
- for (const i of this.enemies)
3696
- if (i.active) {
3697
- i.triggerDissolveDeath();
3698
- for (let s = 0; s < 6; s++) {
3699
- const a = Math.random() * Math.PI * 2, c = 100 + Math.random() * 200;
3700
- this.particles.push({
3701
- id: Math.random().toString(),
3702
- position: { ...i.position },
3703
- velocity: { x: Math.cos(a) * c, y: Math.sin(a) * c },
3704
- color: "#00f0ff",
3705
- radius: 3 + Math.random() * 3,
3706
- alpha: 1,
3707
- lifetime: 0,
3708
- maxLifetime: 0.5
3709
- });
3710
- }
3711
- }
3712
- this.shockwaves.push({
3713
- id: Math.random().toString(),
3714
- position: { ...this.core.position },
3715
- radius: 20,
3716
- maxRadius: Math.max(this.canvas.width, this.canvas.height) * 1.4,
3717
- color: "#00f0ff",
3718
- alpha: 1,
3719
- lifetime: 0,
3720
- maxLifetime: 0.8
3721
- }), this.juice.triggerFlash(0.6), this.juice.triggerScreenShake({ x: 0, y: 1 }, 20), this.floatingTexts.push({
3804
+ this.pendingLevelUps.push(t), this.isLevelUpActive || this.presentNextLevelUp();
3805
+ }
3806
+ presentNextLevelUp() {
3807
+ const t = this.pendingLevelUps.shift();
3808
+ if (t === void 0) {
3809
+ this.isLevelUpActive = !1;
3810
+ return;
3811
+ }
3812
+ this.isLevelUpActive = !0, this.inputManager.forceRelease(), this.juice.triggerFlash(0.3), this.juice.triggerScreenShake({ x: 0, y: 1 }, 8), this.floatingTexts.push({
3722
3813
  id: Math.random().toString(),
3723
3814
  text: this.i18n.translate("levelUpChoose", { level: t }),
3724
3815
  position: { ...this.core.position },
@@ -3729,15 +3820,57 @@ class Et {
3729
3820
  maxLifetime: 2,
3730
3821
  size: 30
3731
3822
  });
3823
+ for (let i = 0; i < 18; i++) {
3824
+ const s = Math.random() * Math.PI * 2, a = 80 + Math.random() * 160;
3825
+ this.particles.push({
3826
+ id: Math.random().toString(),
3827
+ position: { ...this.core.position },
3828
+ velocity: { x: Math.cos(s) * a, y: Math.sin(s) * a },
3829
+ color: "#00f0ff",
3830
+ radius: 2 + Math.random() * 3,
3831
+ alpha: 1,
3832
+ lifetime: 0,
3833
+ maxLifetime: 0.7
3834
+ });
3835
+ }
3732
3836
  const e = B.getRandomOptions(3);
3733
3837
  this.orbitingOrbs = e.map((i, s) => {
3734
3838
  const a = s * Math.PI * 2 / e.length;
3735
3839
  return new G(`orb_${Date.now()}_${s}`, i, a);
3736
- }), this.hasRerolledThisLevel = !1;
3840
+ }), this.rerollsRemaining = this.getRerollLimit();
3841
+ }
3842
+ spawnExperienceDrops() {
3843
+ for (const t of this.enemies)
3844
+ t.experienceDropPending && (t.experienceDropPending = !1, this.experienceOrbs.push(new lt(t.position)));
3845
+ }
3846
+ updateExperienceOrbs(t) {
3847
+ const e = E.getInstance().getConfig().magnet;
3848
+ for (const i of this.experienceOrbs)
3849
+ if (i.active) {
3850
+ if (i.isAbsorbing || Math.hypot(
3851
+ this.core.position.x - i.position.x,
3852
+ this.core.position.y - i.position.y
3853
+ ) <= this.core.getHitboxRadius() + e.corePickupRadius && i.beginAbsorption(), !i.isAbsorbing) {
3854
+ const s = this.inputManager.pointerPosition.x - i.position.x, a = this.inputManager.pointerPosition.y - i.position.y, l = e.psionicRadius + e.pickupRadius + i.radius;
3855
+ Math.hypot(s, a) <= l && i.beginAbsorption();
3856
+ }
3857
+ i.update(t, this.core.position, this.core.getHitboxRadius(), e.absorptionSpeed), i.active || (this.progressBar.addExperience(i.value), this.juice.triggerFlash(0.12), this.floatingTexts.push({
3858
+ id: Math.random().toString(),
3859
+ text: `+${i.value} XP`,
3860
+ position: { ...this.core.position },
3861
+ velocity: { x: 0, y: -55 },
3862
+ color: "#fbbf24",
3863
+ alpha: 1,
3864
+ lifetime: 0,
3865
+ maxLifetime: 0.8,
3866
+ size: 18
3867
+ }));
3868
+ }
3869
+ this.experienceOrbs = this.experienceOrbs.filter((i) => i.active);
3737
3870
  }
3738
3871
  triggerReroll() {
3739
- if (this.hasRerolledThisLevel) return;
3740
- this.hasRerolledThisLevel = !0, this.juice.triggerFlash(0.4);
3872
+ if (this.rerollsRemaining <= 0) return;
3873
+ this.rerollsRemaining -= 1, this.juice.triggerFlash(0.4);
3741
3874
  const t = B.getRandomOptions(3);
3742
3875
  this.orbitingOrbs = t.map((e, i) => {
3743
3876
  const s = i * Math.PI * 2 / t.length;
@@ -3749,6 +3882,7 @@ class Et {
3749
3882
  this.renderer.render(
3750
3883
  this.core,
3751
3884
  t,
3885
+ this.experienceOrbs,
3752
3886
  this.pools,
3753
3887
  this.vortices,
3754
3888
  this.shockwaves,
@@ -3759,20 +3893,29 @@ class Et {
3759
3893
  this.inputManager.pointerPosition,
3760
3894
  this.progressBar.getLevel(),
3761
3895
  this.interactiveTutorial.isActive ? this.interactiveTutorial : void 0
3762
- ), this.isLevelUpActive && this.orbitingOrbs.length > 0 && this.renderer.drawOrbitingModifierOrbs(this.orbitingOrbs, this.core.pulsePhase, this.i18n, !this.hasRerolledThisLevel);
3896
+ ), this.isLevelUpActive && this.orbitingOrbs.length > 0 && this.renderer.drawOrbitingModifierOrbs(
3897
+ this.orbitingOrbs,
3898
+ this.core.pulsePhase,
3899
+ this.i18n,
3900
+ this.rerollsRemaining > 0,
3901
+ this.rerollsRemaining
3902
+ );
3903
+ }
3904
+ getRerollLimit() {
3905
+ return this.debugRerollsEnabled ? 99 : 1;
3763
3906
  }
3764
3907
  destroy() {
3765
3908
  this.gameLoop.stop(), this.canvas.remove();
3766
3909
  }
3767
3910
  }
3768
- function At(y) {
3769
- return new Et(y);
3911
+ function bt(y) {
3912
+ return new At(y);
3770
3913
  }
3771
3914
  export {
3772
- yt as BrowserPlatform,
3773
- Et as GameEngine,
3915
+ Et as BrowserPlatform,
3916
+ At as GameEngine,
3774
3917
  K as LANGUAGES,
3775
- lt as ThemeManager,
3776
- At as createAxonSurge,
3777
- P as isLanguage
3918
+ ct as ThemeManager,
3919
+ bt as createAxonSurge,
3920
+ O as isLanguage
3778
3921
  };