P11: hide fogged tokens from players + show combat conditions
- toPlayerProjection now drops tokens whose footprint is unrevealed when fog is on, so a token's name/position stays hidden in the dark (tested). - Player initiative view shows each combatant's visible conditions (playerCombatant + wire schema + PlayerBoards chips) — monster conditions are now visible to players. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -73,11 +73,16 @@ export function PlayerBoards({ snapshot, image, images }: { snapshot: Snapshot;
|
||||
{encounter.combatants.map((c) => (
|
||||
<li key={c.id} className={cn('flex items-center gap-3 rounded-md border px-3 py-2', c.isCurrent ? 'border-accent bg-elevated ring-1 ring-accent/40' : 'border-line bg-panel')}>
|
||||
<span className="w-8 text-center font-display text-lg font-semibold text-accent">{c.initiative}</span>
|
||||
<span className="flex-1 text-ink">{c.name}{c.isCurrent && <span className="ml-2 text-xs text-accent">◀ turn</span>}</span>
|
||||
<span className="flex min-w-0 flex-1 flex-wrap items-center gap-x-2">
|
||||
<span className="text-ink">{c.name}{c.isCurrent && <span className="ml-2 text-xs text-accent">◀ turn</span>}</span>
|
||||
{c.conditions.map((cond, i) => (
|
||||
<span key={i} className="rounded-full bg-warning/15 px-1.5 py-0.5 text-[10px] text-warning">{cond.name}{cond.value ? ` ${cond.value}` : ''}</span>
|
||||
))}
|
||||
</span>
|
||||
{c.hp ? (
|
||||
<span className="text-sm text-muted">{c.hp.current}/{c.hp.max} HP</span>
|
||||
<span className="shrink-0 text-sm text-muted">{c.hp.current}/{c.hp.max} HP</span>
|
||||
) : c.status ? (
|
||||
<span className={cn('text-sm font-medium', c.status.cls)}>{c.status.label}</span>
|
||||
<span className={cn('shrink-0 text-sm font-medium', c.status.cls)}>{c.status.label}</span>
|
||||
) : null}
|
||||
</li>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user