rpg-engine 0.4.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/campaign/settings.d.ts +1 -0
- package/dist/campaign/settings.js +6 -5
- package/dist/command-line.js +12 -5
- package/dist/commands/advance.js +1 -1
- package/dist/commands/ask.d.ts +37 -2
- package/dist/commands/ask.js +106 -35
- package/dist/commands/change.js +28 -17
- package/dist/commands/config.d.ts +1 -1
- package/dist/commands/config.js +69 -21
- package/dist/commands/effect.js +42 -23
- package/dist/commands/find.js +1 -1
- package/dist/commands/game-adventures.js +2 -2
- package/dist/commands/game-catalog.d.ts +13 -0
- package/dist/commands/game-catalog.js +26 -2
- package/dist/commands/game-checks.js +23 -21
- package/dist/commands/{game-hit-dice.d.ts → game-dice-pool.d.ts} +3 -3
- package/dist/commands/{game-hit-dice.js → game-dice-pool.js} +7 -7
- package/dist/commands/game-effects.d.ts +12 -4
- package/dist/commands/game-effects.js +21 -13
- package/dist/commands/game-examples.d.ts +22 -0
- package/dist/commands/game-examples.js +72 -0
- package/dist/commands/game-extension-list.d.ts +31 -3
- package/dist/commands/game-extension-list.js +94 -6
- package/dist/commands/game-images.d.ts +1 -1
- package/dist/commands/game-images.js +3 -2
- package/dist/commands/game-library.d.ts +3 -0
- package/dist/commands/game-library.js +2 -2
- package/dist/commands/game-mode.js +1 -1
- package/dist/commands/game-package-code.d.ts +87 -0
- package/dist/commands/game-package-code.js +648 -0
- package/dist/commands/game-package-hooks.d.ts +37 -0
- package/dist/commands/game-package-hooks.js +116 -0
- package/dist/commands/game-recipes.js +2 -2
- package/dist/commands/game-reminders.d.ts +5 -2
- package/dist/commands/game-reminders.js +7 -4
- package/dist/commands/game-rules.d.ts +4 -1
- package/dist/commands/game-rules.js +7 -1
- package/dist/commands/game-upkeep.js +3 -3
- package/dist/commands/game-view-place.d.ts +8 -20
- package/dist/commands/game-view-place.js +16 -35
- package/dist/commands/game-widgets.d.ts +42 -8
- package/dist/commands/game-widgets.js +182 -31
- package/dist/commands/game-world.d.ts +32 -3
- package/dist/commands/game-world.js +113 -24
- package/dist/commands/image.js +1 -1
- package/dist/commands/init.js +2 -2
- package/dist/commands/mode.d.ts +1 -1
- package/dist/commands/package.d.ts +15 -1
- package/dist/commands/package.js +96 -24
- package/dist/commands/progression.d.ts +2 -0
- package/dist/commands/progression.js +7 -2
- package/dist/commands/roll.d.ts +2 -0
- package/dist/commands/roll.js +50 -24
- package/dist/commands/rules.js +6 -4
- package/dist/commands/scene.d.ts +2 -2
- package/dist/commands/scene.js +13 -10
- package/dist/commands/sheet.js +10 -1
- package/dist/commands/status.d.ts +1 -0
- package/dist/commands/status.js +14 -4
- package/dist/commands/trade.js +6 -4
- package/dist/commands/translate.js +2 -2
- package/dist/commands/travel.js +1 -1
- package/dist/commands/validate.js +2 -2
- package/dist/commands/view.d.ts +12 -4
- package/dist/commands/view.js +11 -8
- package/dist/commands/worked-out.js +11 -5
- package/dist/commands/write.d.ts +8 -1
- package/dist/commands/write.js +84 -25
- package/dist/core/command-reference.js +3 -2
- package/dist/core/consents.d.ts +18 -0
- package/dist/core/consents.js +93 -0
- package/dist/core/context.d.ts +68 -27
- package/dist/core/context.js +3 -1
- package/dist/core/examples.d.ts +25 -0
- package/dist/core/examples.js +19 -0
- package/dist/core/files.d.ts +2 -0
- package/dist/core/files.js +10 -1
- package/dist/core/package-api.d.ts +388 -0
- package/dist/core/package-declarations.d.ts +102 -0
- package/dist/core/package-declarations.js +81 -0
- package/dist/core/registry.d.ts +4 -0
- package/dist/core/text.d.ts +5 -0
- package/dist/core/text.js +12 -0
- package/dist/dashboard/acts.js +31 -24
- package/dist/dashboard/address.js +4 -1
- package/dist/dashboard/api.js +65 -3
- package/dist/dashboard/app.js +222 -98
- package/dist/dashboard/ask-card.js +169 -0
- package/dist/dashboard/asked-dice.js +57 -0
- package/dist/dashboard/dice/tray.js +6 -4
- package/dist/dashboard/extension-widgets.js +136 -16
- package/dist/dashboard/faces.js +6 -4
- package/dist/dashboard/help.js +10 -3
- package/dist/dashboard/i18n/ar.json +34 -29
- package/dist/dashboard/i18n/cs.json +34 -29
- package/dist/dashboard/i18n/da.json +34 -29
- package/dist/dashboard/i18n/de.json +34 -29
- package/dist/dashboard/i18n/el.json +34 -29
- package/dist/dashboard/i18n/es.json +34 -29
- package/dist/dashboard/i18n/fi.json +34 -29
- package/dist/dashboard/i18n/fr.json +34 -29
- package/dist/dashboard/i18n/he.json +34 -29
- package/dist/dashboard/i18n/hi.json +34 -29
- package/dist/dashboard/i18n/hu.json +34 -29
- package/dist/dashboard/i18n/is.json +34 -29
- package/dist/dashboard/i18n/it.json +34 -29
- package/dist/dashboard/i18n/ja.json +34 -29
- package/dist/dashboard/i18n/ko.json +34 -29
- package/dist/dashboard/i18n/nb.json +34 -29
- package/dist/dashboard/i18n/nl.json +34 -29
- package/dist/dashboard/i18n/pl.json +34 -29
- package/dist/dashboard/i18n/pt.json +34 -29
- package/dist/dashboard/i18n/ro.json +34 -29
- package/dist/dashboard/i18n/ru.json +34 -29
- package/dist/dashboard/i18n/sv.json +34 -29
- package/dist/dashboard/i18n/tr.json +34 -29
- package/dist/dashboard/i18n/uk.json +34 -29
- package/dist/dashboard/i18n/zh.json +34 -29
- package/dist/dashboard/icons.js +4 -1
- package/dist/dashboard/kit.js +35 -0
- package/dist/dashboard/labels.js +1 -0
- package/dist/dashboard/pack-card.js +97 -0
- package/dist/dashboard/package-page.js +50 -0
- package/dist/dashboard/packages.js +180 -24
- package/dist/dashboard/page-code.js +248 -0
- package/dist/dashboard/party.js +13 -14
- package/dist/dashboard/people.js +4 -0
- package/dist/dashboard/person-panel.js +110 -0
- package/dist/dashboard/place-map-view.js +11 -6
- package/dist/dashboard/rolls.js +2 -2
- package/dist/dashboard/scene.js +12 -9
- package/dist/dashboard/settings.js +55 -9
- package/dist/dashboard/sheet.js +21 -13
- package/dist/dashboard/status.js +69 -15
- package/dist/dashboard/style.css +859 -574
- package/dist/dashboard/top.js +75 -25
- package/dist/dashboard/turns.js +34 -13
- package/dist/dashboard/widgets.js +9 -2
- package/dist/dashboard-server.js +246 -11
- package/dist/dice/roll-dice.js +1 -1
- package/dist/effects/effect.d.ts +7 -4
- package/dist/effects/effect.js +12 -9
- package/dist/extensions/engine.d.ts +4 -0
- package/dist/extensions/engine.js +74 -0
- package/dist/extensions/extension.d.ts +28 -33
- package/dist/extensions/extension.js +37 -46
- package/dist/extensions/index.d.ts +4 -3
- package/dist/extensions/index.js +5 -2
- package/dist/extensions/packages.d.ts +14 -0
- package/dist/extensions/packages.js +148 -12
- package/dist/extensions/words.d.ts +2 -1
- package/dist/extensions/words.js +5 -4
- package/dist/index.d.ts +1 -3
- package/dist/mcp-server.js +52 -15
- package/dist/page-words.d.ts +4 -0
- package/dist/page-words.js +4 -4
- package/dist/page.d.ts +218 -0
- package/dist/page.js +2 -0
- package/dist/pages/index.d.ts +1 -1
- package/dist/pages/index.js +1 -1
- package/dist/pages/load.d.ts +7 -1
- package/dist/pages/load.js +10 -5
- package/dist/pages/page-file.js +1 -1
- package/dist/pages/stack-writes.js +5 -4
- package/dist/pages/standard-fields.d.ts +2 -0
- package/dist/pages/standard-fields.js +8 -1
- package/dist/pages/world.d.ts +8 -0
- package/dist/pages/world.js +9 -2
- package/dist/systems/game-system.d.ts +61 -30
- package/dist/systems/game-system.js +159 -50
- package/dist/systems/index.d.ts +3 -3
- package/dist/systems/index.js +3 -3
- package/dist/systems/system-code.d.ts +29 -88
- package/dist/systems/system-code.js +68 -23
- package/dist/systems/words.d.ts +2 -0
- package/dist/systems/words.js +11 -0
- package/dist/testing.d.ts +76 -0
- package/dist/testing.js +197 -0
- package/instructions/combat.md +2 -2
- package/instructions/core.md +2 -2
- package/instructions/dashboard.md +1 -1
- package/instructions/mentor-tutorial.md +1 -1
- package/instructions/play.md +2 -2
- package/instructions/setup.md +1 -1
- package/package.json +15 -2
- package/systems/5e/LICENSE.md +13 -3
- package/systems/5e/dist/dying.js +83 -16
- package/systems/5e/dist/index.js +2 -2
- package/systems/5e/dist/page-style.js +634 -0
- package/systems/5e/dist/page.js +166 -0
- package/systems/5e/dist/shown.js +23 -0
- package/systems/5e/instructions/combat.md +1 -0
- package/systems/5e/package.json +4 -2
- package/systems/5e/system.yaml +35 -7
- package/systems/5e/versions/srd-5.1/system.yaml +2 -0
- package/systems/5e/words/ar.yaml +30 -0
- package/systems/5e/words/cs.yaml +30 -0
- package/systems/5e/words/da.yaml +30 -0
- package/systems/5e/words/de.yaml +30 -0
- package/systems/5e/words/el.yaml +30 -0
- package/systems/5e/words/es.yaml +30 -0
- package/systems/5e/words/fi.yaml +30 -0
- package/systems/5e/words/fr.yaml +30 -0
- package/systems/5e/words/he.yaml +30 -0
- package/systems/5e/words/hi.yaml +30 -0
- package/systems/5e/words/hu.yaml +30 -0
- package/systems/5e/words/is.yaml +30 -0
- package/systems/5e/words/it.yaml +30 -0
- package/systems/5e/words/ja.yaml +30 -0
- package/systems/5e/words/ko.yaml +30 -0
- package/systems/5e/words/nb.yaml +30 -0
- package/systems/5e/words/nl.yaml +30 -0
- package/systems/5e/words/pl.yaml +30 -0
- package/systems/5e/words/pt.yaml +30 -0
- package/systems/5e/words/ro.yaml +30 -0
- package/systems/5e/words/ru.yaml +30 -0
- package/systems/5e/words/sv.yaml +30 -0
- package/systems/5e/words/tr.yaml +30 -0
- package/systems/5e/words/uk.yaml +30 -0
- package/systems/5e/words/zh.yaml +30 -0
- package/dist/commands/game-extensions.d.ts +0 -34
- package/dist/commands/game-extensions.js +0 -182
- package/dist/commands/game-system-code.d.ts +0 -25
- package/dist/commands/game-system-code.js +0 -172
- package/dist/dashboard/death-save.js +0 -67
- package/dist/dashboard/dying.js +0 -46
- package/dist/dashboard/save-outcome.js +0 -42
- package/dist/dashboard/spend.js +0 -115
- package/dist/extensions/api.d.ts +0 -155
- /package/dist/{extensions/api.js → core/package-api.js} +0 -0
|
@@ -0,0 +1,634 @@
|
|
|
1
|
+
// The 5e page module's own style sheet (D-510): the layout and motion of the insides of its cards and of its line of the heart, which each of its drawings
|
|
2
|
+
// takes after the dashboard's, with the dashboard's tokens. The parts it shares with the dashboard (marks, pips, bars, buttons) are the dashboard's.
|
|
3
|
+
export const pageStyle = `
|
|
4
|
+
/* The inside of the card of a death save (D-460, D-461), in the tint of danger until the outcome is told: the portrait greyed in a ring that beats, the line
|
|
5
|
+
of the heart behind it, the successes on one side and the failures on the other, the one button under them. The outcome sets its tint: gold back on
|
|
6
|
+
their feet, green stable, grey at the last failure, the line flat. */
|
|
7
|
+
.death-save {
|
|
8
|
+
--tint: var(--low);
|
|
9
|
+
display: grid;
|
|
10
|
+
gap: 12px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.death-save.back {
|
|
14
|
+
--tint: var(--gold);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.death-save.stable {
|
|
18
|
+
--tint: var(--ally);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.death-save.dead {
|
|
22
|
+
--tint: var(--muted);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.dying-life {
|
|
26
|
+
position: relative;
|
|
27
|
+
display: grid;
|
|
28
|
+
grid-template-columns: 1fr auto 1fr;
|
|
29
|
+
align-items: center;
|
|
30
|
+
gap: 12px;
|
|
31
|
+
min-height: 112px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* The line runs between the two sides, behind the portrait. */
|
|
35
|
+
.dying-line {
|
|
36
|
+
position: absolute;
|
|
37
|
+
top: calc(50% - 30px);
|
|
38
|
+
inset-inline-start: 120px;
|
|
39
|
+
width: calc(100% - 240px);
|
|
40
|
+
height: 60px;
|
|
41
|
+
overflow: visible;
|
|
42
|
+
color: var(--tint);
|
|
43
|
+
opacity: 0.6;
|
|
44
|
+
pointer-events: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.dying-line path {
|
|
48
|
+
fill: none;
|
|
49
|
+
stroke: currentColor;
|
|
50
|
+
stroke-width: 2;
|
|
51
|
+
stroke-linejoin: round;
|
|
52
|
+
vector-effect: non-scaling-stroke;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.person-mark.new {
|
|
56
|
+
box-shadow: 0 0 0 4px color-mix(in srgb, var(--mark) 30%, transparent);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.person-mark::after {
|
|
60
|
+
content: "";
|
|
61
|
+
position: absolute;
|
|
62
|
+
inset: -7px;
|
|
63
|
+
border: 2px solid var(--mark);
|
|
64
|
+
border-radius: inherit;
|
|
65
|
+
opacity: 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* The portrait in its ring, greyed while dying: in colour again on the highest face, darker at the last failure. */
|
|
69
|
+
.dying-token {
|
|
70
|
+
position: relative;
|
|
71
|
+
z-index: 1;
|
|
72
|
+
display: grid;
|
|
73
|
+
place-items: center;
|
|
74
|
+
width: 102px;
|
|
75
|
+
height: 102px;
|
|
76
|
+
border: 3px solid var(--tint);
|
|
77
|
+
border-radius: 50%;
|
|
78
|
+
background: var(--float);
|
|
79
|
+
transition: border-color var(--long) var(--ease);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.dying-token .token {
|
|
83
|
+
--size: 90px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.dying-token .token > :is(img, .initials) {
|
|
87
|
+
filter: grayscale(0.85) brightness(0.8);
|
|
88
|
+
transition: filter var(--long) var(--ease);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.death-save.back .dying-token .token > :is(img, .initials) {
|
|
92
|
+
filter: none;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.death-save.dead .dying-token .token > :is(img, .initials) {
|
|
96
|
+
filter: grayscale(1) brightness(0.5);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.dying-token::after {
|
|
100
|
+
content: "";
|
|
101
|
+
position: absolute;
|
|
102
|
+
inset: -3px;
|
|
103
|
+
border: 3px solid var(--tint);
|
|
104
|
+
border-radius: 50%;
|
|
105
|
+
opacity: 0;
|
|
106
|
+
pointer-events: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.dying-foot {
|
|
110
|
+
display: grid;
|
|
111
|
+
justify-items: center;
|
|
112
|
+
gap: 8px;
|
|
113
|
+
text-align: center;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.dying-roll {
|
|
117
|
+
/* The die in front hides the lines of the one behind it with the button's gold, as a check's button. */
|
|
118
|
+
--die-ground: var(--gold);
|
|
119
|
+
display: inline-flex;
|
|
120
|
+
align-items: center;
|
|
121
|
+
justify-content: center;
|
|
122
|
+
gap: 8px;
|
|
123
|
+
min-width: min(320px, 100%);
|
|
124
|
+
min-height: 48px;
|
|
125
|
+
padding: 8px 20px;
|
|
126
|
+
border: 0;
|
|
127
|
+
border-radius: var(--radius-m);
|
|
128
|
+
background: var(--gold);
|
|
129
|
+
color: var(--on-gold);
|
|
130
|
+
font: inherit;
|
|
131
|
+
font-weight: 600;
|
|
132
|
+
box-shadow: var(--raise);
|
|
133
|
+
cursor: pointer;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.dying-roll:disabled {
|
|
137
|
+
cursor: default;
|
|
138
|
+
opacity: 0.55;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.dying-roll.sent {
|
|
142
|
+
opacity: 1;
|
|
143
|
+
outline: 2px solid var(--accent);
|
|
144
|
+
outline-offset: 2px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.dying-stakes {
|
|
148
|
+
margin: 0;
|
|
149
|
+
color: var(--muted);
|
|
150
|
+
font-size: 0.85rem;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* The outcome, large where the button was and as tall: the total, then the word, green for a success, red for a failure, gold on its feet. */
|
|
154
|
+
.dying-word {
|
|
155
|
+
display: grid;
|
|
156
|
+
place-items: center;
|
|
157
|
+
min-height: 48px;
|
|
158
|
+
margin: 0;
|
|
159
|
+
color: var(--low);
|
|
160
|
+
font-size: 1.6rem;
|
|
161
|
+
font-weight: 800;
|
|
162
|
+
line-height: 1.2;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.dying-word:empty {
|
|
166
|
+
display: none;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.death-save:is(.success, .stable) .dying-word {
|
|
170
|
+
color: var(--ally);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/* A total the system's code wrote nothing of: no outcome, so no colour of one. */
|
|
174
|
+
.death-save.told:not(.success, .stable, .failure, .failures, .dead, .back) .dying-word {
|
|
175
|
+
color: var(--ink);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.death-save.back .dying-word {
|
|
179
|
+
color: var(--gold-ink);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/* Motion only for who wants it: the ring beats while dying, slower once stable, bursts on the highest face; the new mark pops. Reduced, the states alone. */
|
|
183
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
184
|
+
.death-save:is(.asking, .rolling, .success, .failure, .failures) .dying-token::after {
|
|
185
|
+
animation: dying-beat 1.6s var(--ease-out) infinite;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.death-save.stable .dying-token::after {
|
|
189
|
+
animation: dying-beat 2.6s var(--ease-out) infinite;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.death-save.back .dying-token::after {
|
|
193
|
+
animation: dying-burst var(--linger) var(--ease-out) both;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.person-mark.new {
|
|
197
|
+
animation: mark-pop var(--flight) var(--ease-bounce) both;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.person-mark.new::after {
|
|
201
|
+
animation: mark-ring var(--long) var(--ease-out) var(--quick) both;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.death-save.told .dying-word {
|
|
205
|
+
animation: word-rise var(--medium) var(--ease-out) both;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
@keyframes dying-beat {
|
|
210
|
+
0%,
|
|
211
|
+
30% {
|
|
212
|
+
opacity: 0.8;
|
|
213
|
+
transform: scale(1);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
60%,
|
|
217
|
+
100% {
|
|
218
|
+
opacity: 0;
|
|
219
|
+
transform: scale(1.35);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
@keyframes dying-burst {
|
|
224
|
+
from {
|
|
225
|
+
opacity: 1;
|
|
226
|
+
transform: scale(1);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
to {
|
|
230
|
+
opacity: 0;
|
|
231
|
+
transform: scale(1.9);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* The death save's card on a phone (D-461): the portrait over the two sides, the line left out, the button the whole width. */
|
|
236
|
+
@media (max-width: 600px) {
|
|
237
|
+
.death-save {
|
|
238
|
+
gap: 10px;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.death-save .dying-life {
|
|
242
|
+
grid-template-columns: 1fr 1fr;
|
|
243
|
+
min-height: 0;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.death-save .dying-line {
|
|
247
|
+
display: none;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.death-save .dying-token {
|
|
251
|
+
grid-column: 1 / -1;
|
|
252
|
+
grid-row: 1;
|
|
253
|
+
justify-self: center;
|
|
254
|
+
width: 84px;
|
|
255
|
+
height: 84px;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.death-save .dying-token .token {
|
|
259
|
+
--size: 74px;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.death-save .person-side {
|
|
263
|
+
grid-row: 2;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.death-save .dying-roll {
|
|
267
|
+
width: 100%;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.death-save .dying-word {
|
|
271
|
+
font-size: 1.35rem;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/* The dice of a rest the master asks the player to spend (D-492, ASK-14): a card in the frame of the master's question, which stays while they roll. Who rests
|
|
276
|
+
and the points the dice give, as a bar that keeps where the rest began; a row for each kind of die with its pips and its button; the dice rolled as chips;
|
|
277
|
+
the one button that ends it. Wide, the points and the dice side by side; narrow, one under the other. */
|
|
278
|
+
.spend-play {
|
|
279
|
+
display: grid;
|
|
280
|
+
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
281
|
+
align-items: start;
|
|
282
|
+
gap: 12px 24px;
|
|
283
|
+
max-width: 880px;
|
|
284
|
+
margin-bottom: 12px;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.spend-life {
|
|
288
|
+
display: grid;
|
|
289
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
290
|
+
align-items: center;
|
|
291
|
+
gap: 14px;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.spend-token .token {
|
|
295
|
+
--size: 56px;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.spend-points {
|
|
299
|
+
display: grid;
|
|
300
|
+
gap: 6px;
|
|
301
|
+
min-width: 0;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.spend-points-head {
|
|
305
|
+
display: flex;
|
|
306
|
+
flex-wrap: wrap;
|
|
307
|
+
align-items: baseline;
|
|
308
|
+
gap: 4px 10px;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.spend-points-number {
|
|
312
|
+
font-variant-numeric: tabular-nums;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.spend-points-number b {
|
|
316
|
+
font-size: 1.6rem;
|
|
317
|
+
font-weight: 700;
|
|
318
|
+
line-height: 1;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.spend-points-max {
|
|
322
|
+
color: var(--muted);
|
|
323
|
+
font-weight: 700;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.spend-gain {
|
|
327
|
+
color: var(--ally);
|
|
328
|
+
font-weight: 700;
|
|
329
|
+
font-variant-numeric: tabular-nums;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.spend-full {
|
|
333
|
+
display: inline-flex;
|
|
334
|
+
align-items: center;
|
|
335
|
+
gap: 3px;
|
|
336
|
+
color: var(--muted);
|
|
337
|
+
font-size: 0.85rem;
|
|
338
|
+
font-weight: 600;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.spend-full svg.icon {
|
|
342
|
+
width: 16px;
|
|
343
|
+
height: 16px;
|
|
344
|
+
color: var(--ally);
|
|
345
|
+
stroke-width: 2.5;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/* Where the rest began, solid; what it gave, the same green lighter in both themes, a notch between them on the side the bar grows to. */
|
|
349
|
+
.bar.spend-bar {
|
|
350
|
+
width: 100%;
|
|
351
|
+
height: 12px;
|
|
352
|
+
border-radius: var(--radius-s);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.spend-bar .spend-now {
|
|
356
|
+
background: light-dark(color-mix(in srgb, var(--ally) 50%, var(--float)), color-mix(in srgb, var(--ally) 55%, white));
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.spend-bar .spend-before {
|
|
360
|
+
border-inline-end: 2px solid var(--float);
|
|
361
|
+
background: var(--ally);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.spend-rows {
|
|
365
|
+
display: grid;
|
|
366
|
+
gap: 8px;
|
|
367
|
+
margin: 0;
|
|
368
|
+
padding: 0;
|
|
369
|
+
list-style: none;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.spend-row {
|
|
373
|
+
display: grid;
|
|
374
|
+
grid-template-columns: minmax(0, 1fr) auto auto;
|
|
375
|
+
align-items: center;
|
|
376
|
+
gap: 4px 12px;
|
|
377
|
+
padding-block: 6px;
|
|
378
|
+
padding-inline: 12px 6px;
|
|
379
|
+
border-radius: var(--radius-m);
|
|
380
|
+
background: var(--panel-2);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.spend-row-name {
|
|
384
|
+
font-weight: 700;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.spend-row.out .spend-row-name {
|
|
388
|
+
color: var(--muted);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.spend-pips {
|
|
392
|
+
gap: 6px;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.spend-pips .pip {
|
|
396
|
+
width: 16px;
|
|
397
|
+
height: 16px;
|
|
398
|
+
border-width: 2px;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/* The die just spent: a ring around its pip. */
|
|
402
|
+
.spend-pips .pip.fresh {
|
|
403
|
+
box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.spend-count {
|
|
407
|
+
color: var(--muted);
|
|
408
|
+
font-weight: 700;
|
|
409
|
+
font-variant-numeric: tabular-nums;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.spend-roll {
|
|
413
|
+
/* The die in front hides its lines with the button's gold. */
|
|
414
|
+
--die-ground: var(--gold);
|
|
415
|
+
display: inline-flex;
|
|
416
|
+
align-items: center;
|
|
417
|
+
justify-content: center;
|
|
418
|
+
gap: 8px;
|
|
419
|
+
min-width: 116px;
|
|
420
|
+
min-height: 44px;
|
|
421
|
+
padding-block: 6px;
|
|
422
|
+
padding-inline: 12px 16px;
|
|
423
|
+
border: 0;
|
|
424
|
+
border-radius: var(--radius-m);
|
|
425
|
+
background: var(--gold);
|
|
426
|
+
color: var(--on-gold);
|
|
427
|
+
font: inherit;
|
|
428
|
+
font-weight: 600;
|
|
429
|
+
box-shadow: var(--raise);
|
|
430
|
+
cursor: pointer;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.spend-roll[aria-disabled="true"] {
|
|
434
|
+
cursor: default;
|
|
435
|
+
opacity: 0.55;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.spend-roll.sent {
|
|
439
|
+
opacity: 1;
|
|
440
|
+
outline: 2px solid var(--accent);
|
|
441
|
+
outline-offset: 2px;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.spend-row.out .spend-roll {
|
|
445
|
+
--die-ground: transparent;
|
|
446
|
+
background: transparent;
|
|
447
|
+
color: var(--muted);
|
|
448
|
+
box-shadow: inset 0 0 0 1px var(--rule);
|
|
449
|
+
opacity: 1;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
.spend-foot {
|
|
453
|
+
display: flex;
|
|
454
|
+
flex-wrap: wrap;
|
|
455
|
+
align-items: center;
|
|
456
|
+
justify-content: space-between;
|
|
457
|
+
gap: 10px 16px;
|
|
458
|
+
max-width: 880px;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.spend-hint {
|
|
462
|
+
margin: 0;
|
|
463
|
+
color: var(--muted);
|
|
464
|
+
font-size: 0.85rem;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.spend-chips {
|
|
468
|
+
display: flex;
|
|
469
|
+
flex-wrap: wrap;
|
|
470
|
+
gap: 6px 10px;
|
|
471
|
+
margin: 0;
|
|
472
|
+
padding: 0;
|
|
473
|
+
list-style: none;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.spend-chip {
|
|
477
|
+
display: inline-flex;
|
|
478
|
+
align-items: center;
|
|
479
|
+
gap: 4px;
|
|
480
|
+
font-variant-numeric: tabular-nums;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.spend-chip .die-chip {
|
|
484
|
+
box-shadow: inset 0 0 0 1px var(--rule);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.spend-chip.fresh .die-chip {
|
|
488
|
+
box-shadow: inset 0 0 0 2px var(--accent);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.spend-chip-adds {
|
|
492
|
+
color: var(--muted);
|
|
493
|
+
font-size: 0.85rem;
|
|
494
|
+
font-weight: 600;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
.spend-chip-total {
|
|
498
|
+
font-weight: 700;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.spend-done {
|
|
502
|
+
min-height: 44px;
|
|
503
|
+
margin-inline-start: auto;
|
|
504
|
+
padding: 8px 18px;
|
|
505
|
+
border: 1px solid var(--rule);
|
|
506
|
+
border-radius: var(--radius-m);
|
|
507
|
+
background: var(--panel-2);
|
|
508
|
+
color: var(--ink);
|
|
509
|
+
font: inherit;
|
|
510
|
+
font-weight: 600;
|
|
511
|
+
cursor: pointer;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
.spend-done[aria-disabled="true"] {
|
|
515
|
+
cursor: default;
|
|
516
|
+
opacity: 0.55;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
/* Wide, the button keeps its width as its words change at the first die. */
|
|
520
|
+
@media (min-width: 601px) {
|
|
521
|
+
.spend-done {
|
|
522
|
+
min-width: 8.5em;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/* With no die left, ending it is all there is to do. */
|
|
527
|
+
.spend-done.last {
|
|
528
|
+
border-color: transparent;
|
|
529
|
+
background: var(--gold);
|
|
530
|
+
color: var(--on-gold);
|
|
531
|
+
box-shadow: var(--raise);
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
535
|
+
.spend-chip.fresh {
|
|
536
|
+
animation: spend-pop var(--medium) var(--ease-bounce) both;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.spend-pips .pip {
|
|
540
|
+
transition: background-color var(--short) var(--ease), box-shadow var(--short) var(--ease);
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
@keyframes spend-pop {
|
|
545
|
+
from {
|
|
546
|
+
opacity: 0;
|
|
547
|
+
transform: scale(0.6);
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
@media (max-width: 600px) {
|
|
552
|
+
.spend-play {
|
|
553
|
+
grid-template-columns: minmax(0, 1fr);
|
|
554
|
+
gap: 10px;
|
|
555
|
+
margin-bottom: 10px;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.spend-life {
|
|
559
|
+
gap: 10px;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
.spend-token .token {
|
|
563
|
+
--size: 44px;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
.spend-points-number b {
|
|
567
|
+
font-size: 1.35rem;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.spend-row {
|
|
571
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
572
|
+
padding-inline: 10px 6px;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
.spend-row-name {
|
|
576
|
+
grid-column: 1;
|
|
577
|
+
grid-row: 1;
|
|
578
|
+
font-size: 0.85rem;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
.spend-pips,
|
|
582
|
+
.spend-count {
|
|
583
|
+
grid-column: 1;
|
|
584
|
+
grid-row: 2;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
.spend-pips .pip {
|
|
588
|
+
width: 14px;
|
|
589
|
+
height: 14px;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
.spend-roll {
|
|
593
|
+
grid-column: 2;
|
|
594
|
+
grid-row: 1 / span 2;
|
|
595
|
+
min-width: 104px;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
.spend-foot {
|
|
599
|
+
gap: 8px;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
.spend-done {
|
|
603
|
+
flex: 1 1 100%;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
.spend-hint {
|
|
607
|
+
font-size: 0.85rem;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
/* Right to left, the numbers with their signs stay in their order, as the dashboard keeps its own. */
|
|
612
|
+
:is(.asked-dice, .spend-gain, .spend-chip-adds):dir(rtl) {
|
|
613
|
+
direction: ltr;
|
|
614
|
+
unicode-bidi: isolate;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
/* The hit dice under the question, as far from it as the card always had them. */
|
|
618
|
+
.hit-dice {
|
|
619
|
+
margin-top: 12px;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/* The portraits without the pip of their side, as the card always drew them. */
|
|
623
|
+
:is(.dying-token, .spend-token) .side-pip {
|
|
624
|
+
display: none;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
/* The line of the heart over the word of one at 0, in their panel's tint. */
|
|
628
|
+
.dying-line.in-panel {
|
|
629
|
+
position: static;
|
|
630
|
+
display: block;
|
|
631
|
+
width: 100%;
|
|
632
|
+
height: 100%;
|
|
633
|
+
}
|
|
634
|
+
`;
|