feat: integrated expansion system (Vampire Mode + Goddess Mode) #131

Open
opened 2026-03-24 16:15:49 -07:00 by hikari · 5 comments
Owner

Overview

Add two post-apotheosis alternate game modes — Vampire Mode and Goddess Mode — as an integrated expansion system built directly into the core game state. Each expansion's state lives as first-class fields in GameState (same pattern as prestige, transcendence, apotheosis) rather than under a separate expansions key.

Supersedes #17 and #18.


Architecture

GameState Changes

Goddess Mode and Vampire Mode state fields are added directly to GameState at the top level. No nested expansions wrapper.

Each expansion starts with fully default/locked state and is gated behind its unlock condition (see below).

Unlock Chain

Mode Unlock Condition
Mortal (Base Game) Always available
Goddess Mode First Apotheosis in Base Game
Vampire Mode First Eternal Sovereignty in Goddess Mode

Sync New Content (Force Sync Button)

The existing "sync new content" / force-sync flow must inject all expansion state fields for players whose saves pre-date the expansion. On sync, any missing goddess or vampire state properties are initialised to their defaults (all locked, all resources at zero, all progress at zero) so existing saves are never broken by the new content landing.

Tick Engine

The client-side tick engine (apps/web/src/engine/tick.ts) calculates passive income and quest/exploration timers for all unlocked expansion states on every tick. Offline income calculation on load must also cover all unlocked expansions.


UI — Mode Bar + Dynamic Tab Bar

Navigation uses two rows:

  • Row 1 — Mode bar: Mortal | Goddess | Vampire
    • Always visible
    • Locked modes show a padlock and cannot be selected pre-unlock
    • Selected mode persists in game state (survives page reload)
  • Row 2 — Tab bar: swaps entirely based on the selected mode
    • Mortal: Zones · Quests · Adventurers · Equipment · Upgrades · Prestige · Transcendence · Crafting · Exploration · Achievements · Codex · Story · Daily
    • Goddess: Zones · Disciples · Quests · Equipment · Upgrades · Consecration · Enlightenment · Crafting · Exploration · Achievements
    • Vampire: (TBD when implemented)

This scales cleanly to any number of future modes without adding new rows.


UI — Goddess Colour Theme

When Goddess is the selected mode, the entire site UI shifts to the Goddess colour scheme with a ~300ms CSS fade transition. Switching back to Mortal fades back to the default scheme. The game logo does not change.

Goddess palette:

  • Primary: soft divine blue (backgrounds, tab highlights, borders)
  • Accents: gold and white (text, icons, buttons, highlights)

Implementation: toggle a .goddess-mode CSS class on the root element based on selected mode. All colours are driven by CSS custom properties so the swap is a single class change.

Vampire Mode will follow the same pattern with its own .vampire-mode palette (deep crimsons, blacks, desaturated purples) when implemented.


UI — Resource Bar

The resource bar dropdown always shows goddess currencies (Prayers, Divinity, Stardust), even before Goddess Mode is unlocked. Pre-unlock they appear greyed/locked so players can see what's coming.


Vampire Mode

Theme

Gothic/vampire — Haunted Catacombs, Blood Mire, Obsidian Keep, Crimson Citadel, Shadow Court, The Eternal Abyss, etc.

Thematic Terminology (working names — open to revision)

Base Game Vampire Mode
Gold Blood
Essence Ichor
Crystals Soul Shards
Runestones Bloodstones
Echoes Whispers
Click action Hunt
Adventurers Thralls
Prestige Siring
Transcendence The Awakening
Apotheosis Eternal Sovereignty

Tuning (harder than base game)

Setting Base Game Vampire Mode
Gold income multiplier ~0.3×
Boss HP Standard Substantially higher
Quest failure chance 10%–40% 20%–60%
Prestige threshold Standard Higher
Transcendence threshold Standard Higher

Content Scale

Content Type Count
Zones 18
Bosses ~4 per zone
Quests ~5 per zone
Adventurer tiers 32 (Thrall → Fledgling → Revenant → … → Ancient One)
Equipment TBD
Equipment sets TBD
Upgrades TBD
Prestige upgrades TBD
Transcendence upgrades TBD
Achievements TBD
Exploration areas 4 per zone
Crafting recipes TBD
Materials TBD

Goddess Mode

Theme

Divine/celestial — Celestial Gardens, The Crystal Sanctum, Astral Cathedral, The Heavenly Forge, Empyrean Citadel, The Divine Heart, etc.

Thematic Terminology

Base Game Goddess Mode
Gold Prayers
Essence Divinity
Crystals Stardust
Click action Invoke
Adventurers Disciples
Prestige Consecration
Transcendence Enlightenment
Apotheosis Deification

Tuning (harder than Vampire Mode)

Setting Base Game Vampire Mode Goddess Mode
Gold income multiplier ~0.3× ~0.1×
Boss HP Standard Higher Much higher
Boss/quest rewards Standard Standard Lower
Quest failure chance 10%–40% 20%–60% 30%–70%
Purchase costs Standard Standard More expensive
Prestige threshold Standard Higher Much higher

Implementation Progress

Chunk 1 — Types

  • All goddess type interfaces added to packages/types
  • GoddessEquipmentSet + computeGoddessSetBonuses added
  • Goddess currency fields added to Resource
  • GoddessState container + goddess? field on GameState

Chunk 2 — Data (at base game content scale)

  • 18 zones, 72 bosses, 90 quests
  • 32 disciple tiers, 53 equipment pieces, 9 equipment sets
  • 57 upgrades, 25 consecration upgrades, 15 enlightenment upgrades
  • 54 materials, 36 crafting recipes, 72 exploration areas
  • 40 achievements

Chunk 3 — Sync / Sanitize

  • validateAndSanitize — inject goddess state defaults for existing saves
  • syncNewContent — inject missing goddess fields
  • Apotheosis unlock flag handling

Chunk 4 — API Routes

  • Goddess boss fight route
  • Consecration (goddess prestige) route
  • Enlightenment (goddess transcendence) route
  • Goddess upgrade purchase route
  • Goddess crafting route
  • Goddess exploration route

Chunk 5 — UI: Resource Bar + Mode/Tab Nav

  • Goddess currencies in resource bar (greyed pre-apotheosis)
  • Mode bar (Row 1): Mortal | Goddess | Vampire
  • Dynamic tab bar (Row 2): swaps per selected mode
  • Selected mode persists in game state
  • .goddess-mode CSS class toggle on root when Goddess mode selected
  • 300ms CSS fade transition

Chunk 6 — UI: Goddess Panels

  • All 10 goddess panel components

Chunk 7 — Tick Engine

  • Goddess passive income, disciple logic, quest timers, lock state checks

Chunk 8 — CSS Theme

  • Goddess CSS variables + .goddess-mode overrides + fade transition

Chunk 9 — About Page

  • Update HOW_TO_PLAY with Goddess expansion documentation

This issue was created with help from Hikari~ 🌸

