rpg-engine 0.5.0 → 0.6.1

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.
Files changed (218) hide show
  1. package/dist/campaign/settings.d.ts +1 -0
  2. package/dist/campaign/settings.js +6 -5
  3. package/dist/command-line.js +12 -5
  4. package/dist/commands/advance.js +1 -1
  5. package/dist/commands/ask.d.ts +1 -1
  6. package/dist/commands/ask.js +66 -24
  7. package/dist/commands/change.js +28 -17
  8. package/dist/commands/config.d.ts +1 -1
  9. package/dist/commands/config.js +67 -21
  10. package/dist/commands/effect.js +42 -23
  11. package/dist/commands/find.js +1 -1
  12. package/dist/commands/game-adventures.js +2 -2
  13. package/dist/commands/game-catalog.d.ts +13 -0
  14. package/dist/commands/game-catalog.js +26 -2
  15. package/dist/commands/game-checks.js +23 -21
  16. package/dist/commands/{game-hit-dice.d.ts → game-dice-pool.d.ts} +3 -3
  17. package/dist/commands/{game-hit-dice.js → game-dice-pool.js} +7 -7
  18. package/dist/commands/game-effects.d.ts +12 -4
  19. package/dist/commands/game-effects.js +21 -13
  20. package/dist/commands/game-examples.d.ts +22 -0
  21. package/dist/commands/game-examples.js +72 -0
  22. package/dist/commands/game-extension-list.d.ts +31 -3
  23. package/dist/commands/game-extension-list.js +83 -7
  24. package/dist/commands/game-images.d.ts +1 -1
  25. package/dist/commands/game-images.js +3 -2
  26. package/dist/commands/game-library.d.ts +3 -0
  27. package/dist/commands/game-library.js +2 -2
  28. package/dist/commands/game-mode.js +1 -1
  29. package/dist/commands/game-package-code.d.ts +87 -0
  30. package/dist/commands/game-package-code.js +648 -0
  31. package/dist/commands/game-package-hooks.d.ts +37 -0
  32. package/dist/commands/game-package-hooks.js +116 -0
  33. package/dist/commands/game-recipes.js +2 -2
  34. package/dist/commands/game-reminders.d.ts +5 -2
  35. package/dist/commands/game-reminders.js +7 -4
  36. package/dist/commands/game-rules.d.ts +4 -1
  37. package/dist/commands/game-rules.js +7 -1
  38. package/dist/commands/game-upkeep.js +3 -3
  39. package/dist/commands/game-view-place.d.ts +8 -20
  40. package/dist/commands/game-view-place.js +16 -35
  41. package/dist/commands/game-widgets.d.ts +39 -10
  42. package/dist/commands/game-widgets.js +138 -35
  43. package/dist/commands/game-world.d.ts +17 -0
  44. package/dist/commands/game-world.js +70 -12
  45. package/dist/commands/image.js +1 -1
  46. package/dist/commands/init.js +2 -2
  47. package/dist/commands/mode.d.ts +1 -1
  48. package/dist/commands/package.d.ts +8 -0
  49. package/dist/commands/package.js +81 -24
  50. package/dist/commands/progression.d.ts +2 -0
  51. package/dist/commands/progression.js +7 -2
  52. package/dist/commands/roll.d.ts +2 -0
  53. package/dist/commands/roll.js +50 -24
  54. package/dist/commands/rules.js +6 -4
  55. package/dist/commands/scene.d.ts +1 -1
  56. package/dist/commands/scene.js +13 -10
  57. package/dist/commands/sheet.js +10 -1
  58. package/dist/commands/status.d.ts +1 -0
  59. package/dist/commands/status.js +14 -4
  60. package/dist/commands/trade.js +6 -4
  61. package/dist/commands/translate.js +2 -2
  62. package/dist/commands/travel.js +1 -1
  63. package/dist/commands/validate.js +2 -2
  64. package/dist/commands/view.d.ts +8 -4
  65. package/dist/commands/view.js +7 -6
  66. package/dist/commands/worked-out.js +11 -5
  67. package/dist/commands/write.d.ts +8 -1
  68. package/dist/commands/write.js +84 -25
  69. package/dist/core/command-reference.js +3 -2
  70. package/dist/core/consents.d.ts +18 -0
  71. package/dist/core/consents.js +93 -0
  72. package/dist/core/context.d.ts +51 -29
  73. package/dist/core/context.js +3 -1
  74. package/dist/core/examples.d.ts +25 -0
  75. package/dist/core/examples.js +19 -0
  76. package/dist/{extensions/api.d.ts → core/package-api.d.ts} +134 -32
  77. package/dist/core/package-declarations.d.ts +102 -0
  78. package/dist/core/package-declarations.js +81 -0
  79. package/dist/core/registry.d.ts +2 -0
  80. package/dist/core/text.d.ts +5 -0
  81. package/dist/core/text.js +12 -0
  82. package/dist/dashboard/acts.js +31 -24
  83. package/dist/dashboard/address.js +4 -1
  84. package/dist/dashboard/api.js +54 -0
  85. package/dist/dashboard/app.js +140 -96
  86. package/dist/dashboard/ask-card.js +76 -25
  87. package/dist/dashboard/asked-dice.js +57 -0
  88. package/dist/dashboard/dice/tray.js +3 -3
  89. package/dist/dashboard/extension-widgets.js +104 -10
  90. package/dist/dashboard/i18n/ar.json +25 -29
  91. package/dist/dashboard/i18n/cs.json +25 -29
  92. package/dist/dashboard/i18n/da.json +25 -29
  93. package/dist/dashboard/i18n/de.json +25 -29
  94. package/dist/dashboard/i18n/el.json +25 -29
  95. package/dist/dashboard/i18n/es.json +25 -29
  96. package/dist/dashboard/i18n/fi.json +25 -29
  97. package/dist/dashboard/i18n/fr.json +25 -29
  98. package/dist/dashboard/i18n/he.json +25 -29
  99. package/dist/dashboard/i18n/hi.json +25 -29
  100. package/dist/dashboard/i18n/hu.json +25 -29
  101. package/dist/dashboard/i18n/is.json +25 -29
  102. package/dist/dashboard/i18n/it.json +25 -29
  103. package/dist/dashboard/i18n/ja.json +25 -29
  104. package/dist/dashboard/i18n/ko.json +25 -29
  105. package/dist/dashboard/i18n/nb.json +25 -29
  106. package/dist/dashboard/i18n/nl.json +25 -29
  107. package/dist/dashboard/i18n/pl.json +25 -29
  108. package/dist/dashboard/i18n/pt.json +25 -29
  109. package/dist/dashboard/i18n/ro.json +25 -29
  110. package/dist/dashboard/i18n/ru.json +25 -29
  111. package/dist/dashboard/i18n/sv.json +25 -29
  112. package/dist/dashboard/i18n/tr.json +25 -29
  113. package/dist/dashboard/i18n/uk.json +25 -29
  114. package/dist/dashboard/i18n/zh.json +25 -29
  115. package/dist/dashboard/icons.js +4 -1
  116. package/dist/dashboard/kit.js +35 -0
  117. package/dist/dashboard/labels.js +1 -0
  118. package/dist/dashboard/pack-card.js +7 -2
  119. package/dist/dashboard/package-page.js +50 -0
  120. package/dist/dashboard/packages.js +172 -23
  121. package/dist/dashboard/page-code.js +248 -0
  122. package/dist/dashboard/party.js +13 -14
  123. package/dist/dashboard/people.js +4 -0
  124. package/dist/dashboard/person-panel.js +110 -0
  125. package/dist/dashboard/place-map-view.js +11 -6
  126. package/dist/dashboard/scene.js +12 -9
  127. package/dist/dashboard/settings.js +55 -9
  128. package/dist/dashboard/sheet.js +21 -13
  129. package/dist/dashboard/status.js +69 -15
  130. package/dist/dashboard/style.css +592 -825
  131. package/dist/dashboard/top.js +75 -25
  132. package/dist/dashboard/turns.js +34 -13
  133. package/dist/dashboard/widgets.js +9 -2
  134. package/dist/dashboard-server.js +189 -10
  135. package/dist/dice/roll-dice.js +1 -1
  136. package/dist/effects/effect.d.ts +7 -4
  137. package/dist/effects/effect.js +12 -9
  138. package/dist/extensions/engine.d.ts +4 -0
  139. package/dist/extensions/engine.js +74 -0
  140. package/dist/extensions/extension.d.ts +25 -37
  141. package/dist/extensions/extension.js +26 -48
  142. package/dist/extensions/index.d.ts +3 -2
  143. package/dist/extensions/index.js +4 -1
  144. package/dist/extensions/packages.d.ts +6 -0
  145. package/dist/extensions/packages.js +100 -11
  146. package/dist/index.d.ts +1 -3
  147. package/dist/mcp-server.js +51 -14
  148. package/dist/page-words.d.ts +4 -0
  149. package/dist/page-words.js +4 -4
  150. package/dist/page.d.ts +218 -0
  151. package/dist/page.js +2 -0
  152. package/dist/pages/load.d.ts +7 -1
  153. package/dist/pages/load.js +10 -5
  154. package/dist/pages/page-file.js +1 -1
  155. package/dist/pages/stack-writes.js +5 -4
  156. package/dist/pages/world.d.ts +8 -0
  157. package/dist/pages/world.js +9 -2
  158. package/dist/systems/game-system.d.ts +52 -26
  159. package/dist/systems/game-system.js +141 -42
  160. package/dist/systems/index.d.ts +3 -3
  161. package/dist/systems/index.js +3 -3
  162. package/dist/systems/system-code.d.ts +29 -88
  163. package/dist/systems/system-code.js +68 -23
  164. package/dist/systems/words.d.ts +2 -0
  165. package/dist/systems/words.js +11 -0
  166. package/dist/testing.d.ts +20 -5
  167. package/dist/testing.js +49 -14
  168. package/instructions/combat.md +2 -2
  169. package/instructions/core.md +2 -2
  170. package/instructions/dashboard.md +2 -2
  171. package/instructions/mentor-tutorial.md +1 -1
  172. package/instructions/play.md +3 -3
  173. package/instructions/setup.md +1 -1
  174. package/package.json +10 -2
  175. package/systems/5e/LICENSE.md +13 -3
  176. package/systems/5e/dist/dying.js +83 -16
  177. package/systems/5e/dist/index.js +2 -2
  178. package/systems/5e/dist/page-style.js +634 -0
  179. package/systems/5e/dist/page.js +166 -0
  180. package/systems/5e/dist/shown.js +23 -0
  181. package/systems/5e/instructions/combat.md +1 -0
  182. package/systems/5e/package.json +4 -2
  183. package/systems/5e/system.yaml +37 -9
  184. package/systems/5e/versions/srd-5.1/system.yaml +2 -0
  185. package/systems/5e/words/ar.yaml +30 -0
  186. package/systems/5e/words/cs.yaml +30 -0
  187. package/systems/5e/words/da.yaml +30 -0
  188. package/systems/5e/words/de.yaml +30 -0
  189. package/systems/5e/words/el.yaml +30 -0
  190. package/systems/5e/words/es.yaml +30 -0
  191. package/systems/5e/words/fi.yaml +30 -0
  192. package/systems/5e/words/fr.yaml +30 -0
  193. package/systems/5e/words/he.yaml +30 -0
  194. package/systems/5e/words/hi.yaml +30 -0
  195. package/systems/5e/words/hu.yaml +30 -0
  196. package/systems/5e/words/is.yaml +30 -0
  197. package/systems/5e/words/it.yaml +30 -0
  198. package/systems/5e/words/ja.yaml +30 -0
  199. package/systems/5e/words/ko.yaml +30 -0
  200. package/systems/5e/words/nb.yaml +30 -0
  201. package/systems/5e/words/nl.yaml +30 -0
  202. package/systems/5e/words/pl.yaml +30 -0
  203. package/systems/5e/words/pt.yaml +30 -0
  204. package/systems/5e/words/ro.yaml +30 -0
  205. package/systems/5e/words/ru.yaml +30 -0
  206. package/systems/5e/words/sv.yaml +30 -0
  207. package/systems/5e/words/tr.yaml +30 -0
  208. package/systems/5e/words/uk.yaml +30 -0
  209. package/systems/5e/words/zh.yaml +30 -0
  210. package/dist/commands/game-extensions.d.ts +0 -34
  211. package/dist/commands/game-extensions.js +0 -407
  212. package/dist/commands/game-system-code.d.ts +0 -33
  213. package/dist/commands/game-system-code.js +0 -188
  214. package/dist/dashboard/death-save.js +0 -67
  215. package/dist/dashboard/dying.js +0 -46
  216. package/dist/dashboard/save-outcome.js +0 -42
  217. package/dist/dashboard/spend.js +0 -115
  218. /package/dist/{extensions/api.js → core/package-api.js} +0 -0
