Skip to content

armgit / ODS

Public Imported from GitHub
0

ODS V3 Pre-Release: Public testing and refinement ahead of the official V3 launch. Turn your PC, Mac, or Linux box into a private AI server.

14.8 KB
Raw Blame
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Elf of Doom — Archer of Vaighruz</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="game-wrap">
  <canvas id="game" width="960" height="540"></canvas>

  <!-- HUD -->
  <div id="hud" class="hidden">
    <div class="hud-left">
      <div class="hero-badge">
        <div class="hero-emoji"><svg viewBox="-7 -4 78 60" width="68" height="52" shape-rendering="geometricPrecision" role="img" aria-label="Shasan, male elven archer">
          <!-- Shasan, male elven archer — face only. The tiara/green-gem circlet and the cloak
               collar, clasp and shoulder strap are gone: this badge is just his head. The styling
               reads rougher and more masculine than the earlier elegant pass: the swept, sectioned
               fringe is replaced with a messy asymmetric bedhead (strands falling unevenly over
               the brow, a few loose flyaways),
               the ponytail is gone in favour of a shaggy nape, and there is light stubble across
               the lower face. Still blond (#fff0b0 / #f7d96c / #e8c24a, shadow #d0a633); the only
               brown is the warm ink #46300f. -->
          <defs>
            <linearGradient id="gabHair" x1="0" y1="0" x2=".25" y2="1">
              <stop offset="0" stop-color="#fff0b0"/>
              <stop offset=".5" stop-color="#f7d96c"/>
              <stop offset="1" stop-color="#e8c24a"/>
            </linearGradient>
            <radialGradient id="gabFace" cx=".42" cy=".3" r=".85">
              <stop offset="0" stop-color="#ffd9b0"/>
              <stop offset=".62" stop-color="#eeb98a"/>
              <stop offset="1" stop-color="#d69867"/>
            </radialGradient>
            <radialGradient id="gabIris" cx=".4" cy=".3" r=".82">
              <stop offset="0" stop-color="#6fb4dd"/>
              <stop offset=".55" stop-color="#2f72a6"/>
              <stop offset="1" stop-color="#143c5f"/>
            </radialGradient>
            <linearGradient id="gabGold" x1="0" y1="0" x2="0" y2="1">
              <stop offset="0" stop-color="#ffe9a0"/>
              <stop offset="1" stop-color="#cf9c33"/>
            </linearGradient>
            <clipPath id="gabFaceClip">
              <path d="M17 30 Q17 13 32 13 Q47 13 47 30 L47 38.5 Q47 48 41 53.5 Q36.5 57 32 57 Q27.5 57 23 53.5 Q17 48 17 38.5 Z"/>
            </clipPath>
          </defs>
          <!-- hair mass behind the head: messy all-over volume with a shaggy nape, no tail -->
          <path d="M12.5 28 Q7.5 20 10.5 14.5 L14 16.5 Q12.5 8 20 4.5 L22 8 Q26 0.5 33.5 1.5 L34.5 5.5 Q42 1 46.5 6.5 L44.8 9.5 Q53 10 54 17.5 L50.8 18.5 Q55 22.5 51.5 28 Q51.5 17 48.5 13.5 Q40 8.5 32 8.5 Q24 8.5 15.5 13.5 Q12.5 17 12.5 28 Z" fill="url(#gabHair)" stroke="#46300f" stroke-width="1.45" stroke-linejoin="round"/>
          <!-- undercut: short-shaved sideburn on both sides, darker than the mass above it -->
          <g clip-path="url(#gabFaceClip)">
            <path d="M17 26 Q19.5 31 18.8 37 L17 37 Z" fill="#c99f2e" opacity=".5"/>
            <path d="M47 26 Q44.5 31 45.2 37 L47 37 Z" fill="#c99f2e" opacity=".5"/>
          </g>
          <!-- shaggy nape strands behind the right ear, loose instead of a tied tail -->
          <path d="M45.5 32 Q51 36.5 49.5 44 L47.4 41 L48 48.5 L45.4 44.5 Q44.6 38 43 33 Z" fill="url(#gabHair)" stroke="#46300f" stroke-width="1.3" stroke-linejoin="round"/>
          <!-- pointed elven ears, high and springy -->
          <path d="M18 29.5 L0 20.5 L17 40.5 Z" fill="#e7b384" stroke="#46300f" stroke-width="1.4" stroke-linejoin="round"/>
          <path d="M46 29.5 L64 20.5 L47 40.5 Z" fill="#e7b384" stroke="#46300f" stroke-width="1.4" stroke-linejoin="round"/>
          <path d="M15.4 28.2 L6 23.6" fill="none" stroke="#c98a5c" stroke-width="1.2" stroke-linecap="round"/>
          <path d="M48.6 28.2 L58 23.6" fill="none" stroke="#c98a5c" stroke-width="1.2" stroke-linecap="round"/>
          <!-- face: squareer, heavier jaw than the elegant pass, slightly narrowed mouth corner -->
          <path d="M17 30 Q17 13 32 13 Q47 13 47 30 L47 39 Q47 48.5 42 53.5 Q37.5 57.5 32 57.5 Q26.5 57.5 22 53.5 Q17 48.5 17 39 Z" fill="url(#gabFace)" stroke="#46300f" stroke-width="1.5"/>
          <!-- shading: form shadow on both sides and a jaw shadow, no blush -->
          <g clip-path="url(#gabFaceClip)">
            <ellipse cx="17.2" cy="34" rx="6.6" ry="18" fill="#c98a5c" opacity=".28"/>
            <ellipse cx="46.8" cy="34" rx="6.6" ry="18" fill="#c98a5c" opacity=".28"/>
            <path d="M21.5 50 Q32 58.5 42.5 50 L42.5 57.5 L21.5 57.5 Z" fill="#c98a5c" opacity=".22"/>
          </g>
          <!-- fringe: messy and uneven, falling in several directions across the brow -->
          <path d="M16.5 26 Q15.5 12 32 11 Q48.5 12 47.5 26 L45.3 19.6 Q44.8 15.4 42.2 17.6 L39.6 25.2 L36.4 15.8 Q33.6 13.8 31.4 16.6 L29.8 24.4 L26.6 15.4 Q23.6 14.6 22.6 18.4 L21.6 23.4 L19.2 17.2 Q17.4 17.4 17.6 20.8 Z" fill="url(#gabHair)" stroke="#46300f" stroke-width="1.4" stroke-linejoin="round"/>
          <path d="M36.8 15.6 L33.4 23.2" fill="none" stroke="#d0a633" stroke-width="1.1" stroke-linecap="round"/>
          <path d="M27.4 15.4 L25.6 22" fill="none" stroke="#d0a633" stroke-width="1" stroke-linecap="round"/>
          <path d="M43.6 17.2 L41.4 23.4" fill="none" stroke="#d0a633" stroke-width="1" stroke-linecap="round"/>
          <path d="M21.4 18 L20.6 22.8" fill="none" stroke="#d0a633" stroke-width=".9" stroke-linecap="round"/>
          <!-- loose flyaway strands: the messy, just-riding-through-the-woods look -->
          <path d="M25.5 5.8 Q23.2 1.4 25.8 -1.2" fill="none" stroke="url(#gabHair)" stroke-width="1.4" stroke-linecap="round"/>
          <path d="M38.5 3.4 Q41 0.4 39.6 -2.2" fill="none" stroke="url(#gabHair)" stroke-width="1.3" stroke-linecap="round"/>
          <path d="M14.6 14 Q11.4 11.4 12 8" fill="none" stroke="url(#gabHair)" stroke-width="1.3" stroke-linecap="round"/>
          <path d="M50.4 14.6 Q53.6 12.2 53.2 8.8" fill="none" stroke="url(#gabHair)" stroke-width="1.3" stroke-linecap="round"/>
          <!-- restrained crown highlight, broken so it does not read as a sleek shine -->
          <path d="M23 16 Q27.5 12.8 32 13.2" fill="none" stroke="#fff6d2" stroke-width="1.4" stroke-linecap="round" opacity=".4"/>
          <path d="M36 13.4 Q40 13.8 42.5 16" fill="none" stroke="#fff6d2" stroke-width="1.4" stroke-linecap="round" opacity=".35"/>
          <!-- determined brows: heavy, low over the eyes, driven slightly inward -->
          <path d="M20.2 24.4 Q25 22 29.9 24.9" fill="none" stroke="#d0a633" stroke-width="2.6" stroke-linecap="round"/>
          <path d="M34.1 24.9 Q39 22 43.8 24.4" fill="none" stroke="#d0a633" stroke-width="2.6" stroke-linecap="round"/>
          <!-- eyes: shallower and half-lidded, a straight lower edge, gaze steady and off-centre -->
          <path d="M21.4 30 Q25.4 27.2 29.7 29.8 Q25.8 32.8 21.4 30 Z" fill="#fffdf4" stroke="#46300f" stroke-width=".8"/>
          <path d="M34.3 29.8 Q38.6 27.2 42.6 30 Q38.2 32.8 34.3 29.8 Z" fill="#fffdf4" stroke="#46300f" stroke-width=".8"/>
          <circle cx="26.2" cy="30.3" r="2.35" fill="url(#gabIris)"/>
          <circle cx="38.9" cy="30.3" r="2.35" fill="url(#gabIris)"/>
          <circle cx="26.3" cy="30.4" r="1.05" fill="#0c1822"/>
          <circle cx="39" cy="30.4" r="1.05" fill="#0c1822"/>
          <circle cx="25.3" cy="29.4" r=".8" fill="#fffefa"/>
          <circle cx="38" cy="29.4" r=".8" fill="#fffefa"/>
          <!-- upper lid line sits on the iris: that contact is what reads as focus -->
          <path d="M21 29.8 Q25.4 26.9 30.1 29.6" fill="none" stroke="#46300f" stroke-width="1.35" stroke-linecap="round"/>
          <path d="M33.9 29.6 Q38.6 26.9 43 29.8" fill="none" stroke="#46300f" stroke-width="1.35" stroke-linecap="round"/>
          <!-- under-eye line, faint: fatigue, not age -->
          <path d="M22.6 32.6 Q25.6 33.8 28.6 33" fill="none" stroke="#c98a5c" stroke-width=".85" stroke-linecap="round" opacity=".55"/>
          <path d="M35.4 33 Q38.4 33.8 41.4 32.6" fill="none" stroke="#c98a5c" stroke-width=".85" stroke-linecap="round" opacity=".55"/>
          <!-- small upturned nose -->
          <path d="M31.4 34.8 Q31 38.6 34 39.2" fill="none" stroke="#c98a5c" stroke-width="1.3" stroke-linecap="round"/>
          <!-- the smirk: closed, asymmetric, corner pulled up on his left only.
               Shortened and scaled down from the earlier M24.2 45.4 … L40.2 41.4 sweep, which read
               as too wide a grin for the face: the mouth is now about two-thirds as wide and half
               as tall, centred under the nose, with the same one-sided lift. -->
          <path d="M26.9 45.2 Q30.6 46.2 33.9 45.4 Q36 44.8 37.4 43.1" fill="none" stroke="#46300f" stroke-width="1.6" stroke-linecap="round"/>
          <path d="M36.9 44.0 Q38.4 43.7 39.1 42.6" fill="none" stroke="#c98a5c" stroke-width="1" stroke-linecap="round" opacity=".85"/>
          <!-- brow scar, a short healed line on his right brow -->
          <path d="M23 20.6 L26.4 23.4" fill="none" stroke="#c07f57" stroke-width="1.1" stroke-linecap="round" opacity=".65"/>
          <!-- light stubble across the jaw and chin: rough days on the road, no elegance -->
          <g clip-path="url(#gabFaceClip)" opacity=".32">
            <path d="M20.5 44 Q21.5 53 32 57 Q42.5 53 43.5 44 L43.5 58 L20.5 58 Z" fill="#8a6f4d"/>
            <path d="M27.6 50 Q32 51.6 36.4 50 L36.4 54 Q32 55.4 27.6 54 Z" fill="#8a6f4d" opacity=".6"/>
          </g>
        </svg></div>
        <div class="hero-info">
          <div class="hero-name">Shasan</div>
          <div class="bar hp-bar"><div id="hp-fill"></div><span id="hp-text">50/50</span></div>
          <div class="bar xp-bar"><div id="xp-fill"></div><span id="xp-text">Lv 1</span></div>
        </div>
      </div>
    </div>
    <div class="hud-center">
      <div id="zone-label">The Gate of Ash</div>
      <div id="wave-label">Foes: 0</div>
      <div id="arrow-label">🏹 Arrows: 24</div>
    </div>
    <div class="hud-right">
      <div class="stat"><span class="stat-ico">🪙</span><span id="gold-text">0</span></div>
      <div class="stat"><span class="stat-ico">💀</span><span id="kills-text">0</span></div>
      <div class="stat"><span class="stat-ico">🏹</span><span id="dmg-text">22</span></div>
      <button id="mute-btn" class="icon-btn" type="button" aria-label="Toggle sound">🔊</button>
    </div>
  </div>

  <!-- Boss bar -->
  <div id="boss-wrap" class="hidden">
    <div id="boss-name">—</div>
    <div class="bar boss-bar"><div id="boss-fill"></div></div>
  </div>

  <div id="vignette"></div>

  <!-- Title screen -->
  <div id="screen-title" class="screen">
    <div class="title-card">
      <div class="ring title-crest" aria-hidden="true">🏹</div>
      <h1>Elf of Doom</h1>
      <p class="subtitle">A dungeon crawler made with ODS on the RTX Spark</p>
      <p class="lore">One elf. One bow. Endless brutes.<br>
      Run, draw, and loose arrows through great halls of the ashland — <b>grab hearts</b> to mend your wounds and <b>quivers</b> to keep your string singin', then loot, level, and outrun your way to the Cinderfall.</p>
      <p class="lore">Break the Hollow Crown and the realms <b>fold back on themselves</b>: every circuit of six brings <b>half again as many foes</b>, <b>hardier bosses</b> and <b>realm-6 reinforcements</b> from the first hall onward. The quest never ends — it is only ever a matter of how far Shasan gets.</p>
      <button id="btn-start" class="big-btn" type="button">🏹 Draw Your Bow</button>
      <div class="controls-hint">
        <h3>Controls</h3>
        <ul class="controls-list">
          <li><b>Arrow keys</b> / <b>WASD</b> — run; you shoot the way you last ran</li>
          <li><b>Hold Space</b> to keep shooting — or tap <b>J</b> for single arrows</li>
          <li><b>Hearts</b> heal you, <b>quivers</b> refill your arrows — grab them between waves</li>
          <li><b>1</b>, <b>2</b>, <b>3</b> — choose a boon when you level up</li>
          <li><b>Esc</b> or <b>P</b> — pause&nbsp;·&nbsp;<b>Enter</b> — start / retry&nbsp;·&nbsp;<b>M</b> — mute</li>
          <li>Clicking away from the game pauses it automatically</li>
        </ul>
        <div class="controls-objective">
          Clear every brute in the arena to open the way onward — <b>6 realms</b>, each with its own boss, then <b>Mount Cinderfall</b> and the Hollow Crown. Fall the Crown and <b>Continue</b> into the next circuit: more brutes, tougher bosses, faster reinforcements — forever.
        </div>
      </div>
      <div class="title-footer">
        <a class="ods-link" href="https://github.com/Osmantic/ODS" target="_blank" rel="noopener noreferrer">Try ODS</a>
      </div>
    </div>
  </div>

  <!-- Level up -->
  <div id="screen-levelup" class="screen hidden">
    <div class="panel">
      <h2>✨ Level Up!</h2>
      <p class="panel-sub">The wisdom of the Sylvaniai sharpens your aim. Choose a boon:</p>
      <div id="boon-list" class="boon-list"></div>
    </div>
  </div>

  <!-- Game over -->
  <div id="screen-over" class="screen hidden">
    <div class="panel">
      <h2 id="over-title">💀 The Shadow Prevails</h2>
      <p class="panel-sub" id="over-sub">The last arrow has flown…</p>
      <div id="over-stats" class="over-stats"></div>
      <button id="btn-retry" class="big-btn" type="button">↻ Rise Again</button>
    </div>
  </div>

  <!-- Victory / circuit checkpoint. Re-shown after every six realms with a metal tier that
       deepens each loop (bronze → silver → gold); its button continues the endless run. -->
  <div id="screen-win" class="screen hidden">
    <div class="panel">
      <h2 id="win-title">🌋 The Quest is Done!</h2>
      <p class="panel-sub" id="win-sub">The Hollow Crown is broken, and the elven realms begin their long twilight.</p>
      <div id="win-stats" class="over-stats"></div>
      <button id="btn-again" class="big-btn" type="button">➤ Continue the Quest</button>
    </div>
  </div>

  <!-- Pause -->
  <div id="screen-pause" class="screen hidden">
    <div class="panel">
      <h2>⏸️ Paused</h2>
      <p class="panel-sub">The brutes wait politely.</p>
      <!-- The usual way here is clicking away from the window, which does not put keyboard focus
           back on the page, so the player arrives with no idea how to continue. Say it plainly. -->
      <p class="panel-sub pause-hint">
        Press <b>P</b> or <b>Esc</b> to jump back in &nbsp;·&nbsp; or click <b>Resume</b> below.
      </p>
      <button id="btn-resume" class="big-btn" type="button">▶ Resume</button>
    </div>
  </div>
</div>
<script src="world.js"></script>
<script src="dungeon.js"></script>
<script src="chars.js"></script>
<script src="legacy.js"></script>
<script src="engine.js"></script>
<script src="ui.js"></script>
</body>
</html>