## Overview Add two post-apotheosis alternate game modes — **Vampire Mode** and **Goddess Mode** — as an integrated expansion system built directly into the core game state. Each expansion's state lives as first-class fields in `GameState` (same pattern as `prestige`, `transcendence`, `apotheosis`) rather than under a separate `expansions` key. Supersedes #17 and #18. --- ## Architecture ### GameState Changes Goddess Mode and Vampire Mode state fields are added directly to `GameState` at the top level. No nested `expansions` wrapper. Each expansion starts with fully default/locked state and is gated behind its unlock condition (see below). ### Unlock Chain | Mode | Unlock Condition | |---|---| | Mortal (Base Game) | Always available | | Goddess Mode | First Apotheosis in Base Game | | Vampire Mode | First Eternal Sovereignty in Goddess Mode | ### Sync New Content (Force Sync Button) The existing "sync new content" / force-sync flow **must inject all expansion state fields** for players whose saves pre-date the expansion. On sync, any missing goddess or vampire state properties are initialised to their defaults (all locked, all resources at zero, all progress at zero) so existing saves are never broken by the new content landing. ### Tick Engine The client-side tick engine (`apps/web/src/engine/tick.ts`) calculates passive income and quest/exploration timers for all unlocked expansion states on every tick. Offline income calculation on load must also cover all unlocked expansions. --- ## UI — Mode Bar + Dynamic Tab Bar Navigation uses **two rows**: - **Row 1 — Mode bar:** `Mortal | Goddess | Vampire` - Always visible - Locked modes show a padlock and cannot be selected pre-unlock - Selected mode persists in game state (survives page reload) - **Row 2 — Tab bar:** swaps entirely based on the selected mode - **Mortal:** Zones · Quests · Adventurers · Equipment · Upgrades · Prestige · Transcendence · Crafting · Exploration · Achievements · Codex · Story · Daily - **Goddess:** Zones · Disciples · Quests · Equipment · Upgrades · Consecration · Enlightenment · Crafting · Exploration · Achievements - **Vampire:** *(TBD when implemented)* This scales cleanly to any number of future modes without adding new rows. --- ## UI — Goddess Colour Theme When **Goddess** is the selected mode, the **entire site UI shifts to the Goddess colour scheme** with a ~300ms CSS fade transition. Switching back to Mortal fades back to the default scheme. The game logo does not change. **Goddess palette:** - Primary: soft divine blue (backgrounds, tab highlights, borders) - Accents: gold and white (text, icons, buttons, highlights) Implementation: toggle a `.goddess-mode` CSS class on the root element based on selected mode. All colours are driven by CSS custom properties so the swap is a single class change. Vampire Mode will follow the same pattern with its own `.vampire-mode` palette (deep crimsons, blacks, desaturated purples) when implemented. --- ## UI — Resource Bar The resource bar dropdown **always shows goddess currencies** (Prayers, Divinity, Stardust), even before Goddess Mode is unlocked. Pre-unlock they appear greyed/locked so players can see what's coming. --- ## Vampire Mode ### Theme Gothic/vampire — Haunted Catacombs, Blood Mire, Obsidian Keep, Crimson Citadel, Shadow Court, The Eternal Abyss, etc. ### Thematic Terminology *(working names — open to revision)* | Base Game | Vampire Mode | |---|---| | Gold | Blood | | Essence | Ichor | | Crystals | Soul Shards | | Runestones | Bloodstones | | Echoes | Whispers | | Click action | Hunt | | Adventurers | Thralls | | Prestige | Siring | | Transcendence | The Awakening | | Apotheosis | Eternal Sovereignty | ### Tuning (harder than base game) | Setting | Base Game | Vampire Mode | |---|---|---| | Gold income multiplier | 1× | ~0.3× | | Boss HP | Standard | Substantially higher | | Quest failure chance | 10%–40% | 20%–60% | | Prestige threshold | Standard | Higher | | Transcendence threshold | Standard | Higher | ### Content Scale | Content Type | Count | |---|---| | Zones | 18 | | Bosses | ~4 per zone | | Quests | ~5 per zone | | Adventurer tiers | 32 (Thrall → Fledgling → Revenant → … → Ancient One) | | Equipment | TBD | | Equipment sets | TBD | | Upgrades | TBD | | Prestige upgrades | TBD | | Transcendence upgrades | TBD | | Achievements | TBD | | Exploration areas | 4 per zone | | Crafting recipes | TBD | | Materials | TBD | --- ## Goddess Mode ### Theme Divine/celestial — Celestial Gardens, The Crystal Sanctum, Astral Cathedral, The Heavenly Forge, Empyrean Citadel, The Divine Heart, etc. ### Thematic Terminology | Base Game | Goddess Mode | |---|---| | Gold | Prayers | | Essence | Divinity | | Crystals | Stardust | | Click action | Invoke | | Adventurers | Disciples | | Prestige | Consecration | | Transcendence | Enlightenment | | Apotheosis | Deification | ### Tuning (harder than Vampire Mode) | Setting | Base Game | Vampire Mode | Goddess Mode | |---|---|---|---| | Gold income multiplier | 1× | ~0.3× | ~0.1× | | Boss HP | Standard | Higher | Much higher | | Boss/quest rewards | Standard | Standard | Lower | | Quest failure chance | 10%–40% | 20%–60% | 30%–70% | | Purchase costs | Standard | Standard | More expensive | | Prestige threshold | Standard | Higher | Much higher | --- ## Implementation Progress ### ✅ Chunk 1 — Types - [x] All goddess type interfaces added to `packages/types` - [x] `GoddessEquipmentSet` + `computeGoddessSetBonuses` added - [x] Goddess currency fields added to `Resource` - [x] `GoddessState` container + `goddess?` field on `GameState` ### ✅ Chunk 2 — Data (at base game content scale) - [x] 18 zones, 72 bosses, 90 quests - [x] 32 disciple tiers, 53 equipment pieces, 9 equipment sets - [x] 57 upgrades, 25 consecration upgrades, 15 enlightenment upgrades - [x] 54 materials, 36 crafting recipes, 72 exploration areas - [x] 40 achievements ### Chunk 3 — Sync / Sanitize - [ ] `validateAndSanitize` — inject goddess state defaults for existing saves - [ ] `syncNewContent` — inject missing goddess fields - [ ] Apotheosis unlock flag handling ### Chunk 4 — API Routes - [ ] Goddess boss fight route - [ ] Consecration (goddess prestige) route - [ ] Enlightenment (goddess transcendence) route - [ ] Goddess upgrade purchase route - [ ] Goddess crafting route - [ ] Goddess exploration route ### Chunk 5 — UI: Resource Bar + Mode/Tab Nav - [ ] Goddess currencies in resource bar (greyed pre-apotheosis) - [ ] Mode bar (Row 1): `Mortal | Goddess | Vampire` - [ ] Dynamic tab bar (Row 2): swaps per selected mode - [ ] Selected mode persists in game state - [ ] `.goddess-mode` CSS class toggle on root when Goddess mode selected - [ ] 300ms CSS fade transition ### Chunk 6 — UI: Goddess Panels - [ ] All 10 goddess panel components ### Chunk 7 — Tick Engine - [ ] Goddess passive income, disciple logic, quest timers, lock state checks ### Chunk 8 — CSS Theme - [ ] Goddess CSS variables + `.goddess-mode` overrides + fade transition ### Chunk 9 — About Page - [ ] Update `HOW_TO_PLAY` with Goddess expansion documentation --- ✨ This issue was created with help from Hikari~ 🌸
Author
Owner