@@ -0,0 +1,166 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "preact/jsx-runtime";
2
+ import { useEffect, useRef, useState } from "preact/hooks";
3
+ import { Dice, Icon, Portrait } from "rpg-engine/page";
4
+ import { pageStyle } from "./page-style.js";
5
+ import { saveOutcome } from "./shown.js";
6
+ const page = {
7
+ figures: { heartbeat: HeartbeatFigure },
8
+ bodies: { "death-save": DeathSaveBody, "hit-dice": HitDiceBody },
9
+ style: pageStyle,
10
+ };
11
+ export default page;
12
+ // The line of the heart, on a strip 420 wide and 60 high: a faint beat while dying, a stronger one at a success, weaker at a failure, flat at the last.
13
+ const heartLines = {
14
+ faint: "M0 30H130l6-6 5 10 4-4H170l5-16 7 28 5-12H260l5-5 4 8 4-3H420",
15
+ beat: "M0 30H120l8-4 6 4H170l6-26 8 50 6-24H240l8-4 6 4H330l6-22 8 42 6-20H420",
16
+ weak: "M0 30H140l6-8 6 14 4-6H300l4-6 4 8H420",
17
+ flat: "M0 30H420",
18
+ strong: "M0 30H120l8-6 6 6H160l8-34 10 60 8-30H250l8-6 6 6H320l8-30 10 54 8-24H420",
19
+ };
20
+ // The line of each state that stays.
21
+ const stateLines = { dying: "faint", stable: "beat", dead: "flat" };
22
+ // The drawing of the skull of the dead, as the dashboard's own.
23
+ const skull = "M12 2.5C7 2.5 3.5 6 3.5 10.6c0 2.7 1.2 4.8 3.2 6.1V19.5c0 1.1.9 2 2 2h6.6c1.1 0 2-.9 2-2v-2.8c2-1.3 3.2-3.4 3.2-6.1C20.5 6 17 2.5 12 2.5Z "
24
+ + "M8.6 8.8a2.3 2.4 0 1 0 0 4.8a2.3 2.4 0 1 0 0-4.8Z M15.4 8.8a2.3 2.4 0 1 0 0 4.8a2.3 2.4 0 1 0 0-4.8Z M12 13.8l-1.4 2.5h2.8Z M10.1 18.4h1.1v3.4h-1.1Z M12.8 18.4h1.1v3.4h-1.1Z";
25
+ /** The line of the heart over the word of one at 0, in the tint of their panel: faint dying, a beat stable, flat dead. */
26
+ function HeartbeatFigure({ data }) {
27
+ const state = data?.state ?? "dying";
28
+ return _jsx(HeartLine, { line: stateLines[state], kind: "dying-line in-panel" });
29
+ }
30
+ function HeartLine({ line, kind = "dying-line" }) {
31
+ return (_jsx("svg", { class: kind, viewBox: "0 0 420 60", preserveAspectRatio: "none", "aria-hidden": "true", children: _jsx("path", { d: heartLines[line] }) }));
32
+ }
33
+ /** The inside of the card of a death save, from the question to its outcome, which the player closes once read. */
34
+ function DeathSaveBody({ data, before, rolled, buttons, sent, answer, words, field }) {
35
+ const save = data;
36
+ const was = before;
37
+ const button = buttons[0];
38
+ const rolling = sent !== undefined;
39
+ // The outcome once the dice landed and what the server's code wrote of them came: from the card before the roll to the card after.
40
+ const outcome = rolled === undefined || was === undefined ? undefined : saveOutcome(was, save);
41
+ const shown = was ?? save;
42
+ const successes = outcome?.successes ?? (rolled === undefined ? save : shown).successes.value;
43
+ const failures = outcome?.failures ?? (rolled === undefined ? save : shown).failures.value;
44
+ const highest = `${save.highest.value} ${field(save.highest.field)}`;
45
+ const told = rolled === undefined ? (rolling ? "rolling" : "asking") : outcome === undefined ? "told" : `told ${outcome.kind}`;
46
+ const said = outcome === undefined ? "" : outcomeWords(outcome, highest, words);
47
+ const label = (side) => words(side === "successes" ? "Successes" : "Failures");
48
+ const of = (value, max) => words("{value} of {max}", { value, max });
49
+ return (_jsxs("div", { class: `death-save ${told}`, children: [_jsxs("div", { class: "dying-life", children: [_jsx(HeartLine, { line: heartLine(outcome?.kind) }), _jsx(Marks, { kind: "successes", label: label("successes"), value: successes, most: save.successes.most, lit: outcome?.kind === "success" || outcome?.kind === "stable" ? 1 : 0, of: of }), _jsx("span", { class: "dying-token", children: _jsx(Portrait, { name: save.who, large: true }) }), _jsx(Marks, { kind: "failures", label: label("failures"), value: failures, most: save.failures.most, lit: outcome?.count ?? 0, of: of })] }), _jsxs("div", { class: "dying-foot", children: [rolled === undefined && button !== undefined && (_jsxs("button", { type: "button", class: rolling ? "dying-roll sent" : "dying-roll", disabled: rolling, "aria-describedby": "dying-stakes", onClick: () => answer(0), children: [button.dice !== undefined && _jsx(Dice, { notation: button.dice }), _jsx("span", { class: "asked-check-name", children: button.name }), button.dice !== undefined && _jsx("span", { class: "visually-hidden", children: button.dice })] })), _jsx("p", { class: "dying-word", role: "status", children: rolled !== undefined && (_jsxs(_Fragment, { children: [_jsxs("span", { "aria-hidden": "true", children: [outcome === undefined ? rolled.total : `${rolled.total} · `, outcome?.kind === "dead" && (_jsx("svg", { class: "person-skull", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { d: skull }) })), said] }), _jsx("span", { class: "visually-hidden", children: outcome === undefined
50
+ ? String(rolled.total)
51
+ : `${rolled.total}: ${said}. ${label("successes")}: ${of(successes, save.successes.most)}; ${label("failures")}: ${of(failures, save.failures.most)}.` })] })) }), _jsx("p", { id: "dying-stakes", class: "dying-stakes", children: [
52
+ words("{value} or more: a success", { value: save.atLeast }),
53
+ save.lowest === 2 ? words("{face}: two failures", { face: 1 }) : words("{face}: {count} failures", { face: 1, count: save.lowest }),
54
+ words("{face}: back up with {value}", { face: save.sides, value: highest }),
55
+ ].join(" · ") })] })] }));
56
+ }
57
+ /** A side's marks, successes as circles, failures as squares; the last `lit` of those marked are new, lit as they come. */
58
+ function Marks({ kind, label, value, most, lit, of }) {
59
+ return (_jsxs("div", { class: kind === "failures" ? "person-side bad" : "person-side good", children: [_jsx("span", { class: "eyebrow person-label", "aria-hidden": "true", children: label }), _jsxs("span", { class: "person-marks", children: [Array.from({ length: most }, (_, index) => (_jsx("span", { class: ["person-mark", index < value ? "marked" : "", index < value && index >= value - lit ? "new" : ""].filter((name) => name !== "").join(" "), "aria-hidden": "true" }, index))), _jsx("span", { class: "visually-hidden", children: `${label}: ${of(value, most)}` })] })] }));
60
+ }
61
+ /** The outcome in the 5e's words. */
62
+ function outcomeWords(outcome, highest, words) {
63
+ switch (outcome.kind) {
64
+ case "success":
65
+ return words("Success");
66
+ case "stable":
67
+ return words("Stable");
68
+ case "failure":
69
+ return words("Failure");
70
+ case "failures":
71
+ return outcome.count === 2 ? words("Two failures") : words("{count} failures", { count: outcome.count });
72
+ case "dead":
73
+ return words("Dead");
74
+ case "back":
75
+ return words("Back up with {value}", { value: highest });
76
+ }
77
+ }
78
+ /** The line of the heart for an outcome: faint while it is to roll, a beat at a success, weaker at a failure, strong back on their feet, flat at the last. */
79
+ function heartLine(kind) {
80
+ return kind === undefined ? "faint" : kind === "back" ? "strong" : kind === "dead" ? "flat" : kind === "success" || kind === "stable" ? "beat" : "weak";
81
+ }
82
+ // How long the points take to climb to what a die gave.
83
+ const climbTime = 400;
84
+ // The kit's check, drawn on a grid of 24.
85
+ const checkPath = "M5 12.5l4.5 4.5L19 7.5";
86
+ /**
87
+ * The inside of the card of the hit dice of a rest (ASK-14): who rests and the points the dice give, as a bar that keeps where the rest began; a row for each
88
+ * die with its pips and its button; the dice rolled as chips; the one button that ends it. What a roll changes shows once its dice land.
89
+ */
90
+ function HitDiceBody({ rest, buttons, sent, answer, words, field, number, reducedMotion }) {
91
+ const element = useRef(null);
92
+ const done = useRef(null);
93
+ const [leaving, setLeaving] = useState(false);
94
+ const value = useClimb(rest?.gives.value ?? 0, reducedMotion);
95
+ // The last die spent, the focus that was on a button to roll goes to the one that ends it.
96
+ const left = rest?.dice.some((dice) => dice.value > 0) === true;
97
+ useEffect(() => {
98
+ const active = element.current?.getRootNode()?.activeElement ?? null;
99
+ if (!left && active !== null && element.current?.contains(active) === true) {
100
+ done.current?.focus();
101
+ }
102
+ }, [left]);
103
+ if (rest === undefined) {
104
+ return null;
105
+ }
106
+ const { gives } = rest;
107
+ const gained = gives.value - gives.from;
108
+ const full = gives.max !== undefined && gives.value >= gives.max;
109
+ const last = rest.rolls.at(-1);
110
+ const busy = sent !== undefined || leaving;
111
+ const end = () => {
112
+ if (!busy) {
113
+ setLeaving(true);
114
+ answer(buttons.length - 1);
115
+ }
116
+ };
117
+ return (_jsxs("div", { ref: element, class: leaving ? "hit-dice leaving" : "hit-dice", children: [_jsxs("div", { class: "spend-play", children: [_jsxs("div", { class: "spend-life", children: [_jsx("span", { class: "spend-token", children: _jsx(Portrait, { name: rest.who }) }), _jsxs("div", { class: "spend-points", children: [_jsxs("span", { class: "spend-points-head", children: [_jsx("span", { class: "eyebrow spend-points-name", children: field(gives.field) }), _jsxs("span", { class: "spend-points-number", children: [_jsx("b", { children: number(value) }), gives.max !== undefined && _jsxs("span", { class: "spend-points-max", children: ["/", number(gives.max)] })] }), gained > 0 && _jsxs("span", { class: "spend-gain", children: ["+", number(gained)] }), full && (_jsxs("span", { class: "spend-full", children: [_jsx(Icon, { path: checkPath }), words("at the maximum")] }))] }), gives.max !== undefined && gives.max > 0 && (_jsxs("span", { class: "bar spend-bar", role: "meter", "aria-label": field(gives.field), "aria-valuemin": 0, "aria-valuemax": gives.max, "aria-valuenow": gives.value, "aria-valuetext": words("{value} of {max}", { value: gives.value, max: gives.max }), children: [_jsx("span", { class: "fill spend-now", style: { "--fill": String(share(gives.value, gives.max)) } }), gives.from > 0 && _jsx("span", { class: "fill spend-before", style: { "--fill": String(share(gives.from, gives.max)) } })] }))] })] }), _jsx("ul", { class: "spend-rows", children: rest.dice.map((dice, index) => {
118
+ const out = dice.value <= 0;
119
+ const label = field(dice.field);
120
+ return (_jsxs("li", { class: out ? "spend-row out" : "spend-row", children: [_jsx("span", { class: "spend-row-name", children: label }), dice.max <= 10
121
+ ? (_jsx("span", { class: "pips spend-pips", role: "img", "aria-label": `${label}: ${words("{value} of {max}", { value: dice.value, max: dice.max })}`, children: Array.from({ length: dice.max }, (_, pip) => (_jsx("span", { class: ["pip", pip < dice.value ? "on" : "", last?.field === dice.field && pip === dice.value ? "fresh" : ""].filter((name) => name !== "").join(" ") }, pip))) }))
122
+ : _jsx("span", { class: "spend-count", children: words("{value} of {max}", { value: dice.value, max: dice.max }) }), _jsxs("button", { type: "button", class: sent === index ? "spend-roll sent" : "spend-roll", "aria-disabled": out || busy ? "true" : undefined, onClick: () => !out && !busy && answer(index), children: [_jsx(Dice, { notation: `1d${dice.sides}` }), _jsx("span", { class: "asked-check-name", children: out ? words("None left") : words("Roll") }), !out && dice.adds !== 0 && _jsx("span", { class: "asked-dice", children: signed(dice.adds) }), _jsx("span", { class: "visually-hidden", children: label })] })] }, dice.field));
123
+ }) })] }), _jsxs("div", { class: "spend-foot", children: [rest.rolls.length === 0
124
+ ? _jsx("p", { class: "spend-hint", children: words("One die at a time: stop when you like.") })
125
+ : (_jsx("ol", { class: "spend-chips", "aria-label": words("Dice rolled"), children: rest.rolls.map((roll) => (_jsxs("li", { class: roll.id === last?.id ? "spend-chip fresh" : "spend-chip", children: [_jsxs("span", { class: "die-chip", children: [_jsx(Dice, { notation: `1d${rest.dice.find((dice) => dice.field === roll.field)?.sides ?? 6}` }), roll.face] }), roll.adds !== 0 && _jsx("span", { class: "spend-chip-adds", children: signed(roll.adds) }), _jsxs("span", { class: "spend-chip-total", children: ["= ", roll.total] })] }, roll.id))) })), _jsx("button", { ref: done, type: "button", class: left ? "spend-done" : "spend-done last", "aria-disabled": busy ? "true" : undefined, onClick: end, children: rest.rolls.length === 0 ? words("I spend none") : words("Done") })] }), _jsx("p", { class: "visually-hidden", role: "status", children: last === undefined ? "" : landedText(rest, last, words, field) })] }));
126
+ }
127
+ /** "Hit dice d8: 6 +2 = 8. HP: 22 of 27. Left: 1.": a die as it landed, for a screen reader. */
128
+ function landedText(rest, roll, words, field) {
129
+ const dice = rest.dice.find((counter) => counter.field === roll.field);
130
+ const points = rest.gives.max === undefined ? String(rest.gives.value) : words("{value} of {max}", { value: rest.gives.value, max: rest.gives.max });
131
+ const rolled = `${roll.face}${roll.adds === 0 ? "" : ` ${signed(roll.adds)}`} = ${roll.total}`;
132
+ return `${field(roll.field)}: ${rolled}. ${field(rest.gives.field)}: ${points}.${dice === undefined ? "" : ` ${words("Left: {count}", { count: dice.value })}`}`;
133
+ }
134
+ /** What a die adds, with its sign: +2, −1. */
135
+ function signed(value) {
136
+ return value < 0 ? `−${Math.abs(value)}` : `+${value}`;
137
+ }
138
+ /** A value's share of its maximum, from 0 to 1. */
139
+ function share(value, max) {
140
+ return Math.min(1, Math.max(0, value / max));
141
+ }
142
+ /** A number that climbs to its new value in a moment, at once for a player who asked for less motion. */
143
+ function useClimb(target, still) {
144
+ const [value, setValue] = useState(target);
145
+ const from = useRef(target);
146
+ useEffect(() => {
147
+ const start = from.current;
148
+ from.current = target;
149
+ if (start === target || still) {
150
+ setValue(target);
151
+ return;
152
+ }
153
+ const began = performance.now();
154
+ let frame = 0;
155
+ const step = (now) => {
156
+ const part = Math.min(1, (now - began) / climbTime);
157
+ setValue(Math.round(start + (target - start) * part));
158
+ if (part < 1) {
159
+ frame = requestAnimationFrame(step);
160
+ }
161
+ };
162
+ frame = requestAnimationFrame(step);
163
+ return () => cancelAnimationFrame(frame);
164
+ }, [target]);
165
+ return value;
166
+ }
@@ -0,0 +1,23 @@
1
+ // What the 5e's widgets give its page module (D-510, D-516), and what a death save did, read from its card before and after the dice (DIE-4, D-461): the rule
2
+ // itself is the server code's, which writes the counters; the page only tells them.
3
+ /**
4
+ * The outcome of a death save from its card before and after the dice (DIE-4): dead, back above 0, failures added, the last of them dead, or a success, the
5
+ * last of them stable; none when it changed nothing, as when the server's code did not run.
6
+ */
7
+ export function saveOutcome(before, after) {
8
+ const [successes, failures] = [after.successes.value, after.failures.value];
9
+ if (after.dead) {
10
+ return { kind: "dead", successes, failures: after.failures.most, count: Math.max(after.failures.most - before.failures.value, 1) };
11
+ }
12
+ if (!after.down) {
13
+ return { kind: "back", successes: 0, failures: 0, count: 0 };
14
+ }
15
+ if (failures > before.failures.value) {
16
+ const count = failures - before.failures.value;
17
+ return { kind: count > 1 ? "failures" : "failure", successes, failures, count };
18
+ }
19
+ if (successes > before.successes.value) {
20
+ return { kind: successes >= after.successes.most ? "stable" : "success", successes, failures, count: 0 };
21
+ }
22
+ return undefined;
23
+ }
@@ -0,0 +1 @@
1
+ Armor class too is said in words: how hard a foe is to hit. A turn's rolls are its attacks and the saves it forces; in the next message, the damage of those that hit, such as by -(2d6+3).
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "name": "@rpgengine/system-5e",
3
+ "version": "1.0.0",
3
4
  "private": true,
