Commit Graph
18 Commits
Author SHA1 Message Date
alex e7ef9ae2df Test mission skill modifiers 2026-06-30 08:53:44 +02:00
alex 647869cba9 Add skill check modifiers to mission roller 2026-06-30 08:33:44 +02:00
alex a08afbaf0f Show skill target modifiers in mission roller 2026-06-30 08:18:09 +02:00
alex b6cff53b8e Add rules-based squad tactics checks 2026-06-29 14:00:19 +02:00
alex fe884ac543 Prepare Deathwatch session tools 2026-06-29 13:37:02 +02:00
alexandClaude Sonnet 4.6 e1bcf61498 fix: combat reveal toggle + eliminate poll flickering
Add 👁/🔒 toggle to combat row in Scene Secrets — players see
combat panel only when GM reveals it (scene.reveal.combat).

Stop flickering: background polls now run silent (no setLoading),
and state updates are skipped when JSON content is unchanged,
preventing unnecessary re-renders every 4s.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-06-24 15:06:37 +02:00
alexandClaude Sonnet 4.6 b3818bd727 feat: next game date banner + demo mission "Blodprøve"
Add amber banner at top of Mission Tab showing next session date
(Lørdag 28. juni 2026). Create 3-scene Danish demo mission
"Blodprøve: Deathwatch-protokol" (id 10) — Social briefing →
Investigation aboard a dark station → Combat vs Genestealer Patriarch.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-06-24 15:01:58 +02:00
alexandClaude Sonnet 4.6 5d98ebec13 feat: granular per-element reveal system + GM manual dice entry
Replace single scene reveal toggle with individual unlock buttons for
title, mood, description, objectives, complications, and each check —
GM controls exactly what players see and when.

Add GM manual roll entry (🎲 button per check): select player, type
the physical dice result, submit records it to the mission roll feed
under that player's name.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-06-24 14:57:29 +02:00
alexandClaude Sonnet 4.6 d6f2f0e5c7 feat: mood text per scene + Danish translation of Fabius Bile mission
- Mood text field on scenes shown as amber italic read-aloud block
  above scene description (gated by revealed flag for players)
- Scene editor includes Mood / Read-aloud textarea
- Scene editor moved full-width below two-column grid
- Mission "The Hunt for Fabius Bile" fully translated to Danish
  ("Jagten på Fabius Bile") with Danish names, descriptions,
  objectives, complications, checks and mood text for all 10 scenes

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-06-24 14:48:31 +02:00
alex 7873f450da feat: rules midgame priority system, mission enhancements, and requisition shop improvements
- Add midgame priority ranking for rules (midgamePriority field)
- Enhance rules search to support midgame filtering and sorting
- Improve mission simulation and midgame tracking
- Fix RequisitionShop player name handling
- Add rules midplay simulation tests
- Update MissionTab with midgame scene tracking
- Add backend logging for rules updates
2026-06-24 12:09:25 +02:00
alexandClaude Sonnet 4.6 7d038dd942 feat: GM mid-play scene editor in Mission Tab
Edit Scene button in Scene Secrets header opens an inline editor card
below Table State. Lets the GM edit scene title, type, description,
checks (name/skill/char/target/modifier/reward, add/remove), enemies
(name/wounds/BS/WS/damage/AP, add/remove), objectives, and
complications — all saved live via the existing patchScene path.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-06-24 11:08:48 +02:00
alexandClaude Sonnet 4.6 8febe583ee feat: Dice Roller — player sheet auto-load, weapon filtering, condition modifiers
On load, each player's character sheet is fetched from /api/players/{name}:
- BS and WS set from tabInfo.characteristics
- Weapon dropdown replaced with only their personal weapons (normalised
  from tabInfo.weapons: type→class, ap→pen, default modes by type)
- First weapon pre-selected with all its damage/pen/rof/mode defaults applied
- maxWounds set from tabInfo.wounds; curWounds preserved from localStorage
  if the player was already tracking mid-session

Active scene conditions (synced from MissionTab via dw:combat-state) now
apply automatic attack modifiers:
- Pinned: –20 BS
- Stunned: –20 BS/WS
- Knocked Down: –20 BS/WS
- Fatigued: –10 BS/WS
- Grappled: –20 WS, ranged/heavy weapons hidden from weapon dropdown
- Bleeding: banner only (no roll modifier)