Palette Reference

Exact hex values agreed upon for each expansion's colour scheme:

Base Game

Variable Hex
Accent (purple) #7C3AED
Accent light #A855F7
Crystal (teal) #06B6D4
Gold #F59E0B
Rune (pink) #EC4899
Background #0D0D1A
Surface #1A1A2E

Vampire Mode (.vampire-mode)

Role Use Hex
Primary Dark blood #5C0A1A
Secondary Rich crimson #C41E3A

Goddess Mode (.goddess-mode)

Role Use Hex
Primary Deep gold #C8A000
Secondary Soft celestial blue #9EC8F0

These are also reflected in the Discord milestone role colours (Apotheosis, Eternal Sovereignty, Deification).

## Palette Reference Exact hex values agreed upon for each expansion's colour scheme: ### Base Game | Variable | Hex | |---|---| | Accent (purple) | `#7C3AED` | | Accent light | `#A855F7` | | Crystal (teal) | `#06B6D4` | | Gold | `#F59E0B` | | Rune (pink) | `#EC4899` | | Background | `#0D0D1A` | | Surface | `#1A1A2E` | ### Vampire Mode (`.vampire-mode`) | Role | Use | Hex | |---|---|---| | Primary | Dark blood | `#5C0A1A` | | Secondary | Rich crimson | `#C41E3A` | ### Goddess Mode (`.goddess-mode`) | Role | Use | Hex | |---|---|---| | Primary | Deep gold | `#C8A000` | | Secondary | Soft celestial blue | `#9EC8F0` | These are also reflected in the Discord milestone role colours (Apotheosis, Eternal Sovereignty, Deification).
Author
Owner

The stats on the public profile page should be tabbed by expansion (base, prestige, transcendence, apotheosis) rather than shown all at once, to keep the layout manageable as the numbers grow.

This issue was created with help from Hikari~ 🌸

The stats on the public profile page should be tabbed by expansion (base, prestige, transcendence, apotheosis) rather than shown all at once, to keep the layout manageable as the numbers grow. ✨ This issue was created with help from Hikari~ 🌸
Author
Owner

Each prestige/transcendence/apotheosis reset should only reset the game state for its specific expansion (or the base game), leaving progress in other expansions intact.

This issue was created with help from Hikari~ 🌸

Each prestige/transcendence/apotheosis reset should only reset the game state for its specific expansion (or the base game), leaving progress in other expansions intact. ✨ This issue was created with help from Hikari~ 🌸
Author
Owner

Design correction noted during Goddess implementation:

The expansion order is Vampire Mode first, then Goddess Mode — not the other way around. The correct progression chain is:

Mortal → Apotheosis → Vampire Mode → [Vampire Apotheosis equivalent] → Goddess Mode → Deification

The full mode/mechanic mapping across all three tiers:

Base Game Vampire Mode Goddess Mode
Gold TBD Prayers
Essence TBD Divinity
Crystals TBD Stardust
Click action TBD Invoke
Adventurers TBD Disciples
Prestige TBD Consecration
Transcendence TBD Enlightenment
Apotheosis TBD Deification

What this means for current code:

  • Mode bar order is now Mortal | Vampire | Goddess (corrected)
  • Vampire mode unlocks at apotheosis.count >= 1 (corrected)
  • Goddess mode unlock gate is a placeholder until Vampire content is built
  • Deification tab still needs to be added to the Goddess tab row

Picking up Vampire Mode content tomorrow!

This issue was created with help from Hikari~ 🌸

**Design correction noted during Goddess implementation:** The expansion order is **Vampire Mode first, then Goddess Mode** — not the other way around. The correct progression chain is: **Mortal → Apotheosis → Vampire Mode → [Vampire Apotheosis equivalent] → Goddess Mode → Deification** The full mode/mechanic mapping across all three tiers: | Base Game | Vampire Mode | Goddess Mode | |-----------|-------------|--------------| | Gold | TBD | Prayers | | Essence | TBD | Divinity | | Crystals | TBD | Stardust | | Click action | TBD | Invoke | | Adventurers | TBD | Disciples | | Prestige | TBD | Consecration | | Transcendence | TBD | Enlightenment | | Apotheosis | TBD | Deification | **What this means for current code:** - Mode bar order is now `Mortal | Vampire | Goddess` ✅ (corrected) - Vampire mode unlocks at `apotheosis.count >= 1` ✅ (corrected) - Goddess mode unlock gate is a placeholder until Vampire content is built - Deification tab still needs to be added to the Goddess tab row Picking up Vampire Mode content tomorrow! ✨ This issue was created with help from Hikari~ 🌸
Author
Owner

Post-implementation parity audit — outstanding gaps

The vampire and goddess expansions are now fully implemented. A parity audit against the base game identified three remaining gaps to address:


1. /force-unlocks debug endpoint — vampire & goddess not handled

debugRouter.post("/force-unlocks", ...) only propagates zone/quest/boss unlocks for the base game. If a player has a stuck lock in the vampire or goddess realms, calling this endpoint won't fix it. Needs equivalent unlock logic for state.vampire and state.goddess.


2. Daily challenges — base game only

The daily challenges system (src/data/dailyChallenges.ts, the /timers route, and the dailyChallengePanel) exists only for the base game. Vampire and goddess have no equivalent. This is likely intentional — confirm whether daily challenges should remain base-game-exclusive or be extended to the expansions.


3. Tick engine asymmetry — auto systems live in wrong place

Base game auto-adventurer logic runs inside applyTick() in apps/web/src/engine/tick.ts. Vampire and goddess auto-quest/auto-thrall/auto-disciple logic runs inside gameContext.tsx instead. Behaviour is equivalent but the code location is inconsistent. Low priority, but worth tidying for maintainability.


This comment was added with help from Hikari~ 🌸

## Post-implementation parity audit — outstanding gaps The vampire and goddess expansions are now fully implemented. A parity audit against the base game identified three remaining gaps to address: --- ### 1. `/force-unlocks` debug endpoint — vampire & goddess not handled `debugRouter.post("/force-unlocks", ...)` only propagates zone/quest/boss unlocks for the base game. If a player has a stuck lock in the vampire or goddess realms, calling this endpoint won't fix it. Needs equivalent unlock logic for `state.vampire` and `state.goddess`. --- ### 2. Daily challenges — base game only The daily challenges system (`src/data/dailyChallenges.ts`, the `/timers` route, and the `dailyChallengePanel`) exists only for the base game. Vampire and goddess have no equivalent. **This is likely intentional** — confirm whether daily challenges should remain base-game-exclusive or be extended to the expansions. --- ### 3. Tick engine asymmetry — auto systems live in wrong place Base game auto-adventurer logic runs inside `applyTick()` in `apps/web/src/engine/tick.ts`. Vampire and goddess auto-quest/auto-thrall/auto-disciple logic runs inside `gameContext.tsx` instead. Behaviour is equivalent but the code location is inconsistent. Low priority, but worth tidying for maintainability. --- ✨ This comment was added with help from Hikari~ 🌸
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nhcarrigan/elysium#131