Ledger chests tap open full-size, like the table's other peeks
The carried-treasure chest in the scoresheet is now a button: tapping it raises the big-peek scrim with the chest at full size and a note naming whose treasure sits in whose arms. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0138A8CjeQRpvzKxuMfz1Bqc
This commit is contained in:
co-authored by
Claude Fable 5
parent
f4355a60c6
commit
67157ad3a2
+27
-12
@@ -81,6 +81,8 @@
|
||||
let peekCreatureId = $state<string | null>(null);
|
||||
/** The clicked token itself, enlarged beside its card. */
|
||||
let peekToken = $state<string | null>(null);
|
||||
/** Ledger chest tapped: the treasure full-size, with whose and who-holds. */
|
||||
let peekTreasure = $state<{ src: string; note: string } | null>(null);
|
||||
/** Bare-knuckle demolition: click a wall to punch it. */
|
||||
let punchWallMode = $state(false);
|
||||
/** Leafing through the face-up discard pile. */
|
||||
@@ -1097,17 +1099,22 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if peekCard || discardPeek}
|
||||
{#if peekCard || discardPeek || peekTreasure}
|
||||
<div class="big-peek-scrim" role="button" tabindex="-1"
|
||||
onclick={() => { peekCard = null; peekCreatureId = null; peekToken = null; discardPeek = null; }} onkeydown={() => {}}>
|
||||
onclick={() => { peekCard = null; peekCreatureId = null; peekToken = null; discardPeek = null; peekTreasure = null; }} onkeydown={() => {}}>
|
||||
<div class="big-peek">
|
||||
{#if peekCard && peekToken}
|
||||
<img class="big-peek-token" src={peekToken} alt="" />
|
||||
{#if peekTreasure}
|
||||
<img class="big-peek-token" src={peekTreasure.src} alt="" />
|
||||
<div class="peek-note big-peek-note">{peekTreasure.note}</div>
|
||||
{:else}
|
||||
{#if peekCard && peekToken}
|
||||
<img class="big-peek-token" src={peekToken} alt="" />
|
||||
{/if}
|
||||
<div class="card-stage">
|
||||
<Card card={(peekCard ?? discardPeek)!} onfaq={(id) => (faqCardId = id)} />
|
||||
</div>
|
||||
{#if peekNote}<div class="peek-note big-peek-note">{peekNote}</div>{/if}
|
||||
{/if}
|
||||
<div class="card-stage">
|
||||
<Card card={(peekCard ?? discardPeek)!} onfaq={(id) => (faqCardId = id)} />
|
||||
</div>
|
||||
{#if peekNote}<div class="peek-note big-peek-note">{peekNote}</div>{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
@@ -1606,9 +1613,10 @@
|
||||
</span>
|
||||
<span class="score-life">{p.life}</span>
|
||||
<span class="score-marks">
|
||||
{p.handCount} cards{#if p.lostTurns > 0} · dazed {p.lostTurns}{/if}{#if p.carriedTreasureId}{@const ct = view.treasures.find((t) => t.id === p.carriedTreasureId)} ·
|
||||
<img class="score-chest" alt="carrying {ct?.owner ?? "a"} treasure"
|
||||
src={`/tokens-svg/treasure-${colorIndexOf(view, ct?.owner ?? p.id) % 6}.svg`} />{/if}
|
||||
{p.handCount} cards{#if p.lostTurns > 0} · dazed {p.lostTurns}{/if}{#if p.carriedTreasureId}{@const ct = view.treasures.find((t) => t.id === p.carriedTreasureId)}{@const chestSrc = `/tokens-svg/treasure-${colorIndexOf(view, ct?.owner ?? p.id) % 6}.svg`} ·
|
||||
<button class="score-chest-btn" aria-label="see the carried treasure"
|
||||
onclick={() => (peekTreasure = { src: chestSrc, note: `${ct?.owner ?? "someone"}'s treasure — in ${p.id}'s arms` })}>
|
||||
<img class="score-chest" alt="" src={chestSrc} /></button>{/if}
|
||||
</span>
|
||||
</div>
|
||||
{@const spellsOn = view.sustained.filter((e) => e.targetId === p.id)}
|
||||
@@ -2384,9 +2392,16 @@
|
||||
.score-name { font-family: "Caveat", cursive; font-size: 1.25rem; line-height: 1; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.score-life { font-family: "Caveat", cursive; font-size: 1.4rem; font-weight: 700; min-width: 1.6rem; text-align: right; }
|
||||
.score-marks { font-size: 0.75rem; color: #6b5a41; }
|
||||
.score-chest-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
vertical-align: -0.7em;
|
||||
}
|
||||
.score-chest {
|
||||
height: 2.1em;
|
||||
vertical-align: -0.7em;
|
||||
display: block;
|
||||
filter: drop-shadow(0.5px 0.5px 0.5px rgba(0, 0, 0, 0.35));
|
||||
}
|
||||
.deck-line {
|
||||
|
||||
Reference in New Issue
Block a user