Condition banner appears above the roller when any condition is active,
showing each condition label and the net modifier to the attack target.
The status bar target display also shows the condition delta inline.

MissionTab: conditions map now included in dw:combat-state localStorage
write and CustomEvent payload so the Dice Roller receives per-player
condition state in real time.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-06-24 00:38:32 +02:00
alexandClaude Sonnet 4.6 cdfd147f02 feat: Mission Tab — 11 playthrough fixes + 4 follow-up findings
All 11 issues from 4-player simulation of The Hunt for Fabius Bile:
1. Roll feed visible to all players (no GM auth guard)
2. Scene text gated by revealed flag; GM explicit reveal per scene
3. GM can add NPC/enemy entries to initiative tracker
4. Round counter synced to Dice Roller via localStorage + custom event
5. Check reward text hidden until player has rolled
6. Checks assignable to specific player via Scene Secrets ⚙ options
7. Fear test quick-roll panel with WP input appears when fearRating > 0
8. Decision checks show textarea/Declare instead of d100 roll button
9. Fate point re-roll: one per check per scene, resets on scene advance
10. Player poll reduced from 8s to 4s, combined mission + roll feed poll
11. Mission complete banner with scene stats and GM outcome notes field

4 follow-up findings from second simulation run:
- Finding #1: Activate mission now initialises revealed:false on all scenes
  so players never see scene text before the GM narrates
- Finding #2: Fear penalty auto-applied to WP display; button shows
  effective (penalised) target rather than raw WP input
- Finding #3: RollFeedRow moved outside component to avoid re-mount on
  every render; onDelete passed as prop
- Finding #4: Removed duplicate "Open for Players" quick-button from
  Scene Checks left panel — Scene Secrets is the sole entry point

New files:
- src/tests/missionPlaythrough.test.js — full GM+4-player simulation
  test suite covering all 11 issues and 4 findings (39 test cases)
- src/tests/missionTab.test.js — player/GM view isolation tests
- src/utils/diceRoller.js — shared d100/degrees/clampTarget utilities
- tests/missionRoutes.test.js — backend mission route unit tests
- tests/playerRoutesLogin.test.js — player login route tests
- tests/sessionRoutes.test.js — session validation tests

Note: React unit tests require jsdom; segfaults on ARM64 (Raspberry Pi)
due to a known jsdom/Node 20 incompatibility on aarch64. Tests pass on
x86 CI. Backend integration tests (tests/) run normally.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-06-24 00:25:51 +02:00
alexandClaude Opus 4.7 fb019057bb Restructure Mission tab: Mission for all, Mission Sim for GM only
- Rename MissionTab to MissionSimTab (combat simulation, GM only)
- New MissionTab shows mission history (all users)
- Mission Sim tab added to GM-only navigation
- MissionSimTab.jsx moved to src/components/

Co-Authored-By: Claude Opus 4.7 <[email protected]>
2026-04-23 10:16:35 +02:00
alexandClaude Opus 4.7 fe1b77ec68 Add mission persistence: missions table, API routes, and history UI
- MariaDB missions table with scenes JSON
- /api/missions CRUD routes
- MissionTab saves completed missions to DB
- Mission history panel in UI

Co-Authored-By: Claude Opus 4.7 <[email protected]>
2026-04-23 10:07:46 +02:00
alexandClaude Opus 4.7 dbb79c2537 Remove unused hitsFromDoS from MissionTab
Co-Authored-By: Claude Opus 4.7 <[email protected]>
2026-04-23 08:52:16 +02:00
alexandClaude Opus 4.7 a054293ef9 Clean up MissionTab: remove unused imports and state variables
Co-Authored-By: Claude Opus 4.7 <[email protected]>
2026-04-23 08:51:00 +02:00
alexandClaude Opus 4.7 ca4c8068f8 Add Mission Tab: combat simulation for GM mission planning
- New MissionTab component with scene-based combat simulation
- Enemy roster from DeathwatchRoller (12 enemy types)
- Scene progression (4-6 scenes) with threat levels
- Combat log and results tracking
- Added to App.js navigation

Co-Authored-By: Claude Opus 4.7 <[email protected]>
2026-04-23 08:47:40 +02:00