← Creature Collection results

Creature Collection

GPT 5.6 Luna Pro · typescript

Initial view of Creature Collection

Reviews & generation details

Reviews

No human review yet. Unreviewed does not mean unsuccessful.

Generation context

Imported historical artifact. Its exact original instructions and lineage are not known.

Generation prompt · exact text unavailable

See the current prompt for reference. It may differ from the instructions used to generate this artifact.

Inspect original source 26,967 bytes · SHA-256 24a60c77527f
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Auralith: The Luminous Binding</title>
<style>
/* ── css: base ── */
:root{--ink:#071522;--deep:#0c2030;--glass:rgba(13,31,46,.78);--line:rgba(167,225,226,.24);--cyan:#8de8df;--aqua:#39c7c5;--gold:#f6d58a;--coral:#f58d7c;--violet:#bba6ff;--text:#e8f5ef;--muted:#8eabb0}*{box-sizing:border-box}html,body{margin:0;height:100%;overflow:hidden;background:#071522;color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif}button{font:inherit;color:inherit;border:1px solid var(--line);background:rgba(255,255,255,.045);padding:12px 16px;border-radius:6px;cursor:pointer;letter-spacing:.12em;font-size:11px;transition:.2s}button:hover{background:rgba(141,232,223,.14);border-color:var(--cyan);transform:translateY(-1px)}#app-shell{height:100%;position:relative;isolation:isolate}#game-canvas{position:absolute;inset:0;width:100%;height:100%;image-rendering:auto}#ambient{position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 50% 18%,rgba(108,233,218,.1),transparent 33%),linear-gradient(180deg,rgba(5,13,25,.04),rgba(5,13,25,.4))}.brand{display:flex;align-items:center;gap:10px;font-size:14px;letter-spacing:.18em}.brand small{display:block;font-size:8px;color:var(--muted);letter-spacing:.2em;margin-top:3px}.sigil{font-size:25px;color:var(--gold);text-shadow:0 0 15px var(--gold)}#hud{position:absolute;inset:0;pointer-events:none;padding:24px;display:flex;justify-content:space-between;align-items:flex-start}.hud-pills{display:flex;gap:8px;pointer-events:auto}.hud-pills button{padding:9px 11px;background:var(--glass)}#party-strip{position:absolute;left:24px;bottom:24px;display:flex;gap:7px;pointer-events:auto}.party-card{width:115px;padding:9px 10px;background:var(--glass);border:1px solid var(--line);border-radius:8px;backdrop-filter:blur(12px)}.party-card.active{border-color:var(--cyan);box-shadow:0 0 20px rgba(57,199,197,.18)}.party-card b{font-size:12px}.party-card small{float:right;color:var(--gold)}.mini-hp{height:4px;background:#162d38;border-radius:5px;margin-top:8px;overflow:hidden}.mini-hp span{display:block;height:100%;background:linear-gradient(90deg,var(--coral),var(--gold));border-radius:5px}.title-copy{position:absolute;left:9vw;top:18vh;z-index:2}.eyebrow{font-size:11px;letter-spacing:.38em;color:var(--cyan)}h1{font-family:Georgia,serif;font-size:clamp(58px,10vw,148px);font-weight:400;letter-spacing:.06em;line-height:.85;margin:19px 0 8px;text-shadow:0 0 45px rgba(141,232,223,.3)}.title-copy p{color:var(--gold);letter-spacing:.42em;font-size:14px;margin:0 0 27px}.title-copy span{color:#b5ccca;font-family:Georgia,serif;font-style:italic;font-size:17px}.title-rule{width:230px;height:1px;background:linear-gradient(90deg,var(--gold),transparent);margin-bottom:18px}.title-actions{display:flex;gap:12px;margin-top:44px}.primary{background:var(--aqua);color:#06242b;border-color:var(--aqua);font-weight:700}.title-note{display:block;color:#66888e;margin-top:17px;font-size:10px;letter-spacing:.15em}.title-orbit{position:absolute;border:1px solid rgba(141,232,223,.18);border-radius:50%;width:52vw;height:52vw;right:-12vw;top:-14vw;animation:spin 35s linear infinite}.orbit-b{width:33vw;height:33vw;right:12vw;top:7vw;border-color:rgba(246,213,138,.17);animation-duration:23s;animation-direction:reverse}.orbit-a:after,.orbit-b:after{content:'✦';position:absolute;color:var(--cyan);font-size:20px;top:12%;left:5%;text-shadow:0 0 20px var(--cyan)}#zone-label{color:var(--gold);letter-spacing:.2em;font-size:11px;margin:12px auto 0;position:absolute;left:50%;transform:translateX(-50%)}#dialogue,#battle-ui,#modal-root{position:absolute;inset:0;z-index:5}.glass{background:var(--glass);border:1px solid var(--line);backdrop-filter:blur(18px);box-shadow:0 18px 60px rgba(0,0,0,.3);border-radius:12px}.dialog-card{position:absolute;left:8vw;right:8vw;bottom:7vh;padding:24px 28px;display:flex;gap:24px;align-items:flex-start}.portrait{width:54px;height:54px;border-radius:50%;background:linear-gradient(135deg,var(--gold),var(--coral));display:grid;place-items:center;color:#172132;font-size:25px;flex:none}.dialog-card h3{margin:0 0 8px;color:var(--gold);font-size:12px;letter-spacing:.2em}.dialog-card p{margin:0;line-height:1.6;color:#d0e5df}.dialog-card button{margin-left:auto;align-self:flex-end}.battle-panel{position:absolute;left:5vw;right:5vw;bottom:4vh;padding:18px;display:flex;gap:18px;align-items:center}.battle-actions{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;flex:1}.move-btn{text-align:left;padding:13px}.move-btn small{display:block;color:var(--muted);font-size:9px;margin-top:4px}.battle-info{min-width:220px}.battle-info b{display:block;font-size:18px}.hpbar{height:9px;background:#142b36;border-radius:10px;overflow:hidden;margin:8px 0}.hpbar span{display:block;height:100%;background:linear-gradient(90deg,var(--coral),#ffc66e);transition:width .4s}.battle-stage{position:absolute;inset:0;pointer-events:none}.enemy-card{position:absolute;top:17%;right:13%;width:210px}.player-card{position:absolute;bottom:34%;left:12%;width:230px}..stage-name{display:flex;justify-content:space-between;font-size:12px;letter-spacing:.15em}.creature-art{width:190px;height:160px;display:grid;place-items:center;font-size:110px;filter:drop-shadow(0 0 22px rgba(141,232,223,.6));animation:float 3s ease-in-out infinite}.enemy-card .creature-art{margin-left:auto}.modal{position:absolute;inset:8vh 10vw;padding:28px;overflow:auto}.modal h2{font:400 32px Georgia,serif;margin:0 0 18px;color:var(--gold)}.modal-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px}.list-card{padding:14px;border:1px solid var(--line);border-radius:8px;background:rgba(255,255,255,.035)}.list-card h3{margin:0 0 7px;font-size:14px}.list-card p{font-size:11px;color:var(--muted);line-height:1.5}.close{position:absolute;right:22px;top:22px}.notice{color:var(--cyan);font-size:12px;letter-spacing:.1em}#toast{position:absolute;bottom:18%;left:50%;transform:translateX(-50%);z-index:8;padding:12px 20px;border:1px solid var(--line);border-radius:30px;background:rgba(8,23,34,.9);color:var(--gold);opacity:0;transition:.3s;pointer-events:none}#toast.show{opacity:1}.heal{color:var(--cyan)}#touch-controls{position:absolute;right:24px;bottom:22px;text-align:center;z-index:4}#touch-controls button{width:45px;height:40px;padding:0;margin:2px;background:rgba(10,35,46,.7)}@keyframes spin{to{transform:rotate(360deg)}}@keyframes float{50%{transform:translateY(-10px)}}@media(max-width:700px){#hud{padding:14px}.brand{font-size:11px}.hud-pills button{font-size:9px;padding:8px 7px}.title-copy{left:8vw;top:17vh}.title-copy span{font-size:14px}.title-actions{margin-top:30px}.party-card{width:90px}.party-card:nth-child(n+4){display:none}.battle-panel{left:3vw;right:3vw;bottom:2vh;display:block}.battle-info{margin-bottom:12px}.battle-actions{grid-template-columns:repeat(2,1fr)}.enemy-card{right:5%;top:13%}.player-card{left:5%;bottom:45%}.modal{inset:4vh 4vw;padding:20px}#touch-controls{display:block!important}}
/* ── css: motion ── */
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}
</style>
</head>
<body>
<main id="app-shell"><canvas id="game-canvas"></canvas><div id="ambient"></div><section id="hud" hidden=""><div class="brand"><span class="sigil">✦</span><div><b>AURALITH</b><small>THE LUMINOUS BINDING</small></div></div><div id="zone-label"></div><div class="hud-pills"><button id="bag-btn">▣ BAG</button><button id="team-btn">◈ TEAM</button><button id="map-btn">⌘ MAP</button><button id="sound-btn">♫</button></div><div id="party-strip"></div></section><section id="title-screen"><div class="title-orbit orbit-a"></div><div class="title-orbit orbit-b"></div><div class="title-copy"><div class="eyebrow">A FIELD JOURNAL OF THE</div><h1>AURALITH</h1><p>THE LUMINOUS BINDING</p><div class="title-rule"></div><span>Where living light remembers the shape of a promise.</span><div class="title-actions"><button id="new-btn" class="primary">NEW BINDING <i>↗</i></button><button id="continue-btn">CONTINUE <i>↗</i></button></div><small class="title-note">A handcrafted expedition • autosaves at shrines</small></div></section><div id="dialogue" hidden=""></div><div id="battle-ui" hidden=""></div><div id="modal-root" hidden=""></div><div id="toast"></div><div id="touch-controls" hidden=""><button data-key="ArrowUp">▲</button><div><button data-key="ArrowLeft">◀</button><button data-key="ArrowDown">▼</button><button data-key="ArrowRight">▶</button></div></div></main>
<script>
(function () {
'use strict';
var __mods = {};
var __cache = {};
var __map = {};
function __require(id) {
  if (__cache[id]) return __cache[id].exports;
  var module = __cache[id] = { exports: {} };
  var factory = __mods[id];
  if (!factory) throw new Error("Module not found: " + id);
  factory(module.exports, function (spec) {
    var target = (__map[id] && __map[id][spec]) || spec;
    return __require(target);
  }, module);
  return module.exports;
}

// ── module: src/main.ts ──
__mods["src/main.ts"] = function (exports, require, module) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const moves = [
    ['Lumen Jab', 38, 100, 'Aster', 0, 'none'], ['Tide Pin', 42, 95, 'Brine', 3, 'frost'], ['Cinder Veil', 46, 90, 'Cinder', 4, 'burn'], ['Hush Spiral', 35, 100, 'Dusk', 2, 'shock'], ['Kindle Mend', 0, 100, 'Ember', 4, 'heal'], ['Razor Bloom', 52, 90, 'Feral', 5, 'none'], ['Gloam Shell', 0, 100, 'Gloam', 3, 'barrier'], ['Quick Gleam', 30, 100, 'Aster', 2, 'priority'], ['Silt Lance', 49, 90, 'Brine', 4, 'none'], ['Ashen Choir', 44, 100, 'Cinder', 3, 'burn'], ['Night Tether', 40, 95, 'Dusk', 3, 'speed'], ['Warmth Knot', 0, 100, 'Ember', 3, 'regen'], ['Claw Current', 41, 100, 'Feral', 2, 'multi'], ['Morrow Guard', 0, 100, 'Gloam', 2, 'barrier'], ['Prism Rend', 58, 85, 'Aster', 6, 'none'], ['Rime Bell', 43, 95, 'Brine', 4, 'frost'], ['Coal Comet', 55, 85, 'Cinder', 6, 'burn'], ['Veilskip', 0, 100, 'Dusk', 4, 'speed'], ['Pulse Salve', 0, 100, 'Ember', 5, 'heal'], ['Thorn Orbit', 47, 95, 'Feral', 4, 'multi'], ['Stillwater', 0, 100, 'Brine', 3, 'regen'], ['Starfall Peck', 45, 100, 'Aster', 3, 'priority'], ['Cinderwake', 50, 90, 'Cinder', 5, 'burn'], ['Dusk Pollen', 36, 100, 'Dusk', 3, 'shock'], ['Feral Hymn', 48, 95, 'Feral', 4, 'speed'], ['Gloam Anchor', 0, 100, 'Gloam', 4, 'barrier'], ['Aurora Fang', 60, 90, 'Aster', 7, 'none'], ['Brine Chorus', 52, 95, 'Brine', 5, 'frost'], ['Ember Vow', 0, 100, 'Ember', 4, 'heal'], ['Wild Tuning', 55, 90, 'Feral', 6, 'multi'], ['Obsidian Wink', 45, 100, 'Gloam', 3, 'shock'], ['Ash Mirror', 0, 100, 'Cinder', 4, 'barrier'], ['Sable Rush', 43, 100, 'Dusk', 3, 'priority'], ['Dawn Stitch', 0, 100, 'Aster', 4, 'regen'], ['Talon Rain', 49, 90, 'Feral', 5, 'multi'], ['Deep Chime', 41, 100, 'Brine', 3, 'shock'], ['Flare Thread', 47, 95, 'Ember', 4, 'burn'], ['Murk Bloom', 46, 90, 'Gloam', 4, 'frost'], ['Sunken Ray', 53, 90, 'Brine', 6, 'none'], ['Heart of Hush', 0, 100, 'Dusk', 6, 'heal']
].map((x) => ({ name: x[0], power: x[1], acc: x[2], aff: x[3], cost: x[4], effect: x[5] }));
const species = [['Vellune', '✦', 'Aster', 'A moonseed that stores dawn in its hollow ribs.'], ['Mirelark', '◒', 'Brine', 'It sings beneath reedwater, mapping unseen currents.'], ['Cindrel', '◆', 'Cinder', 'A small ember-beast whose footsteps leave warm glass.'], ['Noctil', '◐', 'Dusk', 'Noctil folds its shadow into careful little origami birds.'], ['Serein', '❋', 'Ember', 'A patient mote that gathers kindness as radiant pollen.'], ['Brackhorn', '♠', 'Feral', 'Its antlers hum when a distant storm changes course.'], ['Umbriel', '⬡', 'Gloam', 'A quiet shellwalker that remembers every shelter it finds.'], ['Orivane', '✧', 'Aster', 'Orivane drifts toward unfinished songs and completes them.'], ['Kelphid', '≈', 'Brine', 'Its translucent fins glow with the color of deep rain.'], ['Pyrrin', '♦', 'Cinder', 'Pyrrin naps in kilnstone and wakes when friends call.'], ['Vespera', '☾', 'Dusk', 'It trades secrets with the first star after twilight.'], ['Mallowisp', '❀', 'Ember', 'A soft wanderer, leaving tiny lanterns for lost travelers.'], ['Ruskite', '♣', 'Feral', 'Ruskite collects fallen leaves and wears them like medals.'], ['Bastionet', '⬢', 'Gloam', 'Its crystal back becomes a calm refuge during storms.'], ['Auralyn', '✹', 'Aster', 'Auralyn is born where two promises overlap.'], ['Nerith', '◈', 'Brine', 'Nerith can hear the pulse of stones under rivers.'], ['Scorvale', '✷', 'Cinder', 'Scorvale paints the night with sparks from its plume.'], ['Dreyl', '◌', 'Dusk', 'Dreyl moves softly enough to make dew stand still.']];
const zones = [['Murmur Meadow', '#123f4d', '#9ce8cf', 'The first note'], ['Glassfen', '#16384b', '#8cd9e5', 'A mirror below'], ['Cinder Steps', '#512b32', '#ffb36d', 'The kiln remembers'], ['Veil Orchard', '#342956', '#ceb4ff', 'A fruit of dusk'], ['Saltwind Reach', '#17435b', '#9fe6ef', 'The long listening'], ['Crown of Quiet', '#3c315b', '#ffe09e', 'The last aperture']];
const typeMult = (a, d) => { if (a === 'Feral' && d === 'Gloam')
    return 1.8; if (a === 'Feral')
    return 1.08; if (d === 'Gloam')
    return .75; if ((a === 'Aster' && d === 'Brine') || (a === 'Brine' && d === 'Cinder') || (a === 'Cinder' && d === 'Aster') || (a === 'Dusk' && (d === 'Aster' || d === 'Cinder')) || (a === 'Ember' && (d === 'Dusk' || d === 'Brine')))
    return 1.35; if ((d === 'Aster' && a === 'Brine') || (d === 'Brine' && a === 'Cinder') || (d === 'Cinder' && a === 'Aster'))
    return .72; return 1; };
let party = [];
let zone = 0;
let guardians = 0;
let mode = 'title';
let battle = { foes: [], foe: null, active: 0 };
let pos = { x: 5, y: 4 };
let keys = new Set();
let ctx;
let W = 0, H = 0;
let tick = 0;
const $ = (s) => document.querySelector(s);
const toast = (s) => { const e = $('#toast'); e.textContent = s; e.classList.add('show'); setTimeout(() => e.classList.remove('show'), 2200); };
function make(id, level = 3) { const s = species[id % species.length]; return { id: 'c' + id, name: s[0], icon: s[1], aff: s[2], level, hp: 100 + level * 9, maxHp: 100 + level * 9, atk: 27 + level * 3, def: 24 + level * 2, spd: 20 + level * 2, exp: 0, lore: s[3], moves: [moves[(id * 2) % moves.length].name, moves[(id * 2 + 1) % moves.length].name, moves[(id * 2 + 7) % moves.length].name] }; }
;
function save() { localStorage.setItem('auralith-save', JSON.stringify({ party, zone, guardians, pos })); toast('Binding etched at the shrine.'); }
function load() { try {
    const v = JSON.parse(localStorage.getItem('auralith-save') || '');
    party = v.party;
    zone = v.zone;
    guardians = v.guardians;
    pos = v.pos;
    return true;
}
catch {
    return false;
} }
function resize() { const c = $('#game-canvas'); W = c.width = innerWidth * devicePixelRatio; H = c.height = innerHeight * devicePixelRatio; c.style.width = innerWidth + 'px'; c.style.height = innerHeight + 'px'; ctx = c.getContext('2d'); ctx.scale(devicePixelRatio, devicePixelRatio); W = innerWidth; H = innerHeight; }
function draw() { ctx.clearRect(0, 0, W, H); if (mode === 'title') {
    drawTitle();
    return;
} const z = zones[zone]; ctx.fillStyle = z[1]; ctx.fillRect(0, 0, W, H); ctx.fillStyle = 'rgba(255,255,255,.035)'; for (let i = 0; i < 60; i++) {
    const x = (i * 173 + tick * .15) % W, y = (i * 91 + Math.sin(tick / 800 + i) * 18) % H;
    ctx.beginPath();
    ctx.arc(x, y, 1 + (i % 3), 0, 7);
    ctx.fill();
} const tile = Math.min(W / 14, H / 9); for (let y = 0; y < 9; y++)
    for (let x = 0; x < 14; x++) {
        ctx.fillStyle = (x + y) % 2 ? 'rgba(255,255,255,.025)' : 'rgba(0,0,0,.035)';
        ctx.fillRect((W - 14 * tile) / 2 + x * tile, (H - 9 * tile) / 2 + y * tile, tile - 1, tile - 1);
    } const ox = (W - 14 * tile) / 2, oy = (H - 9 * tile) / 2; ctx.fillStyle = '#f6d58a'; ctx.font = `${tile * .6}px serif`; ctx.fillText('⌂', ox + tile * 1.5, oy + tile * 2.1); ctx.fillStyle = '#8de8df'; ctx.font = `${tile * .7}px serif`; ctx.fillText('✦', ox + (pos.x + .18) * tile, oy + (pos.y + .78) * tile); ctx.fillStyle = 'rgba(245,141,124,.9)'; ctx.font = `${tile * .55}px serif`; ctx.fillText('◆', ox + tile * 10.3, oy + tile * 6.2); ctx.fillStyle = 'rgba(255,255,255,.5)'; ctx.font = '12px system-ui'; ctx.fillText('WASD / ARROWS  •  walk the tessellated hush', ox + 18, oy + 9 * tile + 28); }
function drawTitle() { const g = ctx.createRadialGradient(W * .72, H * .4, 10, W * .72, H * .4, W * .7); g.addColorStop(0, '#174455'); g.addColorStop(1, '#071522'); ctx.fillStyle = g; ctx.fillRect(0, 0, W, H); for (let i = 0; i < 35; i++) {
    ctx.fillStyle = `rgba(141,232,223,${.1 + (i % 4) / 20})`;
    ctx.beginPath();
    ctx.arc((i * 211) % W, (i * 97 + tick / 3) % H, 1 + i % 3, 0, 7);
    ctx.fill();
} }
function updateHud() { if (mode === 'title') {
    $('#title-screen').hidden = false;
    $('#hud').hidden = true;
    return;
} $('#title-screen').hidden = true; $('#hud').hidden = false; $('#zone-label').textContent = `${String(zone + 1).padStart(2, '0')}  /  ${zones[zone][3].toUpperCase()}`; $('#party-strip').innerHTML = party.map((p, i) => `<div class="party-card ${i === battle.active ? 'active' : ''}"><b>${p.icon} ${p.name}</b><small>LV ${p.level}</small><div class="mini-hp"><span style="width:${p.hp / p.maxHp * 100}%"></span></div></div>`).join(''); }
function openModal(kind) { const root = $('#modal-root'); root.hidden = false; let body = ''; if (kind === 'bag')
    body = `<h2>Field Satchel</h2><p class="notice">COLLECTION SHARDS  × 12 &nbsp; • &nbsp; VITAL DRAUGHTS × 3</p><div class="modal-grid"><div class="list-card"><h3>Glimmer Pod</h3><p>A woven capture vessel. Best for steady, weakened creatures.</p></div><div class="list-card"><h3>Prism Lure</h3><p>Premium binding filament. Collection success +24%.</p></div><div class="list-card"><h3>Vital Draught</h3><p>Restores 35% of a companion's HP.</p></div><div class="list-card"><h3>Sunspool Catalyst</h3><p>Transforms a companion at level 20.</p></div></div>`;
else if (kind === 'team')
    body = `<h2>Resonance Ledger</h2><p>Six seats in the binding. Your companions carry the expedition.</p><div class="modal-grid">${party.map(p => `<div class="list-card"><h3>${p.icon} ${p.name} <small>LV ${p.level}</small></h3><p>${p.lore}</p><p>${p.aff} affinity · ${p.hp}/${p.maxHp} vitality</p></div>`).join('')}</div>`;
else
    body = `<h2>Atlas of Quiet Places</h2><p>Four anchors keep the world from slipping out of tune. ${guardians}/4 have fallen.</p><div class="modal-grid">${zones.map((z, i) => `<div class="list-card"><h3>${i <= zone ? '✦' : '◇'} ${z[0]}</h3><p>${i <= zone ? 'Charted and humming.' : 'The path is sealed.'}</p></div>`).join('')}</div>`; root.innerHTML = `<div class="modal glass"><button class="close" id="close-modal">CLOSE ×</button>${body}</div>`; $('#close-modal').onclick = () => root.hidden = true; }
function dialogue(title, text, next) { const d = $('#dialogue'); d.hidden = false; d.innerHTML = `<div class="dialog-card glass"><div class="portrait">✦</div><div><h3>${title}</h3><p>${text}</p></div><button id="dialog-next">CONTINUE ↗</button></div>`; $('#dialog-next').onclick = () => { d.hidden = true; next(); }; }
function startGame(isNew) { if (isNew || !load()) {
    party = [make(0), make(1), make(2)];
    zone = 0;
    guardians = 0;
    pos = { x: 5, y: 4 };
    save();
} mode = 'world'; updateHud(); dialogue('THE CARTOGRAPHER', 'The hush is not silence. It is a living field of light, waiting for a hand steady enough to bind its wandering notes.', () => toast('Move with WASD or the arrow keys. Find the wild glimmer.')); }
function encounter() { const foe = make((zone * 3 + Math.floor(Math.random() * 6)) % species.length, zone * 3 + 3); battle = { foes: [foe], foe, active: 0 }; mode = 'battle'; updateHud(); renderBattle(); }
function renderBattle(msg = 'A wild resonance emerges from the grass.') { const p = party[battle.active], f = battle.foe; const b = $('#battle-ui'); b.hidden = false; b.innerHTML = `<div class="battle-stage"><div class="enemy-card"><div class="creature-art">${f.icon}</div><div class="stage-name"><b>${f.name}</b><span>LV ${f.level}</span></div><div class="hpbar"><span style="width:${f.hp / f.maxHp * 100}%"></span></div></div><div class="player-card"><div class="creature-art">${p.icon}</div><div class="stage-name"><b>${p.name}</b><span>LV ${p.level}</span></div><div class="hpbar"><span style="width:${p.hp / p.maxHp * 100}%"></span></div></div></div><div class="battle-panel glass"><div class="battle-info"><b>${f.name}</b><span class="notice">${msg}</span></div><div class="battle-actions">${p.moves.map(n => { const m = moves.find(x => x.name === n); return `<button class="move-btn" data-move="${n}">${n}<small>${m.aff} · PWR ${m.power || '—'} · ${m.effect}</small></button>`; }).join('')}<button class="move-btn" id="capture">BINDING POD<small>attempt collection</small></button><button class="move-btn" id="flee">WITHDRAW<small>return to the field</small></button></div></div>`; b.querySelectorAll('[data-move]').forEach(e => e.addEventListener('click', () => useMove(e.dataset.move))); $('#capture').onclick = capture; $('#flee').onclick = () => { mode = 'world'; b.hidden = true; updateHud(); }; }
function useMove(name) { const p = party[battle.active], f = battle.foe, m = moves.find(x => x.name === name); if (Math.random() * 100 > m.acc) {
    renderBattle('The note slips past its mark.');
    enemyTurn();
    return;
} if (m.effect === 'heal') {
    p.hp = Math.min(p.maxHp, p.hp + Math.floor(p.maxHp * .32));
    renderBattle('A gentle chord restores vitality.');
    enemyTurn();
    return;
} let dmg = m.power ? Math.floor(.4 * p.level * p.atk / Math.max(1, f.def) * typeMult(m.aff, f.aff) + Math.random() * 5) : 0; if (m.aff === p.aff)
    dmg = Math.floor(dmg * 1.25); const crit = Math.random() < .1; if (crit)
    dmg = Math.floor(dmg * 1.5); f.hp = Math.max(0, f.hp - dmg); if (m.effect === 'burn')
    f.status = 'burn'; if (m.effect === 'frost')
    f.status = 'frost'; if (m.effect === 'shock')
    f.status = 'shock'; if (f.hp <= 0) {
    win();
    return;
} renderBattle(`${crit ? 'CRITICAL • ' : ''}${name} lands for ${dmg}.`); setTimeout(enemyTurn, 500); }
function enemyTurn() { const p = party[battle.active], f = battle.foe; if (f.status === 'burn')
    f.hp = Math.max(1, f.hp - 4); if (f.status === 'shock' && Math.random() < .3) {
    renderBattle('The foe stutters between two moments.');
    return;
} const dmg = Math.max(1, Math.floor(.4 * f.level * f.atk / Math.max(1, p.def) + Math.random() * 4)); p.hp = Math.max(0, p.hp - dmg); if (p.hp <= 0) {
    const next = party.findIndex(x => x.hp > 0);
    if (next >= 0) {
        battle.active = next;
        renderBattle(`${p.name} fades. ${party[next].name} answers.`);
    }
    else {
        party.forEach(x => x.hp = x.maxHp);
        mode = 'world';
        $('#battle-ui').hidden = true;
        toast('The shrine draws you back, renewed.');
        updateHud();
    }
}
else
    renderBattle(`A counterpulse strikes for ${dmg}.`); }
function capture() { const f = battle.foe; const chance = .22 + (1 - f.hp / f.maxHp) * .52; if (Math.random() < chance) {
    if (party.length < 6)
        party.push({ ...f, hp: f.maxHp });
    toast(`${f.name} joins your binding.`);
    win(true);
}
else {
    renderBattle('The pod flashes, but the resonance breaks free.');
    enemyTurn();
} }
function win(captured = false) { const p = party[battle.active]; p.exp += 25 + battle.foe.level * 8; if (battle.foe.id === 'guardian') {
    guardians++;
    if (zone < 5)
        zone++;
    pos = { x: 5, y: 4 };
    toast(`ANCHOR BROKEN • Zone ${zone + 1} opens.`);
} if (p.exp > p.level * 35 && p.level < 50) {
    p.level++;
    p.maxHp += 9;
    p.hp = p.maxHp;
    p.atk += 3;
    p.def += 2;
    p.spd += 2;
    toast(`${p.name} reached level ${p.level}.`);
} if (!captured)
    toast(`${battle.foe.name} dissolves into bright motes.`); mode = 'world'; $('#battle-ui').hidden = true; updateHud(); save(); }
function move(dx, dy) { if (mode !== 'world')
    return; pos.x = Math.max(0, Math.min(13, pos.x + dx)); pos.y = Math.max(0, Math.min(8, pos.y + dy)); if (pos.x === 10 && pos.y === 6) {
    if (guardians < 4 && zone < 4) {
        guardian();
    }
    else {
        party.forEach(x => x.hp = x.maxHp);
        toast('The shrine mends every fracture.');
        save();
    }
}
else if (Math.random() < .16 + zone * .025)
    encounter(); }
function guardian() { const f = make((zone * 4 + 8) % species.length, zone * 4 + 7); f.id = 'guardian'; f.maxHp = Math.floor(f.maxHp * 1.35); f.hp = f.maxHp; f.atk += 8; f.def += 5; battle = { foes: [f], foe: f, active: 0 }; mode = 'battle'; renderBattle(`ANCHOR OF ${zones[zone][0].toUpperCase()} • Break its chord.`); }
function bind() { addEventListener('keydown', e => { if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'w', 'a', 's', 'd'].includes(e.key)) {
    e.preventDefault();
    keys.add(e.key);
    if (e.key === 'ArrowUp' || e.key === 'w')
        move(0, -1);
    if (e.key === 'ArrowDown' || e.key === 's')
        move(0, 1);
    if (e.key === 'ArrowLeft' || e.key === 'a')
        move(-1, 0);
    if (e.key === 'ArrowRight' || e.key === 'd')
        move(1, 0);
} }); document.querySelectorAll('#touch-controls button').forEach(b => b.addEventListener('click', () => move(b.dataset.key === 'ArrowLeft' ? -1 : b.dataset.key === 'ArrowRight' ? 1 : 0, b.dataset.key === 'ArrowUp' ? -1 : b.dataset.key === 'ArrowDown' ? 1 : 0))); $('#new-btn').onclick = () => startGame(true); $('#continue-btn').onclick = () => localStorage.getItem('auralith-save') ? startGame(false) : dialogue('NO BINDING FOUND', 'The atlas holds no memory yet. Begin a new binding and make the first mark.', () => { }); $('#bag-btn').onclick = () => openModal('bag'); $('#team-btn').onclick = () => openModal('team'); $('#map-btn').onclick = () => openModal('map'); $('#sound-btn').onclick = () => { const a = new AudioContext(); const o = a.createOscillator(); o.frequency.value = 220; o.connect(a.destination); o.start(); o.stop(a.currentTime + .08); toast('A tuning pulse answers.'); }; }
function loop() { tick++; draw(); requestAnimationFrame(loop); }
resize();
addEventListener('resize', resize);
bind();
updateHud();
loop();
};

// ── entry ──
__require("src/main.ts");
})();
</script>
</body>
</html>
<!-- agent-meta {"model":"openai/gpt-5.6-luna-pro","provider":"openrouter","persona":"typescript","sessionId":"6f175686-3ec2-4184-89c3-01b3f821f95b","tokensIn":505217,"tokensOut":20427,"tokensTotal":525644,"turns":13,"toolCalls":17,"failedToolCalls":0,"timestamp":"2026-07-31T03:20:58.450Z"} -->