Halls of Ruin
Section IDesign Pillars
Every run ends. Every run matters. Permadeath resets dungeon state, but the player always extracts something — gold, knowledge, unlocks, reputation. The question is never if you die, but how much you got out of it.
The game runs while you're away, but active play is always more efficient. Idle income funds upgrades; active play pushes depth. Neither path alone is optimal — the interplay is the core loop.
No two runs play the same. Randomized loot, event chains, shrine blessings, curse stacking, and class synergies create combinatorial depth without requiring manual deckbuilding.
There is no final floor. Scaling is asymptotic — the player can always push one floor deeper with better meta-progression, but the difficulty curve ensures there's always a wall.
Section IICore Loop
Run Structure
A "run" is a single dungeon delve — a procedurally generated infinite vertical descent with branching paths at decision points.
- Floor types: Combat, Event, Shop, Rest, Elite, Boss (every 10th), Mystery
- Floor weighting: Weighted random with pity timers. Guaranteed shop within every 5-floor window. Rest sites rarer past floor 30.
- Branching: Choose between 2–3 paths with partial info. Clarity improves with the Scout upgrade line.
- Termination: Death (HP ≤ 0), Flee (keep partial gold), or Extraction Portal (rare event, keep everything + bonus).
Idle Systems
| System | Unlocked At | Produces | Active Bonus |
|---|---|---|---|
| Tax Collector | Start | Gold/sec | — |
| Tavern | Prestige 1 | Gold/sec, rumors | Hire better staff |
| Minion Expeditions | Floor 15 reached | Materials, minor loot | Choose expedition targets |
| Crafting Queue | Prestige 2 | Equipment from blueprints | Manual crafting is faster |
| Training Grounds | Floor 30 reached | Passive hero XP | Spar for bonus XP |
| Black Market | Prestige 3 | Rare item rotation | Negotiate prices |
Offline calculation: On reconnect, compute min(elapsed, 8h) of idle ticks. Cap prevents overnight-equals-weeks exploits. Premium "Eternal Flame" upgrade raises cap to 24h.
Section IIIHero System
Classes
Four base classes, each unlocking a subclass tree at Prestige 1. Subclass selection is per-run, chosen at floor 5 via a "Shrine of Calling" event.
Stats
| Stat | Source | Notes |
|---|---|---|
| HP | Base + upgrades + equipment | No natural regen in combat |
| ATK | Base + upgrades + equipment + buffs | Flat + % scaling |
| DEF | Base + upgrades + equipment | Diminishing returns: reduction = DEF / (DEF + 50 + floor×2) |
| SPD | Base + equipment | Determines turn order |
| CRIT% | Base (5%) + upgrades + equipment | Crit multiplier separate (default 2×) |
| LUCK | Equipment + events | Affects loot rarity, event quality, shop inventory |
Per-Run Leveling
Heroes gain XP from kills. Level-ups grant stat boosts and skill points spent in a 3-deep subclass skill tree. All per-run progress resets on death. This creates the "one more floor" tension — you're always one level from a power spike that might carry you past the current wall.
Section IVCombat System
Turn Structure
Semi-auto with meaningful decisions. Combat is round-based:
- Turn order resolved by SPD.
- Hero turn: Auto-attack by default. Player can intervene to use a skill, item, or flee. If idle/AFK, hero auto-attacks.
- Enemy turn: AI acts based on behavior pattern.
- Repeat until one side is dead.
Skills are strictly better than auto-attacks but require player input. Idle combat is viable but suboptimal — this is the core idle/active tension.
Example Skills — Knight
| Skill | Cost | Effect |
|---|---|---|
| Shield Bash | 2 CD | Deal 80% ATK + stun 1 turn |
| Fortify | 3 CD | +50% DEF for 3 turns |
| Rallying Cry | 5 CD | Heal 15% max HP + cleanse 1 debuff |
| Last Stand | Passive | Below 25% HP: +30% ATK, +20% DEF |
Enemy Behavior Patterns
- Aggressive: Always attacks. Simple scaling.
- Defensive: Alternates attack/defend. Higher effective HP.
- Berserk: Gains ATK as HP drops. Punishes slow fights.
- Healer: Heals every 3 turns. Must burst down.
- Summoner: Spawns adds. Requires target prioritization.
- Cursed: Applies debuffs on hit. Demands cleanse or avoidance.
Elite Modifiers
Applied to any enemy on elite floors: Vampiric, Shielded, Thorns, Splitting, Enraged, Time-Bomb.
Boss Design
Bosses have 3 phases with mechanic changes at 66% and 33% HP. Each boss has a telegraph system — upcoming attacks are previewed 1 turn in advance, rewarding attentive players.
Section VLoot & Equipment
Rarity Tiers
| Tier | Drop % | Stat Mul | Special |
|---|---|---|---|
| ■ Common | 60% | 1.0× | — |
| ■ Uncommon | 25% | 1.3× | 1 minor affix |
| ■ Rare | 10% | 1.6× | 2 affixes |
| ■ Epic | 4% | 2.0× | 3 affixes + set potential |
| ■ Legendary | 1% | 2.5× | Unique effect + 3 affixes |
| ■ Mythic | 0.1% | 3.5× | Build-defining unique |
Equipment Slots
Helmet, Armor, Weapon, Shield/Offhand, Ring ×2, Amulet, Boots. Each slot has a dedicated affix pool.
Equipment found during a run is lost on death unless: the player reaches a Vault event and banks 1 item (rare), or has the "Salvager" meta-upgrade (extracts 1 random item as blueprint), or extracts via portal (keeps everything). This creates high-stakes decisions: equip the legendary sword now for power, or bank it for future runs?
Affix System
Prefixes (2 max) and suffixes (2 max) rolled from per-slot pools.
- Prefixes: Brutal (+ATK%), Fortified (+DEF%), Vampiric (lifesteal), Blazing (+fire damage)
- Suffixes: of the Bear (+HP), of Haste (+SPD), of Fortune (+LUCK), of Thorns (reflect)
Set Items
4-piece sets with 2pc and 4pc bonuses, class-agnostic but synergy-targeted:
- Ironbound — 2pc: +20% DEF. 4pc: Block chance applies to all damage types.
- Shadowweave — 2pc: +15% CRIT. 4pc: Crits reset skill cooldowns.
- Flamecaller — 2pc: +25% spell damage. 4pc: Spells apply burn DoT.
Section VIDungeon Events
Events are the primary source of run variance. Each has 2–3 choices with different risk/reward profiles.
Resource Events
- Healing Spring: Full heal vs. partial heal + permanent HP buff.
- Treasure Vault: Take gold now vs. solve riddle for 3× gold.
- Abandoned Cart: Random equipment vs. guaranteed consumables.
Risk Events
- Cursed Altar: Accept a curse (permanent debuff) for a powerful blessing.
- Gambler's Den: Bet gold on dice. Odds improve with LUCK.
- Trapped Chest: Disarm (SPD check) for loot, or trigger trap for damage.
Narrative Events
- Wandering Merchant: Unique shop with rotating rare inventory.
- Lost Soul: Escort for 3 floors for reward, or ignore.
- Rival Adventurer: Fight for loot, trade items, or temporary alliance.
Mystery Events
- Dimensional Rift: Teleport 3–5 floors deeper (skip content + loot).
- Memory Fragment: Lore unlock + permanent stat bonus (collectible).
- Shrine of Calling: Subclass selection (floor 5, guaranteed).
Event Chains
Some events have follow-ups. Saving the Lost Soul on floor 12 triggers "Grateful Ghost" on floor 20 with a unique reward. Chains are tracked per-run and create emergent narratives.
Section VIIMeta-Progression
Persistent Upgrades (Gold)
| Category | Examples |
|---|---|
| Economy | Idle gold rate, gold multiplier, shop discounts, death gold retention % |
| Combat | Base ATK/DEF/HP bonuses, starting crit%, starting skill unlocks |
| Exploration | Floor preview range, event quality, vault frequency, portal spawn rate |
| Idle | Minion expedition slots, crafting speed, tavern capacity, offline cap |
Prestige System
Trigger: Reach floor 50+ and choose to "Ascend" at any rest site.
Cost: Resets ALL gold, upgrades, and unlocked content (except achievements and lore).
Reward: Prestige Points (PP) based on deepest floor. PP buys permanent prestige upgrades.
Ascension Challenges
Optional run modifiers that multiply PP gain. Stack multiplicatively.
| Challenge | Effect | PP Multiplier |
|---|---|---|
| Frail | -50% HP | 1.5× |
| Pacifist | Can't attack on odd turns | 2× |
| Cursed Blood | Start with 3 random curses | 2.5× |
| Ironman | No healing from any source | 3× |
| Speedrun | 30-second timer per floor | 2× |
Hero Legacy
After Prestige 3, dead heroes leave behind a "Legacy" — a permanent passive buff based on deepest floor and class. The player accumulates a graveyard of legacies. Each is small (+1% ATK, +5 HP) but they stack infinitely, creating permanent growth even through death.
Section VIIIEndgame — The Abyss
Unlocked at Prestige Tier 4. A separate infinite dungeon with modified rules:
- No floor events. Pure combat gauntlet.
- Daily mutators. "Today: all enemies have Thorns + double gold." Creates daily leaderboard competition.
- Leaderboard floors as the primary competitive metric.
- Abyss-exclusive loot with unique affixes not found in the main dungeon.
- Weekly boss: Hand-designed encounter, rotates weekly. Grants cosmetic + Abyss currency.
Section IXEconomy & Currencies
| Currency | Source | Sink | Persistence |
|---|---|---|---|
| Gold | Combat, events, idle | Upgrades, shops | Survives death, reset on prestige |
| Prestige Points | Ascension | Prestige upgrades | Permanent |
| Materials | Expeditions, salvage | Crafting | Survives death, reset on prestige |
| Abyss Tokens | Abyss runs | Cosmetics, QoL | Permanent |
| Soul Fragments | Legacy system | Legacy enhancement | Permanent |
| Dungeon Keys | Rare drops, daily | Special dungeon variants | Permanent |
Anti-inflation: Upgrade costs are exponential. Shop prices scale with floor depth. Crafting permanently consumes materials.
Section XProgression Pacing
| Milestone | Expected Time | What Opens |
|---|---|---|
| First death | 2 min | Understanding of loop |
| Floor 10 (first boss) | 15–30 min | Boss mechanics, rare loot |
| Floor 25 | 1–2 hours | Mid-tier upgrades, expeditions |
| Floor 50 (first prestige) | 4–8 hours | Prestige system, subclasses |
| Prestige 3 | 20–40 hours | Ascension challenges, legacy |
| Floor 100 | 50+ hours | The Abyss, endgame |
| Abyss floor 50 | 100+ hours | Competitive leaderboards |
Section XITechnical Architecture
State Model
Tick System
- Fast tick (600ms): Combat resolution, active gameplay.
- Slow tick (1s): Idle income, expedition progress, crafting, UI updates.
- Offline reconnect: slowTicks = min(elapsed_seconds, offline_cap). Bulk-apply idle income and expedition completions. No combat sim while offline.
Scaling Math
Enemy HP: base_hp × template_mul × (1 + floor × 0.15) × (1 + prestige × 0.05)
Enemy ATK: Same formula, steeper per-floor coefficient (0.18).
Gold scaling: base_gold × template_mul × (1 + floor × 0.12) × (1 + gold_upgrade × 0.1)
DEF diminishing returns: reduction = DEF / (DEF + 50 + floor × 2) — ensures value without immunity.
All tunable constants exposed in balance.json for rapid iteration.
RNG Architecture
- Seeded PRNG per run (seed shown to player, shareable for challenge runs).
- Pity counters for loot rarity, event types, and shop inventory.
- Weighted tables with configurable weights per floor bracket.
Persistence
- LocalStorage for single-device (with base64 export/import save string).
- Cloud save (optional) via lightweight backend: save on death, prestige, and every 60s.
- Save versioning with migration on load.
Section XIIContent Roadmap
- 4 classes, no subclasses
- Combat + basic events + boss every 10 floors
- Gold + persistent upgrades
- Common/Uncommon/Rare loot (no sets)
- Idle gold generation
- Mobile-responsive web UI
- Subclass system + Shrine of Calling
- Full event chain system
- Equipment affixes + set items
- Minion expeditions + crafting
- Prestige system (Tier 1–2)
- Prestige Tier 3–4 + Ascension Challenges
- The Abyss + daily mutators + leaderboards
- Hero Legacy system
- Mythic items + lore completion
- Shared seed challenge runs
- Guild system (shared idle bonuses)
- Weekly boss rankings + trading post
- Seasonal content + cosmetics
Section XIIIMonetization
If monetized, strictly cosmetic + convenience:
- Cosmetic skins for heroes, UI themes, death animations, loot particles.
- Offline cap extension (8h → 24h).
- Additional save slots.
- Cosmetic gravestones for the Legacy graveyard.
- Season pass with cosmetic reward track + minor QoL.
No stat boosts, no exclusive gameplay content, no gold purchases. Paying players look cooler but don't go deeper.
Section XIVOpen Design Questions
Should the player eventually recruit companions (1 → 3-hero party)? Adds tactical depth but massively increases combat complexity and balance surface area. Possibly Phase 4+.
Async PvP (attack other players' "ghost runs") could work without real-time infrastructure. Risk of balance distortion.
How much lore vs. pure mechanics? Memory Fragments suggest light narrative. Could expand into a full story mode or stay ambient.
Or is the Ascension Challenge system sufficient for self-imposed difficulty?
Ladder-style seasons with fresh starts, or purely additive forever? Seasons drive engagement but punish casual players.