fix: truncate procedural guardian names to key elements only
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m2s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m2s
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Circular Dependencies
|
||||
Generated: 2026-06-11T09:55:02.653Z
|
||||
Generated: 2026-06-11T10:10:52.183Z
|
||||
Found: 4 circular chain(s) — these MUST be fixed before modifying involved files.
|
||||
|
||||
1. 1) data/guardian-encounters.ts > data/guardian-procedural.ts
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"_meta": {
|
||||
"generated": "2026-06-11T09:55:00.412Z",
|
||||
"generated": "2026-06-11T10:10:50.083Z",
|
||||
"description": "Import dependency graph for src/lib/game. Keys are files, values are arrays of files they import.",
|
||||
"usage": "To find what a file affects, search for its path in the VALUES. To find what a file depends on, look at its KEY entry."
|
||||
},
|
||||
|
||||
@@ -159,6 +159,22 @@ export function getProceduralGuardian(floor: number): GuardianDef | null {
|
||||
const tier = floor >= 440 ? 8 : floor >= 390 ? 7 : floor >= 340 ? 6 : floor >= 290 ? 5 : floor >= 250 ? 4 : 0;
|
||||
if (tier === 0) return null;
|
||||
const g = tier === 4 ? getTier4Guardian(floor) : tier === 5 ? getTier5Guardian(floor) : tier === 6 ? getTier6Guardian(floor) : tier === 7 ? getTier7Guardian(floor) : getTier8Guardian(floor);
|
||||
if (!g.name) g.name = generateGuardianName(g.element, floor);
|
||||
if (!g.name) {
|
||||
// Use only the primary (key) elements for name generation, not the full
|
||||
// component chain from resolveMultiUnlockChain(). This keeps names concise
|
||||
// (e.g. "Ignis-Aqua the Warden" instead of "Ignis-Petra-Marina the Warden").
|
||||
const compositesInChain = g.element.filter((e) => COMPOSITE_ELEMENTS.includes(e));
|
||||
const exoticsInChain = g.element.filter((e) => EXOTIC_ELEMENTS.includes(e));
|
||||
const keyElements = tier === 4
|
||||
? g.element.slice(0, 2)
|
||||
: tier === 5
|
||||
? compositesInChain.slice(0, 2)
|
||||
: tier === 6
|
||||
? exoticsInChain.slice(0, 1)
|
||||
: tier === 7
|
||||
? [...exoticsInChain.slice(0, 1), ...compositesInChain.slice(0, 1)]
|
||||
: [...exoticsInChain.slice(0, 1), ...compositesInChain.slice(0, 2)];
|
||||
g.name = generateGuardianName(keyElements, floor);
|
||||
}
|
||||
return g;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user