4
- "description": "The game system compatible with fifth edition, from the SRD 5.1 and 5.2: its code, where its data is not enough.",
5
+ "description": "A game system for RPG Engine compatible with fifth edition, from the SRD 5.1: its rules, creatures, items, spells, classes and races as pages, and the character's sheet worked out.",
5
6
  "type": "module",
6
7
  "main": "dist/index.js",
7
8
  "rpg-engine": {
8
9
  "kind": "system",
9
- "api": 1
10
+ "api": 5,
11
+ "page": "dist/page.js"
10
12
  }
11
13
  }
@@ -23,6 +23,8 @@ load:
23
23
  limit: ["str * 15 * table(carry-by-size, size)", str * 15]
24
24
  coins: 50
25
25
  weightless: extradimensional
26
+ # Arrows (20) and the like: cost and weight are the bundle's, a count is in pieces (p. 69, STK-2).
27
+ bundle: bundle
26
28
  stages:
27
29
  - {name: Encumbered, when: "has(rigor, simulation) * ceil(best(load, 0) - 5 * best(str, 0))"}
28
30
  - {name: Heavily encumbered, when: "has(rigor, simulation) * ceil(best(load, 0) - 10 * best(str, 0))"}
@@ -59,6 +61,11 @@ grid:
59
61
  walking: walking
