id: 55b9d8f7f2764c069232aa6dd0be21dc
parent_id: d9dda063a07148abbc0e443976d4abd2
item_type: 1
item_id: 088737f31c514f1da21cc42c0ab6acc1
item_updated_time: 1785698958525
title_diff: "[]"
body_diff: "[{\"diffs\":[[0,\" 1**\"],[-1,\" (setting, items, enemies, spells, bard songs)\"],[0,\" wit\"]],\"start1\":147,\"start2\":147,\"length1\":54,\"length2\":8},{\"diffs\":[[0,\"spired**\"],[-1,\" open-ended d100\"],[0,\" combat \"]],\"start1\":212,\"start2\":212,\"length1\":32,\"length2\":16},{\"diffs\":[[0,\"e.\\\n\\\n\"],[-1,\"### What Each Source Contributes\\\n\\\n| Source | Primary Contribution |\\\n|---|---|\\\n| **Bard's Tale 1** | All 127 items, 125 enemies, 79 spells (4 caster classes × 7 levels), 6 bard songs, Skara Brae overworld + 16 dungeon levels, BT1 dungeon structure (Cellar→Sewers→Catacombs→Harkyn's→Kylearan's→Mangar's Tower) |\\\n| **RoleMaster / MERP** | Open-ended d100 combat rolls, critical hit tables (slash/crush/puncture × A-D), OB/DB system, stat_bonus formula |\\\n| **Torn City** | UI layout (sidebar + main content), shop with buy/sell economy, gold display, energy/nerve resource system, Torn-style graphical browser UI |\\\n| **Idle Fantasy** | Offline adventure sessions (planned, not yet implemented) |\\\n\\\n\"],[0,\"---\\\n\"]],\"start1\":299,\"start2\":299,\"length1\":701,\"length2\":8},{\"diffs\":[[0,\"ms**\"],[-1,\" across 3 JSON files\"],[0,\" (we\"]],\"start1\":389,\"start2\":389,\"length1\":28,\"length2\":8},{\"diffs\":[[0,\"urer\"],[-1,\" 22, \"],[1,\"/\"],[0,\"Magician\"],[-1,\" 22, \"],[1,\"/\"],[0,\"Sorcerer\"],[-1,\" 22, \"],[1,\"/\"],[0,\"Wizard \"],[-1,\"13\"],[1,\"× 7 levels\"],[0,\") wi\"]],\"start1\":538,\"start2\":538,\"length1\":48,\"length2\":44},{\"diffs\":[[0,\"ects\"],[-1,\" (accuracy, defense, heal, weaken, damage, magic_resist)\"],[0,\"\\\n- *\"]],\"start1\":637,\"start2\":637,\"length1\":64,\"length2\":8},{\"diffs\":[[0,\" instrument\\\n\"],[1,\"- **BIGINT stats (i64)**: CharacterStats uses i64 for all stats, matching design spec\\\n\"],[0,\"- **RoleMast\"]],\"start1\":886,\"start2\":886,\"length1\":24,\"length2\":110},{\"diffs\":[[0,\"- **\"],[-1,\"Song combat integration**: `resolve_combat_with_song()` applies buffs/debuffs during combat\\\n- **Shop economy**: `always_in_shop` flag (15 basic items always stocked), `shop_stock` HashMap tracks sold items,\"],[1,\"Crit damage cap by level difference**: +10 = 60% HP cap, +20 = 40%, +50 = 15%, +100 = 5% (per design doc)\\\n- **Spell system**: `known_spells` on Character, auto-learn level 1 spells at creation, learn higher levels at Review Board (costs gold), activate one\"],[0,\" s\"],[1,\"p\"],[0,\"ell \"],[-1,\"adds to stock, buy consumes it\\\n- **Item pricing**: BT1 gold values directly (sell = 50%)\\\n- **Active song system**: Bards can set one active song that affects combat\\\n- **Spell learning**: Spell level costs gold at Review Board (1000-20000), known_spells on Character\\\n- **Spell points**: `max_spell_points = spell_level * 10`, refills to max (regen system)\"],[1,\"for combat, SP deducted per fight\\\n- **Spell combat integration**: `resolve_combat_full()` applies damage/heal spell effects during adventure combat\\\n- **Song combat integration**: `resolve_combat_with_song()` applies bard song buffs/debuffs\\\n- **Shop economy**: `always_in_shop` flag (15 basic items), `shop_stock` HashMap, sell adds to stock\"],[0,\"\\\n- *\"]],\"start1\":1100,\"start2\":1100,\"length1\":574,\"length2\":611},{\"diffs\":[[0,\"stat\"],[-1,\", costs 1 energy per train, +1 stat\\\n- **Garth's Equipment Shoppe**: Buy/sell with stock management\"],[0,\"\\\n- *\"]],\"start1\":1837,\"start2\":1837,\"length1\":106,\"length2\":8},{\"diffs\":[[0,\" per HP\\\n- **\"],[-1,\"A\"],[1,\"8 a\"],[0,\"dventure sys\"]],\"start1\":1878,\"start2\":1878,\"length1\":25,\"length2\":27},{\"diffs\":[[0,\"ure \"],[-1,\"system**: 5 zones with nerve cost + encounter tables\\\n- **Zones**: Streets, Catacombs, Sewers, Lower Dungeons, Mangar's Tower (need reorg to BT1 dungeon structure)\"],[1,\"zones** matching BT1 dungeon progression: Streets → Cellar → Sewers Upper/Deep → Catacombs → Harkyn's Castle → Kylearan's Tower → Mangar's Tower\"],[0,\"\\\n- *\"]],\"start1\":1898,\"start2\":1898,\"length1\":170,\"length2\":152},{\"diffs\":[[0,\" yet\"],[-1,\" (all state lost on restart)\"],[0,\"\\\n- *\"]],\"start1\":2167,\"start2\":2167,\"length1\":36,\"length2\":8},{\"diffs\":[[0,\" yet\"],[-1,\"\\\n- **No database**: All state in `RwLock<Vec<T>>` in AppState\"],[0,\"\\\n\\\n##\"]],\"start1\":2257,\"start2\":2257,\"length1\":69,\"length2\":8},{\"diffs\":[[0,\" bar\"],[-1,\" (logo + char tabs + account dropdown)\"],[0,\", le\"]],\"start1\":2317,\"start2\":2317,\"length1\":46,\"length2\":8},{\"diffs\":[[0,\"s** \"],[-1,\"with emoji fallbacks\"],[1,\"(Sparkles, WandSparkles for spells)\"],[0,\"\\\n- *\"]],\"start1\":2365,\"start2\":2365,\"length1\":28,\"length2\":43},{\"diffs\":[[0,\"Bard\"],[-1,\" \"],[1,\"-\"],[0,\"only), \"],[-1,\"Item Catalogue (admin only)\\\n- **Custom favicon**: SVG shield with sword in purple gradient\\\n- **Dynamic browser title**: `Skara Brae - {page label}`\\\n- **Shop stock filtering**: 3 dropdowns (type/quality/slot), computed property for filtered items\\\n- **Songs page**: List all 6 songs with Play/Stop, locked songs shown with level req\\\n- **Admin i\"],[1,\"**Spells** (caster classes only), I\"],[0,\"tem \"],[-1,\"c\"],[1,\"C\"],[0,\"atalogue\"],[-1,\"**: Only visible to admin-role users\\\n- **Inventory management**: Equip/unequip via API\\\n- **Adventure combat log**: Round-by-round display\\\n- **Regen timers**: Energy +1/3min, Nerve +1/5min, HP +5%/5min\\\n\\\n---\\\n\\\n## Inconsistencies with Design Docs (to address)\\\n\\\n### Stats — Design says BIGINT/i64, Implementation uses i32\\\n- **Design**: Stats should be open-ended BIGINT, tiered display (K/M/B/T), exponentially growing\\\n- **Current**: `CharacterStats` uses `i32` for all stats. `Item.stats` uses `i64` for values\\\n- **Impact**: Can't grow beyond ~2 billion. Need to migrate to `i64` before exponential growth matters\\\n- **Priority**: Low for now (stats are small), but must fix before Phase 2 stat growth\\\n\\\n### Stats — Design says 6 stats, Implementation has 5\\\n- **Design**: Strength, Agility, Constitution, Intelligence, Wisdom, Charisma\\\n- **Current**: Strength, Intelligence, Dexterity, Constitution, Luck\\\n- **Decisi\"],[1,\" (admin-only)\\\n- **Spells page**: Review Board (learn new spell levels for gold), known spells grid, activate/deactivate one spell for combat\\\n- **S\"],[0,\"on\"],[1,\"g\"],[0,\"s \"],[-1,\"mad\"],[1,\"pag\"],[0,\"e**: \"],[-1,\"Luck replaces Charisma + Wisdom (simplified). This is fine — \\\"Luck\\\" in our game serves both Wisdom's perception role and Charisma's luck\\\n- **To revisit**: When adding blessings/cleric spells that reference Wisdom, may need to split Luck into Wisdom + Luck\\\n\\\n### Races — Design says 6, Implementation has 5\\\n- **Design**: Human, Dwarf, Elf, Halfling, Half-Orc, Half-Elf\\\n- **Current**: Human, Elf, Dwarf, Hobbit, HalfElf\\\n- **Note**: \\\"Hobbit\\\" in our code = \\\"Halfling\\\" in BT1 (same race, different name)\\\n\\\n### Classes — Design says 8, Implementation has 10\\\n- **Design**: Warrior, Rogue, Mage, Bard, Cleric, Ranger, Paladin, Monk\\\n- **Current**: Warrior, Paladin, Rogue, Bard, Hunter, Monk, Mage, Wizard, Conjurer, Sorcerer\\\n- **Rationale**: BT1 has 4 spellcaster classes (Conjurer, Magician, Sorcerer, Wizard). Added Hunter as Fighter archetype. Cleric not added (BT1 uses temples for healing, not a class). Mage = generic\"],[1,\"Card list with Play/Stop, level gates\\\n- **SP bar**: Gold-colored spell points bar on home dashboard, visible for caster\"],[0,\" c\"],[1,\"l\"],[0,\"as\"],[-1,\"ter. This matches BT1 better than the original plan\\\n- **Note**: \\\"Mage\\\" class is generic — in BT1, spellcasters switch between Conjurer/Magician/Sorcerer/Wizard\\\n\\\n### Combat — Design says BIGINT stats + Torn-style deterministic outcomes, Implementation uses RoleMaster open-ended\\\n- **Design**: \\\"Stats grow into hundreds of millions. Combat outcomes overwhelmingly deterministic.\\\"\\\n- **Implementation**: RoleMaster-style open-ended d100 rolls, OB/DB from stats, crit tables. A level 1 CAN beat a level 10 with lucky crits\\\n- **Decision**: This is intentional. The hybrid approach keeps combat exciting. Open-ended d100 rolls + the crit cap by level difference isn't implemented yet — full crit damage applies\\\n- **Need to add**: Crit damage cap by level difference (per design doc)\\\n\\\n### Crit Tables — Design has slash/crush/puncture × A-D, Implementation is correct\\\n- Matching the design. Tables loaded from `skara-brae-common/data/crit-tables/combat.json`\\\n\\\n### Crit Level-Difference Caps — Not implemented yet\\\n- Design: Level +10 = 60% HP cap, +20 = 40%, etc.\\\n- Current: No cap\\\n- **Must add before**: Higher-level enemies become unkillable by low-level players with lucky crits\\\n\\\n### Dungeons — Design says district nav + room-by-room, Implementation is zone-based\\\n- Design: City = district click, dungeons = room-by-room exploration with minimap\\\n- Current: Dungeons are abstract \\\"zones\\\" (click adventure → get combat log). No grid movement\\\n- Maps stored as JSON for future exploration mode. This is correct — add exploration as Phase 2\\\n\\\n### Spell Points — Design says \\\"Power Poin\"],[1,\"ses\\\n- **Active spell indicator**: Shown on adventure page\\\n- **Custom favicon**: SVG shield with sword\\\n- **Dynamic browser title**: `Skara Brae - {page label}`\\\n\\\n---\\\n\\\n## Design Doc Inconsistencies (resolved)\\\n\\\n| Area | Design | Implementation | Status |\\\n|---|---|---|---|\\\n| Stats type | BIGINT (i64) | Now i64 for CharacterSta\"],[0,\"ts\"],[-1,\"\\\"\"],[0,\", \"],[-1,\"Implementation uses \\\"Spell Points\\\" + `max_sp`\\\n- Same concept, different name. Fine.\\\n\\\n### Spell Leveling — Design: learn at Review Board every 3 char levels\\\n- **Design**: Characters learn new spell levels at Review Board at levels 3, 6, 9, 12, 15, 18, 21\\\n- **Current**: `spell_level = (char.level / 3) + 1`, matching the BT1 formula\\\n- **Implementation**: `learn_spell_level` POST endpoint deducts gold (1000-20000)\\\n- **Correct**: Matches BT1\\\n\\\n### Offline Adventures — Not implemented\\\n- Design: \\\"Adventures continue for up to 1 hour while logged out\\\"\\\n- Current: Adventures are instant — click → combat log → done\\\n- **Planned**: Phase 2\\\n\\\n### Party System — Design says 2-6 players, Implementation is single-player\\\n- Current: 1 character per adventure. No party system\\\n- **Planned**: Phase 3 (PvP arena first), then guild raids\\\n\\\n### Database — Design says PostgreSQL, Implementation uses in-memory RwLock\\\n- Current: All state lost on restart. `sb-db` and `sb-auth` crates are empty scaffolds\\\n- **Planned**: When persistence matters (Phase 2)\\\n\\\n### Auth — Design says JWT, Implementation has seeded admin/player\\\n- No auth middleware. Just URL-based user selection\\\n- **Planned**: Phase 2\\\n\\\n###\"],[1,\"EnemyStats, CombatStats stats | Fixed |\\\n| Stats count | 6 (STR/AGI/CON/INT/WIS/CHA) | 5 (STR/INT/DEX/CON/LUK) | Acceptable — Luck merges Wis+Cha |\\\n| Races | 6 (incl. Half-Orc) | 5 | Half-Orc deferred |\\\n| Classes | 8 (incl. Cleric) | 10 (no Cleric, 4 spellcasters) |\"],[0,\" I\"],[1,\"n\"],[0,\"te\"],[-1,\"ms — Design says 12 crafting professions' worth, Implementation has BT1 items only\\\n- BT1 items are comprehensive for combat gear. Need crafting materials/components for crafting system\\\n- **Planned**: Phase 4\\\n\\\n### Maps — Stored as JSON, ready for exploration mode\\\n- Skara Brae overworld (32 locations), 16 dungeon levels with special squares\\\n- **Planned**: Exploration mode in Phase 2\\\n\\\n### Bard Songs — Fully implemented with combat integration\\\n- 6 songs, 4 level gates, active song affects combat via resolve_combat_with_song()\\\n\\\n###\"],[1,\"ntional — matches BT1 |\\\n| Crit cap by level diff | Designed | Implemented | Fixed |\\\n|\"],[0,\" Spells \"],[-1,\"— D\"],[1,\"d\"],[0,\"ata \"],[-1,\"loaded, API endpoints created\\\n- GET/POST `/api/characters/{id}/spells` — list available + learn new levels\\\n- `known_spells` on Character, spell_points system\\\n- **Not yet in client UI** — no Spells page in the sidebar yet\\\n- **Not integrated into combat** — spells don't apply in adventure combat yet\\\n\\\n---\\\n\\\n## Next Priority Items\\\n\\\n1. **Add Spells page to client** — sidebar item for caster classes\\\n2. **Integrate spell casting into combat** — spell effects in adventure combat\\\n3. **Add crit damage cap by level difference** — per design doc, prevents low-level lucky crits from one-shotting high-level enemies\\\n4. **Reorganize zones to match BT1 dungeon structure** — Cellar, Sewers 1-3, Catacombs 1-3, Harkyn's 1-3, Kylearan's Tower, Mangar's Tower 1-5\\\n5. **Stat migration path i32 → i64** — before exponential growth\\\n6. **Database persistence** — before state worth keeping\\\n7. **Leveling system** — XP accumulates but level never increases currently\"],[1,\"| Designed | 79 spells + combat integration | Done |\\\n| Zones | Abstract | 8 zones matching BT1 dungeons | Reorganized |\\\n\\\n---\\\n\\\n## Server BGP\\\n- `bgp_fc3f363bf001uzEC631JsnxCIA` on `:8080`\"],[0,\"\\\n\\\n--\"]],\"start1\":2485,\"start2\":2485,\"length1\":6472,\"length2\":1227},{\"diffs\":[[0,\"tack\"],[-1,\" & Deployment\\\n\"],[0,\"\\\n- B\"]],\"start1\":3724,\"start2\":3724,\"length1\":22,\"length2\":8},{\"diffs\":[[0,\"80)\\\n\"],[-1,\"- In-memory state (no database yet)\\\n- Seeded users: admin (id=1), player (id=2)\\\n\"],[0,\"- Data: \"],[1,\"`\"],[0,\"skar\"]],\"start1\":3826,\"start2\":3826,\"length1\":96,\"length2\":17},{\"diffs\":[[0,\"on/data/\"],[1,\"`\"],[0,\" (items,\"]],\"start1\":3854,\"start2\":3854,\"length1\":16,\"length2\":17},{\"diffs\":[[0,\"es)\\\n\"],[-1,\"\\\n## Server BGP\\\n- `bgp_fc3d3d233001yrCfkGsbijEAch` on `:8080`\\\n\\\n## Decisions Log\\\n\\\n| Question | Decision | Rationale |\\\n|---|---|---|\\\n| Stats type | i32 for now, plan i64 migration | MVP stats are small; BIGINT needed before exponential growth |\\\n| Stat count | 5: STR/INT/DEX/CON/LUK | Luck replaces both Wisdom and Charisma |\\\n| Race count | 5 of 6 designed races | Half-Orc deferred (controversial fantasy race) |\\\n| Class count | 10 of 8 designed classes | BT1 spellcaster split (4 classes vs 1 Mage), added Hunter |\\\n| Cleric class | Not added | Temples handle healing, not a class |\\\n| Combat model | RoleMaster hybrid | Open-ended d100, crit tables, OB/DB — not pure Torn deterministic |\\\n| Item pricing | BT1 gold values | Authentic to source material |\\\n| Shop stock model | `always_in_shop` + sold items | Torn-style player-driven economy |\\\n| Stat bonus formula | `(stat - 20) / 2` | Rolemaster-derived |\\\n| Off-hand slot | Shared between shields and bracers | BT1 has both types as off-hand gear |\\\n| Instrument slot | Separate from trinket | Bards need equip slot for songs |\\\n\"]],\"start1\":3911,\"start2\":3911,\"length1\":1079,\"length2\":4}]"
metadata_diff: {"new":{},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2026-08-02T19:30:00.539Z
created_time: 2026-08-02T19:30:00.539Z
is_locked: 0
type_: 13