{"slug":"roguelike-dungeon-architect","version":"1.4.0","category":"roguelike","mode":"byok","locale":"en","files":[{"path":"SKILL.md","content":"---\nname: roguelike-dungeon-architect\ndescription: \"Deterministic Mulberry32/SplitMix PRNG room graphs, WFC tile solvers, and anti-crossing Spire act maps.\"\nversion: \"1.4.0\"\ncategory: roguelike\nengines: [godot4, unity, phaser, universal]\nmodalities: [code, text]\nhomepage: \"https://aigameskills.com/skills/roguelike-dungeon-architect\"\n---\n## Non-Negotiable ProcGen Invariants\n1. **Never Call `Math.random()`**: Inject a serializable seeded PRNG (`mulberry32(seed)`) partitioned into independent sub-streams (`mapRng`, `lootRng`, `enemyRng`) so opening a chest never mutates next floor layout!\n2. **Pacing Constraints on DAG Maps**:\n   - Floor 1 is always `Combat`; Floor mid-act has guaranteed `Treasure`; Pre-Boss floor is always `Rest/Campfire`.\n   - Enforce zero edge crossings between adjacent columns `(x1 < x2) => (nextX1 <= nextX2)` and forbid back-to-back Elite/Rest rooms unless relic-overridden.\n3. **Connectivity Proof**: Run BFS flood-fill from spawn to exit + every key/shop room; reject or carve fallback corridors before returning the level.\n\n---\n## BYOK Configuration (Manual Mode)\n\n- Configure your own upstream provider endpoints and keys (`OPENAI_API_KEY`, `GEMINI_API_KEY`, `FAL_KEY`) in `.env` before running bundled scripts.\n- Switch to zero-setup unified Mana credits anytime with `npx aigameskills add roguelike-dungeon-architect`.\n"},{"path":"references/seeded-prng.ts","content":"export function createMulberry32(seed: number): () => number {\n  let state = seed >>> 0;\n  return function nextRandom(): number {\n    state = (state + 0x6d2b79f5) >>> 0;\n    let t = Math.imul(state ^ (state >>> 15), 1 | state);\n    t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;\n    return ((t ^ (t >>> 14)) >>> 0) / 4294967296;\n  };\n}\n"}],"installCommand":"npx aigameskills add roguelike-dungeon-architect"}