60
62
  # What the setup asks for this system, with the campaign's settings (DAT-10, D-212): how the characters gain levels, with the experience points of the SRD
61
63
  # (p. 56), or at the milestones the story reaches, where xp is neither asked nor shown.
64
+ # The versions of its rules (D-513 (5), VER-1): the SRD 5.1 alone for now, which every campaign plays. When the 5.2.1 comes, what differs between them moves
65
+ # from here to versions/srd-5.1/, so that a campaign of today reads the same then.
66
+ versions:
67
+ about: which rules of the fifth edition you play
68
+ srd-5.1: {means: "the SRD 5.1, the 2014 rules", player: "the 2014 rules"}
62
69
  settings:
63
70
  advancement:
64
71
  about: how your character levels up
@@ -116,7 +123,7 @@ sheet-notes:
116
123
  Proficiencies: "what the race gives (languages, skills, weapons, tools) comes with it: add what the class and background give with add, and never write a whole list over it. Armor and weapons by the names the class page uses, in English, such as weapon-proficiencies: [simple weapons, martial weapons]: the attacks read them."
117
124
  Spells: "spells lists the spells the character knows, cantrips included, or keeps in a spellbook; prepared, those prepared today, for a cleric, druid, paladin or wizard: both as links, by the system's names, such as [[Cure Wounds]], [[Shield (spell)]]; a spell the system lacks gets its page first. A domain's or an oath's spells are always prepared and never written in prepared, which counts only those chosen. Slots, save DC and attack are worked out: never write them."
