Clarify starting dice choices and player role help
This commit is contained in:
parent
5b4614371e
commit
e6bcd883e9
4 changed files with 113 additions and 17 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "fuji-engine",
|
||||
"version": "0.1.7",
|
||||
"version": "0.1.8",
|
||||
"private": true,
|
||||
"license": "AGPL-3.0-only",
|
||||
"files": [
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ export const SKILLS = {
|
|||
draw: 1,
|
||||
keep: 1,
|
||||
page: 2,
|
||||
description: "One additional reroll during the reroll phase.",
|
||||
description: "Start with five dice. One additional reroll during the reroll phase.",
|
||||
},
|
||||
gatherer: {
|
||||
name: "Gatherer",
|
||||
|
|
@ -111,7 +111,7 @@ export const SKILLS = {
|
|||
draw: 2,
|
||||
keep: 2,
|
||||
page: 5,
|
||||
description: "Travel up to four spaces. A four-space journey allows no phase-three rerolls.",
|
||||
description: "Start with five dice. Travel up to four spaces. A four-space journey allows no phase-three rerolls.",
|
||||
},
|
||||
tinkerer: {
|
||||
name: "Tinkerer",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
import ChatPanel from "./lib/ChatPanel.svelte";
|
||||
import { untrack } from "svelte";
|
||||
import {
|
||||
DICE,
|
||||
terrain,
|
||||
cell,
|
||||
paths,
|
||||
|
|
@ -435,6 +436,7 @@
|
|||
? "Preparation"
|
||||
: s.phase}</span
|
||||
>
|
||||
<span class="difficulty-label" title={`Difficulty level ${s.difficulty} of 4`}>Level {s.difficulty}</span>
|
||||
</div>
|
||||
{#if store.chat.enabled}<button class="text-button" onclick={openChat}
|
||||
>Chat{store.chat.unread ? ` · ${store.chat.unread}` : ""}</button
|
||||
|
|
@ -553,9 +555,7 @@
|
|||
class="teammate"
|
||||
class:own={seat === i}
|
||||
class:opposite={s.players.length === 4 && seat !== undefined && i === (seat + 2) % 4}
|
||||
title={s.players.length === 4 && seat !== undefined && i === (seat + 2) % 4
|
||||
? "Opposite player, not your neighbour. Your dice are not compared with each other."
|
||||
: undefined}
|
||||
title={`${s.skillChoices?.includes(i) ? "Choosing skill" : `${SKILLS[p.skill].name}: ${SKILLS[p.skill].description}${p.injuries.includes("amnesia") ? " Currently unavailable due to amnesia." : ""}`}${s.players.length === 4 && seat !== undefined && i === (seat + 2) % 4 ? " Opposite player, not your neighbour. Your dice are not compared with each other." : ""}`}
|
||||
class:can-act={actingSeats.includes(i)}
|
||||
style:--player-color={CHARACTER_COLORS[p.character]}
|
||||
aria-label={`${p.name}${seat === i ? ", you" : ""}${actingSeats.includes(i) ? ", can act now" : ""}. ${EXHAUSTION - p.stamina} stamina remaining${p.skill === "gatherer" ? `, ${p.powerBars} power bars` : ""}${store.local ? ". Switch to this player." : ""}`}
|
||||
|
|
@ -572,11 +572,21 @@
|
|||
title={s.skillChoices?.includes(i)
|
||||
? "This player is choosing their skill."
|
||||
: `${SKILLS[p.skill].description}${p.injuries.includes("amnesia") ? " Currently unavailable due to amnesia." : ""}`}
|
||||
>{s.skillChoices?.includes(i)
|
||||
? "Choosing skill"
|
||||
: SKILLS[p.skill].name}{#each p.injuries as injury}<InjuryIcon
|
||||
{injury}
|
||||
/>{/each}{#if p.skill === "gatherer"}<span
|
||||
><button
|
||||
type="button"
|
||||
class="role-details"
|
||||
use:equipmentPopover
|
||||
aria-label={`About ${SKILLS[p.skill].name}`}
|
||||
>
|
||||
{s.skillChoices?.includes(i) ? "Choosing skill" : SKILLS[p.skill].name}
|
||||
<span aria-hidden="true">ⓘ</span>
|
||||
</button><span class="equipment-preview role-preview" popover="auto">
|
||||
<strong>{s.skillChoices?.includes(i) ? "Choosing skill" : SKILLS[p.skill].name}</strong>
|
||||
<p>
|
||||
{s.skillChoices?.includes(i) ? "This player is choosing their skill." : SKILLS[p.skill].description}
|
||||
</p>
|
||||
{#if p.injuries.includes("amnesia")}<p>Currently unavailable due to amnesia.</p>{/if}
|
||||
</span>{#each p.injuries as injury}<InjuryIcon {injury} />{/each}{#if p.skill === "gatherer"}<span
|
||||
class="public-bars"
|
||||
title={`${p.powerBars} power bar${p.powerBars === 1 ? "" : "s"}. Each adds +1 to a player's movement total.`}
|
||||
aria-label={`${p.powerBars} power bars`}
|
||||
|
|
@ -889,12 +899,34 @@
|
|||
>{/each}
|
||||
</div>
|
||||
{#if !me.setupDone}
|
||||
{#if SKILLS[me.skill].dice === 5}<fieldset class="visible-choices">
|
||||
<legend>Choose the die to leave behind</legend>
|
||||
<div class="choice-row">
|
||||
{#each me.dice as d}<button aria-pressed={drop === d.id} onclick={() => (drop = d.id)}
|
||||
>⚄ {"ABC"[d.type]} · {Number(d.id.split("-")[1]) + 1}</button
|
||||
>{/each}
|
||||
{#if SKILLS[me.skill].dice === 5}<fieldset class="visible-choices starting-dice">
|
||||
<legend>Choose one die to leave behind</legend>
|
||||
<p>
|
||||
You will keep five dice for the expedition. Each row shows all six faces of a die; the two dice of
|
||||
each type are identical.
|
||||
</p>
|
||||
<div class="starting-dice-options">
|
||||
{#each me.dice.filter((d, i, dice) => dice.findIndex((other) => other.type === d.type) === i) as d}
|
||||
<button
|
||||
type="button"
|
||||
aria-pressed={me.dice.find((other) => other.id === drop)?.type === d.type}
|
||||
onclick={() => (drop = d.id)}
|
||||
>
|
||||
<span class="starting-die-label"
|
||||
>Leave one of these <span aria-hidden="true"
|
||||
>{me.dice.find((other) => other.id === drop)?.type === d.type ? "✓" : ""}</span
|
||||
></span
|
||||
>
|
||||
<span class="starting-die-faces"
|
||||
>{#each DICE[d.type]! as color, index}<span
|
||||
class="starting-die-face"
|
||||
style:--face-color={{ blue: "#82ccdb", pink: "#e16d9a", yellow: "#f2cd5d" }[color]}
|
||||
aria-label={`${color} ${index + 1}`}
|
||||
>{index + 1}{#if store.colorblind}<small>{color}</small>{/if}</span
|
||||
>{/each}</span
|
||||
>
|
||||
</button>
|
||||
{/each}
|
||||
</div>
|
||||
</fieldset>{/if}
|
||||
<p class="packing-count">{keep.length} / {SKILLS[me.skill].keep} cards selected</p>
|
||||
|
|
|
|||
|
|
@ -1746,3 +1746,67 @@ button.equipment-chip {
|
|||
padding: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.role-details {
|
||||
background: none;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
cursor: help;
|
||||
text-align: left;
|
||||
}
|
||||
.role-details:hover,
|
||||
.role-details:focus-visible {
|
||||
color: #f1d584;
|
||||
text-decoration: underline dotted;
|
||||
}
|
||||
.role-preview p {
|
||||
margin: 8px 0 0;
|
||||
}
|
||||
.starting-dice p {
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.starting-dice-options {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
}
|
||||
.starting-dice-options button {
|
||||
padding: 10px;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
}
|
||||
.starting-die-label {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.starting-die-faces {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(6, minmax(0, 1fr));
|
||||
gap: 5px;
|
||||
}
|
||||
.starting-die-face {
|
||||
background: var(--face-color);
|
||||
color: #152d27;
|
||||
border-radius: 5px;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
text-align: center;
|
||||
padding: 5px 0;
|
||||
box-shadow: inset 0 -3px #0002;
|
||||
}
|
||||
.starting-die-face small {
|
||||
display: block;
|
||||
font-size: 8px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.difficulty-label {
|
||||
color: #afbcad;
|
||||
border-left: 1px solid #597367;
|
||||
padding-left: 9px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue