@gamebob/axon-surge 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/axon-surge.js +486 -416
- package/dist/config/GameConfig.d.ts +4 -0
- package/dist/config/GameConfig.d.ts.map +1 -1
- package/dist/entities/EnemyEntity.d.ts +1 -0
- package/dist/entities/EnemyEntity.d.ts.map +1 -1
- package/dist/i18n/locales.d.ts +4 -0
- package/dist/i18n/locales.d.ts.map +1 -1
- package/dist/physics/PhysicsEngine.d.ts.map +1 -1
- package/dist/physics/handlers/ShieldCollisionHandler.d.ts +2 -1
- package/dist/physics/handlers/ShieldCollisionHandler.d.ts.map +1 -1
- package/dist/physics/handlers/ThrownCollisionHandler.d.ts +2 -1
- package/dist/physics/handlers/ThrownCollisionHandler.d.ts.map +1 -1
- package/dist/physics/handlers/VortexPhysicsHandler.d.ts.map +1 -1
- package/dist/powerups/PowerUpRegistry.d.ts.map +1 -1
- package/dist/strategies/HeavyShieldStrategy.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/axon-surge.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
1
|
+
class F {
|
|
2
2
|
listeners = /* @__PURE__ */ new Map();
|
|
3
3
|
on(t, e) {
|
|
4
4
|
return this.listeners.has(t) || this.listeners.set(t, /* @__PURE__ */ new Set()), this.listeners.get(t).add(e), () => this.off(t, e);
|
|
@@ -36,7 +36,7 @@ class W {
|
|
|
36
36
|
this.lastTime = t, this.updateCallback(e), this.renderCallback(), this.animationFrameId = requestAnimationFrame(this.tick);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
const
|
|
39
|
+
const U = {
|
|
40
40
|
core: {
|
|
41
41
|
maxIntegrity: 3,
|
|
42
42
|
invulnerabilityDuration: 1.5,
|
|
@@ -63,7 +63,11 @@ const k = {
|
|
|
63
63
|
shield: {
|
|
64
64
|
blastSpeed: 1600,
|
|
65
65
|
hitboxRange: 280,
|
|
66
|
-
|
|
66
|
+
protectionArc: Math.PI * 0.25,
|
|
67
|
+
isFanBlast: !1,
|
|
68
|
+
fanBlastInterval: 0.5,
|
|
69
|
+
fanBlastAngle: Math.PI / 4,
|
|
70
|
+
hasFanBlastUpgrade: !1
|
|
67
71
|
},
|
|
68
72
|
cluster: {
|
|
69
73
|
fragmentCount: 6,
|
|
@@ -85,7 +89,7 @@ class E {
|
|
|
85
89
|
static instance;
|
|
86
90
|
config;
|
|
87
91
|
constructor() {
|
|
88
|
-
this.config = JSON.parse(JSON.stringify(
|
|
92
|
+
this.config = JSON.parse(JSON.stringify(U));
|
|
89
93
|
}
|
|
90
94
|
static getInstance() {
|
|
91
95
|
return E.instance || (E.instance = new E()), E.instance;
|
|
@@ -106,10 +110,10 @@ class E {
|
|
|
106
110
|
this.config.core.maxIntegrity += t;
|
|
107
111
|
}
|
|
108
112
|
resetToDefault() {
|
|
109
|
-
this.config = JSON.parse(JSON.stringify(
|
|
113
|
+
this.config = JSON.parse(JSON.stringify(U));
|
|
110
114
|
}
|
|
111
115
|
}
|
|
112
|
-
class
|
|
116
|
+
class Y {
|
|
113
117
|
position;
|
|
114
118
|
radius;
|
|
115
119
|
integrity;
|
|
@@ -166,7 +170,7 @@ class F {
|
|
|
166
170
|
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 };
|
|
167
171
|
}
|
|
168
172
|
}
|
|
169
|
-
class
|
|
173
|
+
class w {
|
|
170
174
|
id;
|
|
171
175
|
position = { x: 0, y: 0 };
|
|
172
176
|
velocity = { x: 0, y: 0 };
|
|
@@ -183,6 +187,7 @@ class D {
|
|
|
183
187
|
maxSpeed = 200;
|
|
184
188
|
isStationaryShield = !1;
|
|
185
189
|
shieldAngle = 0;
|
|
190
|
+
launchDelay = 0;
|
|
186
191
|
remainingHomingKills = 0;
|
|
187
192
|
experienceDropPending = !1;
|
|
188
193
|
isDying = !1;
|
|
@@ -208,7 +213,7 @@ class D {
|
|
|
208
213
|
this.deathTimer += t, this.deathTimer >= this.maxDeathTimer && (this.active = !1, this.isDying = !1);
|
|
209
214
|
return;
|
|
210
215
|
}
|
|
211
|
-
if (!(this.isGrabbed || this.isStationaryShield)) {
|
|
216
|
+
if (!(this.launchDelay > 0 && (this.launchDelay = Math.max(0, this.launchDelay - t), this.launchDelay > 0)) && !(this.isGrabbed || this.isStationaryShield)) {
|
|
212
217
|
if (!this.isThrown && this.maxSpeed > 0) {
|
|
213
218
|
const e = Math.hypot(this.velocity.x, this.velocity.y);
|
|
214
219
|
if (e > this.maxSpeed) {
|
|
@@ -221,7 +226,7 @@ class D {
|
|
|
221
226
|
}
|
|
222
227
|
}
|
|
223
228
|
reset() {
|
|
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;
|
|
229
|
+
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.launchDelay = 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;
|
|
225
230
|
}
|
|
226
231
|
}
|
|
227
232
|
class G {
|
|
@@ -241,7 +246,7 @@ class G {
|
|
|
241
246
|
this.active && !this.isGrabbed && !this.isHovered && (this.orbitAngle += t * 0.25, this.position.x = e.x + Math.cos(this.orbitAngle) * this.orbitDistance, this.position.y = e.y + Math.sin(this.orbitAngle) * this.orbitDistance);
|
|
242
247
|
}
|
|
243
248
|
}
|
|
244
|
-
class
|
|
249
|
+
class Z {
|
|
245
250
|
pointerPosition = { x: 0, y: 0 };
|
|
246
251
|
isPointerDown = !1;
|
|
247
252
|
grabbedEnemy = null;
|
|
@@ -302,7 +307,7 @@ class Y {
|
|
|
302
307
|
if (this.grabbedEnemy) return this.grabbedEnemy;
|
|
303
308
|
const i = e ? 50 : 20;
|
|
304
309
|
for (const s of t) {
|
|
305
|
-
if (!s.active || s.isGrabbed || s.isThrown || s.wasManipulated) continue;
|
|
310
|
+
if (!s.active || s.isGrabbed || s.isThrown || s.wasManipulated || s.launchDelay > 0) continue;
|
|
306
311
|
const a = this.pointerPosition.x - s.position.x, l = this.pointerPosition.y - s.position.y;
|
|
307
312
|
if (Math.hypot(a, l) <= s.getHitRadius() + i)
|
|
308
313
|
return s.isGrabbed = !0, this.grabbedEnemy = s, this.dragStart = { ...this.pointerPosition }, this.pointerHistory = [], s;
|
|
@@ -363,7 +368,7 @@ class Y {
|
|
|
363
368
|
this.grabbedEnemy = null, this.grabbedOrb = null, this.dragStart = null, this.pointerHistory = [], this.isPointerDown = !1;
|
|
364
369
|
}
|
|
365
370
|
}
|
|
366
|
-
class
|
|
371
|
+
class z {
|
|
367
372
|
cellSize;
|
|
368
373
|
grid = /* @__PURE__ */ new Map();
|
|
369
374
|
constructor(t = 100) {
|
|
@@ -390,7 +395,7 @@ class Z {
|
|
|
390
395
|
return i;
|
|
391
396
|
}
|
|
392
397
|
}
|
|
393
|
-
class
|
|
398
|
+
class J {
|
|
394
399
|
hitstopTime = 0;
|
|
395
400
|
shakeTime = 0;
|
|
396
401
|
shakeDuration = 0.14;
|
|
@@ -430,7 +435,7 @@ class z {
|
|
|
430
435
|
};
|
|
431
436
|
}
|
|
432
437
|
}
|
|
433
|
-
const
|
|
438
|
+
const O = {
|
|
434
439
|
es: {
|
|
435
440
|
title: "AXON SURGE",
|
|
436
441
|
startButton: "INICIAR ENLACE",
|
|
@@ -479,6 +484,10 @@ const P = {
|
|
|
479
484
|
pu_piercer_homing_target_desc: "+1 Objetivo para el Corte Buscador",
|
|
480
485
|
pu_shield_fan_title: "TRIPLE RAGAZO ARC",
|
|
481
486
|
pu_shield_fan_desc: "Dispara 3 rayos en abanico",
|
|
487
|
+
pu_shield_fan_upgrade_title: "CADENCIA DEL ABANICO",
|
|
488
|
+
pu_shield_fan_upgrade_desc: "+0.35s entre rayos y +15° de apertura",
|
|
489
|
+
pu_shield_arc_title: "ARCO PROTECTOR",
|
|
490
|
+
pu_shield_arc_desc: "+30° de arco de protección",
|
|
482
491
|
pu_vampirism_unlock_title: "BIO-VAMPIRISMO",
|
|
483
492
|
pu_vampirism_unlock_desc: "Las bajas reparan vidas dañadas",
|
|
484
493
|
pu_vampirism_boost_title: "IMPULSO VAMPÍRICO",
|
|
@@ -540,6 +549,10 @@ const P = {
|
|
|
540
549
|
pu_piercer_homing_target_desc: "+1 Target for Seeker Slice",
|
|
541
550
|
pu_shield_fan_title: "TRIPLE ARC BLAST",
|
|
542
551
|
pu_shield_fan_desc: "Fires 3 fan beams",
|
|
552
|
+
pu_shield_fan_upgrade_title: "FAN OVERDRIVE",
|
|
553
|
+
pu_shield_fan_upgrade_desc: "+0.35s between beams and +15° spread",
|
|
554
|
+
pu_shield_arc_title: "PROTECTIVE ARC",
|
|
555
|
+
pu_shield_arc_desc: "+30° shield protection arc",
|
|
543
556
|
pu_vampirism_unlock_title: "BIO-VAMPIRISM",
|
|
544
557
|
pu_vampirism_unlock_desc: "Kills repair damaged core rings",
|
|
545
558
|
pu_vampirism_boost_title: "VAMPIRIC SURGE",
|
|
@@ -1268,7 +1281,7 @@ const P = {
|
|
|
1268
1281
|
pu_core_ring_title: "核心过载",
|
|
1269
1282
|
pu_core_ring_desc: "+1 生命环"
|
|
1270
1283
|
}
|
|
1271
|
-
},
|
|
1284
|
+
}, V = [
|
|
1272
1285
|
"es",
|
|
1273
1286
|
"en",
|
|
1274
1287
|
"fr",
|
|
@@ -1285,29 +1298,29 @@ const P = {
|
|
|
1285
1298
|
"ko",
|
|
1286
1299
|
"zh"
|
|
1287
1300
|
];
|
|
1288
|
-
function
|
|
1289
|
-
return
|
|
1301
|
+
function N(A) {
|
|
1302
|
+
return V.includes(A);
|
|
1290
1303
|
}
|
|
1291
|
-
const
|
|
1292
|
-
class
|
|
1304
|
+
const H = "axon_surge_language";
|
|
1305
|
+
class $ {
|
|
1293
1306
|
currentLanguage;
|
|
1294
1307
|
constructor(t) {
|
|
1295
1308
|
this.currentLanguage = this.detectLanguage(t);
|
|
1296
1309
|
}
|
|
1297
1310
|
detectLanguage(t) {
|
|
1298
1311
|
try {
|
|
1299
|
-
const e = localStorage.getItem(
|
|
1300
|
-
if (e &&
|
|
1312
|
+
const e = localStorage.getItem(H);
|
|
1313
|
+
if (e && N(e))
|
|
1301
1314
|
return e;
|
|
1302
1315
|
} catch {
|
|
1303
1316
|
}
|
|
1304
|
-
if (t &&
|
|
1317
|
+
if (t && N(t))
|
|
1305
1318
|
return t;
|
|
1306
1319
|
try {
|
|
1307
1320
|
const e = (document.documentElement.lang || document.body?.getAttribute("lang") || document.documentElement.getAttribute("data-lang") || "").toLowerCase();
|
|
1308
1321
|
if (e) {
|
|
1309
1322
|
const i = e.split("-")[0];
|
|
1310
|
-
if (i &&
|
|
1323
|
+
if (i && N(i))
|
|
1311
1324
|
return i;
|
|
1312
1325
|
}
|
|
1313
1326
|
} catch {
|
|
@@ -1316,7 +1329,7 @@ class J {
|
|
|
1316
1329
|
const e = (navigator.language || navigator.languages && navigator.languages[0] || "").toLowerCase();
|
|
1317
1330
|
if (e) {
|
|
1318
1331
|
const i = e.split("-")[0];
|
|
1319
|
-
if (i &&
|
|
1332
|
+
if (i && N(i))
|
|
1320
1333
|
return i;
|
|
1321
1334
|
}
|
|
1322
1335
|
} catch {
|
|
@@ -1324,10 +1337,10 @@ class J {
|
|
|
1324
1337
|
return "en";
|
|
1325
1338
|
}
|
|
1326
1339
|
setLanguage(t) {
|
|
1327
|
-
if (
|
|
1340
|
+
if (O[t]) {
|
|
1328
1341
|
this.currentLanguage = t;
|
|
1329
1342
|
try {
|
|
1330
|
-
localStorage.setItem(
|
|
1343
|
+
localStorage.setItem(H, t);
|
|
1331
1344
|
} catch {
|
|
1332
1345
|
}
|
|
1333
1346
|
}
|
|
@@ -1336,13 +1349,13 @@ class J {
|
|
|
1336
1349
|
return this.currentLanguage;
|
|
1337
1350
|
}
|
|
1338
1351
|
translate(t, e) {
|
|
1339
|
-
let s = (
|
|
1352
|
+
let s = (O[this.currentLanguage] || O.en)[t] || O.en[t] || String(t);
|
|
1340
1353
|
return e && Object.entries(e).forEach(([a, l]) => {
|
|
1341
1354
|
s = s.replace(`{${a}}`, String(l));
|
|
1342
1355
|
}), s;
|
|
1343
1356
|
}
|
|
1344
1357
|
}
|
|
1345
|
-
class
|
|
1358
|
+
class X {
|
|
1346
1359
|
static update(t, e, i) {
|
|
1347
1360
|
const s = E.getInstance().getConfig();
|
|
1348
1361
|
for (let a = t.length - 1; a >= 0; a--) {
|
|
@@ -1350,11 +1363,11 @@ class $ {
|
|
|
1350
1363
|
if (l) {
|
|
1351
1364
|
l.duration += i;
|
|
1352
1365
|
for (const n of e) {
|
|
1353
|
-
if (!n.active || n.isGrabbed || n.isDying || n.isStationaryShield || n.isThrown && n.type === "piercer") continue;
|
|
1354
|
-
const o = l.position.x - n.position.x, r = l.position.y - n.position.y, c = Math.
|
|
1355
|
-
if (
|
|
1356
|
-
const
|
|
1357
|
-
n.velocity.x += Math.cos(
|
|
1366
|
+
if (!n.active || n.isGrabbed || n.isDying || n.isStationaryShield || n.launchDelay > 0 || n.isThrown && n.type === "piercer") continue;
|
|
1367
|
+
const o = l.position.x - n.position.x, r = l.position.y - n.position.y, c = o * o + r * r, h = Math.sqrt(c);
|
|
1368
|
+
if (h > 2 && c <= l.radius * l.radius) {
|
|
1369
|
+
const u = Math.pow(1 - h / l.radius, 0.7), d = l.pullForce * u, _ = Math.atan2(r, o);
|
|
1370
|
+
n.velocity.x += Math.cos(_) * d * i, n.velocity.y += Math.sin(_) * d * i, n.position.x += Math.cos(_) * d * i * 0.8, n.position.y += Math.sin(_) * d * i * 0.8;
|
|
1358
1371
|
}
|
|
1359
1372
|
}
|
|
1360
1373
|
if (l.duration >= l.maxDuration) {
|
|
@@ -1362,7 +1375,7 @@ class $ {
|
|
|
1362
1375
|
for (const n of e) {
|
|
1363
1376
|
if (!n.active || n.isDying) continue;
|
|
1364
1377
|
const o = n.position.x - l.position.x, r = n.position.y - l.position.y;
|
|
1365
|
-
if (
|
|
1378
|
+
if (o * o + r * r <= l.radius * l.radius) {
|
|
1366
1379
|
const h = Math.atan2(r, o), u = 1200;
|
|
1367
1380
|
n.isThrown = !0, n.wasManipulated = !0, n.velocity = {
|
|
1368
1381
|
x: Math.cos(h) * u,
|
|
@@ -1376,12 +1389,12 @@ class $ {
|
|
|
1376
1389
|
}
|
|
1377
1390
|
}
|
|
1378
1391
|
}
|
|
1379
|
-
class
|
|
1392
|
+
class j {
|
|
1380
1393
|
static update(t, e, i, s, a, l, n, o, r, c) {
|
|
1381
1394
|
for (const h of e) {
|
|
1382
|
-
if (!h.active || h.isGrabbed || h.isDying) continue;
|
|
1383
|
-
const u = t.position.x - h.position.x,
|
|
1384
|
-
if (Math.hypot(u,
|
|
1395
|
+
if (!h.active || h.isGrabbed || h.isDying || h.launchDelay > 0) continue;
|
|
1396
|
+
const u = t.position.x - h.position.x, d = t.position.y - h.position.y;
|
|
1397
|
+
if (Math.hypot(u, d) <= t.getHitboxRadius() + h.radius) {
|
|
1385
1398
|
if (h.active = !1, t.takeDamage()) {
|
|
1386
1399
|
n.emit("onCoreDamaged", { currentIntegrity: t.integrity }), i.push({
|
|
1387
1400
|
id: Math.random().toString(),
|
|
@@ -1392,16 +1405,16 @@ class X {
|
|
|
1392
1405
|
alpha: 1,
|
|
1393
1406
|
lifetime: 0,
|
|
1394
1407
|
maxLifetime: 0.8
|
|
1395
|
-
}), l.triggerScreenShake({ x: u, y:
|
|
1396
|
-
for (const
|
|
1397
|
-
if (
|
|
1398
|
-
|
|
1399
|
-
for (let
|
|
1400
|
-
const
|
|
1408
|
+
}), l.triggerScreenShake({ x: u, y: d }, 25), l.triggerHitstop(0.15), l.triggerFlash(0.6);
|
|
1409
|
+
for (const p of e)
|
|
1410
|
+
if (p.active && !p.isGrabbed && p.launchDelay <= 0) {
|
|
1411
|
+
p.triggerDissolveDeath();
|
|
1412
|
+
for (let g = 0; g < 8; g++) {
|
|
1413
|
+
const m = Math.random() * Math.PI * 2, y = 100 + Math.random() * 200;
|
|
1401
1414
|
s.push({
|
|
1402
1415
|
id: Math.random().toString(),
|
|
1403
|
-
position: { ...
|
|
1404
|
-
velocity: { x: Math.cos(
|
|
1416
|
+
position: { ...p.position },
|
|
1417
|
+
velocity: { x: Math.cos(m) * y, y: Math.sin(m) * y },
|
|
1405
1418
|
color: "#00f0ff",
|
|
1406
1419
|
radius: 3 + Math.random() * 3,
|
|
1407
1420
|
alpha: 1,
|
|
@@ -1427,7 +1440,7 @@ class X {
|
|
|
1427
1440
|
}
|
|
1428
1441
|
}
|
|
1429
1442
|
}
|
|
1430
|
-
class
|
|
1443
|
+
class q {
|
|
1431
1444
|
execute(t) {
|
|
1432
1445
|
const { thrownEnemy: e, targetEnemy: i, shockwaves: s, particles: a, floatingTexts: l } = t;
|
|
1433
1446
|
i.experienceDropPending = !0, i.active = !1, s.push({
|
|
@@ -1466,7 +1479,7 @@ class j {
|
|
|
1466
1479
|
});
|
|
1467
1480
|
}
|
|
1468
1481
|
}
|
|
1469
|
-
class
|
|
1482
|
+
class Q {
|
|
1470
1483
|
execute(t) {
|
|
1471
1484
|
const { thrownEnemy: e, pools: i, shockwaves: s, particles: a, floatingTexts: l, eventBus: n } = t, o = e.position, r = E.getInstance().getConfig();
|
|
1472
1485
|
i.push({
|
|
@@ -1512,7 +1525,7 @@ class q {
|
|
|
1512
1525
|
}), e.experienceDropPending = !0, e.active = !1, n.emit("onPoolCreated", { position: o });
|
|
1513
1526
|
}
|
|
1514
1527
|
}
|
|
1515
|
-
class
|
|
1528
|
+
class tt {
|
|
1516
1529
|
execute(t) {
|
|
1517
1530
|
const { thrownEnemy: e, targetEnemy: i, allEnemies: s, shockwaves: a, particles: l, floatingTexts: n } = t, o = i.position;
|
|
1518
1531
|
e.experienceDropPending = !0, i.experienceDropPending = !0, e.active = !1, i.active = !1, a.push({
|
|
@@ -1527,35 +1540,35 @@ class Q {
|
|
|
1527
1540
|
});
|
|
1528
1541
|
const r = E.getInstance().getConfig(), c = r.cluster.fragmentCount, h = r.cluster.hasHoming;
|
|
1529
1542
|
for (let u = 0; u < c; u++) {
|
|
1530
|
-
const
|
|
1531
|
-
x: o.x + Math.cos(
|
|
1532
|
-
y: o.y + Math.sin(
|
|
1543
|
+
const d = u * Math.PI * 2 / c, _ = 800 + Math.random() * 300, f = {
|
|
1544
|
+
x: o.x + Math.cos(d) * 45,
|
|
1545
|
+
y: o.y + Math.sin(d) * 45
|
|
1533
1546
|
};
|
|
1534
|
-
let
|
|
1547
|
+
let p = d;
|
|
1535
1548
|
if (h) {
|
|
1536
|
-
let
|
|
1549
|
+
let m = null, y = 1 / 0;
|
|
1537
1550
|
for (const b of s) {
|
|
1538
1551
|
if (b === e || b === i || !b.active || b.isGrabbed || b.isDying) continue;
|
|
1539
|
-
const I = Math.hypot(b.position.x -
|
|
1540
|
-
I <
|
|
1552
|
+
const I = Math.hypot(b.position.x - f.x, b.position.y - f.y);
|
|
1553
|
+
I < y && (y = I, m = b);
|
|
1541
1554
|
}
|
|
1542
|
-
|
|
1555
|
+
m && (p = Math.atan2(m.position.y - f.y, m.position.x - f.x));
|
|
1543
1556
|
}
|
|
1544
|
-
const
|
|
1545
|
-
x:
|
|
1546
|
-
y:
|
|
1557
|
+
const g = M.createEnemy("micro", f, {
|
|
1558
|
+
x: f.x + Math.cos(p) * 500,
|
|
1559
|
+
y: f.y + Math.sin(p) * 500
|
|
1547
1560
|
});
|
|
1548
|
-
|
|
1549
|
-
x: Math.cos(
|
|
1550
|
-
y: Math.sin(
|
|
1551
|
-
}, s.push(
|
|
1561
|
+
g.isThrown = !0, g.wasManipulated = !0, g.velocity = {
|
|
1562
|
+
x: Math.cos(p) * _,
|
|
1563
|
+
y: Math.sin(p) * _
|
|
1564
|
+
}, s.push(g);
|
|
1552
1565
|
}
|
|
1553
1566
|
for (let u = 0; u < 35; u++) {
|
|
1554
|
-
const
|
|
1567
|
+
const d = Math.random() * Math.PI * 2, _ = 200 + Math.random() * 300;
|
|
1555
1568
|
l.push({
|
|
1556
1569
|
id: Math.random().toString(),
|
|
1557
1570
|
position: { ...o },
|
|
1558
|
-
velocity: { x: Math.cos(
|
|
1571
|
+
velocity: { x: Math.cos(d) * _, y: Math.sin(d) * _ },
|
|
1559
1572
|
color: "#ffd700",
|
|
1560
1573
|
radius: 4 + Math.random() * 4,
|
|
1561
1574
|
alpha: 1,
|
|
@@ -1576,7 +1589,7 @@ class Q {
|
|
|
1576
1589
|
});
|
|
1577
1590
|
}
|
|
1578
1591
|
}
|
|
1579
|
-
class
|
|
1592
|
+
class et {
|
|
1580
1593
|
execute(t) {
|
|
1581
1594
|
const { thrownEnemy: e, targetEnemy: i, vortices: s, shockwaves: a } = t, l = E.getInstance().getConfig(), n = {
|
|
1582
1595
|
x: (e.position.x + i.position.x) / 2,
|
|
@@ -1601,22 +1614,22 @@ class tt {
|
|
|
1601
1614
|
}), e.triggerDissolveDeath(!0), i.triggerDissolveDeath(!0);
|
|
1602
1615
|
}
|
|
1603
1616
|
}
|
|
1604
|
-
class
|
|
1617
|
+
class it {
|
|
1605
1618
|
execute(t) {
|
|
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,
|
|
1607
|
-
for (const _ of
|
|
1608
|
-
const
|
|
1619
|
+
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, d = h.isFanBlast ? [0, -h.fanBlastAngle, h.fanBlastAngle] : [0];
|
|
1620
|
+
for (const [_, f] of d.entries()) {
|
|
1621
|
+
const p = c + f, g = _ === 0 ? e : M.createEnemy(
|
|
1609
1622
|
"heavy",
|
|
1610
1623
|
{
|
|
1611
|
-
x: e.position.x + Math.cos(
|
|
1612
|
-
y: e.position.y + Math.sin(
|
|
1624
|
+
x: e.position.x + Math.cos(p) * 30,
|
|
1625
|
+
y: e.position.y + Math.sin(p) * 30
|
|
1613
1626
|
},
|
|
1614
1627
|
{ x: 0, y: 0 }
|
|
1615
1628
|
);
|
|
1616
|
-
|
|
1617
|
-
x: Math.cos(
|
|
1618
|
-
y: Math.sin(
|
|
1619
|
-
},
|
|
1629
|
+
g.isStationaryShield = !1, g.isThrown = !0, g.wasManipulated = !0, g.shieldAngle = p, g.rotation = p, g.launchDelay = h.isFanBlast ? _ * h.fanBlastInterval : 0, g.velocity = {
|
|
1630
|
+
x: Math.cos(p) * u,
|
|
1631
|
+
y: Math.sin(p) * u
|
|
1632
|
+
}, g !== e && s.push(g);
|
|
1620
1633
|
}
|
|
1621
1634
|
i.active = !1, i.triggerDissolveDeath(!0), n.push({
|
|
1622
1635
|
id: Math.random().toString(),
|
|
@@ -1630,11 +1643,11 @@ class et {
|
|
|
1630
1643
|
size: 24
|
|
1631
1644
|
});
|
|
1632
1645
|
for (let _ = 0; _ < 50; _++) {
|
|
1633
|
-
const
|
|
1646
|
+
const f = (Math.random() - 0.5) * 1.5, p = c + f, g = 300 + Math.random() * 500;
|
|
1634
1647
|
l.push({
|
|
1635
1648
|
id: Math.random().toString(),
|
|
1636
1649
|
position: { ...e.position },
|
|
1637
|
-
velocity: { x: Math.cos(
|
|
1650
|
+
velocity: { x: Math.cos(p) * g, y: Math.sin(p) * g },
|
|
1638
1651
|
color: "#00f5ff",
|
|
1639
1652
|
radius: 4 + Math.random() * 6,
|
|
1640
1653
|
alpha: 1,
|
|
@@ -1657,20 +1670,20 @@ class et {
|
|
|
1657
1670
|
}
|
|
1658
1671
|
class M {
|
|
1659
1672
|
static createEnemy(t, e, i) {
|
|
1660
|
-
const s = `enemy_${Date.now()}_${Math.random()}`, a = new
|
|
1673
|
+
const s = `enemy_${Date.now()}_${Math.random()}`, a = new w(s);
|
|
1661
1674
|
return this.configureEnemy(a, t, e, i), a;
|
|
1662
1675
|
}
|
|
1663
1676
|
static configureEnemy(t, e, i, s) {
|
|
1664
1677
|
t.type = e, t.position = { ...i }, t.active = !0, t.isGrabbed = !1, t.isThrown = !1;
|
|
1665
1678
|
const a = s.x - i.x, l = s.y - i.y, n = Math.atan2(l, a);
|
|
1666
1679
|
let o = 70, r = 100, c = 20, h = "#ff2a5f", u = null;
|
|
1667
|
-
e === "piercer" ? (o = 95, r = 140, c = 18, h = "#ff2a5f", u = new
|
|
1680
|
+
e === "piercer" ? (o = 95, r = 140, c = 18, h = "#ff2a5f", u = new q()) : 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 tt()) : e === "parasite" ? (o = 80, r = 110, c = 22, h = "#9d4edd", u = new et()) : e === "heavy" ? (o = 35, r = 50, c = 34, h = "#00f5ff", u = new it(), 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 = {
|
|
1668
1681
|
x: Math.cos(n) * o,
|
|
1669
1682
|
y: Math.sin(n) * o
|
|
1670
1683
|
};
|
|
1671
1684
|
}
|
|
1672
1685
|
}
|
|
1673
|
-
class
|
|
1686
|
+
class L {
|
|
1674
1687
|
static killEnemy(t, e, i, s, a, l) {
|
|
1675
1688
|
if (!t.active || t.isDying) return;
|
|
1676
1689
|
const n = E.getInstance().getConfig();
|
|
@@ -1696,28 +1709,28 @@ class T {
|
|
|
1696
1709
|
t.triggerDissolveDeath(!0);
|
|
1697
1710
|
const o = n.cluster.fragmentCount, r = n.cluster.hasHoming;
|
|
1698
1711
|
for (let c = 0; c < o; c++) {
|
|
1699
|
-
const h = c * Math.PI * 2 / o, u = 750 + Math.random() * 250,
|
|
1712
|
+
const h = c * Math.PI * 2 / o, u = 750 + Math.random() * 250, d = {
|
|
1700
1713
|
x: t.position.x + Math.cos(h) * 40,
|
|
1701
1714
|
y: t.position.y + Math.sin(h) * 40
|
|
1702
1715
|
};
|
|
1703
1716
|
let _ = h;
|
|
1704
1717
|
if (r) {
|
|
1705
|
-
let
|
|
1706
|
-
for (const
|
|
1707
|
-
if (
|
|
1708
|
-
const
|
|
1709
|
-
|
|
1718
|
+
let p = null, g = 1 / 0;
|
|
1719
|
+
for (const m of l) {
|
|
1720
|
+
if (m === t || !m.active || m.isGrabbed || m.isDying) continue;
|
|
1721
|
+
const y = Math.hypot(m.position.x - d.x, m.position.y - d.y);
|
|
1722
|
+
y < g && (g = y, p = m);
|
|
1710
1723
|
}
|
|
1711
|
-
|
|
1724
|
+
p && (_ = Math.atan2(p.position.y - d.y, p.position.x - d.x));
|
|
1712
1725
|
}
|
|
1713
|
-
const
|
|
1714
|
-
x:
|
|
1715
|
-
y:
|
|
1726
|
+
const f = M.createEnemy("micro", d, {
|
|
1727
|
+
x: d.x + Math.cos(_) * 500,
|
|
1728
|
+
y: d.y + Math.sin(_) * 500
|
|
1716
1729
|
});
|
|
1717
|
-
|
|
1730
|
+
f.isThrown = !0, f.wasManipulated = !0, f.velocity = {
|
|
1718
1731
|
x: Math.cos(_) * u,
|
|
1719
1732
|
y: Math.sin(_) * u
|
|
1720
|
-
}, l.push(
|
|
1733
|
+
}, l.push(f);
|
|
1721
1734
|
}
|
|
1722
1735
|
} else t.type === "parasite" ? (t.triggerDissolveDeath(!0), s.push({
|
|
1723
1736
|
id: Math.random().toString(),
|
|
@@ -1729,16 +1742,16 @@ class T {
|
|
|
1729
1742
|
})) : t.type === "piercer" ? t.triggerSliceDeath(e, !0) : t.triggerDissolveDeath(!0);
|
|
1730
1743
|
}
|
|
1731
1744
|
}
|
|
1732
|
-
class
|
|
1733
|
-
static update(t, e, i, s, a, l, n, o, r, c, h, u,
|
|
1734
|
-
let
|
|
1735
|
-
for (const
|
|
1736
|
-
if (!(!
|
|
1737
|
-
if (
|
|
1738
|
-
if (
|
|
1745
|
+
class st {
|
|
1746
|
+
static update(t, e, i, s, a, l, n, o, r, c, h, u, d, _) {
|
|
1747
|
+
let f = !1;
|
|
1748
|
+
for (const p of t)
|
|
1749
|
+
if (!(!p.active || !p.isThrown || p.isDying || p.launchDelay > 0)) {
|
|
1750
|
+
if (f = !0, p.position.x < -120 || p.position.x > c + 120 || p.position.y < -120 || p.position.y > h + 120) {
|
|
1751
|
+
if (p.type === "heavy") {
|
|
1739
1752
|
s.push({
|
|
1740
1753
|
id: Math.random().toString(),
|
|
1741
|
-
position: { ...
|
|
1754
|
+
position: { ...p.position },
|
|
1742
1755
|
radius: 20,
|
|
1743
1756
|
maxRadius: 350,
|
|
1744
1757
|
color: "#00f5ff",
|
|
@@ -1746,12 +1759,12 @@ class it {
|
|
|
1746
1759
|
lifetime: 0,
|
|
1747
1760
|
maxLifetime: 0.6
|
|
1748
1761
|
});
|
|
1749
|
-
for (let
|
|
1750
|
-
const m = Math.random() * Math.PI * 2,
|
|
1762
|
+
for (let g = 0; g < 40; g++) {
|
|
1763
|
+
const m = Math.random() * Math.PI * 2, y = 250 + Math.random() * 450;
|
|
1751
1764
|
a.push({
|
|
1752
1765
|
id: Math.random().toString(),
|
|
1753
|
-
position: { ...
|
|
1754
|
-
velocity: { x: Math.cos(m) *
|
|
1766
|
+
position: { ...p.position },
|
|
1767
|
+
velocity: { x: Math.cos(m) * y, y: Math.sin(m) * y },
|
|
1755
1768
|
color: "#00f5ff",
|
|
1756
1769
|
radius: 4 + Math.random() * 5,
|
|
1757
1770
|
alpha: 1,
|
|
@@ -1759,13 +1772,13 @@ class it {
|
|
|
1759
1772
|
maxLifetime: 0.6
|
|
1760
1773
|
});
|
|
1761
1774
|
}
|
|
1762
|
-
} else if (
|
|
1763
|
-
const
|
|
1764
|
-
if (
|
|
1765
|
-
const m =
|
|
1775
|
+
} else if (p.type === "piercer") {
|
|
1776
|
+
const g = E.getInstance().getConfig().piercer;
|
|
1777
|
+
if (g.terminalAoERadius > 0) {
|
|
1778
|
+
const m = g.terminalAoERadius;
|
|
1766
1779
|
s.push({
|
|
1767
1780
|
id: Math.random().toString(),
|
|
1768
|
-
position: { ...
|
|
1781
|
+
position: { ...p.position },
|
|
1769
1782
|
radius: 20,
|
|
1770
1783
|
maxRadius: m,
|
|
1771
1784
|
color: "#ff2a5f",
|
|
@@ -1773,30 +1786,30 @@ class it {
|
|
|
1773
1786
|
lifetime: 0,
|
|
1774
1787
|
maxLifetime: 0.6
|
|
1775
1788
|
});
|
|
1776
|
-
for (const
|
|
1777
|
-
if (!
|
|
1778
|
-
const
|
|
1779
|
-
|
|
1789
|
+
for (const y of d.getNearby(p.position, m)) {
|
|
1790
|
+
if (!y.active || y.isGrabbed || y.isDying) continue;
|
|
1791
|
+
const b = y.position.x - p.position.x, I = y.position.y - p.position.y;
|
|
1792
|
+
b * b + I * I <= m * m && L.killEnemy(y, Math.atan2(I, b), e, i, s, t);
|
|
1780
1793
|
}
|
|
1781
1794
|
}
|
|
1782
1795
|
}
|
|
1783
|
-
|
|
1796
|
+
p.active = !1, p.isThrown = !1;
|
|
1784
1797
|
continue;
|
|
1785
1798
|
}
|
|
1786
|
-
for (const
|
|
1787
|
-
if (
|
|
1788
|
-
const m =
|
|
1789
|
-
if (
|
|
1790
|
-
u.pos = { x:
|
|
1791
|
-
const
|
|
1792
|
-
if (
|
|
1793
|
-
u.kills++,
|
|
1794
|
-
for (let
|
|
1795
|
-
const
|
|
1799
|
+
for (const g of d.getNearby(p.position, p.getHitRadius() + 80)) {
|
|
1800
|
+
if (g === p || !g.active || g.isGrabbed || g.isDying || g.launchDelay > 0) continue;
|
|
1801
|
+
const m = g.position.x - p.position.x, y = g.position.y - p.position.y, b = p.getHitRadius() + g.getHitRadius();
|
|
1802
|
+
if (m * m + y * y <= b * b) {
|
|
1803
|
+
u.pos = { x: p.position.x, y: p.position.y };
|
|
1804
|
+
const I = Math.atan2(p.velocity.y, p.velocity.x);
|
|
1805
|
+
if (p.type === "heavy") {
|
|
1806
|
+
u.kills++, L.killEnemy(g, p.rotation, e, i, s, t), n.triggerHitstop(0.04), n.triggerScreenShake({ x: m, y }, 8);
|
|
1807
|
+
for (let S = 0; S < 8; S++) {
|
|
1808
|
+
const v = p.rotation + (Math.random() - 0.5), x = 200 + Math.random() * 350;
|
|
1796
1809
|
a.push({
|
|
1797
1810
|
id: Math.random().toString(),
|
|
1798
|
-
position: { ...
|
|
1799
|
-
velocity: { x: Math.cos(
|
|
1811
|
+
position: { ...g.position },
|
|
1812
|
+
velocity: { x: Math.cos(v) * x, y: Math.sin(v) * x },
|
|
1800
1813
|
color: "#00f5ff",
|
|
1801
1814
|
radius: 3 + Math.random() * 4,
|
|
1802
1815
|
alpha: 1,
|
|
@@ -1804,11 +1817,11 @@ class it {
|
|
|
1804
1817
|
maxLifetime: 0.4
|
|
1805
1818
|
});
|
|
1806
1819
|
}
|
|
1807
|
-
|
|
1808
|
-
} else if (
|
|
1809
|
-
u.kills++,
|
|
1820
|
+
_ && _();
|
|
1821
|
+
} else if (p.type === "piercer") {
|
|
1822
|
+
u.kills++, L.killEnemy(g, I, e, i, s, t), n.triggerHitstop(0.05), n.triggerScreenShake({ x: m, y }, 7), s.push({
|
|
1810
1823
|
id: Math.random().toString(),
|
|
1811
|
-
position: { ...
|
|
1824
|
+
position: { ...g.position },
|
|
1812
1825
|
radius: 10,
|
|
1813
1826
|
maxRadius: 180,
|
|
1814
1827
|
color: "#ff2a5f",
|
|
@@ -1816,12 +1829,12 @@ class it {
|
|
|
1816
1829
|
lifetime: 0,
|
|
1817
1830
|
maxLifetime: 0.45
|
|
1818
1831
|
});
|
|
1819
|
-
for (let
|
|
1820
|
-
const
|
|
1832
|
+
for (let S = 0; S < 16; S++) {
|
|
1833
|
+
const v = Math.random() * Math.PI * 2, x = 150 + Math.random() * 300;
|
|
1821
1834
|
a.push({
|
|
1822
1835
|
id: Math.random().toString(),
|
|
1823
|
-
position: { ...
|
|
1824
|
-
velocity: { x: Math.cos(
|
|
1836
|
+
position: { ...g.position },
|
|
1837
|
+
velocity: { x: Math.cos(v) * x, y: Math.sin(v) * x },
|
|
1825
1838
|
color: "#ff2a5f",
|
|
1826
1839
|
radius: 3 + Math.random() * 3,
|
|
1827
1840
|
alpha: 1,
|
|
@@ -1829,52 +1842,52 @@ class it {
|
|
|
1829
1842
|
maxLifetime: 0.4
|
|
1830
1843
|
});
|
|
1831
1844
|
}
|
|
1832
|
-
if (
|
|
1833
|
-
|
|
1834
|
-
let
|
|
1835
|
-
for (const
|
|
1836
|
-
if (
|
|
1837
|
-
const
|
|
1838
|
-
|
|
1845
|
+
if (p.remainingHomingKills > 0) {
|
|
1846
|
+
p.remainingHomingKills--;
|
|
1847
|
+
let S = null, v = 1 / 0;
|
|
1848
|
+
for (const x of t) {
|
|
1849
|
+
if (x === p || x === g || !x.active || x.isGrabbed || x.isDying) continue;
|
|
1850
|
+
const T = x.position.x - p.position.x, R = x.position.y - p.position.y, k = Math.hypot(T, R);
|
|
1851
|
+
k < v && (v = k, S = x);
|
|
1839
1852
|
}
|
|
1840
|
-
if (
|
|
1841
|
-
const
|
|
1842
|
-
|
|
1843
|
-
x: Math.cos(
|
|
1844
|
-
y: Math.sin(
|
|
1853
|
+
if (S) {
|
|
1854
|
+
const x = Math.atan2(S.position.y - p.position.y, S.position.x - p.position.x), T = Math.hypot(p.velocity.x, p.velocity.y) || 1200;
|
|
1855
|
+
p.rotation = x, p.velocity = {
|
|
1856
|
+
x: Math.cos(x) * T,
|
|
1857
|
+
y: Math.sin(x) * T
|
|
1845
1858
|
};
|
|
1846
1859
|
}
|
|
1847
1860
|
}
|
|
1848
|
-
|
|
1861
|
+
_ && _();
|
|
1849
1862
|
} else {
|
|
1850
|
-
const
|
|
1863
|
+
const S = p.type === g.type, v = S ? 360 : 250;
|
|
1851
1864
|
s.push({
|
|
1852
1865
|
id: Math.random().toString(),
|
|
1853
1866
|
position: { ...u.pos },
|
|
1854
1867
|
radius: 15,
|
|
1855
|
-
maxRadius:
|
|
1856
|
-
color:
|
|
1868
|
+
maxRadius: v,
|
|
1869
|
+
color: p.color,
|
|
1857
1870
|
alpha: 1,
|
|
1858
1871
|
lifetime: 0,
|
|
1859
1872
|
maxLifetime: 0.55
|
|
1860
1873
|
});
|
|
1861
|
-
for (let
|
|
1862
|
-
const
|
|
1874
|
+
for (let x = 0; x < 45; x++) {
|
|
1875
|
+
const T = Math.random() * Math.PI * 2, R = 200 + Math.random() * 450;
|
|
1863
1876
|
a.push({
|
|
1864
1877
|
id: Math.random().toString(),
|
|
1865
1878
|
position: { ...u.pos },
|
|
1866
|
-
velocity: { x: Math.cos(
|
|
1867
|
-
color:
|
|
1879
|
+
velocity: { x: Math.cos(T) * R, y: Math.sin(T) * R },
|
|
1880
|
+
color: p.color,
|
|
1868
1881
|
radius: 4 + Math.random() * 6,
|
|
1869
1882
|
alpha: 1,
|
|
1870
1883
|
lifetime: 0,
|
|
1871
1884
|
maxLifetime: 0.7
|
|
1872
1885
|
});
|
|
1873
1886
|
}
|
|
1874
|
-
if (
|
|
1875
|
-
|
|
1876
|
-
thrownEnemy:
|
|
1877
|
-
targetEnemy:
|
|
1887
|
+
if (p.strategy) {
|
|
1888
|
+
p.strategy.execute({
|
|
1889
|
+
thrownEnemy: p,
|
|
1890
|
+
targetEnemy: g,
|
|
1878
1891
|
allEnemies: t,
|
|
1879
1892
|
pools: e,
|
|
1880
1893
|
vortices: i,
|
|
@@ -1884,51 +1897,51 @@ class it {
|
|
|
1884
1897
|
eventBus: o,
|
|
1885
1898
|
width: c,
|
|
1886
1899
|
height: h
|
|
1887
|
-
}), u.kills += 2,
|
|
1900
|
+
}), u.kills += 2, _ && _();
|
|
1888
1901
|
break;
|
|
1889
1902
|
}
|
|
1890
|
-
if (
|
|
1891
|
-
u.kills += 2, n.triggerHitstop(0.14), n.triggerFlash(0.5), n.triggerScreenShake({ x: m, y
|
|
1903
|
+
if (S) {
|
|
1904
|
+
u.kills += 2, n.triggerHitstop(0.14), n.triggerFlash(0.5), n.triggerScreenShake({ x: m, y }, 16), l.push({
|
|
1892
1905
|
id: Math.random().toString(),
|
|
1893
1906
|
text: "COLOR SYNERGY!",
|
|
1894
1907
|
position: { ...u.pos },
|
|
1895
1908
|
velocity: { x: 0, y: -80 },
|
|
1896
|
-
color:
|
|
1909
|
+
color: p.color,
|
|
1897
1910
|
alpha: 1,
|
|
1898
1911
|
lifetime: 0,
|
|
1899
1912
|
maxLifetime: 1.2,
|
|
1900
1913
|
size: 26
|
|
1901
1914
|
});
|
|
1902
|
-
const
|
|
1903
|
-
|
|
1915
|
+
const x = E.getInstance().getConfig();
|
|
1916
|
+
p.type === "spore" ? e.push({
|
|
1904
1917
|
id: Math.random().toString(),
|
|
1905
1918
|
position: { ...u.pos },
|
|
1906
|
-
radius: Math.round(
|
|
1919
|
+
radius: Math.round(x.toxicPool.baseRadius * 2),
|
|
1907
1920
|
duration: 0,
|
|
1908
|
-
maxDuration:
|
|
1909
|
-
damage:
|
|
1910
|
-
}) :
|
|
1921
|
+
maxDuration: x.toxicPool.synergyDuration,
|
|
1922
|
+
damage: x.toxicPool.damage * 2
|
|
1923
|
+
}) : p.type === "parasite" && i.push({
|
|
1911
1924
|
id: Math.random().toString(),
|
|
1912
1925
|
position: { ...u.pos },
|
|
1913
|
-
radius: Math.round(
|
|
1926
|
+
radius: Math.round(x.gravityVortex.baseRadius * 1.8),
|
|
1914
1927
|
duration: 0,
|
|
1915
|
-
maxDuration:
|
|
1916
|
-
pullForce:
|
|
1917
|
-
}),
|
|
1928
|
+
maxDuration: x.gravityVortex.synergyDuration,
|
|
1929
|
+
pullForce: x.gravityVortex.synergyPullForce
|
|
1930
|
+
}), L.killEnemy(p, I, e, i, s, t), L.killEnemy(g, I, e, i, s, t);
|
|
1918
1931
|
} else
|
|
1919
|
-
u.kills += 2, n.triggerHitstop(0.08), n.triggerFlash(0.35), n.triggerScreenShake({ x: m, y
|
|
1920
|
-
for (const
|
|
1921
|
-
if (
|
|
1922
|
-
const
|
|
1923
|
-
Math.hypot(
|
|
1932
|
+
u.kills += 2, n.triggerHitstop(0.08), n.triggerFlash(0.35), n.triggerScreenShake({ x: m, y }, 10), L.killEnemy(p, I, e, i, s, t), L.killEnemy(g, I, e, i, s, t);
|
|
1933
|
+
for (const x of t) {
|
|
1934
|
+
if (x === p || x === g || !x.active || x.isGrabbed || x.isDying) continue;
|
|
1935
|
+
const T = x.position.x - u.pos.x, R = x.position.y - u.pos.y;
|
|
1936
|
+
Math.hypot(T, R) <= v && x.type !== "micro" && (L.killEnemy(x, I, e, i, s, t), u.kills++);
|
|
1924
1937
|
}
|
|
1925
|
-
|
|
1938
|
+
_ && _();
|
|
1926
1939
|
break;
|
|
1927
1940
|
}
|
|
1928
1941
|
}
|
|
1929
1942
|
}
|
|
1930
1943
|
}
|
|
1931
|
-
r.value = u.kills, !
|
|
1944
|
+
r.value = u.kills, !f && u.kills > 0 && (u.kills >= 2 && u.pos && l.push({
|
|
1932
1945
|
id: Math.random().toString(),
|
|
1933
1946
|
text: `MULTIKILL x${u.kills}!`,
|
|
1934
1947
|
position: { ...u.pos },
|
|
@@ -1941,33 +1954,39 @@ class it {
|
|
|
1941
1954
|
}), o.emit("onComboUpdated", { combo: r.value }), u.kills = 0, u.pos = null);
|
|
1942
1955
|
}
|
|
1943
1956
|
}
|
|
1944
|
-
class
|
|
1957
|
+
class at {
|
|
1945
1958
|
static update(t, e, i, s, a, l, n, o) {
|
|
1946
1959
|
for (let r = t.length - 1; r >= 0; r--) {
|
|
1947
1960
|
const c = t[r];
|
|
1948
1961
|
if (c) {
|
|
1949
1962
|
c.duration += l;
|
|
1950
1963
|
for (const h of e) {
|
|
1951
|
-
if (!h.active || h.isGrabbed || h.isDying || h.isThrown && h.type === "piercer") continue;
|
|
1952
|
-
const u = h.position.x - c.position.x,
|
|
1953
|
-
|
|
1964
|
+
if (!h.active || h.isGrabbed || h.isDying || h.launchDelay > 0 || h.isThrown && h.type === "piercer") continue;
|
|
1965
|
+
const u = h.position.x - c.position.x, d = h.position.y - c.position.y;
|
|
1966
|
+
u * u + d * d <= c.radius * c.radius && (L.killEnemy(h, 0, t, i, s, e), n.kills++, o && o());
|
|
1954
1967
|
}
|
|
1955
1968
|
c.duration >= c.maxDuration && t.splice(r, 1);
|
|
1956
1969
|
}
|
|
1957
1970
|
}
|
|
1958
1971
|
}
|
|
1959
1972
|
}
|
|
1960
|
-
class
|
|
1961
|
-
static update(t, e, i, s, a, l, n, o, r, c, h, u) {
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1973
|
+
class ot {
|
|
1974
|
+
static update(t, e, i, s, a, l, n, o, r, c, h, u, d) {
|
|
1975
|
+
const _ = E.getInstance().getConfig().shield.protectionArc;
|
|
1976
|
+
for (const f of t)
|
|
1977
|
+
if (!(!f.active || !f.isStationaryShield || f.isDying))
|
|
1978
|
+
for (const p of u.getNearby(f.position, f.getHitRadius() + 80)) {
|
|
1979
|
+
if (p === f || !p.active || p.isGrabbed || p.isDying || p.launchDelay > 0) continue;
|
|
1980
|
+
const g = p.position.x - f.position.x, m = p.position.y - f.position.y;
|
|
1981
|
+
let y = Math.atan2(m, g) - f.rotation;
|
|
1982
|
+
for (; y < -Math.PI; ) y += Math.PI * 2;
|
|
1983
|
+
for (; y > Math.PI; ) y -= Math.PI * 2;
|
|
1984
|
+
if (Math.abs(y) > _ / 2) continue;
|
|
1985
|
+
const b = f.getHitRadius() + p.getHitRadius();
|
|
1986
|
+
if (g * g + m * m <= b * b) {
|
|
1987
|
+
f.isStationaryShield = !1, f.strategy && f.strategy.execute({
|
|
1988
|
+
thrownEnemy: f,
|
|
1989
|
+
targetEnemy: p,
|
|
1971
1990
|
allEnemies: t,
|
|
1972
1991
|
pools: e,
|
|
1973
1992
|
vortices: i,
|
|
@@ -1977,69 +1996,71 @@ class at {
|
|
|
1977
1996
|
eventBus: o,
|
|
1978
1997
|
width: c,
|
|
1979
1998
|
height: h
|
|
1980
|
-
}), r.kills += 2, n.triggerHitstop(0.12), n.triggerScreenShake({ x: g, y:
|
|
1999
|
+
}), r.kills += 2, n.triggerHitstop(0.12), n.triggerScreenShake({ x: g, y: m }, 18), d && d();
|
|
1981
2000
|
break;
|
|
1982
2001
|
}
|
|
1983
2002
|
}
|
|
1984
2003
|
}
|
|
1985
2004
|
}
|
|
1986
|
-
class
|
|
2005
|
+
class nt {
|
|
1987
2006
|
spatialHash;
|
|
1988
2007
|
eventBus;
|
|
1989
2008
|
i18n;
|
|
1990
2009
|
throwState = { kills: 0, pos: null };
|
|
1991
2010
|
constructor(t, e) {
|
|
1992
|
-
this.spatialHash = new
|
|
1993
|
-
}
|
|
1994
|
-
update(t, e, i, s, a, l, n, o, r, c, h, u,
|
|
1995
|
-
|
|
1996
|
-
const g
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
S < x && (x = S, m = A);
|
|
2011
|
+
this.spatialHash = new z(100), this.eventBus = t, this.i18n = e;
|
|
2012
|
+
}
|
|
2013
|
+
update(t, e, i, s, a, l, n, o, r, c, h, u, d, _) {
|
|
2014
|
+
const f = E.getInstance().getConfig().piercer;
|
|
2015
|
+
for (const g of i)
|
|
2016
|
+
if (g.active && !g.isDying) {
|
|
2017
|
+
if (g.isThrown && g.type === "piercer" && f.hasHoming && g.remainingHomingKills > 0) {
|
|
2018
|
+
let m = null, y = 1 / 0;
|
|
2019
|
+
for (const b of i) {
|
|
2020
|
+
if (b === g || !b.active || b.isGrabbed || b.isDying) continue;
|
|
2021
|
+
const I = b.position.x - g.position.x, S = b.position.y - g.position.y, v = I * I + S * S;
|
|
2022
|
+
v < y && (y = v, m = b);
|
|
2005
2023
|
}
|
|
2006
2024
|
if (m) {
|
|
2007
|
-
const
|
|
2008
|
-
let
|
|
2009
|
-
for (;
|
|
2010
|
-
for (;
|
|
2011
|
-
const
|
|
2012
|
-
|
|
2013
|
-
x: Math.cos(
|
|
2014
|
-
y: Math.sin(
|
|
2025
|
+
const b = Math.atan2(m.position.y - g.position.y, m.position.x - g.position.x), I = Math.max(Math.hypot(g.velocity.x, g.velocity.y), 1e3), S = 25 * t, v = Math.atan2(g.velocity.y, g.velocity.x);
|
|
2026
|
+
let x = b - v;
|
|
2027
|
+
for (; x < -Math.PI; ) x += Math.PI * 2;
|
|
2028
|
+
for (; x > Math.PI; ) x -= Math.PI * 2;
|
|
2029
|
+
const T = v + Math.sign(x) * Math.min(Math.abs(x), S);
|
|
2030
|
+
g.rotation = T, g.velocity = {
|
|
2031
|
+
x: Math.cos(T) * I,
|
|
2032
|
+
y: Math.sin(T) * I
|
|
2015
2033
|
};
|
|
2016
2034
|
}
|
|
2017
2035
|
}
|
|
2018
|
-
if (
|
|
2019
|
-
let m = null,
|
|
2020
|
-
for (const
|
|
2021
|
-
if (
|
|
2022
|
-
const
|
|
2023
|
-
|
|
2036
|
+
if (g.isStationaryShield) {
|
|
2037
|
+
let m = null, y = 1 / 0;
|
|
2038
|
+
for (const b of i) {
|
|
2039
|
+
if (b === g || !b.active || b.isGrabbed || b.isDying || b.isStationaryShield) continue;
|
|
2040
|
+
const I = b.position.x - g.position.x, S = b.position.y - g.position.y, v = I * I + S * S;
|
|
2041
|
+
v < y && (y = v, m = b);
|
|
2024
2042
|
}
|
|
2025
2043
|
if (m) {
|
|
2026
|
-
let
|
|
2027
|
-
for (;
|
|
2028
|
-
for (;
|
|
2029
|
-
const
|
|
2030
|
-
|
|
2044
|
+
let I = Math.atan2(m.position.y - g.position.y, m.position.x - g.position.x) - g.rotation;
|
|
2045
|
+
for (; I < -Math.PI; ) I += Math.PI * 2;
|
|
2046
|
+
for (; I > Math.PI; ) I -= Math.PI * 2;
|
|
2047
|
+
const S = 5 * t;
|
|
2048
|
+
g.rotation += Math.sign(I) * Math.min(Math.abs(I), S);
|
|
2031
2049
|
}
|
|
2032
2050
|
}
|
|
2033
|
-
|
|
2034
|
-
} else
|
|
2035
|
-
for (let
|
|
2036
|
-
const m = l[
|
|
2051
|
+
g.update(t);
|
|
2052
|
+
} else g.active && g.isDying && g.update(t);
|
|
2053
|
+
for (let g = l.length - 1; g >= 0; g--) {
|
|
2054
|
+
const m = l[g];
|
|
2037
2055
|
if (!m) continue;
|
|
2038
2056
|
m.lifetime += t;
|
|
2039
|
-
const
|
|
2040
|
-
m.radius = m.maxRadius *
|
|
2057
|
+
const y = m.lifetime / m.maxLifetime;
|
|
2058
|
+
m.radius = m.maxRadius * y, m.alpha = Math.max(0, 1 - y), m.lifetime >= m.maxLifetime && l.splice(g, 1);
|
|
2041
2059
|
}
|
|
2042
|
-
|
|
2060
|
+
X.update(a, i, t), this.spatialHash.clear();
|
|
2061
|
+
for (const g of i)
|
|
2062
|
+
g.active && !g.isDying && g.launchDelay <= 0 && this.spatialHash.insert(g);
|
|
2063
|
+
j.update(
|
|
2043
2064
|
e,
|
|
2044
2065
|
i,
|
|
2045
2066
|
l,
|
|
@@ -2049,8 +2070,8 @@ class ot {
|
|
|
2049
2070
|
this.eventBus,
|
|
2050
2071
|
h,
|
|
2051
2072
|
u,
|
|
2052
|
-
|
|
2053
|
-
),
|
|
2073
|
+
d
|
|
2074
|
+
), st.update(
|
|
2054
2075
|
i,
|
|
2055
2076
|
s,
|
|
2056
2077
|
a,
|
|
@@ -2061,10 +2082,11 @@ class ot {
|
|
|
2061
2082
|
this.eventBus,
|
|
2062
2083
|
c,
|
|
2063
2084
|
u,
|
|
2064
|
-
|
|
2085
|
+
d,
|
|
2065
2086
|
this.throwState,
|
|
2087
|
+
this.spatialHash,
|
|
2066
2088
|
_
|
|
2067
|
-
),
|
|
2089
|
+
), at.update(
|
|
2068
2090
|
s,
|
|
2069
2091
|
i,
|
|
2070
2092
|
a,
|
|
@@ -2073,7 +2095,7 @@ class ot {
|
|
|
2073
2095
|
t,
|
|
2074
2096
|
this.throwState,
|
|
2075
2097
|
_
|
|
2076
|
-
),
|
|
2098
|
+
), ot.update(
|
|
2077
2099
|
i,
|
|
2078
2100
|
s,
|
|
2079
2101
|
a,
|
|
@@ -2084,16 +2106,19 @@ class ot {
|
|
|
2084
2106
|
this.eventBus,
|
|
2085
2107
|
this.throwState,
|
|
2086
2108
|
u,
|
|
2087
|
-
|
|
2109
|
+
d,
|
|
2110
|
+
this.spatialHash,
|
|
2088
2111
|
_
|
|
2089
2112
|
);
|
|
2113
|
+
const p = 32;
|
|
2114
|
+
l.length > p && l.splice(0, l.length - p);
|
|
2090
2115
|
}
|
|
2091
2116
|
}
|
|
2092
|
-
class
|
|
2117
|
+
class rt {
|
|
2093
2118
|
pool = [];
|
|
2094
2119
|
constructor(t = 500) {
|
|
2095
2120
|
for (let e = 0; e < t; e++) {
|
|
2096
|
-
const i = new
|
|
2121
|
+
const i = new w(`pool_enemy_${e}`);
|
|
2097
2122
|
this.pool.push(i);
|
|
2098
2123
|
}
|
|
2099
2124
|
}
|
|
@@ -2101,7 +2126,7 @@ class nt {
|
|
|
2101
2126
|
for (const e of this.pool)
|
|
2102
2127
|
if (!e.active)
|
|
2103
2128
|
return e.reset(), e;
|
|
2104
|
-
const t = new
|
|
2129
|
+
const t = new w(`fallback_enemy_${Date.now()}_${Math.random()}`);
|
|
2105
2130
|
return this.pool.push(t), t;
|
|
2106
2131
|
}
|
|
2107
2132
|
resetAll() {
|
|
@@ -2109,7 +2134,7 @@ class nt {
|
|
|
2109
2134
|
t.reset();
|
|
2110
2135
|
}
|
|
2111
2136
|
}
|
|
2112
|
-
class
|
|
2137
|
+
class C {
|
|
2113
2138
|
static getOffscreenPosition(t, e) {
|
|
2114
2139
|
const i = Math.floor(Math.random() * 4), s = 70;
|
|
2115
2140
|
return i === 0 ? { x: Math.random() * t, y: -s } : i === 1 ? { x: t + s, y: Math.random() * e } : i === 2 ? { x: Math.random() * t, y: e + s } : { x: -s, y: Math.random() * e };
|
|
@@ -2120,8 +2145,8 @@ class R {
|
|
|
2120
2145
|
const r = o * Math.PI * 2 / 18, c = {
|
|
2121
2146
|
x: e.x + Math.cos(r) * n,
|
|
2122
2147
|
y: e.y + Math.sin(r) * n
|
|
2123
|
-
}, h = t.get(), u = ["piercer", "spore", "cluster", "parasite"],
|
|
2124
|
-
M.configureEnemy(h,
|
|
2148
|
+
}, h = t.get(), u = ["piercer", "spore", "cluster", "parasite"], d = u[o % u.length];
|
|
2149
|
+
M.configureEnemy(h, d, c, e), h.velocity = {
|
|
2125
2150
|
x: Math.cos(r + Math.PI) * 55,
|
|
2126
2151
|
y: Math.sin(r + Math.PI) * 55
|
|
2127
2152
|
}, a.push(h);
|
|
@@ -2138,10 +2163,10 @@ class R {
|
|
|
2138
2163
|
y: (Math.random() - 0.5) * 60
|
|
2139
2164
|
}, h = { x: o.x + c.x, y: o.y + c.y }, u = t.get();
|
|
2140
2165
|
M.configureEnemy(u, "spore", h, s);
|
|
2141
|
-
const
|
|
2166
|
+
const d = s.x - h.x, _ = s.y - h.y, f = Math.atan2(_, d);
|
|
2142
2167
|
u.velocity = {
|
|
2143
|
-
x: Math.cos(
|
|
2144
|
-
y: Math.sin(
|
|
2168
|
+
x: Math.cos(f) * (50 + Math.random() * 20),
|
|
2169
|
+
y: Math.sin(f) * (50 + Math.random() * 20)
|
|
2145
2170
|
}, a.push(u);
|
|
2146
2171
|
}
|
|
2147
2172
|
return a;
|
|
@@ -2193,7 +2218,7 @@ class R {
|
|
|
2193
2218
|
return a;
|
|
2194
2219
|
}
|
|
2195
2220
|
}
|
|
2196
|
-
class
|
|
2221
|
+
class lt {
|
|
2197
2222
|
wave = 1;
|
|
2198
2223
|
pool;
|
|
2199
2224
|
spawnTimer = 0;
|
|
@@ -2201,7 +2226,7 @@ class rt {
|
|
|
2201
2226
|
patternCooldown = 0;
|
|
2202
2227
|
initialGracePeriod = 6;
|
|
2203
2228
|
constructor() {
|
|
2204
|
-
this.pool = new
|
|
2229
|
+
this.pool = new rt(500);
|
|
2205
2230
|
}
|
|
2206
2231
|
reset() {
|
|
2207
2232
|
this.wave = 1, this.spawnTimer = 0, this.waveTimer = 0, this.patternCooldown = 0;
|
|
@@ -2219,7 +2244,7 @@ class rt {
|
|
|
2219
2244
|
return this.spawnTimer >= n && l < o ? (this.spawnTimer = 0, this.spawnSingleEnemy(i, s, a)) : null;
|
|
2220
2245
|
}
|
|
2221
2246
|
spawnSingleEnemy(t, e, i) {
|
|
2222
|
-
const s =
|
|
2247
|
+
const s = C.getOffscreenPosition(t, e), a = Math.random();
|
|
2223
2248
|
let l = "piercer";
|
|
2224
2249
|
a > 0.75 ? l = "heavy" : a > 0.55 ? l = "parasite" : a > 0.35 ? l = "cluster" : a > 0.15 && (l = "spore");
|
|
2225
2250
|
const n = this.pool.get();
|
|
@@ -2227,37 +2252,37 @@ class rt {
|
|
|
2227
2252
|
}
|
|
2228
2253
|
spawnPatternFormation(t, e, i) {
|
|
2229
2254
|
const s = Math.random();
|
|
2230
|
-
return s < 0.25 ?
|
|
2255
|
+
return s < 0.25 ? C.spawnCircleOfDeath(this.pool, i, t, e) : s < 0.5 ? C.spawnDenseCluster(this.pool, t, e, i) : s < 0.75 ? C.spawnSineSnake(this.pool, t, e, i) : C.spawnMarchingWall(this.pool, t, e, i);
|
|
2231
2256
|
}
|
|
2232
2257
|
applyFlockingBehaviors(t, e, i) {
|
|
2233
2258
|
for (let a = 0; a < t.length; a++) {
|
|
2234
2259
|
const l = t[a];
|
|
2235
2260
|
if (!l.active || l.isGrabbed || l.isThrown || l.isDying) continue;
|
|
2236
2261
|
let n = 0, o = 0, r = 0;
|
|
2237
|
-
for (let
|
|
2238
|
-
if (a ===
|
|
2239
|
-
const _ = t[
|
|
2262
|
+
for (let d = 0; d < t.length; d++) {
|
|
2263
|
+
if (a === d) continue;
|
|
2264
|
+
const _ = t[d];
|
|
2240
2265
|
if (!_.active || _.isGrabbed || _.isDying) continue;
|
|
2241
|
-
const
|
|
2242
|
-
|
|
2266
|
+
const f = l.position.x - _.position.x, p = l.position.y - _.position.y, g = Math.hypot(f, p);
|
|
2267
|
+
g > 0 && g < 70 && (n += f / g, o += p / g, r++);
|
|
2243
2268
|
}
|
|
2244
2269
|
r > 0 && (n /= r, o /= r, l.velocity.x += n * 60 * e, l.velocity.y += o * 60 * e);
|
|
2245
2270
|
const c = i.x - l.position.x, h = i.y - l.position.y, u = Math.hypot(c, h);
|
|
2246
2271
|
if (u > 0) {
|
|
2247
|
-
const
|
|
2248
|
-
l.velocity.x += c / u *
|
|
2272
|
+
const d = 80 + Math.min(this.wave * 4, 40);
|
|
2273
|
+
l.velocity.x += c / u * d * e, l.velocity.y += h / u * d * e;
|
|
2249
2274
|
}
|
|
2250
2275
|
if (l.maxSpeed > 0) {
|
|
2251
|
-
const
|
|
2252
|
-
if (
|
|
2253
|
-
const _ = l.maxSpeed /
|
|
2276
|
+
const d = Math.hypot(l.velocity.x, l.velocity.y);
|
|
2277
|
+
if (d > l.maxSpeed) {
|
|
2278
|
+
const _ = l.maxSpeed / d;
|
|
2254
2279
|
l.velocity.x *= _, l.velocity.y *= _;
|
|
2255
2280
|
}
|
|
2256
2281
|
}
|
|
2257
2282
|
}
|
|
2258
2283
|
}
|
|
2259
2284
|
}
|
|
2260
|
-
class
|
|
2285
|
+
class ct {
|
|
2261
2286
|
id;
|
|
2262
2287
|
position;
|
|
2263
2288
|
velocity;
|
|
@@ -2297,7 +2322,7 @@ class lt {
|
|
|
2297
2322
|
}
|
|
2298
2323
|
}
|
|
2299
2324
|
}
|
|
2300
|
-
const
|
|
2325
|
+
const P = {
|
|
2301
2326
|
bioluminescent: {
|
|
2302
2327
|
bgInner: "#081220",
|
|
2303
2328
|
bgMid: "#050b16",
|
|
@@ -2364,22 +2389,22 @@ const C = {
|
|
|
2364
2389
|
vortexCore: "#274760",
|
|
2365
2390
|
vortexMid: "#577c9e"
|
|
2366
2391
|
}
|
|
2367
|
-
},
|
|
2368
|
-
class
|
|
2392
|
+
}, D = "axon_surge_theme";
|
|
2393
|
+
class ht {
|
|
2369
2394
|
currentTheme = "dark";
|
|
2370
2395
|
isExplicit = !1;
|
|
2371
2396
|
targetElement;
|
|
2372
2397
|
constructor(t, e) {
|
|
2373
2398
|
e !== void 0 && (this.targetElement = e);
|
|
2374
2399
|
try {
|
|
2375
|
-
const i = localStorage.getItem(
|
|
2376
|
-
if (i &&
|
|
2400
|
+
const i = localStorage.getItem(D);
|
|
2401
|
+
if (i && P[i]) {
|
|
2377
2402
|
this.currentTheme = i, this.isExplicit = !0, this.applyThemeToDOM();
|
|
2378
2403
|
return;
|
|
2379
2404
|
}
|
|
2380
2405
|
} catch {
|
|
2381
2406
|
}
|
|
2382
|
-
if (t &&
|
|
2407
|
+
if (t && P[t]) {
|
|
2383
2408
|
this.currentTheme = t, this.isExplicit = !0, this.applyThemeToDOM();
|
|
2384
2409
|
return;
|
|
2385
2410
|
}
|
|
@@ -2389,10 +2414,10 @@ class ct {
|
|
|
2389
2414
|
this.targetElement = t, this.isExplicit ? this.applyThemeToDOM() : this.currentTheme = this.detectParentOrSystemTheme();
|
|
2390
2415
|
}
|
|
2391
2416
|
setTheme(t) {
|
|
2392
|
-
if (
|
|
2417
|
+
if (P[t]) {
|
|
2393
2418
|
this.currentTheme = t, this.isExplicit = !0, this.applyThemeToDOM();
|
|
2394
2419
|
try {
|
|
2395
|
-
localStorage.setItem(
|
|
2420
|
+
localStorage.setItem(D, t);
|
|
2396
2421
|
} catch {
|
|
2397
2422
|
}
|
|
2398
2423
|
}
|
|
@@ -2400,7 +2425,7 @@ class ct {
|
|
|
2400
2425
|
clearExplicitTheme() {
|
|
2401
2426
|
this.isExplicit = !1;
|
|
2402
2427
|
try {
|
|
2403
|
-
localStorage.removeItem(
|
|
2428
|
+
localStorage.removeItem(D);
|
|
2404
2429
|
} catch {
|
|
2405
2430
|
}
|
|
2406
2431
|
this.removeThemeClasses(), this.currentTheme = this.detectParentOrSystemTheme();
|
|
@@ -2409,7 +2434,7 @@ class ct {
|
|
|
2409
2434
|
return this.isExplicit || (this.currentTheme = this.detectParentOrSystemTheme()), this.currentTheme;
|
|
2410
2435
|
}
|
|
2411
2436
|
getPalette() {
|
|
2412
|
-
return
|
|
2437
|
+
return P[this.getTheme()] || P.dark;
|
|
2413
2438
|
}
|
|
2414
2439
|
detectParentOrSystemTheme() {
|
|
2415
2440
|
try {
|
|
@@ -2447,7 +2472,7 @@ class ct {
|
|
|
2447
2472
|
this.targetElement.classList.add(t);
|
|
2448
2473
|
}
|
|
2449
2474
|
}
|
|
2450
|
-
class
|
|
2475
|
+
class ut {
|
|
2451
2476
|
maxDistance = 800;
|
|
2452
2477
|
maxThickness = 18;
|
|
2453
2478
|
minThickness = 5;
|
|
@@ -2460,50 +2485,50 @@ class ht {
|
|
|
2460
2485
|
if (n >= 0 && n <= i && o >= 0 && o <= s) continue;
|
|
2461
2486
|
const r = Math.min(i, Math.max(0, n)), c = Math.min(s, Math.max(0, o)), h = Math.hypot(n - r, o - c);
|
|
2462
2487
|
if (h <= 0 || h > this.maxDistance) continue;
|
|
2463
|
-
const u = Math.min(1, Math.max(0, h / this.maxDistance)),
|
|
2464
|
-
if (t.save(), t.globalAlpha =
|
|
2465
|
-
const
|
|
2466
|
-
t.moveTo(r,
|
|
2488
|
+
const u = Math.min(1, Math.max(0, h / this.maxDistance)), d = this.minThickness + (this.maxThickness - this.minThickness) * (1 - u), _ = this.minLength + (this.maxLength - this.minLength) * (1 - u), f = 0.55 + (1 - u) * 0.35;
|
|
2489
|
+
if (t.save(), t.globalAlpha = f, t.shadowColor = l.color, t.shadowBlur = 14, t.strokeStyle = l.color, t.lineWidth = d, t.lineCap = "round", t.beginPath(), r === 0 || r === i) {
|
|
2490
|
+
const p = Math.max(0, c - _ / 2), g = Math.min(s, c + _ / 2);
|
|
2491
|
+
t.moveTo(r, p), t.lineTo(r, g);
|
|
2467
2492
|
} else {
|
|
2468
|
-
const
|
|
2469
|
-
t.moveTo(
|
|
2493
|
+
const p = Math.max(0, r - _ / 2), g = Math.min(i, r + _ / 2);
|
|
2494
|
+
t.moveTo(p, c), t.lineTo(g, c);
|
|
2470
2495
|
}
|
|
2471
|
-
t.stroke(), t.strokeStyle = a.effectHighlight, t.lineWidth = Math.max(1.8,
|
|
2496
|
+
t.stroke(), t.strokeStyle = a.effectHighlight, t.lineWidth = Math.max(1.8, d * 0.28), t.globalAlpha = f * 0.9, t.stroke(), t.restore();
|
|
2472
2497
|
}
|
|
2473
2498
|
}
|
|
2474
2499
|
}
|
|
2475
|
-
class
|
|
2500
|
+
class pt {
|
|
2476
2501
|
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),
|
|
2478
|
-
n ? (
|
|
2479
|
-
const
|
|
2502
|
+
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), d = e / 2, _ = i / 2, f = Math.max(e, i) * 0.82, p = t.createRadialGradient(d, _, 20, d, _, f);
|
|
2503
|
+
n ? (p.addColorStop(0, `hsl(${c}, 42%, 91%)`), p.addColorStop(0.42, `hsl(${h}, 42%, 86%)`), p.addColorStop(0.78, `hsl(${u}, 38%, 81%)`), p.addColorStop(1, l.bgOuter)) : (p.addColorStop(0, `hsl(${c}, 42%, 11%)`), p.addColorStop(0.42, `hsl(${h}, 48%, 8%)`), p.addColorStop(0.78, `hsl(${u}, 42%, 5%)`), p.addColorStop(1, `hsl(${u}, 48%, 2.5%)`)), t.fillStyle = p, t.fillRect(0, 0, e, i);
|
|
2504
|
+
const g = Math.min(e, i) * 0.055;
|
|
2480
2505
|
this.drawNebula(
|
|
2481
2506
|
t,
|
|
2482
|
-
e * 0.22 + Math.sin(s * 0.18) *
|
|
2483
|
-
i * 0.28 + Math.cos(s * 0.15) *
|
|
2507
|
+
e * 0.22 + Math.sin(s * 0.18) * g,
|
|
2508
|
+
i * 0.28 + Math.cos(s * 0.15) * g,
|
|
2484
2509
|
Math.max(e, i) * 0.42,
|
|
2485
2510
|
c,
|
|
2486
2511
|
n ? 0.27 : 0.23,
|
|
2487
2512
|
n
|
|
2488
2513
|
), this.drawNebula(
|
|
2489
2514
|
t,
|
|
2490
|
-
e * 0.8 + Math.cos(s * 0.14) *
|
|
2491
|
-
i * 0.7 + Math.sin(s * 0.17) *
|
|
2515
|
+
e * 0.8 + Math.cos(s * 0.14) * g,
|
|
2516
|
+
i * 0.7 + Math.sin(s * 0.17) * g,
|
|
2492
2517
|
Math.max(e, i) * 0.48,
|
|
2493
2518
|
h,
|
|
2494
2519
|
n ? 0.23 : 0.2,
|
|
2495
2520
|
n
|
|
2496
2521
|
), this.drawNebula(
|
|
2497
2522
|
t,
|
|
2498
|
-
e * 0.86 + Math.sin(s * 0.11) *
|
|
2499
|
-
i * 0.16 + Math.cos(s * 0.13) *
|
|
2523
|
+
e * 0.86 + Math.sin(s * 0.11) * g * 0.7,
|
|
2524
|
+
i * 0.16 + Math.cos(s * 0.13) * g * 0.7,
|
|
2500
2525
|
Math.max(e, i) * 0.3,
|
|
2501
2526
|
u,
|
|
2502
2527
|
n ? 0.17 : 0.14,
|
|
2503
2528
|
n
|
|
2504
2529
|
), this.drawSoftFlows(t, e, i, s, c, r, n), this.drawParticleField(t, e, i, s, c, h, o, n);
|
|
2505
|
-
const
|
|
2506
|
-
|
|
2530
|
+
const m = t.createRadialGradient(d, _, Math.min(e, i) * 0.28, d, _, f);
|
|
2531
|
+
m.addColorStop(0, "rgba(0, 0, 0, 0)"), m.addColorStop(1, n ? "rgba(40, 60, 90, 0.09)" : "rgba(0, 0, 0, 0.2)"), t.fillStyle = m, t.fillRect(0, 0, e, i);
|
|
2507
2532
|
}
|
|
2508
2533
|
drawNebula(t, e, i, s, a, l, n) {
|
|
2509
2534
|
const o = t.createRadialGradient(e, i, 0, e, i, s), r = n ? 52 : 60;
|
|
@@ -2521,9 +2546,9 @@ class ut {
|
|
|
2521
2546
|
}
|
|
2522
2547
|
drawParticleField(t, e, i, s, a, l, n, o) {
|
|
2523
2548
|
const r = 44 + Math.min(24, n * 2), c = e / 2, h = i / 2, u = Math.min(e, i) * 0.17;
|
|
2524
|
-
for (let
|
|
2525
|
-
const _ =
|
|
2526
|
-
t.fillStyle = `hsla(${
|
|
2549
|
+
for (let d = 0; d < r; d++) {
|
|
2550
|
+
const _ = d + n * 17, f = this.unitNoise(_ * 1.7) * e, p = this.unitNoise(_ * 2.9 + 13) * i, g = Math.hypot(f - c, p - h), m = Math.min(1, Math.max(0, (g - u) / (Math.min(e, i) * 0.28))), y = 0.7 + Math.sin(s * (0.6 + d % 4 * 0.08) + _) * 0.3, b = (o ? 0.34 : 0.3) * m * y, I = 0.65 + d % 3 * 0.45;
|
|
2551
|
+
t.fillStyle = `hsla(${d % 3 === 0 ? l : a}, ${o ? 82 : 78}%, ${o ? 40 : 70}%, ${b})`, t.beginPath(), t.arc(f, p, I, 0, Math.PI * 2), t.fill();
|
|
2527
2552
|
}
|
|
2528
2553
|
}
|
|
2529
2554
|
unitNoise(t) {
|
|
@@ -2533,7 +2558,7 @@ class ut {
|
|
|
2533
2558
|
return (t % 360 + 360) % 360;
|
|
2534
2559
|
}
|
|
2535
2560
|
}
|
|
2536
|
-
class
|
|
2561
|
+
class dt {
|
|
2537
2562
|
render(t, e, i) {
|
|
2538
2563
|
if (!e.isActive) return;
|
|
2539
2564
|
const s = e.getLauncher(), a = e.getTarget();
|
|
@@ -2551,14 +2576,14 @@ class pt {
|
|
|
2551
2576
|
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([]);
|
|
2552
2577
|
const h = a.position.x - Math.cos(c) * (a.radius + 10), u = a.position.y - Math.sin(c) * (a.radius + 10);
|
|
2553
2578
|
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();
|
|
2554
|
-
const
|
|
2555
|
-
t.strokeStyle = "rgba(255, 0, 221, 0.9)", t.lineWidth = 3.5, t.beginPath(), t.arc(a.position.x, a.position.y,
|
|
2579
|
+
const d = a.radius * (1.8 + Math.cos(i * 10) * 0.3);
|
|
2580
|
+
t.strokeStyle = "rgba(255, 0, 221, 0.9)", t.lineWidth = 3.5, t.beginPath(), t.arc(a.position.x, a.position.y, d, 0, Math.PI * 2), t.stroke();
|
|
2556
2581
|
}
|
|
2557
2582
|
}
|
|
2558
2583
|
t.restore();
|
|
2559
2584
|
}
|
|
2560
2585
|
}
|
|
2561
|
-
class
|
|
2586
|
+
class gt {
|
|
2562
2587
|
canvas;
|
|
2563
2588
|
ctx;
|
|
2564
2589
|
themeManager;
|
|
@@ -2566,20 +2591,20 @@ class dt {
|
|
|
2566
2591
|
bgRenderer;
|
|
2567
2592
|
tutorialArrowRenderer;
|
|
2568
2593
|
constructor(t, e) {
|
|
2569
|
-
this.canvas = t, this.ctx = t.getContext("2d"), this.themeManager = e, this.indicatorRenderer = new
|
|
2594
|
+
this.canvas = t, this.ctx = t.getContext("2d"), this.themeManager = e, this.indicatorRenderer = new ut(), this.bgRenderer = new pt(), this.tutorialArrowRenderer = new dt();
|
|
2570
2595
|
}
|
|
2571
|
-
render(t, e, i, s, a, l, n, o, r, c, h, u = 1,
|
|
2596
|
+
render(t, e, i, s, a, l, n, o, r, c, h, u = 1, d) {
|
|
2572
2597
|
if (!this.ctx) return;
|
|
2573
|
-
const _ = this.themeManager.getPalette(), { width:
|
|
2574
|
-
this.ctx.save(), this.ctx.translate(
|
|
2598
|
+
const _ = this.themeManager.getPalette(), { width: f, height: p } = this.canvas, g = r.getShakeOffset();
|
|
2599
|
+
this.ctx.save(), this.ctx.translate(g.x, g.y), this.bgRenderer.render(
|
|
2575
2600
|
this.ctx,
|
|
2576
|
-
|
|
2577
|
-
|
|
2601
|
+
f,
|
|
2602
|
+
p,
|
|
2578
2603
|
t.pulsePhase,
|
|
2579
2604
|
u,
|
|
2580
2605
|
_,
|
|
2581
2606
|
this.themeManager.getTheme() === "light"
|
|
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,
|
|
2607
|
+
), 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, f, p, _), this.drawOrganicEnemies(e, t.pulsePhase, _), d && this.tutorialArrowRenderer.render(this.ctx, d, 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, f, p)), this.ctx.restore();
|
|
2583
2608
|
}
|
|
2584
2609
|
drawExperienceOrbs(t, e, i, s) {
|
|
2585
2610
|
if (this.ctx)
|
|
@@ -2600,18 +2625,18 @@ class dt {
|
|
|
2600
2625
|
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();
|
|
2601
2626
|
const r = 70;
|
|
2602
2627
|
for (let c = 0; c <= r; c++) {
|
|
2603
|
-
const h = c * Math.PI * 2 / r, u = Math.sin(h * 5 + e * 3) * 14,
|
|
2604
|
-
c === 0 ? this.ctx.moveTo(
|
|
2628
|
+
const h = c * Math.PI * 2 / r, u = Math.sin(h * 5 + e * 3) * 14, d = Math.cos(h * 3 - e * 2) * 9, _ = i.radius + u + d, f = l + Math.cos(h) * _, p = n + Math.sin(h) * _;
|
|
2629
|
+
c === 0 ? this.ctx.moveTo(f, p) : this.ctx.lineTo(f, p);
|
|
2605
2630
|
}
|
|
2606
2631
|
this.ctx.closePath(), this.ctx.fill(), this.ctx.strokeStyle = `rgba(57, 255, 20, ${a * 0.8})`, this.ctx.lineWidth = 2.5, this.ctx.beginPath();
|
|
2607
2632
|
for (let c = 0; c <= r; c++) {
|
|
2608
|
-
const h = c * Math.PI * 2 / r, u = Math.sin(h * 6 + e * 4) * 8,
|
|
2609
|
-
c === 0 ? this.ctx.moveTo(_,
|
|
2633
|
+
const h = c * Math.PI * 2 / r, u = Math.sin(h * 6 + e * 4) * 8, d = i.radius * 0.75 + u, _ = l + Math.cos(h) * d, f = n + Math.sin(h) * d;
|
|
2634
|
+
c === 0 ? this.ctx.moveTo(_, f) : this.ctx.lineTo(_, f);
|
|
2610
2635
|
}
|
|
2611
2636
|
this.ctx.closePath(), this.ctx.stroke();
|
|
2612
2637
|
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),
|
|
2614
|
-
this.ctx.fillStyle = `rgba(255, 255, 255, ${a * 0.8})`, this.ctx.beginPath(), this.ctx.arc(
|
|
2638
|
+
const h = c * Math.PI * 0.33 + e * 1.5, u = i.radius * 0.5 * (0.3 + Math.sin(e * 2 + c) * 0.3), d = l + Math.cos(h) * u, _ = n + Math.sin(h) * u, f = 3 + Math.sin(e * 3 + c) * 2;
|
|
2639
|
+
this.ctx.fillStyle = `rgba(255, 255, 255, ${a * 0.8})`, this.ctx.beginPath(), this.ctx.arc(d, _, Math.max(1, f), 0, Math.PI * 2), this.ctx.fill();
|
|
2615
2640
|
}
|
|
2616
2641
|
this.ctx.restore();
|
|
2617
2642
|
}
|
|
@@ -2619,8 +2644,9 @@ class dt {
|
|
|
2619
2644
|
drawShockwaves(t) {
|
|
2620
2645
|
if (!this.ctx) return;
|
|
2621
2646
|
const e = this.themeManager.getTheme() === "light";
|
|
2647
|
+
this.ctx.save();
|
|
2622
2648
|
for (const i of t) {
|
|
2623
|
-
this.ctx.
|
|
2649
|
+
this.ctx.globalAlpha = i.alpha;
|
|
2624
2650
|
const s = this.ctx.createRadialGradient(
|
|
2625
2651
|
i.position.x,
|
|
2626
2652
|
i.position.y,
|
|
@@ -2629,8 +2655,9 @@ class dt {
|
|
|
2629
2655
|
i.position.y,
|
|
2630
2656
|
i.radius
|
|
2631
2657
|
);
|
|
2632
|
-
s.addColorStop(0, e ? "rgba(255, 255, 255, 0.72)" : "rgba(255, 255, 255, 0.4)"), s.addColorStop(0.7, i.color), s.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = s, this.ctx.beginPath(), this.ctx.arc(i.position.x, i.position.y, i.radius, 0, Math.PI * 2), this.ctx.fill(), this.ctx.strokeStyle = e ? i.color : "#ffffff", this.ctx.lineWidth = 4, this.ctx.shadowColor = i.color, this.ctx.shadowBlur = 24, this.ctx.beginPath(), this.ctx.arc(i.position.x, i.position.y, i.radius, 0, Math.PI * 2), this.ctx.stroke()
|
|
2658
|
+
s.addColorStop(0, e ? "rgba(255, 255, 255, 0.72)" : "rgba(255, 255, 255, 0.4)"), s.addColorStop(0.7, i.color), s.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = s, this.ctx.beginPath(), this.ctx.arc(i.position.x, i.position.y, i.radius, 0, Math.PI * 2), this.ctx.fill(), this.ctx.strokeStyle = e ? i.color : "#ffffff", this.ctx.lineWidth = 4, this.ctx.shadowColor = i.color, this.ctx.shadowBlur = 24, this.ctx.beginPath(), this.ctx.arc(i.position.x, i.position.y, i.radius, 0, Math.PI * 2), this.ctx.stroke();
|
|
2633
2659
|
}
|
|
2660
|
+
this.ctx.restore();
|
|
2634
2661
|
}
|
|
2635
2662
|
drawGravityVortices(t, e) {
|
|
2636
2663
|
if (!this.ctx) return;
|
|
@@ -2680,8 +2707,8 @@ class dt {
|
|
|
2680
2707
|
this.ctx.strokeStyle = a, this.ctx.lineWidth = 2.2, this.ctx.shadowColor = a, this.ctx.shadowBlur = 12, this.ctx.beginPath();
|
|
2681
2708
|
const h = 60;
|
|
2682
2709
|
for (let u = 0; u <= h; u++) {
|
|
2683
|
-
const
|
|
2684
|
-
u === 0 ? this.ctx.moveTo(
|
|
2710
|
+
const d = u * Math.PI * 2 / h, _ = c + Math.sin(d * 4 + t.pulsePhase * 2 + r) * 3, f = i + Math.cos(d) * _, p = s + Math.sin(d) * _;
|
|
2711
|
+
u === 0 ? this.ctx.moveTo(f, p) : this.ctx.lineTo(f, p);
|
|
2685
2712
|
}
|
|
2686
2713
|
this.ctx.closePath(), this.ctx.stroke();
|
|
2687
2714
|
}
|
|
@@ -2690,8 +2717,8 @@ class dt {
|
|
|
2690
2717
|
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();
|
|
2691
2718
|
const h = 60;
|
|
2692
2719
|
for (let u = 0; u <= h; u++) {
|
|
2693
|
-
const
|
|
2694
|
-
u === 0 ? this.ctx.moveTo(
|
|
2720
|
+
const d = u * Math.PI * 2 / h, _ = c + Math.sin(d * 4 + t.pulsePhase * 2 + r) * 3, f = i + Math.cos(d) * _, p = s + Math.sin(d) * _;
|
|
2721
|
+
u === 0 ? this.ctx.moveTo(f, p) : this.ctx.lineTo(f, p);
|
|
2695
2722
|
}
|
|
2696
2723
|
this.ctx.closePath(), this.ctx.stroke(), this.ctx.restore();
|
|
2697
2724
|
}
|
|
@@ -2699,8 +2726,8 @@ class dt {
|
|
|
2699
2726
|
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();
|
|
2700
2727
|
const n = 80;
|
|
2701
2728
|
for (let r = 0; r <= n; r++) {
|
|
2702
|
-
const c = r * Math.PI * 2 / n, h = t.getMembraneRadius(c), u = Math.cos(c) * h,
|
|
2703
|
-
r === 0 ? this.ctx.moveTo(u,
|
|
2729
|
+
const c = r * Math.PI * 2 / n, h = t.getMembraneRadius(c), u = Math.cos(c) * h, d = Math.sin(c) * h;
|
|
2730
|
+
r === 0 ? this.ctx.moveTo(u, d) : this.ctx.lineTo(u, d);
|
|
2704
2731
|
}
|
|
2705
2732
|
this.ctx.closePath(), this.ctx.fill(), this.ctx.stroke();
|
|
2706
2733
|
const o = t.powerUpCount;
|
|
@@ -2709,8 +2736,8 @@ class dt {
|
|
|
2709
2736
|
for (let r = 0; r < o; r++) {
|
|
2710
2737
|
const c = r * Math.PI * 2 / o + t.pulsePhase * 0.4, h = t.radius * (0.45 + Math.sin(t.pulsePhase * 2 + r) * 0.15);
|
|
2711
2738
|
this.ctx.beginPath(), this.ctx.moveTo(0, 0);
|
|
2712
|
-
const u = Math.cos(c + Math.sin(t.pulsePhase + r) * 0.4) * (h * 0.6),
|
|
2713
|
-
this.ctx.quadraticCurveTo(u,
|
|
2739
|
+
const u = Math.cos(c + Math.sin(t.pulsePhase + r) * 0.4) * (h * 0.6), d = Math.sin(c + Math.cos(t.pulsePhase + r) * 0.4) * (h * 0.6), _ = Math.cos(c) * h, f = Math.sin(c) * h;
|
|
2740
|
+
this.ctx.quadraticCurveTo(u, d, _, f), this.ctx.stroke(), this.ctx.fillStyle = a, this.ctx.beginPath(), this.ctx.arc(_, f, 2.5, 0, Math.PI * 2), this.ctx.fill();
|
|
2714
2741
|
}
|
|
2715
2742
|
}
|
|
2716
2743
|
this.ctx.fillStyle = e.effectHighlight, this.ctx.beginPath(), this.ctx.arc(0, 0, t.radius * 0.3, 0, Math.PI * 2), this.ctx.fill(), this.ctx.restore(), this.ctx.restore();
|
|
@@ -2758,14 +2785,14 @@ class dt {
|
|
|
2758
2785
|
const c = s.radius * (1 - o * 0.7);
|
|
2759
2786
|
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();
|
|
2760
2787
|
for (let h = 0; h < 4; h++) {
|
|
2761
|
-
const u = h * Math.PI * 0.5 + o * 4,
|
|
2762
|
-
this.ctx.fillStyle = i.effectHighlight, this.ctx.beginPath(), this.ctx.arc(Math.cos(u) *
|
|
2788
|
+
const u = h * Math.PI * 0.5 + o * 4, d = c * 0.8 * o;
|
|
2789
|
+
this.ctx.fillStyle = i.effectHighlight, this.ctx.beginPath(), this.ctx.arc(Math.cos(u) * d, Math.sin(u) * d, 3, 0, Math.PI * 2), this.ctx.fill();
|
|
2763
2790
|
}
|
|
2764
2791
|
this.ctx.restore();
|
|
2765
2792
|
continue;
|
|
2766
2793
|
} else if (s.deathType === "sliced") {
|
|
2767
|
-
const c = o * 24, h = s.sliceAngle + Math.PI / 2, u = Math.cos(h) * c,
|
|
2768
|
-
this.ctx.shadowColor = "#ff2a5f", this.ctx.shadowBlur = 22, this.ctx.fillStyle = a, this.ctx.save(), this.ctx.translate(u,
|
|
2794
|
+
const c = o * 24, h = s.sliceAngle + Math.PI / 2, u = Math.cos(h) * c, d = Math.sin(h) * c;
|
|
2795
|
+
this.ctx.shadowColor = "#ff2a5f", this.ctx.shadowBlur = 22, this.ctx.fillStyle = a, this.ctx.save(), this.ctx.translate(u, d), 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, -d), 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();
|
|
2769
2796
|
continue;
|
|
2770
2797
|
}
|
|
2771
2798
|
}
|
|
@@ -2773,16 +2800,16 @@ class dt {
|
|
|
2773
2800
|
this.ctx.rotate(s.rotation), this.ctx.beginPath();
|
|
2774
2801
|
const o = 12;
|
|
2775
2802
|
for (let r = 0; r <= o; r++) {
|
|
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,
|
|
2777
|
-
r === 0 ? this.ctx.moveTo(
|
|
2803
|
+
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, d = Math.cos(c) * h, _ = Math.sin(c) * u;
|
|
2804
|
+
r === 0 ? this.ctx.moveTo(d, _) : this.ctx.lineTo(d, _);
|
|
2778
2805
|
}
|
|
2779
2806
|
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();
|
|
2780
2807
|
} else if (s.type === "spore") {
|
|
2781
2808
|
this.ctx.beginPath();
|
|
2782
2809
|
const o = 8;
|
|
2783
2810
|
for (let r = 0; r < o; r++) {
|
|
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,
|
|
2785
|
-
r === 0 ? this.ctx.moveTo(u,
|
|
2811
|
+
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, d = Math.sin(c) * h;
|
|
2812
|
+
r === 0 ? this.ctx.moveTo(u, d) : this.ctx.lineTo(u, d);
|
|
2786
2813
|
}
|
|
2787
2814
|
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();
|
|
2788
2815
|
} else if (s.type === "cluster") {
|
|
@@ -2793,19 +2820,19 @@ class dt {
|
|
|
2793
2820
|
this.ctx.beginPath();
|
|
2794
2821
|
const o = 14;
|
|
2795
2822
|
for (let r = 0; r <= o; r++) {
|
|
2796
|
-
const c = r * Math.PI * 2 / o, h = s.radius + Math.sin(c * 5 - e * 5) * 3, u = Math.cos(c) * h,
|
|
2797
|
-
r === 0 ? this.ctx.moveTo(u,
|
|
2823
|
+
const c = r * Math.PI * 2 / o, h = s.radius + Math.sin(c * 5 - e * 5) * 3, u = Math.cos(c) * h, d = Math.sin(c) * h;
|
|
2824
|
+
r === 0 ? this.ctx.moveTo(u, d) : this.ctx.lineTo(u, d);
|
|
2798
2825
|
}
|
|
2799
2826
|
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();
|
|
2800
2827
|
} else if (s.type === "heavy") {
|
|
2801
2828
|
this.ctx.rotate(s.rotation);
|
|
2802
|
-
const o =
|
|
2829
|
+
const o = E.getInstance().getConfig().shield.protectionArc, r = s.radius * 1.35, c = s.radius * 0.75;
|
|
2803
2830
|
this.ctx.beginPath(), this.ctx.arc(0, 0, r, -o / 2, o / 2, !1);
|
|
2804
2831
|
const h = Math.cos(o / 2) * c, u = Math.sin(o / 2) * c;
|
|
2805
2832
|
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();
|
|
2806
|
-
for (let
|
|
2807
|
-
const _ =
|
|
2808
|
-
this.ctx.fillStyle = i.effectHighlight, this.ctx.beginPath(), this.ctx.arc(
|
|
2833
|
+
for (let d = -2; d <= 2; d++) {
|
|
2834
|
+
const _ = d * o / 6, f = Math.cos(_) * (c + 6), p = Math.sin(_) * (c + 6);
|
|
2835
|
+
this.ctx.fillStyle = i.effectHighlight, this.ctx.beginPath(), this.ctx.arc(f, p, 3, 0, Math.PI * 2), this.ctx.fill();
|
|
2809
2836
|
}
|
|
2810
2837
|
} else
|
|
2811
2838
|
this.ctx.beginPath(), this.ctx.arc(0, 0, s.radius, 0, Math.PI * 2), this.ctx.fill();
|
|
@@ -2813,9 +2840,12 @@ class dt {
|
|
|
2813
2840
|
}
|
|
2814
2841
|
}
|
|
2815
2842
|
drawParticles(t) {
|
|
2816
|
-
if (this.ctx)
|
|
2843
|
+
if (this.ctx) {
|
|
2844
|
+
this.ctx.save();
|
|
2817
2845
|
for (const e of t)
|
|
2818
|
-
this.ctx.
|
|
2846
|
+
this.ctx.globalAlpha = e.alpha, this.ctx.fillStyle = e.color, this.ctx.beginPath(), this.ctx.arc(e.position.x, e.position.y, e.radius, 0, Math.PI * 2), this.ctx.fill();
|
|
2847
|
+
this.ctx.restore();
|
|
2848
|
+
}
|
|
2819
2849
|
}
|
|
2820
2850
|
drawFloatingTexts(t) {
|
|
2821
2851
|
if (this.ctx)
|
|
@@ -2827,21 +2857,21 @@ class dt {
|
|
|
2827
2857
|
const l = this.themeManager.getPalette(), n = this.themeManager.getTheme() === "light";
|
|
2828
2858
|
for (const o of t) {
|
|
2829
2859
|
if (!o.active) continue;
|
|
2830
|
-
const { x: r, y: c } = o.position, h = o.definition.color, u = o.definition.rarity,
|
|
2831
|
-
if (this.ctx.save(), this.ctx.shadowColor =
|
|
2832
|
-
const
|
|
2833
|
-
|
|
2860
|
+
const { x: r, y: c } = o.position, h = o.definition.color, u = o.definition.rarity, d = u === "legendary" ? "#ff00ff" : u === "epic" ? "#ffd700" : u === "rare" ? "#9d4edd" : "#00f5ff", _ = o.radius + Math.sin(e * 6 + o.orbitAngle) * 3;
|
|
2861
|
+
if (this.ctx.save(), this.ctx.shadowColor = d, this.ctx.shadowBlur = o.isGrabbed ? 36 : u === "legendary" ? 28 : 16, u === "legendary" || u === "epic") {
|
|
2862
|
+
const g = _ + 12, m = this.ctx.createRadialGradient(r, c, _, r, c, g);
|
|
2863
|
+
m.addColorStop(0, d), m.addColorStop(1, "rgba(0, 0, 0, 0)"), this.ctx.fillStyle = m, this.ctx.beginPath(), this.ctx.arc(r, c, g, 0, Math.PI * 2), this.ctx.fill();
|
|
2834
2864
|
}
|
|
2835
|
-
const
|
|
2836
|
-
|
|
2837
|
-
const
|
|
2838
|
-
this.ctx.textBaseline = "alphabetic", this.ctx.font = "900 16px Orbitron, sans-serif", this.ctx.fillStyle = l.effectInk, this.ctx.shadowColor =
|
|
2865
|
+
const f = this.ctx.createRadialGradient(r, c, 2, r, c, _ * 1.4);
|
|
2866
|
+
f.addColorStop(0, l.effectHighlight), f.addColorStop(0.4, h), f.addColorStop(1, n ? "rgba(23, 50, 77, 0.24)" : "rgba(0, 0, 0, 0.5)"), this.ctx.fillStyle = f, this.ctx.beginPath(), this.ctx.arc(r, c, _, 0, Math.PI * 2), this.ctx.fill(), this.ctx.strokeStyle = d, 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 ? d : 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);
|
|
2867
|
+
const p = i ? i.translate(o.definition.titleKey) : o.definition.badge;
|
|
2868
|
+
this.ctx.textBaseline = "alphabetic", this.ctx.font = "900 16px Orbitron, sans-serif", this.ctx.fillStyle = l.effectInk, this.ctx.shadowColor = d, this.ctx.shadowBlur = 14, this.ctx.fillText(p, r, c - _ - 14), this.ctx.restore();
|
|
2839
2869
|
}
|
|
2840
2870
|
if (i && s) {
|
|
2841
2871
|
const o = this.canvas.width / 2, r = this.canvas.height / 2 + 210, c = i.translate("rerollButton", { count: a });
|
|
2842
2872
|
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
|
|
2844
|
-
this.ctx.beginPath(), this.ctx.roundRect(o -
|
|
2873
|
+
const d = this.ctx.measureText(c).width + 20 * 2, _ = 38;
|
|
2874
|
+
this.ctx.beginPath(), this.ctx.roundRect(o - d / 2, r - _ / 2, d, _, 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();
|
|
2845
2875
|
}
|
|
2846
2876
|
}
|
|
2847
2877
|
colorWithAlpha(t, e) {
|
|
@@ -2851,7 +2881,7 @@ class dt {
|
|
|
2851
2881
|
return `rgba(${s}, ${a}, ${l}, ${e})`;
|
|
2852
2882
|
}
|
|
2853
2883
|
}
|
|
2854
|
-
class
|
|
2884
|
+
class _t {
|
|
2855
2885
|
container;
|
|
2856
2886
|
i18n;
|
|
2857
2887
|
waveLabelElement;
|
|
@@ -2883,7 +2913,7 @@ class gt {
|
|
|
2883
2913
|
this.container.style.display = "none";
|
|
2884
2914
|
}
|
|
2885
2915
|
}
|
|
2886
|
-
class
|
|
2916
|
+
class ft {
|
|
2887
2917
|
container;
|
|
2888
2918
|
i18n;
|
|
2889
2919
|
onStartCallback;
|
|
@@ -2954,13 +2984,13 @@ class mt {
|
|
|
2954
2984
|
ko: "한국어 (KO)",
|
|
2955
2985
|
zh: "中文 (ZH)"
|
|
2956
2986
|
};
|
|
2957
|
-
for (const
|
|
2958
|
-
const
|
|
2959
|
-
|
|
2987
|
+
for (const v of V) {
|
|
2988
|
+
const x = document.createElement("option");
|
|
2989
|
+
x.value = v, x.textContent = l[v], this.i18n.getLanguage() === v && (x.selected = !0), a.appendChild(x);
|
|
2960
2990
|
}
|
|
2961
2991
|
a.addEventListener("change", () => {
|
|
2962
|
-
const
|
|
2963
|
-
this.i18n.setLanguage(
|
|
2992
|
+
const v = a.value;
|
|
2993
|
+
this.i18n.setLanguage(v), this.onLanguageChangedCallback && this.onLanguageChangedCallback(v), this.renderContent();
|
|
2964
2994
|
});
|
|
2965
2995
|
const n = document.createElement("span");
|
|
2966
2996
|
n.className = "axon-select-arrow", n.textContent = "▼", s.appendChild(a), s.appendChild(n), e.appendChild(i), e.appendChild(s);
|
|
@@ -2975,53 +3005,53 @@ class mt {
|
|
|
2975
3005
|
{ id: "dark", label: "DARK" },
|
|
2976
3006
|
{ id: "light", label: "LIGHT" }
|
|
2977
3007
|
];
|
|
2978
|
-
for (const
|
|
2979
|
-
const
|
|
2980
|
-
|
|
2981
|
-
this.themeManager.setTheme(
|
|
2982
|
-
}), c.appendChild(
|
|
3008
|
+
for (const v of h) {
|
|
3009
|
+
const x = document.createElement("button");
|
|
3010
|
+
x.type = "button", x.className = `axon-toggle-btn ${this.themeManager.getTheme() === v.id ? "active" : ""}`, x.textContent = v.label, x.addEventListener("click", () => {
|
|
3011
|
+
this.themeManager.setTheme(v.id), this.renderContent();
|
|
3012
|
+
}), c.appendChild(x);
|
|
2983
3013
|
}
|
|
2984
3014
|
o.appendChild(r), o.appendChild(c);
|
|
2985
3015
|
const u = document.createElement("div");
|
|
2986
3016
|
u.className = "axon-setting-row";
|
|
2987
|
-
const
|
|
2988
|
-
|
|
3017
|
+
const d = document.createElement("span");
|
|
3018
|
+
d.textContent = this.i18n.translate("hapticsLabel");
|
|
2989
3019
|
const _ = document.createElement("div");
|
|
2990
3020
|
_.className = "axon-toggle-group";
|
|
2991
|
-
const
|
|
3021
|
+
const f = [
|
|
2992
3022
|
{ enabled: !0, label: this.i18n.translate("hapticsOn") },
|
|
2993
3023
|
{ enabled: !1, label: this.i18n.translate("hapticsOff") }
|
|
2994
3024
|
];
|
|
2995
|
-
for (const
|
|
2996
|
-
const
|
|
2997
|
-
|
|
2998
|
-
this.hapticsEnabled =
|
|
2999
|
-
}), _.appendChild(
|
|
3000
|
-
}
|
|
3001
|
-
u.appendChild(
|
|
3002
|
-
const
|
|
3003
|
-
|
|
3004
|
-
const
|
|
3005
|
-
|
|
3006
|
-
const
|
|
3007
|
-
|
|
3008
|
-
const
|
|
3025
|
+
for (const v of f) {
|
|
3026
|
+
const x = document.createElement("button");
|
|
3027
|
+
x.type = "button", x.className = `axon-toggle-btn ${this.hapticsEnabled === v.enabled ? "active" : ""}`, x.textContent = v.label, x.addEventListener("click", () => {
|
|
3028
|
+
this.hapticsEnabled = v.enabled, localStorage.setItem("axon_surge_haptics", String(v.enabled)), this.hapticsEnabled && this.platform.haptics.selectionChanged(), this.renderContent();
|
|
3029
|
+
}), _.appendChild(x);
|
|
3030
|
+
}
|
|
3031
|
+
u.appendChild(d), u.appendChild(_);
|
|
3032
|
+
const p = document.createElement("div");
|
|
3033
|
+
p.className = "axon-setting-row";
|
|
3034
|
+
const g = document.createElement("span");
|
|
3035
|
+
g.textContent = this.i18n.translate("tutorialSettingLabel");
|
|
3036
|
+
const m = document.createElement("div");
|
|
3037
|
+
m.className = "axon-toggle-group";
|
|
3038
|
+
const y = localStorage.getItem("axon_surge_show_tutorial") !== "false", b = [
|
|
3009
3039
|
{ enabled: !0, label: this.i18n.translate("hapticsOn") },
|
|
3010
3040
|
{ enabled: !1, label: this.i18n.translate("hapticsOff") }
|
|
3011
3041
|
];
|
|
3012
|
-
for (const
|
|
3013
|
-
const
|
|
3014
|
-
|
|
3015
|
-
localStorage.setItem("axon_surge_show_tutorial", String(
|
|
3016
|
-
}),
|
|
3042
|
+
for (const v of b) {
|
|
3043
|
+
const x = document.createElement("button");
|
|
3044
|
+
x.type = "button", x.className = `axon-toggle-btn ${y === v.enabled ? "active" : ""}`, x.textContent = v.label, x.addEventListener("click", () => {
|
|
3045
|
+
localStorage.setItem("axon_surge_show_tutorial", String(v.enabled)), this.renderContent();
|
|
3046
|
+
}), m.appendChild(x);
|
|
3017
3047
|
}
|
|
3018
|
-
|
|
3048
|
+
p.appendChild(g), p.appendChild(m);
|
|
3019
3049
|
const I = document.createElement("div");
|
|
3020
3050
|
I.className = "axon-settings-credits", I.textContent = this.i18n.translate("creditsJam");
|
|
3021
3051
|
const S = document.createElement("button");
|
|
3022
3052
|
S.type = "button", S.className = "axon-start-button", S.style.padding = "12px 36px", S.style.fontSize = "14px", S.textContent = this.i18n.translate("closeButton"), S.addEventListener("click", () => {
|
|
3023
3053
|
this.modal.close();
|
|
3024
|
-
}), this.card.appendChild(t), this.card.appendChild(e), this.card.appendChild(o), this.card.appendChild(u), this.card.appendChild(
|
|
3054
|
+
}), this.card.appendChild(t), this.card.appendChild(e), this.card.appendChild(o), this.card.appendChild(u), this.card.appendChild(p), this.card.appendChild(I), this.card.appendChild(S);
|
|
3025
3055
|
}
|
|
3026
3056
|
isHapticsEnabled() {
|
|
3027
3057
|
return this.hapticsEnabled;
|
|
@@ -3033,8 +3063,8 @@ class mt {
|
|
|
3033
3063
|
this.modal.close();
|
|
3034
3064
|
}
|
|
3035
3065
|
}
|
|
3036
|
-
const
|
|
3037
|
-
class
|
|
3066
|
+
const B = "axon_surge_show_tutorial";
|
|
3067
|
+
class xt {
|
|
3038
3068
|
isActive = !1;
|
|
3039
3069
|
showWarning = !1;
|
|
3040
3070
|
dummyLauncher = null;
|
|
@@ -3043,14 +3073,14 @@ class ft {
|
|
|
3043
3073
|
initialTargetPos = { x: 0, y: 0 };
|
|
3044
3074
|
isTutorialEnabled() {
|
|
3045
3075
|
try {
|
|
3046
|
-
return localStorage.getItem(
|
|
3076
|
+
return localStorage.getItem(B) !== "false";
|
|
3047
3077
|
} catch {
|
|
3048
3078
|
return !0;
|
|
3049
3079
|
}
|
|
3050
3080
|
}
|
|
3051
3081
|
setTutorialEnabled(t) {
|
|
3052
3082
|
try {
|
|
3053
|
-
localStorage.setItem(
|
|
3083
|
+
localStorage.setItem(B, String(t));
|
|
3054
3084
|
} catch {
|
|
3055
3085
|
}
|
|
3056
3086
|
}
|
|
@@ -3110,7 +3140,7 @@ class ft {
|
|
|
3110
3140
|
this.isActive = !1, this.showWarning = !1;
|
|
3111
3141
|
}
|
|
3112
3142
|
}
|
|
3113
|
-
class
|
|
3143
|
+
class yt {
|
|
3114
3144
|
container;
|
|
3115
3145
|
i18n;
|
|
3116
3146
|
tutorialManager;
|
|
@@ -3146,7 +3176,7 @@ class xt {
|
|
|
3146
3176
|
this.container.style.display = "none";
|
|
3147
3177
|
}
|
|
3148
3178
|
}
|
|
3149
|
-
class
|
|
3179
|
+
class Et {
|
|
3150
3180
|
fillElement;
|
|
3151
3181
|
experienceCount = 0;
|
|
3152
3182
|
currentLevel = 1;
|
|
@@ -3183,7 +3213,7 @@ class yt {
|
|
|
3183
3213
|
this.fillElement && this.fillElement.parentElement && (this.fillElement.parentElement.style.display = "none");
|
|
3184
3214
|
}
|
|
3185
3215
|
}
|
|
3186
|
-
class
|
|
3216
|
+
class K {
|
|
3187
3217
|
static powerUps = [
|
|
3188
3218
|
{
|
|
3189
3219
|
id: "spore_radius",
|
|
@@ -3323,6 +3353,46 @@ class B {
|
|
|
3323
3353
|
});
|
|
3324
3354
|
}
|
|
3325
3355
|
},
|
|
3356
|
+
{
|
|
3357
|
+
id: "shield_fan_upgrade",
|
|
3358
|
+
titleKey: "pu_shield_fan_upgrade_title",
|
|
3359
|
+
descKey: "pu_shield_fan_upgrade_desc",
|
|
3360
|
+
badge: "+0.35s / +15°",
|
|
3361
|
+
category: "power",
|
|
3362
|
+
rarity: "epic",
|
|
3363
|
+
rarityWeight: 15,
|
|
3364
|
+
color: "#00f5ff",
|
|
3365
|
+
apply: () => {
|
|
3366
|
+
const t = E.getInstance(), e = t.getConfig().shield;
|
|
3367
|
+
t.updateConfig({
|
|
3368
|
+
shield: {
|
|
3369
|
+
...e,
|
|
3370
|
+
fanBlastInterval: e.fanBlastInterval + 0.35,
|
|
3371
|
+
fanBlastAngle: e.fanBlastAngle + Math.PI / 12,
|
|
3372
|
+
hasFanBlastUpgrade: !0
|
|
3373
|
+
}
|
|
3374
|
+
});
|
|
3375
|
+
}
|
|
3376
|
+
},
|
|
3377
|
+
{
|
|
3378
|
+
id: "shield_arc",
|
|
3379
|
+
titleKey: "pu_shield_arc_title",
|
|
3380
|
+
descKey: "pu_shield_arc_desc",
|
|
3381
|
+
badge: "+30° ARC",
|
|
3382
|
+
category: "defense",
|
|
3383
|
+
rarity: "common",
|
|
3384
|
+
rarityWeight: 35,
|
|
3385
|
+
color: "#00f5ff",
|
|
3386
|
+
apply: () => {
|
|
3387
|
+
const t = E.getInstance(), e = t.getConfig().shield;
|
|
3388
|
+
t.updateConfig({
|
|
3389
|
+
shield: {
|
|
3390
|
+
...e,
|
|
3391
|
+
protectionArc: Math.min(Math.PI * 1.5, e.protectionArc + Math.PI / 6)
|
|
3392
|
+
}
|
|
3393
|
+
});
|
|
3394
|
+
}
|
|
3395
|
+
},
|
|
3326
3396
|
{
|
|
3327
3397
|
id: "cluster_extra",
|
|
3328
3398
|
titleKey: "pu_cluster_extra_title",
|
|
@@ -3528,7 +3598,7 @@ class B {
|
|
|
3528
3598
|
}
|
|
3529
3599
|
];
|
|
3530
3600
|
static getRandomOptions(t = 3) {
|
|
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 = [];
|
|
3601
|
+
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 === "shield_fan_upgrade" && (!e.shield.isFanBlast || e.shield.hasFanBlastUpgrade) || a.id === "cluster_homing" && e.cluster.hasHoming || a.id === "offscreen_radar" && e.core.hasOffscreenIndicators)), s = [];
|
|
3532
3602
|
for (let a = 0; a < t && i.length > 0; a++) {
|
|
3533
3603
|
const l = i.reduce((o, r) => o + r.rarityWeight, 0);
|
|
3534
3604
|
let n = Math.random() * l;
|
|
@@ -3546,7 +3616,7 @@ class B {
|
|
|
3546
3616
|
this.powerUps.push(t);
|
|
3547
3617
|
}
|
|
3548
3618
|
}
|
|
3549
|
-
class
|
|
3619
|
+
class At {
|
|
3550
3620
|
haptics = {
|
|
3551
3621
|
impact: async (t) => {
|
|
3552
3622
|
if ("vibrate" in navigator) {
|
|
@@ -3586,7 +3656,7 @@ class Et {
|
|
|
3586
3656
|
}
|
|
3587
3657
|
};
|
|
3588
3658
|
}
|
|
3589
|
-
class
|
|
3659
|
+
class bt {
|
|
3590
3660
|
container;
|
|
3591
3661
|
canvas;
|
|
3592
3662
|
i18n;
|
|
@@ -3624,7 +3694,7 @@ class At {
|
|
|
3624
3694
|
isRunning = !1;
|
|
3625
3695
|
isPaused = !1;
|
|
3626
3696
|
constructor(t) {
|
|
3627
|
-
this.container = t.root, this.container.classList.add("axon-game-root"), this.i18n = new
|
|
3697
|
+
this.container = t.root, this.container.classList.add("axon-game-root"), this.i18n = new $(t.language), this.themeManager = new ht(t.theme, this.container), this.platform = t.platform || new At(), 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 F(), this.core = new Y(this.canvas.width / 2, this.canvas.height / 2), this.inputManager = new Z(this.canvas), this.physicsEngine = new nt(this.eventBus, this.i18n), this.waveDirector = new lt(), this.renderer = new gt(this.canvas, this.themeManager), this.juice = new J(), this.settingsModal = new mt(
|
|
3628
3698
|
this.container,
|
|
3629
3699
|
this.i18n,
|
|
3630
3700
|
this.themeManager,
|
|
@@ -3633,11 +3703,11 @@ class At {
|
|
|
3633
3703
|
() => {
|
|
3634
3704
|
this.isPaused = !1;
|
|
3635
3705
|
}
|
|
3636
|
-
), this.interactiveTutorial = new
|
|
3706
|
+
), this.interactiveTutorial = new xt(), this.tutorialOverlay = new yt(this.container, this.i18n, this.interactiveTutorial), this.hud = new _t(this.container, this.i18n, () => {
|
|
3637
3707
|
this.isPaused = !0, this.settingsModal.show();
|
|
3638
|
-
}), this.hud.show(), this.progressBar = new
|
|
3708
|
+
}), this.hud.show(), this.progressBar = new Et(this.hud.progressSlot, (e) => {
|
|
3639
3709
|
this.waveDirector.wave = e, this.triggerLevelUp(e);
|
|
3640
|
-
}), this.startMenu = new
|
|
3710
|
+
}), this.startMenu = new ft(this.container, this.i18n, () => this.startGame()), this.initAmbientArena(), this.gameLoop = new W(
|
|
3641
3711
|
(e) => this.update(e),
|
|
3642
3712
|
() => this.render()
|
|
3643
3713
|
), this.setupEvents(), this.gameLoop.start();
|
|
@@ -3753,11 +3823,11 @@ class At {
|
|
|
3753
3823
|
size: 26
|
|
3754
3824
|
});
|
|
3755
3825
|
for (let h = 0; h < 45; h++) {
|
|
3756
|
-
const u = Math.random() * Math.PI * 2,
|
|
3826
|
+
const u = Math.random() * Math.PI * 2, d = 200 + Math.random() * 400;
|
|
3757
3827
|
this.particles.push({
|
|
3758
3828
|
id: Math.random().toString(),
|
|
3759
3829
|
position: { ...this.core.position },
|
|
3760
|
-
velocity: { x: Math.cos(u) *
|
|
3830
|
+
velocity: { x: Math.cos(u) * d, y: Math.sin(u) * d },
|
|
3761
3831
|
color: s.definition.color,
|
|
3762
3832
|
radius: 4 + Math.random() * 5,
|
|
3763
3833
|
alpha: 1,
|
|
@@ -3833,7 +3903,7 @@ class At {
|
|
|
3833
3903
|
maxLifetime: 0.7
|
|
3834
3904
|
});
|
|
3835
3905
|
}
|
|
3836
|
-
const e =
|
|
3906
|
+
const e = K.getRandomOptions(3);
|
|
3837
3907
|
this.orbitingOrbs = e.map((i, s) => {
|
|
3838
3908
|
const a = s * Math.PI * 2 / e.length;
|
|
3839
3909
|
return new G(`orb_${Date.now()}_${s}`, i, a);
|
|
@@ -3841,7 +3911,7 @@ class At {
|
|
|
3841
3911
|
}
|
|
3842
3912
|
spawnExperienceDrops() {
|
|
3843
3913
|
for (const t of this.enemies)
|
|
3844
|
-
t.experienceDropPending && (t.experienceDropPending = !1, this.experienceOrbs.push(new
|
|
3914
|
+
t.experienceDropPending && (t.experienceDropPending = !1, this.experienceOrbs.push(new ct(t.position)));
|
|
3845
3915
|
}
|
|
3846
3916
|
updateExperienceOrbs(t) {
|
|
3847
3917
|
const e = E.getInstance().getConfig().magnet;
|
|
@@ -3871,7 +3941,7 @@ class At {
|
|
|
3871
3941
|
triggerReroll() {
|
|
3872
3942
|
if (this.rerollsRemaining <= 0) return;
|
|
3873
3943
|
this.rerollsRemaining -= 1, this.juice.triggerFlash(0.4);
|
|
3874
|
-
const t =
|
|
3944
|
+
const t = K.getRandomOptions(3);
|
|
3875
3945
|
this.orbitingOrbs = t.map((e, i) => {
|
|
3876
3946
|
const s = i * Math.PI * 2 / t.length;
|
|
3877
3947
|
return new G(`orb_${Date.now()}_${i}`, e, s);
|
|
@@ -3908,14 +3978,14 @@ class At {
|
|
|
3908
3978
|
this.gameLoop.stop(), this.canvas.remove();
|
|
3909
3979
|
}
|
|
3910
3980
|
}
|
|
3911
|
-
function
|
|
3912
|
-
return new
|
|
3981
|
+
function vt(A) {
|
|
3982
|
+
return new bt(A);
|
|
3913
3983
|
}
|
|
3914
3984
|
export {
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3985
|
+
At as BrowserPlatform,
|
|
3986
|
+
bt as GameEngine,
|
|
3987
|
+
V as LANGUAGES,
|
|
3988
|
+
ht as ThemeManager,
|
|
3989
|
+
vt as createAxonSurge,
|
|
3990
|
+
N as isLanguage
|
|
3921
3991
|
};
|