118
125
  Combat: "hp-base is the hit points the class's hit dice gave at each level, without Constitution: the system adds con-mod, and hp-per-level when the race or class gives it, for every level. equipped lists the armor and shield worn, the weapons ready and the magic items worn or held, as a ring, whose bonuses count only so, among what the character carries: the system's kind, such as [[Chain Mail]], or an item of the campaign derived from it, as a magic one: the armor class and the attacks follow it. An effect on the armor class gives what it adds, bonus-ac, as Shield of Faith's 2, or the base without armor, unarmored-base, as Mage Armor's 13, to which the system adds Dex. A mithral armor writes what it lacks over its kind: item=[[Plate Armor]], magic=[[Mithral Armor]], strength-required=0, stealth-disadvantage=false."
119
- Attacks: "Dueling's +2 is on every one-handed melee weapon, as on a sheet: leave it out of a roll with another weapon in hand, or with both hands on a versatile weapon, which rolls its larger die. Two-Weapon Fighting's attack with the other hand adds no ability modifier to its damage unless the style gives it (p. 95). A monk weapon uses Dex, and rolls the Martial Arts die instead of its own when that is higher, only while the monk wears no armor and holds no shield. A campaign weapon whose dice differ from its kind's copies the kind's damage-roll with its own dice in place, such as 1d10 + str-mod + bonus + 2 * has(fighting-styles, Dueling) slashing. A companion's natural attacks, such as a wolf's bite, are in its stat block, beside the unarmed strike every sheet shows. A magic weapon or armor of the campaign derives from the system's kind and names its magic item: item=[[Longsword]], magic=[[Weapon, +1, +2, or +3]], bonus=1; ammunition's bonus is added to the roll by hand."
126
+ Attacks: "Dueling's +2 is on every one-handed melee weapon, as on a sheet: leave it out of a roll with another weapon in hand, or with both hands on a versatile weapon, which rolls its larger die. Two-Weapon Fighting's attack with the other hand adds no ability modifier to its damage unless the style gives it. A monk weapon uses Dex, and rolls the Martial Arts die instead of its own when that is higher, only while the monk wears no armor and holds no shield. A campaign weapon whose dice differ from its kind's copies the kind's damage-roll with its own dice in place, such as 1d10 + str-mod + bonus + 2 * has(fighting-styles, Dueling) slashing. A companion's natural attacks, such as a wolf's bite, are in its stat block, beside the unarmed strike every sheet shows. A magic weapon or armor of the campaign derives from the system's kind and names its magic item: item=[[Longsword]], magic=[[Weapon, +1, +2, or +3]], bonus=1; ammunition's bonus is added to the roll by hand."
120
127
  Features: "a choice a feature asks for goes in the list of its kind, by the name the class page gives it, in English, such as fighting-styles: [Archery] or invocations: [Thirsting Blade]; its bonuses follow. Thirsting Blade's second attack is only with the pact weapon."
121
128
  # Where the dashboard puts the groups (D-295): in the rail, as on a paper sheet, the abilities, the saving throws and the skills; then the rest by how often
122
129
  # play needs them; in a fight, at hand, the armor class, initiative, speed and hit points, the attacks and the spells (D-315).
@@ -133,6 +140,16 @@ sheet-actions:
133
140
  features: [use]
134
141
  inventory: [use, equip]
135
142
  equipped: [use, unequip]
143
+ # Its own verbs beside the engine's (D-514), in English: its words translate them.
144
+ sheet-verbs:
145
+ cast:
146
+ label: Cast
147
+ title: "Cast {item}"
148
+ says: "I cast {item}."
149
+ says-on: "I cast {item} on {target}."
150
+ says-at: "I cast {item} at {square}."
151
+ says-self: "I cast {item} on myself."
152
+ prepare: {label: Prepare, title: "Prepare {item}", says: "I prepare {item}."}
136
153
  # The line under a character's name on the dashboard (D-288).
137
154
  sheet-headline: "Level {level} {classes}"
138
155
  # The icon of each group on the dashboard (D-284): the d of an SVG path on a grid of 24, drawn as a line; drawn for rpg-engine.
@@ -243,8 +260,11 @@ rewards:
243
260
  xp: {from: xp-value, overcome: hp 0}
244
261
  # The conditions (Appendix PH-A, pp. 358–359): an effect with one of these names shows its rule.
245
262
  conditions: [Blinded, Charmed, Deafened, Frightened, Grappled, Incapacitated, Invisible, Paralyzed, Petrified, Poisoned, Prone, Restrained, Stunned, Unconscious]
246
- # The drawing of each condition on the dashboard's tokens and in Combat (D-419): the d of an SVG path on a grid of 24, drawn as a line; drawn for rpg-engine.
263
+ # The drawing of each condition on the dashboard's tokens and in Combat (D-419), and of a few frequent effects in their chips (D-516): the d of an SVG path on
264
+ # a grid of 24, drawn as a line; drawn for rpg-engine.
247
265
  condition-icons:
266
+ Bless: "M6.5 4.5a5.5 2 0 1 0 11 0a5.5 2 0 1 0-11 0Z M12 9a3.25 3.25 0 1 0 0 6.5a3.25 3.25 0 1 0 0-6.5Z M5.5 21c.7-3 3.3-4.75 6.5-4.75s5.8 1.75 6.5 4.75"
267
+ Shield of Faith: "M12 3.25 19 5.75V11.25c0 4.6-3 8.1-7 9.5-4-1.4-7-4.9-7-9.5V5.75Z M12 8.5v7 M9 11h6"
248
268
  Blinded: "M3 12c2.5-4 5.5-6 9-6s6.5 2 9 6c-2.5 4-5.5 6-9 6s-6.5-2-9-6Z M4.5 19.5l15-15"
249
269
  Charmed: "M12 19.5s-7.5-4.6-7.5-9.6a4 4 0 0 1 7.5-2a4 4 0 0 1 7.5 2c0 5-7.5 9.6-7.5 9.6Z"
250
270
  Deafened: "M4 9.5h3l4.5-4v13l-4.5-4H4Z M15 9.5l5 5 M20 9.5l-5 5"
@@ -289,7 +309,7 @@ bonds:
289
309
  # any turn; the attacks of the Attack action within it; Sneak Attack once a turn, in any (p. 39); a legendary creature's actions.
290
310
  turn-uses:
291
311
  action: {}
292
- bonus action: {note: "If it cast a spell, only a cantrip of one action follows this turn (p. 101).", note-when: "count(spells) + count(prepared)"}
312
+ bonus action: {note: "If it cast a spell, only a cantrip of one action follows this turn.", note-when: "count(spells) + count(prepared)"}
293
313
  reaction: {any-turn: true}
294
314
  attack: {within: action, most: "(1 + best(extra-attacks, 0)) / min(1, count(classes))"}
295
315
  sneak attack: {needs: "has(features, Sneak Attack)", any-turn: true, resets: each turn}
