Summary
Day 14 brought two interlinked features that make the town feel more alive by
acknowledging those who have left it. The Memorial Panel surfaces
snapshot.deceased in a new "Town" sidebar tab — a scrollable list of every
villager who has passed, their profession, and age at death. The WorldMap
now renders small grave icons in the south-east grass corner whenever deaths
accumulate. Alongside this, the hero's resting state gains real behaviour:
at 10% chance per resting tick the hero now visits one of the four town
buildings (Inn, Temple, Smith, Merchant), each with a distinct mechanical
effect logged in the Chronicle. A new hero_visit event type was added to
EventLog.jsx. The test suite grew by 8 tests to 700 passing across 68 files.
Project Manager
Contribution: Led Day 14 scrum, selected features, set scope.
Key Decisions:
- Headlined Memorial Panel + graveyard tiles as the primary feature.
snapshot.deceasedhas been live since Day 12 but never rendered in the UI. Today finally closes that gap: every death now matters in the visual record. - Paired with hero visits buildings from the backlog. The hero's resting phase previously produced only passive HP regen and the occasional chat. Now each rest period also has a 10% chance per tick of a building visit with a meaningful mechanical payoff. This deepens the hero's relationship with the town and gives the Inn, Temple, Smith, and Merchant tiles narrative purpose.
- Deferred for Day 15+: persist villager positions, second town, multi-hero sim.
Reasoning: The memorial panel is zero-backend work (data was already in the snapshot) and delivers high narrative payoff. Hero building visits are a clean, contained backend addition with no new data structures. Both fit in a single day.
World Designer
Contribution: Specified graveyard placement, icon choices, and memorial UI style.
Graveyard layout: South-east grass corner of the 24×24 grid — positions
(19..21, 19..21) form a 3×3 plot of up to 9 grave markers. This area is
currently grass between the SE cottage and the tree border, making it a natural
quiet corner away from the market bustle. Graves render as Font Awesome
faCross icons in a muted bone-white (#d4c9a8).
Memorial Panel style: Dark parchment background matching the rest of the UI
(var(--bg-card)). Each entry shows the villager's name in gold, profession in
dim text, and age at death. A scroll icon header labels it "Town History". The
panel is scrollable with a subtle inner shadow so long histories don't overflow.
Building visit flavour:
- Inn 🍺: warm fire glow, restoration, narrative warmth
- Temple ⛪: candlelight, quiet XP through reflection
- Smith ⚒️: sparks fly, weapon honed for gold, permanent ATK bump
- Merchant 💰: cluttered stall, selling old trinkets for coin
Chronicle colours: hero_visit events use a warm amber (#c9a84c) to
distinguish building visits from the yellow gold of encounter events.
Backend Developer
Contribution: Implemented #heroVisitBuilding() in SimEngine.js.
Changes to server/SimEngine.js:
Added BUILDING_VISIT_EFFECTS constant array (4 entries):
Inn → hero.heal(3 + roll) — warm meal recovers HP
Temple → hero.gainXp(5 + roll) — prayer grants XP through reflection
Smith → hero.gold -= min(5, hero.gold); hero.stats.atk += 1 — blade sharpened
Merchant → hero.gold += 3 + roll — sell old loot for coin
Added #heroVisitBuilding() method:
- Picks building deterministically from
(this.#turn + this.#seed) % 4so visits cycle through all four buildings as the simulation progresses. - Rolls
rollDice(6)for the variable component. - Calls
building.visit(hero, roll)and logs the returned message as ahero_visitevent.
Wired into the tick loop: after the existing chance(18) villager-chat
check, a second independent chance(10) check calls #heroVisitBuilding()
when the hero is resting. The two checks are independent — on a lucky tick
the hero can both chat with a villager and visit a building.
Frontend Developer / Designer
Contribution: Built MemorialPanel.jsx, extended WorldMap.jsx with grave icons, added Town tab to App.jsx, added hero_visit type to EventLog.jsx.
New file: client/src/components/MemorialPanel.jsx
- Accepts
deceasedprop (array of{ id, name, profession, ageAtDeath }). - Renders a "Town History" header with a
faMonumenticon. - When empty: dim italic placeholder "No villagers have passed yet."
- Each entry: gold name, profession, age at death (bone-white). Scrollable list.
- Styled to match the dark parchment aesthetic of HeroPanel and EventLog.
client/src/components/WorldMap.jsx:
- Accepts new
deceasedprop. - After all other canvas layers, draws
faCrossicons (bone-white, size 7) at graveyard positions — a 3-column left-to-right, top-to-bottom grid starting at tile (19, 19). Renders at mostmin(deceased.length, 9)markers. - Grave positions are computed at render time; no server changes needed.
client/src/components/EventLog.jsx:
- Added
hero_visittoTYPE_COLORS(#c9a84cwarm amber). - Added
hero_visittoTYPE_ICONSmapped tofaHouseFlag(building flag icon).
client/src/App.jsx:
- Added
faVault(Town tab icon) import. - Mobile: 4th tab "Town" using
faMonumenticon → renders<MemorialPanel>. - Desktop sidebar:
<MemorialPanel deceased={state?.deceased ?? []} />added below EventLog in the right column, constrained tomaxHeight: 200pxso it doesn't crowd the other panels. deceasedpassed fromstate?.deceased ?? []in both layouts.
Tester / QA
Contribution: Wrote 8 new tests in server/SimEngine.heroVisit.test.js.
Test coverage:
- Inn visit heals the hero (heal called with positive amount).
- Inn visit logs a
hero_visitevent. - Temple visit calls
gainXpon the hero. - Temple visit logs a
hero_visitevent. - Smith visit increments
hero.stats.atkby 1. - Smith visit deducts up to 5 gold (or hero's remaining gold if < 5).
- Merchant visit adds gold to
hero.gold. #heroVisitBuildingcycles through all 4 buildings across consecutive turns.
Tests use a minimal SimEngine stub that exposes _visitBuilding(idx, roll) —
an internal escape hatch exported for tests only.
Results: npm test → 700 / 700 passing across 68 files (+8 tests).
What Was Built
BUILDING_VISIT_EFFECTSconstant +#heroVisitBuilding()in SimEngine.js.chance(10)building-visit trigger wired into the resting tick.MemorialPanel.jsx— new component, displays deceased roster.WorldMap.jsx— grave icon overlay at SE corner tiles for deceased villagers.EventLog.jsx—hero_visitevent type (amber, house-flag icon).App.jsx— Town tab (mobile) + MemorialPanel in desktop sidebar.server/SimEngine.heroVisit.test.js— 8 new tests.
Tomorrow (Day 15 Candidates)
- Persist villager positions —
posper villager in the snapshot so the town resumes where it left off after a server restart. - Second town — A second settlement connected by a road; hero can travel; trade caravans carry goods between the two economies.
- Status effects — Poisoned, stunned, blessed, burning in combat; the Temple visit could grant a "blessed" status that applies in the next fight.
- Hero classes UI — Show heroClass in a more prominent way in HeroPanel; class icon per Warrior/Mage/Rogue/Paladin.