@@ -315,12 +335,20 @@ keeping: {counter: hp, conditions: [Incapacitated, Paralyzed, Petrified, Stunned
315
335
  # What a fight follows on the dashboard's Combat (D-314): hit points, a foe's told in words, full, more than half, half or less, 0 (D-238); who cannot act
316
336
  # (p. 358), never a turn skipped.
317
337
  combat: {track: hp, in-words: [unhurt, hurt, bloodied, down], inactive: [Incapacitated, Paralyzed, Petrified, Stunned, Unconscious]}
318
- # At 0 hit points the death saves, big on the dashboard by their sides (p. 98, D-310, D-314, D-461); what the dying point does is the 5e's code (src/dying.ts, D-448).
319
- dying:
320
- at: hp 0
321
- show: {successes: death-successes, failures: death-failures}
322
- stable: Stable
323
- marks: {successes: Successes, failures: Failures}
338
+ # Down at 0 hit points (p. 98); the death saves, what they do and how the dashboard draws them, are the 5e's code (src/dying.ts, src/page.tsx, D-448, D-516).
339
+ down: {at: hp 0}
340
+ # Its widgets, as an extension's (D-511, D-514), drawn by its page module (src/page.tsx): on each of the party at 0 hit points the word of their state and
341
+ # their death saves, with the line of the heart; the card a death save is asked in, and the card the hit dice of a rest are spent in.
342
+ icons:
343
+ heartbeat: "M3 12.5h4.5l2-5 3 10 2.5-5H21"
344
+ widgets:
345
+ dying: {title: Death Saves, icon: heartbeat, place: person}
346
+ death-save: {title: Death Saving Throw, icon: heartbeat, place: card}
347
+ hit-dice: {title: Hit Dice, place: card}
348
+ figures:
349
+ heartbeat: {width: 420, height: 60}
350
+ death-save: {width: 760, height: 220}
351
+ hit-dice: {width: 760, height: 220}
324
352
  # What cannot be true together, which the engine says to the master (CHK-2, D-473): the death saves and Stable hold only at 0 hit points (p. 98).
325
353
  checks:
326
354
  - {when: Stable, needs: hp <= 0, say: "{page} is Stable with {hp}: Stable holds only at 0 hit points; effect end {page} Stable."}
@@ -0,0 +1,2 @@
1
+ # The SRD 5.1, the 2014 rules (VER-1): for now all of it is in the common part, which the 5.2.1 will share.
2
+ title: the SRD 5.1, the 2014 rules
@@ -199,6 +199,27 @@ words:
199
199
  Stable: مستقر
200
200
  Successes: النجاحات
201
201
  Failures: الإخفاقات
202
+ # The death save's card and the hit dice of a rest on the dashboard (D-461, D-492): drawn by the 5e's page module
203
+ "Dying": "يحتضر"
204
+ "Dead": "ميت"
205
+ "Success": "نجاح"
206
+ "Failure": "إخفاق"
207
+ "Two failures": "إخفاقان"
208
+ "{count} failures": "{count} إخفاقات"
209
+ "Back up with {value}": "عودة إلى الوقوف بـ {value}"
210
+ "{value} or more: a success": "{value} أو أكثر: نجاح"
211
+ "{face}: two failures": "{face}: إخفاقان"
212
+ "{face}: {count} failures": "{face}: {count} إخفاقات"
213
+ "{face}: back up with {value}": "{face}: العودة إلى الوقوف بـ {value}"
214
+ "at the maximum": "عند الحد الأقصى"
215
+ "None left": "نفدت"
216
+ "One die at a time: stop when you like.": "حجر نرد واحد في كل مرة: توقف متى شئت."
217
+ "Dice rolled": "النرد المرميّ"
218
+ "I spend none": "لن أنفق أيًا منها"
219
+ "Done": "تم"
220
+ "Left: {count}": "المتبقي: {count}"
221
+ "{value} of {max}": "{value} من {max}"
222
+ "Roll": "رمي"
202
223
  Wretched: بائس
203
224
  Squalid: متهالك
204
225
  Poor: فقير
@@ -481,6 +502,15 @@ words:
481
502
  Hooded Lantern: فانوس مغطى
482
503
  Bullseye Lantern: فانوس مركّز الشعاع
483
504
  Oil: زيت
505
+ "Cast": "إلقاء"
506
+ "Cast {item}": "إلقاء {item}"
507
+ "I cast {item}.": "ألقي {item}."
508
+ "I cast {item} on {target}.": "ألقي {item} على {target}."
509
+ "I cast {item} at {square}.": "ألقي {item} على المربع {square}."
510
+ "I cast {item} on myself.": "ألقي {item} على نفسي."
511
+ "Prepare": "تحضير"
512
+ "Prepare {item}": "تحضير {item}"
513
+ "I prepare {item}.": "أحضّر {item}."
484
514
  names:
485
515
  str: القوة
486
516
  str-mod: القوة
@@ -199,6 +199,27 @@ words:
199
199
  Stable: Stabilní
200
200
  Successes: Úspěchy
201
201
  Failures: Neúspěchy
202
+ # The death save's card and the hit dice of a rest on the dashboard (D-461, D-492): drawn by the 5e's page module
203
+ "Dying": "Umírání"
204
+ "Dead": "Smrt"
205
+ "Success": "Úspěch"
206
+ "Failure": "Neúspěch"
207
+ "Two failures": "Dva neúspěchy"
208
+ "{count} failures": "Neúspěchy: {count}"
209
+ "Back up with {value}": "Na nohou s {value}"
210
+ "{value} or more: a success": "{value} a více: úspěch"
211
+ "{face}: two failures": "{face}: dva neúspěchy"
212
+ "{face}: {count} failures": "{face}: neúspěchy: {count}"
213
+ "{face}: back up with {value}": "{face}: zpět na nohou s {value}"
214
+ "at the maximum": "na maximu"
215
+ "None left": "Žádné nezbyly"
216
+ "One die at a time: stop when you like.": "Jedna kostka po druhé: skonči, kdy chceš."
217
+ "Dice rolled": "Hozené kostky"
218
+ "I spend none": "Žádné nevyužiju"
219
+ "Done": "Hotovo"
220
+ "Left: {count}": "Zbývá: {count}"
221
+ "{value} of {max}": "{value} z {max}"
222
+ "Roll": "Hodit"
202
223
  Wretched: Ubohý
203
224
  Squalid: Žebrácký
204
225
  Poor: Chudý
@@ -481,6 +502,15 @@ words:
481
502
  Hooded Lantern: Zakrytá lucerna
482
503
  Bullseye Lantern: Hledací lucerna
483
504
  Oil: Olej
505
+ "Cast": "Seslat"
506
+ "Cast {item}": "Seslat {item}"
507
+ "I cast {item}.": "Sesílám {item}."
508
+ "I cast {item} on {target}.": "Sesílám {item} na {target}."
509
+ "I cast {item} at {square}.": "Sesílám {item} na políčko {square}."
510
+ "I cast {item} on myself.": "Sesílám {item} na sebe."
511
+ "Prepare": "Připravit"
512
+ "Prepare {item}": "Připravit {item}"
513
+ "I prepare {item}.": "Připravuji {item}."
484
514
  names:
485
515
  str: Síla
486
516
  str-mod: Síla
@@ -199,6 +199,27 @@ words:
199
199
  Stable: Stabil
200
200
  Successes: Succeser
201
201
  Failures: Fejl
202
+ # The death save's card and the hit dice of a rest on the dashboard (D-461, D-492): drawn by the 5e's page module
203
+ "Dying": "Døende"
204
+ "Dead": "Død"
205
+ "Success": "Succes"
206
+ "Failure": "Fejl"
207
+ "Two failures": "To fejl"
208
+ "{count} failures": "{count} fejl"
209
+ "Back up with {value}": "Tilbage på benene med {value}"
210
+ "{value} or more: a success": "{value} eller mere: en succes"
211
+ "{face}: two failures": "{face}: to fejl"
212
+ "{face}: {count} failures": "{face}: {count} fejl"
213
+ "{face}: back up with {value}": "{face}: tilbage på benene med {value}"
214
+ "at the maximum": "på maksimum"
215
+ "None left": "Ingen tilbage"
216
+ "One die at a time: stop when you like.": "Én terning ad gangen: stop, når du vil."
217
+ "Dice rolled": "Terninger slået"
218
+ "I spend none": "Jeg bruger ingen"
219
+ "Done": "Færdig"
220
+ "Left: {count}": "Tilbage: {count}"
221
+ "{value} of {max}": "{value} af {max}"
222
+ "Roll": "Slå"
202
223
  Wretched: Elendig
203
224
  Squalid: Usel
204
225
  Poor: Fattig
@@ -481,6 +502,15 @@ words:
481
502
  Hooded Lantern: Blændlanterne
482
503
  Bullseye Lantern: Linselanterne
483
504
  Oil: Olie
505
+ "Cast": "Kast"
506
+ "Cast {item}": "Kast {item}"
507
+ "I cast {item}.": "Jeg kaster {item}."
508
+ "I cast {item} on {target}.": "Jeg kaster {item} på {target}."
509
+ "I cast {item} at {square}.": "Jeg kaster {item} mod felt {square}."
510
+ "I cast {item} on myself.": "Jeg kaster {item} på mig selv."
511
+ "Prepare": "Gør klar"
512
+ "Prepare {item}": "Gør {item} klar"
513
+ "I prepare {item}.": "Jeg gør {item} klar."
484
514
  names:
485
515
  str: Styrke
486
516
  str-mod: Styrke
@@ -199,6 +199,27 @@ words:
199
199
  Stable: Stabil
200
200
  Successes: Erfolge
201
201
  Failures: Fehlschläge
202
+ # The death save's card and the hit dice of a rest on the dashboard (D-461, D-492): drawn by the 5e's page module
203
+ "Dying": "Im Sterben"
204
+ "Dead": "Tot"
205
+ "Success": "Erfolg"
206
+ "Failure": "Fehlschlag"
207
+ "Two failures": "Zwei Fehlschläge"
208
+ "{count} failures": "{count} Fehlschläge"
209
+ "Back up with {value}": "Wieder auf den Beinen mit {value}"
210
+ "{value} or more: a success": "{value} oder mehr: ein Erfolg"
211
+ "{face}: two failures": "{face}: zwei Fehlschläge"
212
+ "{face}: {count} failures": "{face}: {count} Fehlschläge"
213
+ "{face}: back up with {value}": "{face}: wieder auf den Beinen mit {value}"
214
+ "at the maximum": "am Maximum"
215
+ "None left": "Keine mehr übrig"
216
+ "One die at a time: stop when you like.": "Ein Würfel nach dem anderen: Hör auf, wann du willst."
217
+ "Dice rolled": "Gewürfelte Würfel"
218
+ "I spend none": "Ich gebe keine aus"
219
+ "Done": "Fertig"
220
+ "Left: {count}": "Übrig: {count}"
221
+ "{value} of {max}": "{value} von {max}"
222
+ "Roll": "Würfeln"
202
223
  Wretched: Elend
203
224
  Squalid: Ärmlich
204
225
  Poor: Arm
@@ -481,6 +502,15 @@ words:
481
502
  Hooded Lantern: Blendlaterne
482
503
  Bullseye Lantern: Bullaugenlaterne
483
504
  Oil: Öl
505
+ "Cast": "Zaubern"
506
+ "Cast {item}": "{item} zaubern"
507
+ "I cast {item}.": "Ich zaubere {item}."
508
+ "I cast {item} on {target}.": "Ich zaubere {item} auf {target}."
509
+ "I cast {item} at {square}.": "Ich zaubere {item} auf Feld {square}."
510
+ "I cast {item} on myself.": "Ich zaubere {item} auf mich selbst."
511
+ "Prepare": "Vorbereiten"
512
+ "Prepare {item}": "{item} vorbereiten"
513
+ "I prepare {item}.": "Ich bereite {item} vor."
484
514
  names:
485
515
  str: Stärke
486
516
  str-mod: Stärke
@@ -199,6 +199,27 @@ words:
199
199
  Stable: Σταθεροποιημένη κατάσταση
200
200
  Successes: Επιτυχίες
201
201
  Failures: Αποτυχίες
202
+ # The death save's card and the hit dice of a rest on the dashboard (D-461, D-492): drawn by the 5e's page module
203
+ "Dying": "Ετοιμοθάνατο"
204
+ "Dead": "Νεκρό"
205
+ "Success": "Επιτυχία"
206
+ "Failure": "Αποτυχία"
207
+ "Two failures": "Δύο αποτυχίες"
208
+ "{count} failures": "{count} αποτυχίες"
209
+ "Back up with {value}": "Ανάκτηση με {value}"
210
+ "{value} or more: a success": "{value} ή περισσότερο: επιτυχία"
211
+ "{face}: two failures": "{face}: δύο αποτυχίες"
212
+ "{face}: {count} failures": "{face}: {count} αποτυχίες"
213
+ "{face}: back up with {value}": "{face}: ανάκτηση με {value}"
214
+ "at the maximum": "στο μέγιστο"
215
+ "None left": "Δεν έμεινε κανένα"
216
+ "One die at a time: stop when you like.": "Ένα ζάρι τη φορά: σταμάτα όποτε θέλεις."
217
+ "Dice rolled": "Ζάρια που ρίχτηκαν"
218
+ "I spend none": "Δεν ξοδεύω κανένα"
219
+ "Done": "Τέλος"
220
+ "Left: {count}": "Απομένουν: {count}"
221
+ "{value} of {max}": "{value} από {max}"
222
+ "Roll": "Ρίψη"
202
223
  Wretched: Άθλιος
203
224
  Squalid: Άθλιος
204
225
  Poor: Φτωχός
@@ -481,6 +502,15 @@ words:
481
502
  Hooded Lantern: Φανάρι με κάλυμμα
482
503
  Bullseye Lantern: Φανάρι με εστιασμένη δέσμη
483
504
  Oil: Λάδι
505
+ "Cast": "Ρίξε"
506
+ "Cast {item}": "Ρίξε {item}"
507
+ "I cast {item}.": "Ρίχνω {item}."
508
+ "I cast {item} on {target}.": "Ρίχνω {item} σε {target}."
509
+ "I cast {item} at {square}.": "Ρίχνω {item} στο {square}."
510
+ "I cast {item} on myself.": "Ρίχνω {item} στον εαυτό μου."
511
+ "Prepare": "Ετοίμασε"
512
+ "Prepare {item}": "Ετοίμασε {item}"
513
+ "I prepare {item}.": "Ετοιμάζω {item}."
484
514
  names:
485
515
  str: Δύναμη
486
516
  str-mod: Δύναμη
@@ -199,6 +199,27 @@ words:
199
199
  Stable: Estable
200
200
  Successes: Éxitos
201
201
  Failures: Fallos
202
+ # The death save's card and the hit dice of a rest on the dashboard (D-461, D-492): drawn by the 5e's page module
203
+ "Dying": "Agonizando"
204
+ "Dead": "Muerte"
205
+ "Success": "Éxito"
206
+ "Failure": "Fallo"
207
+ "Two failures": "Dos fallos"
208
+ "{count} failures": "{count} fallos"
209
+ "Back up with {value}": "De pie con {value}"
210
+ "{value} or more: a success": "{value} o más: un éxito"
211
+ "{face}: two failures": "{face}: dos fallos"
212
+ "{face}: {count} failures": "{face}: {count} fallos"
213
+ "{face}: back up with {value}": "{face}: se levanta con {value}"
214
+ "at the maximum": "en el máximo"
215
+ "None left": "Sin usos"
216
+ "One die at a time: stop when you like.": "Un dado cada vez: para cuando quieras."
217
+ "Dice rolled": "Dados tirados"
218
+ "I spend none": "No gasto ninguno"
219
+ "Done": "Listo"
220
+ "Left: {count}": "Quedan: {count}"
221
+ "{value} of {max}": "{value} de {max}"
222
+ "Roll": "Tirar"
202
223
  Wretched: Miserable
203
224
  Squalid: Mísero
204
225
  Poor: Pobre
@@ -481,6 +502,15 @@ words:
481
502
  Hooded Lantern: Linterna sorda
482
503
  Bullseye Lantern: Linterna de ojo de buey
483
504
  Oil: Aceite
505
+ "Cast": "Lanzar"
506
+ "Cast {item}": "Lanzar {item}"
507
+ "I cast {item}.": "Lanzo {item}."
508
+ "I cast {item} on {target}.": "Lanzo {item} sobre {target}."
509
+ "I cast {item} at {square}.": "Lanzo {item} a la casilla {square}."
510
+ "I cast {item} on myself.": "Lanzo {item} sobre mí."
511
+ "Prepare": "Preparar"
512
+ "Prepare {item}": "Preparar {item}"
513
+ "I prepare {item}.": "Preparo {item}."
484
514
  names:
485
515
  str: Fuerza
486
516
  str-mod: Fuerza
@@ -199,6 +199,27 @@ words:
199
199
  Stable: Vakaa
200
200
  Successes: Onnistumiset
201
201
  Failures: Epäonnistumiset
202
+ # The death save's card and the hit dice of a rest on the dashboard (D-461, D-492): drawn by the 5e's page module
203
+ "Dying": "Kuolemassa"
204
+ "Dead": "Kuollut"
205
+ "Success": "Onnistuminen"
206
+ "Failure": "Epäonnistuminen"
207
+ "Two failures": "Kaksi epäonnistumista"
208
+ "{count} failures": "{count} epäonnistumista"
209
+ "Back up with {value}": "Pystyssä arvolla {value}"
210
+ "{value} or more: a success": "{value} tai enemmän: onnistuminen"
211
+ "{face}: two failures": "{face}: kaksi epäonnistumista"
212
+ "{face}: {count} failures": "{face}: {count} epäonnistumista"
213
+ "{face}: back up with {value}": "{face}: pystyyn arvolla {value}"
214
+ "at the maximum": "enimmäismäärässä"
215
+ "None left": "Ei yhtään jäljellä"
216
+ "One die at a time: stop when you like.": "Yksi noppa kerrallaan: lopeta, kun haluat."
217
+ "Dice rolled": "Heitetyt nopat"
218
+ "I spend none": "En käytä yhtään"
219
+ "Done": "Valmis"
220
+ "Left: {count}": "Jäljellä: {count}"
221
+ "{value} of {max}": "{value}/{max}"
222
+ "Roll": "Heitä"
202
223
  Wretched: Viheliäinen
203
224
  Squalid: Surkea
204
225
  Poor: Köyhä
@@ -481,6 +502,15 @@ words:
481
502
  Hooded Lantern: Peitelyhty
482
503
  Bullseye Lantern: Linssilyhty
483
504
  Oil: Öljy
505
+ "Cast": "Loitsi"
506
+ "Cast {item}": "Lausu loitsu: {item}"
507
+ "I cast {item}.": "Lausun loitsun {item}."
508
+ "I cast {item} on {target}.": "Lausun loitsun {item} kohteelle {target}."
509
+ "I cast {item} at {square}.": "Lausun loitsun {item} ruutuun {square}."
510
+ "I cast {item} on myself.": "Lausun loitsun {item} itselleni."
511
+ "Prepare": "Valmistele"
512
+ "Prepare {item}": "Valmistele: {item}"
513
+ "I prepare {item}.": "Valmistelen: {item}."
484
514
  names:
485
515
  str: Voima
486
516
  str-mod: Voima