rpg-engine 0.2.1 → 0.4.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 +3 -3
- package/dist/adventures/index.d.ts +3 -0
- package/dist/adventures/index.js +5 -0
- package/dist/adventures/manifest.d.ts +39 -0
- package/dist/adventures/manifest.js +89 -0
- package/dist/adventures/placement.d.ts +4 -0
- package/dist/adventures/placement.js +14 -0
- package/dist/adventures/source.d.ts +21 -0
- package/dist/adventures/source.js +108 -0
- package/dist/bell-listener.d.ts +9 -0
- package/dist/bell-listener.js +83 -0
- package/dist/campaign/create-campaign.d.ts +3 -2
- package/dist/campaign/create-campaign.js +5 -5
- package/dist/campaign/host-files.d.ts +23 -6
- package/dist/campaign/host-files.js +130 -40
- package/dist/campaign/index.d.ts +2 -2
- package/dist/campaign/index.js +2 -2
- package/dist/campaign/settings.d.ts +43 -3
- package/dist/campaign/settings.js +58 -14
- package/dist/cli.js +10 -1
- package/dist/command-line.js +26 -3
- package/dist/commands/advance.js +6 -2
- package/dist/commands/ask.d.ts +11 -4
- package/dist/commands/ask.js +249 -23
- package/dist/commands/change.d.ts +29 -0
- package/dist/commands/change.js +260 -41
- package/dist/commands/config.d.ts +6 -3
- package/dist/commands/config.js +217 -83
- package/dist/commands/effect.js +38 -9
- package/dist/commands/game-advance.d.ts +11 -2
- package/dist/commands/game-advance.js +22 -7
- package/dist/commands/game-adventures.d.ts +70 -0
- package/dist/commands/game-adventures.js +418 -0
- package/dist/commands/game-bonds.d.ts +9 -0
- package/dist/commands/game-bonds.js +84 -0
- package/dist/commands/game-catalog.d.ts +36 -0
- package/dist/commands/game-catalog.js +122 -0
- package/dist/commands/game-checks.d.ts +17 -0
- package/dist/commands/game-checks.js +128 -0
- package/dist/commands/game-damage.d.ts +18 -0
- package/dist/commands/game-damage.js +74 -0
- package/dist/commands/game-effects.d.ts +5 -0
- package/dist/commands/game-effects.js +2 -2
- package/dist/commands/game-events.js +8 -4
- package/dist/commands/game-experience.js +2 -2
- package/dist/commands/game-extensions.d.ts +8 -1
- package/dist/commands/game-extensions.js +8 -3
- package/dist/commands/game-grid-moves.d.ts +4 -1
- package/dist/commands/game-grid-moves.js +8 -2
- package/dist/commands/game-hit-dice.d.ts +39 -0
- package/dist/commands/game-hit-dice.js +120 -0
- package/dist/commands/game-import.d.ts +11 -0
- package/dist/commands/game-import.js +154 -0
- package/dist/commands/game-journey.d.ts +6 -2
- package/dist/commands/game-journey.js +17 -6
- package/dist/commands/game-knowledge.d.ts +56 -6
- package/dist/commands/game-knowledge.js +152 -23
- package/dist/commands/game-library.d.ts +112 -0
- package/dist/commands/game-library.js +388 -0
- package/dist/commands/game-limits.d.ts +7 -0
- package/dist/commands/game-limits.js +67 -0
- package/dist/commands/game-master-rolls.d.ts +15 -0
- package/dist/commands/game-master-rolls.js +34 -0
- package/dist/commands/game-mode.js +5 -4
- package/dist/commands/game-moves.d.ts +14 -1
- package/dist/commands/game-moves.js +24 -9
- package/dist/commands/game-recipe-pace.d.ts +6 -0
- package/dist/commands/game-recipe-pace.js +25 -0
- package/dist/commands/game-recipes.js +10 -3
- package/dist/commands/game-reminders.d.ts +3 -3
- package/dist/commands/game-reminders.js +10 -5
- package/dist/commands/game-roads.d.ts +11 -4
- package/dist/commands/game-roads.js +89 -26
- package/dist/commands/game-saves.d.ts +12 -0
- package/dist/commands/game-saves.js +44 -5
- package/dist/commands/game-scene.js +3 -1
- package/dist/commands/game-stacks.d.ts +78 -0
- package/dist/commands/game-stacks.js +198 -0
- package/dist/commands/game-system-code.d.ts +25 -0
- package/dist/commands/game-system-code.js +172 -0
- package/dist/commands/game-tables.d.ts +7 -0
- package/dist/commands/game-tables.js +40 -0
- package/dist/commands/game-thoughts.d.ts +25 -0
- package/dist/commands/game-thoughts.js +57 -0
- package/dist/commands/game-turn-uses.d.ts +33 -0
- package/dist/commands/game-turn-uses.js +137 -0
- package/dist/commands/game-upkeep.d.ts +20 -0
- package/dist/commands/game-upkeep.js +190 -0
- package/dist/commands/game-view-journal.d.ts +14 -1
- package/dist/commands/game-view-journal.js +5 -2
- package/dist/commands/game-view-map.d.ts +3 -0
- package/dist/commands/game-view-map.js +5 -1
- package/dist/commands/game-view-place.d.ts +22 -3
- package/dist/commands/game-view-place.js +61 -24
- package/dist/commands/game-view-world.d.ts +98 -0
- package/dist/commands/game-view-world.js +98 -0
- package/dist/commands/game-voices.d.ts +5 -0
- package/dist/commands/game-voices.js +13 -0
- package/dist/commands/game-widgets.d.ts +66 -0
- package/dist/commands/game-widgets.js +274 -0
- package/dist/commands/game-world.d.ts +8 -1
- package/dist/commands/game-world.js +23 -3
- package/dist/commands/image.js +2 -3
- package/dist/commands/import.d.ts +47 -0
- package/dist/commands/import.js +390 -0
- package/dist/commands/index.js +6 -0
- package/dist/commands/init.js +2 -2
- package/dist/commands/install.js +2 -1
- package/dist/commands/instructions.js +26 -1
- package/dist/commands/mode.js +3 -1
- package/dist/commands/move.d.ts +2 -0
- package/dist/commands/move.js +86 -12
- package/dist/commands/package.d.ts +57 -3
- package/dist/commands/package.js +308 -51
- package/dist/commands/parts.d.ts +3 -0
- package/dist/commands/parts.js +5 -0
- package/dist/commands/problems.js +6 -0
- package/dist/commands/rename.js +3 -0
- package/dist/commands/reveal.js +12 -7
- package/dist/commands/roll.d.ts +6 -0
- package/dist/commands/roll.js +95 -24
- package/dist/commands/route.js +4 -5
- package/dist/commands/rules.d.ts +3 -0
- package/dist/commands/rules.js +38 -6
- package/dist/commands/save.d.ts +1 -1
- package/dist/commands/save.js +2 -2
- package/dist/commands/scene.d.ts +10 -1
- package/dist/commands/scene.js +146 -29
- package/dist/commands/sheet.d.ts +47 -6
- package/dist/commands/sheet.js +179 -33
- package/dist/commands/show.d.ts +33 -0
- package/dist/commands/show.js +19 -2
- package/dist/commands/status.d.ts +9 -3
- package/dist/commands/status.js +59 -17
- package/dist/commands/thoughts.d.ts +11 -0
- package/dist/commands/thoughts.js +54 -0
- package/dist/commands/trade.d.ts +17 -0
- package/dist/commands/trade.js +273 -0
- package/dist/commands/travel.d.ts +2 -0
- package/dist/commands/travel.js +40 -14
- package/dist/commands/validate.js +2 -1
- package/dist/commands/view.d.ts +99 -2
- package/dist/commands/view.js +273 -57
- package/dist/commands/worked-out.d.ts +16 -0
- package/dist/commands/worked-out.js +108 -13
- package/dist/commands/write.d.ts +1 -0
- package/dist/commands/write.js +93 -21
- package/dist/confirm/confirm.d.ts +35 -0
- package/dist/confirm/confirm.js +94 -0
- package/dist/confirm/index.d.ts +1 -0
- package/dist/confirm/index.js +3 -0
- package/dist/core/archive-paths.d.ts +8 -0
- package/dist/core/archive-paths.js +39 -0
- package/dist/core/context.d.ts +127 -5
- package/dist/core/context.js +4 -3
- package/dist/core/download.d.ts +2 -0
- package/dist/core/download.js +31 -0
- package/dist/core/field-kind.d.ts +4 -3
- package/dist/core/field-kind.js +4 -3
- package/dist/core/files.d.ts +10 -0
- package/dist/core/files.js +58 -2
- package/dist/core/formula.d.ts +3 -1
- package/dist/core/formula.js +13 -2
- package/dist/core/progression-rule.d.ts +2 -0
- package/dist/core/version.d.ts +2 -0
- package/dist/core/version.js +7 -0
- package/dist/dashboard/act-names.js +27 -0
- package/dist/dashboard/act-sheet.js +100 -0
- package/dist/dashboard/act-strip.js +49 -0
- package/dist/dashboard/acts.js +140 -0
- package/dist/dashboard/address.js +16 -12
- package/dist/dashboard/api.js +140 -10
- package/dist/dashboard/app.js +370 -41
- package/dist/dashboard/asked.js +297 -19
- package/dist/dashboard/calendar.js +56 -0
- package/dist/dashboard/card.js +13 -12
- package/dist/dashboard/coins.js +13 -0
- package/dist/dashboard/death-save.js +67 -0
- package/dist/dashboard/dice/pool.js +22 -0
- package/dist/dashboard/dice/roller.js +1 -1
- package/dist/dashboard/dice/stage.js +12 -4
- package/dist/dashboard/dice/tray.js +28 -15
- package/dist/dashboard/dying.js +46 -0
- package/dist/dashboard/extension-widgets.js +160 -0
- package/dist/dashboard/game-words.js +33 -4
- package/dist/dashboard/guide/ar.md +105 -100
- package/dist/dashboard/guide/cs.md +111 -106
- package/dist/dashboard/guide/da.md +95 -90
- package/dist/dashboard/guide/de.md +93 -88
- package/dist/dashboard/guide/el.md +110 -105
- package/dist/dashboard/guide/en.md +21 -16
- package/dist/dashboard/guide/es.md +79 -74
- package/dist/dashboard/guide/fi.md +99 -94
- package/dist/dashboard/guide/fr.md +83 -78
- package/dist/dashboard/guide/he.md +109 -104
- package/dist/dashboard/guide/hi.md +103 -98
- package/dist/dashboard/guide/hu.md +113 -108
- package/dist/dashboard/guide/is.md +102 -97
- package/dist/dashboard/guide/it.md +22 -17
- package/dist/dashboard/guide/ja.md +108 -103
- package/dist/dashboard/guide/ko.md +113 -108
- package/dist/dashboard/guide/nb.md +95 -90
- package/dist/dashboard/guide/nl.md +89 -84
- package/dist/dashboard/guide/pl.md +104 -99
- package/dist/dashboard/guide/pt.md +82 -77
- package/dist/dashboard/guide/ro.md +113 -108
- package/dist/dashboard/guide/ru.md +109 -104
- package/dist/dashboard/guide/sv.md +96 -91
- package/dist/dashboard/guide/tr.md +102 -97
- package/dist/dashboard/guide/uk.md +113 -108
- package/dist/dashboard/guide/zh.md +110 -105
- package/dist/dashboard/guide-markdown.js +4 -0
- package/dist/dashboard/help.js +4 -5
- package/dist/dashboard/i18n/ar.json +367 -16
- package/dist/dashboard/i18n/cs.json +367 -16
- package/dist/dashboard/i18n/da.json +367 -16
- package/dist/dashboard/i18n/de.json +367 -16
- package/dist/dashboard/i18n/el.json +367 -16
- package/dist/dashboard/i18n/es.json +367 -16
- package/dist/dashboard/i18n/fi.json +367 -16
- package/dist/dashboard/i18n/fr.json +367 -16
- package/dist/dashboard/i18n/he.json +367 -16
- package/dist/dashboard/i18n/hi.json +367 -16
- package/dist/dashboard/i18n/hu.json +367 -16
- package/dist/dashboard/i18n/is.json +367 -16
- package/dist/dashboard/i18n/it.json +369 -18
- package/dist/dashboard/i18n/ja.json +367 -16
- package/dist/dashboard/i18n/ko.json +367 -16
- package/dist/dashboard/i18n/nb.json +367 -16
- package/dist/dashboard/i18n/nl.json +367 -16
- package/dist/dashboard/i18n/pl.json +367 -16
- package/dist/dashboard/i18n/pt.json +367 -16
- package/dist/dashboard/i18n/ro.json +367 -16
- package/dist/dashboard/i18n/ru.json +367 -16
- package/dist/dashboard/i18n/sv.json +367 -16
- package/dist/dashboard/i18n/tr.json +367 -16
- package/dist/dashboard/i18n/uk.json +367 -16
- package/dist/dashboard/i18n/zh.json +367 -16
- package/dist/dashboard/icons.js +38 -4
- package/dist/dashboard/journal.js +203 -49
- package/dist/dashboard/labels.js +45 -4
- package/dist/dashboard/languages.js +2 -2
- package/dist/dashboard/layout.js +35 -0
- package/dist/dashboard/lore.js +44 -0
- package/dist/dashboard/markdown.js +136 -30
- package/dist/dashboard/master.js +2 -2
- package/dist/dashboard/notes.js +5 -5
- package/dist/dashboard/notices.js +24 -4
- package/dist/dashboard/packages.js +678 -0
- package/dist/dashboard/pages.js +0 -8
- package/dist/dashboard/party.js +17 -4
- package/dist/dashboard/place-map-view.js +47 -9
- package/dist/dashboard/rolls.js +35 -93
- package/dist/dashboard/save-outcome.js +42 -0
- package/dist/dashboard/saves.js +14 -11
- package/dist/dashboard/scene.js +114 -20
- package/dist/dashboard/settings.js +71 -13
- package/dist/dashboard/setup.js +4 -4
- package/dist/dashboard/sheet.js +123 -19
- package/dist/dashboard/spend.js +115 -0
- package/dist/dashboard/status.js +22 -10
- package/dist/dashboard/story.js +6 -6
- package/dist/dashboard/style.css +8047 -3468
- package/dist/dashboard/table.js +145 -0
- package/dist/dashboard/tabs.js +34 -0
- package/dist/dashboard/text.js +19 -1
- package/dist/dashboard/top.js +91 -31
- package/dist/dashboard/turns.js +150 -0
- package/dist/dashboard/widgets.js +21 -14
- package/dist/dashboard/world-calendar.js +101 -0
- package/dist/dashboard/world-lore.js +231 -0
- package/dist/dashboard/world.js +87 -29
- package/dist/dashboard-server.d.ts +10 -1
- package/dist/dashboard-server.js +738 -26
- package/dist/dice/index.d.ts +2 -0
- package/dist/dice/index.js +3 -1
- package/dist/dice/oracle.d.ts +19 -0
- package/dist/dice/oracle.js +22 -0
- package/dist/dice/tables.d.ts +29 -0
- package/dist/dice/tables.js +123 -0
- package/dist/documents/index.d.ts +2 -0
- package/dist/documents/index.js +5 -0
- package/dist/documents/markup.d.ts +10 -0
- package/dist/documents/markup.js +124 -0
- package/dist/documents/ocr.d.ts +9 -0
- package/dist/documents/ocr.js +101 -0
- package/dist/documents/png.d.ts +9 -0
- package/dist/documents/png.js +75 -0
- package/dist/documents/read.d.ts +54 -0
- package/dist/documents/read.js +375 -0
- package/dist/extensions/api.d.ts +91 -9
- package/dist/extensions/extension.d.ts +28 -2
- package/dist/extensions/extension.js +49 -11
- package/dist/extensions/index.d.ts +5 -3
- package/dist/extensions/index.js +4 -2
- package/dist/extensions/packages.d.ts +13 -4
- package/dist/extensions/packages.js +114 -16
- package/dist/extensions/tarball.d.ts +6 -0
- package/dist/extensions/tarball.js +87 -0
- package/dist/extensions/words.d.ts +13 -0
- package/dist/extensions/words.js +42 -0
- package/dist/importer/index.d.ts +1 -0
- package/dist/importer/index.js +3 -0
- package/dist/importer/work.d.ts +132 -0
- package/dist/importer/work.js +306 -0
- package/dist/index.d.ts +3 -1
- package/dist/instructions/index.d.ts +7 -0
- package/dist/instructions/index.js +10 -0
- package/dist/languages/index.d.ts +1 -0
- package/dist/languages/index.js +3 -0
- package/dist/languages/language-pack.d.ts +32 -0
- package/dist/languages/language-pack.js +86 -0
- package/dist/library/books.d.ts +76 -0
- package/dist/library/books.js +378 -0
- package/dist/library/folders.d.ts +11 -0
- package/dist/library/folders.js +70 -0
- package/dist/library/index.d.ts +3 -0
- package/dist/library/index.js +5 -0
- package/dist/library/language.d.ts +2 -0
- package/dist/library/language.js +40 -0
- package/dist/library-reader.d.ts +7 -0
- package/dist/library-reader.js +36 -0
- package/dist/mcp-server.js +90 -7
- package/dist/money/index.d.ts +1 -1
- package/dist/money/index.js +1 -1
- package/dist/money/money.d.ts +6 -0
- package/dist/money/money.js +11 -0
- package/dist/page-words.js +4 -1
- package/dist/pages/check.d.ts +5 -0
- package/dist/pages/check.js +111 -5
- package/dist/pages/containers.d.ts +19 -1
- package/dist/pages/containers.js +50 -7
- package/dist/pages/index.d.ts +8 -5
- package/dist/pages/index.js +8 -5
- package/dist/pages/load.d.ts +11 -0
- package/dist/pages/load.js +69 -0
- package/dist/pages/markdown.d.ts +15 -0
- package/dist/pages/markdown.js +54 -3
- package/dist/pages/page-file.d.ts +2 -0
- package/dist/pages/page-file.js +28 -5
- package/dist/pages/rename-page.js +3 -2
- package/dist/pages/stack-entry.d.ts +47 -0
- package/dist/pages/stack-entry.js +83 -0
- package/dist/pages/stack-writes.d.ts +22 -0
- package/dist/pages/stack-writes.js +128 -0
- package/dist/pages/stacks.d.ts +52 -0
- package/dist/pages/stacks.js +168 -0
- package/dist/pages/standard-fields.js +1 -1
- package/dist/pages/system-pages.d.ts +5 -2
- package/dist/pages/system-pages.js +11 -5
- package/dist/pages/world.d.ts +29 -3
- package/dist/pages/world.js +66 -12
- package/dist/pages/write-page.js +15 -6
- package/dist/pictures/chosen.d.ts +5 -1
- package/dist/pictures/chosen.js +12 -3
- package/dist/pictures/claude.d.ts +3 -1
- package/dist/pictures/claude.js +38 -0
- package/dist/pictures/codex.d.ts +3 -1
- package/dist/pictures/codex.js +32 -0
- package/dist/pictures/helpers.d.ts +10 -0
- package/dist/pictures/helpers.js +53 -6
- package/dist/pictures/index.d.ts +5 -4
- package/dist/pictures/index.js +5 -4
- package/dist/pictures/stop.d.ts +2 -0
- package/dist/pictures/stop.js +18 -0
- package/dist/player-acts.d.ts +27 -0
- package/dist/player-acts.js +56 -0
- package/dist/rules/index.d.ts +1 -0
- package/dist/rules/index.js +3 -1
- package/dist/rules/page-search.d.ts +36 -0
- package/dist/rules/page-search.js +216 -0
- package/dist/rules/search.d.ts +7 -0
- package/dist/rules/search.js +2 -2
- package/dist/scene/scene.d.ts +2 -0
- package/dist/scene/scene.js +1 -0
- package/dist/systems/game-system.d.ts +161 -4
- package/dist/systems/game-system.js +237 -34
- package/dist/systems/index.d.ts +3 -1
- package/dist/systems/index.js +3 -1
- package/dist/systems/system-code.d.ts +97 -0
- package/dist/systems/system-code.js +62 -0
- package/dist/systems/system-folders.d.ts +11 -0
- package/dist/systems/system-folders.js +11 -0
- package/dist/systems/words.d.ts +2 -0
- package/dist/systems/words.js +3 -3
- package/instructions/author.md +1 -1
- package/instructions/buttons-physical-dice.md +1 -1
- package/instructions/buttons.md +1 -1
- package/instructions/character.md +15 -0
- package/instructions/combat.md +3 -1
- package/instructions/core.md +5 -5
- package/instructions/dashboard.md +4 -4
- package/instructions/import.md +14 -0
- package/instructions/mentor-hints.md +1 -1
- package/instructions/party.md +11 -0
- package/instructions/play.md +6 -6
- package/instructions/session-zero.md +1 -1
- package/instructions/setup.md +1 -1
- package/instructions/voices-always.md +1 -0
- package/instructions/voices-important.md +1 -0
- package/instructions/voices.md +14 -0
- package/package.json +7 -3
- package/systems/5e/LICENSE.md +1 -1
- package/systems/5e/dist/dying.js +193 -0
- package/systems/5e/dist/index.js +3 -0
- package/systems/5e/images/abacus.svg +1 -0
- package/systems/5e/images/acid-tube.svg +1 -0
- package/systems/5e/images/animal-hide.svg +1 -0
- package/systems/5e/images/anvil.svg +1 -0
- package/systems/5e/images/arrow-cluster.svg +1 -0
- package/systems/5e/images/backpack.svg +1 -0
- package/systems/5e/images/bagpipes.svg +1 -0
- package/systems/5e/images/barbed-spear.svg +1 -0
- package/systems/5e/images/barrel.svg +1 -0
- package/systems/5e/images/basket.svg +1 -0
- package/systems/5e/images/battle-axe.svg +1 -0
- package/systems/5e/images/beer-horn.svg +1 -0
- package/systems/5e/images/belt-buckles.svg +1 -0
- package/systems/5e/images/bird-scepter.svg +1 -0
- package/systems/5e/images/blanket.svg +1 -0
- package/systems/5e/images/book-cover.svg +1 -0
- package/systems/5e/images/boots.svg +1 -0
- package/systems/5e/images/bottle-vapors.svg +1 -0
- package/systems/5e/images/bow-arrow.svg +1 -0
- package/systems/5e/images/bowl-spiral.svg +1 -0
- package/systems/5e/images/bracer.svg +1 -0
- package/systems/5e/images/broadsword.svg +1 -0
- package/systems/5e/images/broom.svg +1 -0
- package/systems/5e/images/bullets.svg +1 -0
- package/systems/5e/images/caltrops.svg +1 -0
- package/systems/5e/images/camp-cooking-pot.svg +1 -0
- package/systems/5e/images/campfire.svg +1 -0
- package/systems/5e/images/camping-tent.svg +1 -0
- package/systems/5e/images/candle-flame.svg +1 -0
- package/systems/5e/images/candle-light.svg +1 -0
- package/systems/5e/images/canoe.svg +1 -0
- package/systems/5e/images/cape.svg +1 -0
- package/systems/5e/images/caravel.svg +1 -0
- package/systems/5e/images/card-pick.svg +1 -0
- package/systems/5e/images/chain-mail.svg +1 -0
- package/systems/5e/images/chained-arrow-heads.svg +1 -0
- package/systems/5e/images/chariot.svg +1 -0
- package/systems/5e/images/chest.svg +1 -0
- package/systems/5e/images/chisel.svg +1 -0
- package/systems/5e/images/claw-hammer.svg +1 -0
- package/systems/5e/images/colombian-statue.svg +1 -0
- package/systems/5e/images/cooking-pot.svg +1 -0
- package/systems/5e/images/crescent-staff.svg +1 -0
- package/systems/5e/images/crossbow.svg +1 -0
- package/systems/5e/images/crossed-chains.svg +1 -0
- package/systems/5e/images/crowbar.svg +1 -0
- package/systems/5e/images/crystal-ball.svg +1 -0
- package/systems/5e/images/crystal-cluster.svg +1 -0
- package/systems/5e/images/crystal-eye.svg +1 -0
- package/systems/5e/images/cubes.svg +1 -0
- package/systems/5e/images/dart.svg +1 -0
- package/systems/5e/images/dice-six-faces-five.svg +1 -0
- package/systems/5e/images/dragon-orb.svg +1 -0
- package/systems/5e/images/drakkar.svg +1 -0
- package/systems/5e/images/drum.svg +1 -0
- package/systems/5e/images/empty-wood-bucket-handle.svg +1 -0
- package/systems/5e/images/eye-shield.svg +1 -0
- package/systems/5e/images/fairy-wand.svg +1 -0
- package/systems/5e/images/feather.svg +1 -0
- package/systems/5e/images/feathered-wing.svg +1 -0
- package/systems/5e/images/fire-bottle.svg +1 -0
- package/systems/5e/images/fire-gem.svg +1 -0
- package/systems/5e/images/first-aid-kit.svg +1 -0
- package/systems/5e/images/fishing-hook.svg +1 -0
- package/systems/5e/images/fishing-net.svg +1 -0
- package/systems/5e/images/fishing-pole.svg +1 -0
- package/systems/5e/images/fist.svg +1 -0
- package/systems/5e/images/flail.svg +1 -0
- package/systems/5e/images/flanged-mace.svg +1 -0
- package/systems/5e/images/flat-hammer.svg +1 -0
- package/systems/5e/images/flint-spark.svg +1 -0
- package/systems/5e/images/floating-crystal.svg +1 -0
- package/systems/5e/images/flute.svg +1 -0
- package/systems/5e/images/galleon.svg +1 -0
- package/systems/5e/images/gauntlet.svg +1 -0
- package/systems/5e/images/gem-necklace.svg +1 -0
- package/systems/5e/images/gem-pendant.svg +1 -0
- package/systems/5e/images/gems.svg +1 -0
- package/systems/5e/images/gladius.svg +1 -0
- package/systems/5e/images/glaive.svg +1 -0
- package/systems/5e/images/glass-ball.svg +1 -0
- package/systems/5e/images/gloves.svg +1 -0
- package/systems/5e/images/gold-scarab.svg +1 -0
- package/systems/5e/images/grain-bundle.svg +1 -0
- package/systems/5e/images/halberd.svg +1 -0
- package/systems/5e/images/hand-saw.svg +1 -0
- package/systems/5e/images/handheld-fan.svg +1 -0
- package/systems/5e/images/harp.svg +1 -0
- package/systems/5e/images/hatchet.svg +1 -0
- package/systems/5e/images/headband-knot.svg +1 -0
- package/systems/5e/images/health-potion.svg +1 -0
- package/systems/5e/images/heart-bottle.svg +1 -0
- package/systems/5e/images/herbs-bundle.svg +1 -0
- package/systems/5e/images/hole-ladder.svg +1 -0
- package/systems/5e/images/holy-symbol.svg +1 -0
- package/systems/5e/images/holy-water.svg +1 -0
- package/systems/5e/images/honey-jar.svg +1 -0
- package/systems/5e/images/hood.svg +1 -0
- package/systems/5e/images/horseshoe.svg +1 -0
- package/systems/5e/images/hourglass.svg +1 -0
- package/systems/5e/images/hunting-horn.svg +1 -0
- package/systems/5e/images/jester-hat.svg +1 -0
- package/systems/5e/images/jug.svg +1 -0
- package/systems/5e/images/katana.svg +1 -0
- package/systems/5e/images/key-lock.svg +1 -0
- package/systems/5e/images/kitchen-scale.svg +1 -0
- package/systems/5e/images/knapsack.svg +1 -0
- package/systems/5e/images/ladder.svg +1 -0
- package/systems/5e/images/lantern.svg +1 -0
- package/systems/5e/images/leather-armor.svg +1 -0
- package/systems/5e/images/leather-boot.svg +1 -0
- package/systems/5e/images/leather-vest.svg +1 -0
- package/systems/5e/images/light-backpack.svg +1 -0
- package/systems/5e/images/light-helm.svg +1 -0
- package/systems/5e/images/locked-box.svg +1 -0
- package/systems/5e/images/locked-fortress.svg +1 -0
- package/systems/5e/images/lockpicks.svg +1 -0
- package/systems/5e/images/lunar-wand.svg +1 -0
- package/systems/5e/images/lyre.svg +1 -0
- package/systems/5e/images/magic-lamp.svg +1 -0
- package/systems/5e/images/magnifying-glass.svg +1 -0
- package/systems/5e/images/mail-shirt.svg +1 -0
- package/systems/5e/images/manacles.svg +1 -0
- package/systems/5e/images/marbles.svg +1 -0
- package/systems/5e/images/meat.svg +1 -0
- package/systems/5e/images/medal.svg +1 -0
- package/systems/5e/images/mirror-mirror.svg +1 -0
- package/systems/5e/images/mountain-climbing.svg +1 -0
- package/systems/5e/images/oil-can.svg +1 -0
- package/systems/5e/images/old-lantern.svg +1 -0
- package/systems/5e/images/old-wagon.svg +1 -0
- package/systems/5e/images/orb-wand.svg +1 -0
- package/systems/5e/images/oyster-pearl.svg +1 -0
- package/systems/5e/images/paint-brush.svg +1 -0
- package/systems/5e/images/painted-pottery.svg +1 -0
- package/systems/5e/images/palette.svg +1 -0
- package/systems/5e/images/paper.svg +1 -0
- package/systems/5e/images/pencil.svg +1 -0
- package/systems/5e/images/perfume-bottle.svg +1 -0
- package/systems/5e/images/pilgrim-hat.svg +1 -0
- package/systems/5e/images/pipes.svg +1 -0
- package/systems/5e/images/plain-arrow.svg +1 -0
- package/systems/5e/images/plain-dagger.svg +1 -0
- package/systems/5e/images/poison-bottle.svg +1 -0
- package/systems/5e/images/powder-bag.svg +1 -0
- package/systems/5e/images/prayer-beads.svg +1 -0
- package/systems/5e/images/pulley-hook.svg +1 -0
- package/systems/5e/images/quill-ink.svg +1 -0
- package/systems/5e/images/quill.svg +1 -0
- package/systems/5e/images/quiver.svg +1 -0
- package/systems/5e/images/red-carpet.svg +1 -0
- package/systems/5e/images/ring.svg +1 -0
- package/systems/5e/images/ringing-bell.svg +1 -0
- package/systems/5e/images/robe.svg +1 -0
- package/systems/5e/images/rope-coil.svg +1 -0
- package/systems/5e/images/round-bottom-flask.svg +1 -0
- package/systems/5e/images/round-potion.svg +1 -0
- package/systems/5e/images/rune-stone.svg +1 -0
- package/systems/5e/images/saddle.svg +1 -0
- package/systems/5e/images/scale-mail.svg +1 -0
- package/systems/5e/images/scroll-unfurled.svg +1 -0
- package/systems/5e/images/secret-book.svg +1 -0
- package/systems/5e/images/sewing-needle.svg +1 -0
- package/systems/5e/images/shield.svg +1 -0
- package/systems/5e/images/shirt-button.svg +1 -0
- package/systems/5e/images/sickle.svg +1 -0
- package/systems/5e/images/siege-ram.svg +1 -0
- package/systems/5e/images/skull-staff.svg +1 -0
- package/systems/5e/images/sleeping-bag.svg +1 -0
- package/systems/5e/images/sling.svg +1 -0
- package/systems/5e/images/slippers.svg +1 -0
- package/systems/5e/images/small-fishing-sailboat.svg +1 -0
- package/systems/5e/images/smoking-orb.svg +1 -0
- package/systems/5e/images/soap.svg +1 -0
- package/systems/5e/images/spade.svg +1 -0
- package/systems/5e/images/sparkling-sabre.svg +1 -0
- package/systems/5e/images/spell-book.svg +1 -0
- package/systems/5e/images/spiked-armor.svg +1 -0
- package/systems/5e/images/spiked-mace.svg +1 -0
- package/systems/5e/images/spikes.svg +1 -0
- package/systems/5e/images/spinning-wheel.svg +1 -0
- package/systems/5e/images/spyglass.svg +1 -0
- package/systems/5e/images/steampunk-goggles.svg +1 -0
- package/systems/5e/images/stone-block.svg +1 -0
- package/systems/5e/images/stone-pile.svg +1 -0
- package/systems/5e/images/stone-sphere.svg +1 -0
- package/systems/5e/images/straight-pipe.svg +1 -0
- package/systems/5e/images/swap-bag.svg +1 -0
- package/systems/5e/images/thor-hammer.svg +1 -0
- package/systems/5e/images/thrown-spear.svg +1 -0
- package/systems/5e/images/tiara.svg +1 -0
- package/systems/5e/images/tied-scroll.svg +1 -0
- package/systems/5e/images/tinker.svg +1 -0
- package/systems/5e/images/torch.svg +1 -0
- package/systems/5e/images/totem.svg +1 -0
- package/systems/5e/images/trap-mask.svg +1 -0
- package/systems/5e/images/treasure-map.svg +1 -0
- package/systems/5e/images/tribal-pendant.svg +1 -0
- package/systems/5e/images/trident.svg +1 -0
- package/systems/5e/images/two-handed-sword.svg +1 -0
- package/systems/5e/images/vial.svg +1 -0
- package/systems/5e/images/violin.svg +1 -0
- package/systems/5e/images/war-axe.svg +1 -0
- package/systems/5e/images/war-pick.svg +1 -0
- package/systems/5e/images/warhammer.svg +1 -0
- package/systems/5e/images/water-bottle.svg +1 -0
- package/systems/5e/images/waterskin.svg +1 -0
- package/systems/5e/images/wavy-chains.svg +1 -0
- package/systems/5e/images/wax-seal.svg +1 -0
- package/systems/5e/images/wheelbarrow.svg +1 -0
- package/systems/5e/images/whip.svg +1 -0
- package/systems/5e/images/whistle.svg +1 -0
- package/systems/5e/images/wing-cloak.svg +1 -0
- package/systems/5e/images/winged-scepter.svg +1 -0
- package/systems/5e/images/wizard-staff.svg +1 -0
- package/systems/5e/images/wolf-trap.svg +1 -0
- package/systems/5e/images/wood-canoe.svg +1 -0
- package/systems/5e/images/wood-club.svg +1 -0
- package/systems/5e/instructions/import.md +1 -0
- package/systems/5e/instructions/play.md +6 -0
- package/systems/5e/instructions/session-zero.md +1 -1
- package/systems/5e/package.json +11 -0
- package/systems/5e/system.yaml +231 -31
- package/systems/5e/words/ar.yaml +74 -0
- package/systems/5e/words/cs.yaml +74 -0
- package/systems/5e/words/da.yaml +74 -0
- package/systems/5e/words/de.yaml +74 -0
- package/systems/5e/words/el.yaml +74 -0
- package/systems/5e/words/en.yaml +20 -0
- package/systems/5e/words/es.yaml +74 -0
- package/systems/5e/words/fi.yaml +74 -0
- package/systems/5e/words/fr.yaml +74 -0
- package/systems/5e/words/he.yaml +74 -0
- package/systems/5e/words/hi.yaml +74 -0
- package/systems/5e/words/hu.yaml +74 -0
- package/systems/5e/words/is.yaml +74 -0
- package/systems/5e/words/it.yaml +84 -1
- package/systems/5e/words/ja.yaml +74 -0
- package/systems/5e/words/ko.yaml +74 -0
- package/systems/5e/words/nb.yaml +74 -0
- package/systems/5e/words/nl.yaml +74 -0
- package/systems/5e/words/pl.yaml +74 -0
- package/systems/5e/words/pt.yaml +74 -0
- package/systems/5e/words/ro.yaml +74 -0
- package/systems/5e/words/ru.yaml +74 -0
- package/systems/5e/words/sv.yaml +74 -0
- package/systems/5e/words/tr.yaml +74 -0
- package/systems/5e/words/uk.yaml +74 -0
- package/systems/5e/words/zh.yaml +74 -0
- package/systems/5e/world/creatures/Aboleth.md +1 -0
- package/systems/5e/world/creatures/Adult Black Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Blue Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Brass Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Bronze Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Copper Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Gold Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Green Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Red Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Silver Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult White Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Black Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Blue Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Brass Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Bronze Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Copper Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Gold Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Green Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Red Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Silver Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient White Dragon.md +2 -0
- package/systems/5e/world/creatures/Androsphinx.md +1 -0
- package/systems/5e/world/creatures/Dwarf.md +1 -0
- package/systems/5e/world/creatures/Gynosphinx.md +1 -0
- package/systems/5e/world/creatures/Kraken.md +1 -0
- package/systems/5e/world/creatures/Lich.md +2 -0
- package/systems/5e/world/creatures/Mummy Lord.md +1 -0
- package/systems/5e/world/creatures/Solar.md +1 -0
- package/systems/5e/world/creatures/Tarrasque.md +2 -0
- package/systems/5e/world/creatures/Unicorn.md +1 -0
- package/systems/5e/world/creatures/Vampire.md +2 -0
- package/systems/5e/world/items/Abacus.md +1 -0
- package/systems/5e/world/items/Acid.md +1 -0
- package/systems/5e/world/items/Adamantine Armor.md +1 -0
- package/systems/5e/world/items/Alchemist's Fire.md +1 -0
- package/systems/5e/world/items/Alchemist's Supplies.md +1 -0
- package/systems/5e/world/items/Ammunition, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Amulet of Health.md +2 -0
- package/systems/5e/world/items/Amulet of Proof against Detection and Location.md +1 -0
- package/systems/5e/world/items/Amulet of the Planes.md +1 -0
- package/systems/5e/world/items/Amulet.md +1 -0
- package/systems/5e/world/items/Animated Shield.md +1 -0
- package/systems/5e/world/items/Antitoxin.md +1 -0
- package/systems/5e/world/items/Apparatus of the Crab.md +1 -0
- package/systems/5e/world/items/Armor of Invulnerability.md +2 -0
- package/systems/5e/world/items/Armor of Resistance.md +1 -0
- package/systems/5e/world/items/Armor of Vulnerability.md +1 -0
- package/systems/5e/world/items/Armor, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Arrow of Slaying.md +1 -0
- package/systems/5e/world/items/Arrow-Catching Shield.md +1 -0
- package/systems/5e/world/items/Arrows.md +2 -0
- package/systems/5e/world/items/Backpack.md +1 -0
- package/systems/5e/world/items/Bag of Beans.md +1 -0
- package/systems/5e/world/items/Bag of Devouring.md +1 -0
- package/systems/5e/world/items/Bag of Holding.md +3 -0
- package/systems/5e/world/items/Bag of Tricks.md +1 -0
- package/systems/5e/world/items/Bagpipes.md +1 -0
- package/systems/5e/world/items/Ball Bearings.md +1 -0
- package/systems/5e/world/items/Barding.md +1 -0
- package/systems/5e/world/items/Barrel.md +1 -0
- package/systems/5e/world/items/Basic Poison.md +1 -0
- package/systems/5e/world/items/Basket.md +1 -0
- package/systems/5e/world/items/Battleaxe.md +1 -0
- package/systems/5e/world/items/Bead of Force.md +1 -0
- package/systems/5e/world/items/Bedroll.md +1 -0
- package/systems/5e/world/items/Bell.md +1 -0
- package/systems/5e/world/items/Belt of Dwarvenkind.md +1 -0
- package/systems/5e/world/items/Belt of Giant Strength.md +1 -0
- package/systems/5e/world/items/Berserker Axe.md +1 -0
- package/systems/5e/world/items/Bit and Bridle.md +1 -0
- package/systems/5e/world/items/Blanket.md +1 -0
- package/systems/5e/world/items/Block and Tackle.md +1 -0
- package/systems/5e/world/items/Blowgun Needles.md +2 -0
- package/systems/5e/world/items/Blowgun.md +1 -0
- package/systems/5e/world/items/Book.md +1 -0
- package/systems/5e/world/items/Boots of Elvenkind.md +1 -0
- package/systems/5e/world/items/Boots of Levitation.md +1 -0
- package/systems/5e/world/items/Boots of Speed.md +1 -0
- package/systems/5e/world/items/Boots of Striding and Springing.md +1 -0
- package/systems/5e/world/items/Boots of the Winterlands.md +2 -0
- package/systems/5e/world/items/Bowl of Commanding Water Elementals.md +1 -0
- package/systems/5e/world/items/Bracers of Archery.md +1 -0
- package/systems/5e/world/items/Bracers of Defense.md +1 -0
- package/systems/5e/world/items/Brazier of Commanding Fire Elementals.md +1 -0
- package/systems/5e/world/items/Breastplate.md +1 -0
- package/systems/5e/world/items/Brewer's Supplies.md +1 -0
- package/systems/5e/world/items/Brooch of Shielding.md +2 -0
- package/systems/5e/world/items/Broom of Flying.md +1 -0
- package/systems/5e/world/items/Bucket.md +1 -0
- package/systems/5e/world/items/Bullseye Lantern.md +1 -0
- package/systems/5e/world/items/Burglar's Pack.md +3 -0
- package/systems/5e/world/items/Calligrapher's Supplies.md +1 -0
- package/systems/5e/world/items/Caltrops.md +1 -0
- package/systems/5e/world/items/Candle of Invocation.md +1 -0
- package/systems/5e/world/items/Candle.md +1 -0
- package/systems/5e/world/items/Cape of the Mountebank.md +1 -0
- package/systems/5e/world/items/Carpenter's Tools.md +1 -0
- package/systems/5e/world/items/Carpet of Flying.md +1 -0
- package/systems/5e/world/items/Carriage.md +1 -0
- package/systems/5e/world/items/Cart.md +1 -0
- package/systems/5e/world/items/Cartographer's Tools.md +1 -0
- package/systems/5e/world/items/Censer of Controlling Air Elementals.md +1 -0
- package/systems/5e/world/items/Chain Mail.md +2 -0
- package/systems/5e/world/items/Chain Shirt.md +1 -0
- package/systems/5e/world/items/Chain.md +1 -0
- package/systems/5e/world/items/Chalk.md +1 -0
- package/systems/5e/world/items/Chariot.md +1 -0
- package/systems/5e/world/items/Chest.md +1 -0
- package/systems/5e/world/items/Chime of Opening.md +1 -0
- package/systems/5e/world/items/Circlet of Blasting.md +1 -0
- package/systems/5e/world/items/Climber's Kit.md +1 -0
- package/systems/5e/world/items/Cloak of Arachnida.md +2 -0
- package/systems/5e/world/items/Cloak of Displacement.md +1 -0
- package/systems/5e/world/items/Cloak of Elvenkind.md +1 -0
- package/systems/5e/world/items/Cloak of Protection.md +3 -0
- package/systems/5e/world/items/Cloak of the Bat.md +1 -0
- package/systems/5e/world/items/Cloak of the Manta Ray.md +1 -0
- package/systems/5e/world/items/Club.md +1 -0
- package/systems/5e/world/items/Cobbler's Tools.md +1 -0
- package/systems/5e/world/items/Common Clothes.md +1 -0
- package/systems/5e/world/items/Component Pouch.md +1 -0
- package/systems/5e/world/items/Cook's Utensils.md +1 -0
- package/systems/5e/world/items/Costume Clothes.md +1 -0
- package/systems/5e/world/items/Crossbow Bolt Case.md +1 -0
- package/systems/5e/world/items/Crossbow Bolts.md +2 -0
- package/systems/5e/world/items/Crowbar.md +1 -0
- package/systems/5e/world/items/Crystal Ball.md +1 -0
- package/systems/5e/world/items/Crystal.md +1 -0
- package/systems/5e/world/items/Cube of Force.md +2 -0
- package/systems/5e/world/items/Cubic Gate.md +2 -0
- package/systems/5e/world/items/Dagger of Venom.md +1 -0
- package/systems/5e/world/items/Dagger.md +1 -0
- package/systems/5e/world/items/Dancing Sword.md +1 -0
- package/systems/5e/world/items/Dart.md +1 -0
- package/systems/5e/world/items/Decanter of Endless Water.md +1 -0
- package/systems/5e/world/items/Deck of Illusions.md +1 -0
- package/systems/5e/world/items/Deck of Many Things.md +1 -0
- package/systems/5e/world/items/Defender.md +1 -0
- package/systems/5e/world/items/Demon Armor.md +1 -0
- package/systems/5e/world/items/Dice Set.md +1 -0
- package/systems/5e/world/items/Dimensional Shackles.md +1 -0
- package/systems/5e/world/items/Diplomat's Pack.md +3 -0
- package/systems/5e/world/items/Disguise Kit.md +1 -0
- package/systems/5e/world/items/Dragon Scale Mail.md +1 -0
- package/systems/5e/world/items/Dragon Slayer.md +1 -0
- package/systems/5e/world/items/Drum.md +1 -0
- package/systems/5e/world/items/Dulcimer.md +1 -0
- package/systems/5e/world/items/Dungeoneer's Pack.md +3 -0
- package/systems/5e/world/items/Dust of Disappearance.md +1 -0
- package/systems/5e/world/items/Dust of Dryness.md +1 -0
- package/systems/5e/world/items/Dust of Sneezing and Choking.md +1 -0
- package/systems/5e/world/items/Dwarven Plate.md +1 -0
- package/systems/5e/world/items/Dwarven Thrower.md +1 -0
- package/systems/5e/world/items/Efficient Quiver.md +1 -0
- package/systems/5e/world/items/Efreeti Bottle.md +1 -0
- package/systems/5e/world/items/Elemental Gem.md +1 -0
- package/systems/5e/world/items/Elven Chain.md +1 -0
- package/systems/5e/world/items/Emblem.md +1 -0
- package/systems/5e/world/items/Entertainer's Pack.md +3 -0
- package/systems/5e/world/items/Eversmoking Bottle.md +1 -0
- package/systems/5e/world/items/Exotic Saddle.md +1 -0
- package/systems/5e/world/items/Explorer's Pack.md +3 -0
- package/systems/5e/world/items/Eyes of Charming.md +1 -0
- package/systems/5e/world/items/Eyes of Minute Seeing.md +1 -0
- package/systems/5e/world/items/Eyes of the Eagle.md +1 -0
- package/systems/5e/world/items/Feather Token.md +1 -0
- package/systems/5e/world/items/Feed.md +1 -0
- package/systems/5e/world/items/Figurine of Wondrous Power.md +1 -0
- package/systems/5e/world/items/Fine Clothes.md +1 -0
- package/systems/5e/world/items/Fishing Tackle.md +1 -0
- package/systems/5e/world/items/Flail.md +1 -0
- package/systems/5e/world/items/Flame Tongue.md +1 -0
- package/systems/5e/world/items/Flask or Tankard.md +1 -0
- package/systems/5e/world/items/Flute.md +1 -0
- package/systems/5e/world/items/Folding Boat.md +1 -0
- package/systems/5e/world/items/Forgery Kit.md +1 -0
- package/systems/5e/world/items/Frost Brand.md +2 -0
- package/systems/5e/world/items/Galley.md +1 -0
- package/systems/5e/world/items/Gauntlets of Ogre Power.md +2 -0
- package/systems/5e/world/items/Gem of Brightness.md +2 -0
- package/systems/5e/world/items/Gem of Seeing.md +2 -0
- package/systems/5e/world/items/Giant Slayer.md +1 -0
- package/systems/5e/world/items/Glaive.md +1 -0
- package/systems/5e/world/items/Glamoured Studded Leather.md +1 -0
- package/systems/5e/world/items/Glass Bottle.md +1 -0
- package/systems/5e/world/items/Glassblower's Tools.md +1 -0
- package/systems/5e/world/items/Gloves of Missile Snaring.md +1 -0
- package/systems/5e/world/items/Gloves of Swimming and Climbing.md +1 -0
- package/systems/5e/world/items/Goggles of Night.md +1 -0
- package/systems/5e/world/items/Grappling Hook.md +1 -0
- package/systems/5e/world/items/Greataxe.md +1 -0
- package/systems/5e/world/items/Greatclub.md +1 -0
- package/systems/5e/world/items/Greatsword.md +1 -0
- package/systems/5e/world/items/Halberd.md +1 -0
- package/systems/5e/world/items/Half Plate Armor.md +1 -0
- package/systems/5e/world/items/Hammer of Thunderbolts.md +2 -0
- package/systems/5e/world/items/Hammer.md +1 -0
- package/systems/5e/world/items/Hand Crossbow.md +1 -0
- package/systems/5e/world/items/Handaxe.md +1 -0
- package/systems/5e/world/items/Handy Haversack.md +3 -0
- package/systems/5e/world/items/Hat of Disguise.md +1 -0
- package/systems/5e/world/items/Headband of Intellect.md +2 -0
- package/systems/5e/world/items/Healer's Kit.md +1 -0
- package/systems/5e/world/items/Heavy Crossbow.md +1 -0
- package/systems/5e/world/items/Helm of Brilliance.md +1 -0
- package/systems/5e/world/items/Helm of Comprehending Languages.md +1 -0
- package/systems/5e/world/items/Helm of Telepathy.md +1 -0
- package/systems/5e/world/items/Helm of Teleportation.md +2 -0
- package/systems/5e/world/items/Hempen Rope.md +1 -0
- package/systems/5e/world/items/Herbalism Kit.md +1 -0
- package/systems/5e/world/items/Hide Armor.md +1 -0
- package/systems/5e/world/items/Holy Avenger.md +1 -0
- package/systems/5e/world/items/Holy Water.md +1 -0
- package/systems/5e/world/items/Hooded Lantern.md +1 -0
- package/systems/5e/world/items/Horn of Blasting.md +1 -0
- package/systems/5e/world/items/Horn of Valhalla.md +1 -0
- package/systems/5e/world/items/Horn.md +1 -0
- package/systems/5e/world/items/Horseshoes of Speed.md +1 -0
- package/systems/5e/world/items/Horseshoes of a Zephyr.md +1 -0
- package/systems/5e/world/items/Hourglass.md +1 -0
- package/systems/5e/world/items/Hunting Trap.md +1 -0
- package/systems/5e/world/items/Immovable Rod.md +1 -0
- package/systems/5e/world/items/Ink Pen.md +1 -0
- package/systems/5e/world/items/Ink.md +1 -0
- package/systems/5e/world/items/Instant Fortress.md +1 -0
- package/systems/5e/world/items/Ioun Stone.md +1 -0
- package/systems/5e/world/items/Iron Bands of Binding.md +1 -0
- package/systems/5e/world/items/Iron Flask.md +1 -0
- package/systems/5e/world/items/Iron Pot.md +1 -0
- package/systems/5e/world/items/Iron Spikes.md +2 -0
- package/systems/5e/world/items/Javelin of Lightning.md +1 -0
- package/systems/5e/world/items/Javelin.md +1 -0
- package/systems/5e/world/items/Jeweler's Tools.md +1 -0
- package/systems/5e/world/items/Jug or Pitcher.md +1 -0
- package/systems/5e/world/items/Keelboat.md +1 -0
- package/systems/5e/world/items/Ladder.md +1 -0
- package/systems/5e/world/items/Lamp.md +1 -0
- package/systems/5e/world/items/Lance.md +1 -0
- package/systems/5e/world/items/Lantern of Revealing.md +1 -0
- package/systems/5e/world/items/Leather Armor.md +1 -0
- package/systems/5e/world/items/Leatherworker's Tools.md +1 -0
- package/systems/5e/world/items/Light Crossbow.md +1 -0
- package/systems/5e/world/items/Light Hammer.md +1 -0
- package/systems/5e/world/items/Lock.md +1 -0
- package/systems/5e/world/items/Longbow.md +1 -0
- package/systems/5e/world/items/Longship.md +1 -0
- package/systems/5e/world/items/Longsword.md +1 -0
- package/systems/5e/world/items/Luck Blade.md +1 -0
- package/systems/5e/world/items/Lute.md +1 -0
- package/systems/5e/world/items/Lyre.md +1 -0
- package/systems/5e/world/items/Mace of Disruption.md +1 -0
- package/systems/5e/world/items/Mace of Smiting.md +1 -0
- package/systems/5e/world/items/Mace of Terror.md +2 -0
- package/systems/5e/world/items/Mace.md +1 -0
- package/systems/5e/world/items/Magnifying Glass.md +1 -0
- package/systems/5e/world/items/Manacles.md +1 -0
- package/systems/5e/world/items/Mantle of Spell Resistance.md +1 -0
- package/systems/5e/world/items/Manual of Bodily Health.md +1 -0
- package/systems/5e/world/items/Manual of Gainful Exercise.md +1 -0
- package/systems/5e/world/items/Manual of Golems.md +1 -0
- package/systems/5e/world/items/Manual of Quickness of Action.md +1 -0
- package/systems/5e/world/items/Map or Scroll Case.md +1 -0
- package/systems/5e/world/items/Marvelous Pigments.md +1 -0
- package/systems/5e/world/items/Mason's Tools.md +1 -0
- package/systems/5e/world/items/Maul.md +1 -0
- package/systems/5e/world/items/Medallion of Thoughts.md +2 -0
- package/systems/5e/world/items/Merchant's Scale.md +1 -0
- package/systems/5e/world/items/Mess Kit.md +1 -0
- package/systems/5e/world/items/Military Saddle.md +1 -0
- package/systems/5e/world/items/Miner's Pick.md +1 -0
- package/systems/5e/world/items/Mirror of Life Trapping.md +1 -0
- package/systems/5e/world/items/Mithral Armor.md +1 -0
- package/systems/5e/world/items/Morningstar.md +1 -0
- package/systems/5e/world/items/Navigator's Tools.md +1 -0
- package/systems/5e/world/items/Necklace of Adaptation.md +1 -0
- package/systems/5e/world/items/Necklace of Fireballs.md +1 -0
- package/systems/5e/world/items/Necklace of Prayer Beads.md +1 -0
- package/systems/5e/world/items/Net.md +1 -0
- package/systems/5e/world/items/Nine Lives Stealer.md +1 -0
- package/systems/5e/world/items/Oathbow.md +1 -0
- package/systems/5e/world/items/Oil of Etherealness.md +1 -0
- package/systems/5e/world/items/Oil of Sharpness.md +1 -0
- package/systems/5e/world/items/Oil of Slipperiness.md +1 -0
- package/systems/5e/world/items/Oil.md +1 -0
- package/systems/5e/world/items/Orb of Dragonkind.md +2 -0
- package/systems/5e/world/items/Orb.md +1 -0
- package/systems/5e/world/items/Pack Saddle.md +1 -0
- package/systems/5e/world/items/Padded Armor.md +1 -0
- package/systems/5e/world/items/Painter's Supplies.md +1 -0
- package/systems/5e/world/items/Pan Flute.md +1 -0
- package/systems/5e/world/items/Paper.md +1 -0
- package/systems/5e/world/items/Parchment.md +1 -0
- package/systems/5e/world/items/Pearl of Power.md +1 -0
- package/systems/5e/world/items/Perfume.md +1 -0
- package/systems/5e/world/items/Periapt of Health.md +1 -0
- package/systems/5e/world/items/Periapt of Proof against Poison.md +1 -0
- package/systems/5e/world/items/Periapt of Wound Closure.md +1 -0
- package/systems/5e/world/items/Philter of Love.md +1 -0
- package/systems/5e/world/items/Pike.md +1 -0
- package/systems/5e/world/items/Pipes of Haunting.md +1 -0
- package/systems/5e/world/items/Pipes of the Sewers.md +1 -0
- package/systems/5e/world/items/Piton.md +1 -0
- package/systems/5e/world/items/Plate Armor of Etherealness.md +1 -0
- package/systems/5e/world/items/Plate Armor.md +2 -0
- package/systems/5e/world/items/Playing Card Set.md +1 -0
- package/systems/5e/world/items/Poisoner's Kit.md +1 -0
- package/systems/5e/world/items/Pole.md +1 -0
- package/systems/5e/world/items/Portable Hole.md +2 -0
- package/systems/5e/world/items/Portable Ram.md +1 -0
- package/systems/5e/world/items/Potion of Animal Friendship.md +1 -0
- package/systems/5e/world/items/Potion of Clairvoyance.md +1 -0
- package/systems/5e/world/items/Potion of Climbing.md +1 -0
- package/systems/5e/world/items/Potion of Diminution.md +1 -0
- package/systems/5e/world/items/Potion of Flying.md +1 -0
- package/systems/5e/world/items/Potion of Gaseous Form.md +1 -0
- package/systems/5e/world/items/Potion of Giant Strength.md +1 -0
- package/systems/5e/world/items/Potion of Growth.md +1 -0
- package/systems/5e/world/items/Potion of Healing.md +1 -0
- package/systems/5e/world/items/Potion of Heroism.md +1 -0
- package/systems/5e/world/items/Potion of Invisibility.md +1 -0
- package/systems/5e/world/items/Potion of Mind Reading.md +1 -0
- package/systems/5e/world/items/Potion of Poison.md +1 -0
- package/systems/5e/world/items/Potion of Resistance.md +1 -0
- package/systems/5e/world/items/Potion of Speed.md +1 -0
- package/systems/5e/world/items/Potion of Water Breathing.md +1 -0
- package/systems/5e/world/items/Potter's Tools.md +1 -0
- package/systems/5e/world/items/Pouch.md +1 -0
- package/systems/5e/world/items/Priest's Pack.md +3 -0
- package/systems/5e/world/items/Quarterstaff.md +1 -0
- package/systems/5e/world/items/Quiver.md +1 -0
- package/systems/5e/world/items/Rapier.md +1 -0
- package/systems/5e/world/items/Rations.md +1 -0
- package/systems/5e/world/items/Reliquary.md +1 -0
- package/systems/5e/world/items/Restorative Ointment.md +1 -0
- package/systems/5e/world/items/Riding Saddle.md +1 -0
- package/systems/5e/world/items/Ring Mail.md +1 -0
- package/systems/5e/world/items/Ring of Animal Influence.md +2 -0
- package/systems/5e/world/items/Ring of Djinni Summoning.md +1 -0
- package/systems/5e/world/items/Ring of Elemental Command.md +2 -0
- package/systems/5e/world/items/Ring of Evasion.md +2 -0
- package/systems/5e/world/items/Ring of Feather Falling.md +1 -0
- package/systems/5e/world/items/Ring of Free Action.md +1 -0
- package/systems/5e/world/items/Ring of Invisibility.md +1 -0
- package/systems/5e/world/items/Ring of Jumping.md +1 -0
- package/systems/5e/world/items/Ring of Mind Shielding.md +1 -0
- package/systems/5e/world/items/Ring of Protection.md +3 -0
- package/systems/5e/world/items/Ring of Regeneration.md +1 -0
- package/systems/5e/world/items/Ring of Resistance.md +1 -0
- package/systems/5e/world/items/Ring of Shooting Stars.md +2 -0
- package/systems/5e/world/items/Ring of Spell Storing.md +1 -0
- package/systems/5e/world/items/Ring of Spell Turning.md +1 -0
- package/systems/5e/world/items/Ring of Swimming.md +1 -0
- package/systems/5e/world/items/Ring of Telekinesis.md +1 -0
- package/systems/5e/world/items/Ring of Three Wishes.md +1 -0
- package/systems/5e/world/items/Ring of Warmth.md +2 -0
- package/systems/5e/world/items/Ring of Water Walking.md +1 -0
- package/systems/5e/world/items/Ring of X-ray Vision.md +1 -0
- package/systems/5e/world/items/Ring of the Ram.md +2 -0
- package/systems/5e/world/items/Robe of Eyes.md +1 -0
- package/systems/5e/world/items/Robe of Scintillating Colors.md +2 -0
- package/systems/5e/world/items/Robe of Stars.md +1 -0
- package/systems/5e/world/items/Robe of Useful Items.md +1 -0
- package/systems/5e/world/items/Robe of the Archmagi.md +3 -0
- package/systems/5e/world/items/Robes.md +1 -0
- package/systems/5e/world/items/Rod of Absorption.md +1 -0
- package/systems/5e/world/items/Rod of Alertness.md +1 -0
- package/systems/5e/world/items/Rod of Lordly Might.md +1 -0
- package/systems/5e/world/items/Rod of Rulership.md +1 -0
- package/systems/5e/world/items/Rod of Security.md +1 -0
- package/systems/5e/world/items/Rod.md +1 -0
- package/systems/5e/world/items/Rope of Climbing.md +1 -0
- package/systems/5e/world/items/Rope of Entanglement.md +1 -0
- package/systems/5e/world/items/Rowboat.md +1 -0
- package/systems/5e/world/items/Sack.md +1 -0
- package/systems/5e/world/items/Saddlebags.md +1 -0
- package/systems/5e/world/items/Sailing Ship.md +1 -0
- package/systems/5e/world/items/Scale Mail.md +1 -0
- package/systems/5e/world/items/Scarab of Protection.md +2 -0
- package/systems/5e/world/items/Scholar's Pack.md +3 -0
- package/systems/5e/world/items/Scimitar of Speed.md +1 -0
- package/systems/5e/world/items/Scimitar.md +1 -0
- package/systems/5e/world/items/Sealing Wax.md +1 -0
- package/systems/5e/world/items/Shawm.md +1 -0
- package/systems/5e/world/items/Shield of Missile Attraction.md +2 -0
- package/systems/5e/world/items/Shield, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Shield.md +1 -0
- package/systems/5e/world/items/Shortbow.md +1 -0
- package/systems/5e/world/items/Shortsword.md +1 -0
- package/systems/5e/world/items/Shovel.md +1 -0
- package/systems/5e/world/items/Sickle.md +1 -0
- package/systems/5e/world/items/Signal Whistle.md +1 -0
- package/systems/5e/world/items/Signet Ring.md +1 -0
- package/systems/5e/world/items/Silk Rope.md +1 -0
- package/systems/5e/world/items/Sled.md +1 -0
- package/systems/5e/world/items/Sledgehammer.md +1 -0
- package/systems/5e/world/items/Sling Bullets.md +2 -0
- package/systems/5e/world/items/Sling.md +1 -0
- package/systems/5e/world/items/Slippers of Spider Climbing.md +1 -0
- package/systems/5e/world/items/Smith's Tools.md +1 -0
- package/systems/5e/world/items/Soap.md +1 -0
- package/systems/5e/world/items/Sovereign Glue.md +1 -0
- package/systems/5e/world/items/Spear.md +1 -0
- package/systems/5e/world/items/Spell Scroll.md +1 -0
- package/systems/5e/world/items/Spellbook.md +1 -0
- package/systems/5e/world/items/Spellguard Shield.md +1 -0
- package/systems/5e/world/items/Sphere of Annihilation.md +1 -0
- package/systems/5e/world/items/Splint Armor.md +2 -0
- package/systems/5e/world/items/Sprig of Mistletoe.md +1 -0
- package/systems/5e/world/items/Spyglass.md +1 -0
- package/systems/5e/world/items/Staff of Charming.md +1 -0
- package/systems/5e/world/items/Staff of Fire.md +3 -0
- package/systems/5e/world/items/Staff of Frost.md +3 -0
- package/systems/5e/world/items/Staff of Healing.md +2 -0
- package/systems/5e/world/items/Staff of Power.md +5 -0
- package/systems/5e/world/items/Staff of Striking.md +2 -0
- package/systems/5e/world/items/Staff of Swarming Insects.md +2 -0
- package/systems/5e/world/items/Staff of Thunder and Lightning.md +1 -0
- package/systems/5e/world/items/Staff of Withering.md +2 -0
- package/systems/5e/world/items/Staff of the Magi.md +3 -0
- package/systems/5e/world/items/Staff of the Python.md +1 -0
- package/systems/5e/world/items/Staff of the Woodlands.md +2 -0
- package/systems/5e/world/items/Staff.md +1 -0
- package/systems/5e/world/items/Steel Mirror.md +1 -0
- package/systems/5e/world/items/Stone of Controlling Earth Elementals.md +1 -0
- package/systems/5e/world/items/Stone of Good Luck.md +4 -0
- package/systems/5e/world/items/Studded Leather Armor.md +1 -0
- package/systems/5e/world/items/Sun Blade.md +1 -0
- package/systems/5e/world/items/Sword of Life Stealing.md +1 -0
- package/systems/5e/world/items/Sword of Sharpness.md +1 -0
- package/systems/5e/world/items/Sword of Wounding.md +1 -0
- package/systems/5e/world/items/Talisman of Pure Good.md +2 -0
- package/systems/5e/world/items/Talisman of Ultimate Evil.md +2 -0
- package/systems/5e/world/items/Talisman of the Sphere.md +1 -0
- package/systems/5e/world/items/Thieves' Tools.md +1 -0
- package/systems/5e/world/items/Tinderbox.md +1 -0
- package/systems/5e/world/items/Tinker's Tools.md +1 -0
- package/systems/5e/world/items/Tome of Clear Thought.md +1 -0
- package/systems/5e/world/items/Tome of Leadership and Influence.md +1 -0
- package/systems/5e/world/items/Tome of Understanding.md +1 -0
- package/systems/5e/world/items/Torch.md +1 -0
- package/systems/5e/world/items/Totem.md +1 -0
- package/systems/5e/world/items/Traveler's Clothes.md +1 -0
- package/systems/5e/world/items/Trident of Fish Command.md +2 -0
- package/systems/5e/world/items/Trident.md +1 -0
- package/systems/5e/world/items/Two-Person Tent.md +1 -0
- package/systems/5e/world/items/Unarmed Strike.md +1 -0
- package/systems/5e/world/items/Universal Solvent.md +1 -0
- package/systems/5e/world/items/Vial.md +1 -0
- package/systems/5e/world/items/Vicious Weapon.md +1 -0
- package/systems/5e/world/items/Viol.md +1 -0
- package/systems/5e/world/items/Vorpal Sword.md +1 -0
- package/systems/5e/world/items/Wagon.md +1 -0
- package/systems/5e/world/items/Wand of Binding.md +2 -0
- package/systems/5e/world/items/Wand of Enemy Detection.md +2 -0
- package/systems/5e/world/items/Wand of Fear.md +2 -0
- package/systems/5e/world/items/Wand of Fireballs.md +2 -0
- package/systems/5e/world/items/Wand of Lightning Bolts.md +2 -0
- package/systems/5e/world/items/Wand of Magic Detection.md +2 -0
- package/systems/5e/world/items/Wand of Magic Missiles.md +2 -0
- package/systems/5e/world/items/Wand of Paralysis.md +2 -0
- package/systems/5e/world/items/Wand of Polymorph.md +2 -0
- package/systems/5e/world/items/Wand of Secrets.md +2 -0
- package/systems/5e/world/items/Wand of Web.md +2 -0
- package/systems/5e/world/items/Wand of Wonder.md +2 -0
- package/systems/5e/world/items/Wand of the War Mage, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Wand.md +1 -0
- package/systems/5e/world/items/War Pick.md +1 -0
- package/systems/5e/world/items/Warhammer.md +1 -0
- package/systems/5e/world/items/Warship.md +1 -0
- package/systems/5e/world/items/Waterskin.md +1 -0
- package/systems/5e/world/items/Weapon, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Weaver's Tools.md +1 -0
- package/systems/5e/world/items/Well of Many Worlds.md +1 -0
- package/systems/5e/world/items/Whetstone.md +1 -0
- package/systems/5e/world/items/Whip.md +1 -0
- package/systems/5e/world/items/Wind Fan.md +1 -0
- package/systems/5e/world/items/Winged Boots.md +1 -0
- package/systems/5e/world/items/Wings of Flying.md +1 -0
- package/systems/5e/world/items/Woodcarver's Tools.md +1 -0
- package/systems/5e/world/items/Wooden Staff.md +1 -0
- package/systems/5e/world/items/Yew Wand.md +1 -0
- package/systems/free/instructions/play.md +5 -0
- package/systems/free/instructions/session-zero.md +1 -0
- package/systems/free/system.yaml +12 -0
- package/dist/dashboard/combat.js +0 -72
package/dist/dashboard/sheet.js
CHANGED
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "preact/jsx-runtime";
|
|
2
2
|
import { useEffect, useId, useRef, useState } from "preact/hooks";
|
|
3
|
+
import { ActName, usePlayerActs } from "./act-names.js";
|
|
4
|
+
import { itemVerbs } from "./acts.js";
|
|
3
5
|
import { readExplanations } from "./api.js";
|
|
4
6
|
import { CardHeader, useOpen } from "./card.js";
|
|
5
7
|
import { FixedColumns } from "./columns.js";
|
|
8
|
+
import { DeathSaves } from "./dying.js";
|
|
9
|
+
import { WidgetCards } from "./extension-widgets.js";
|
|
6
10
|
import { besideLabel, memberPlaceLabel } from "./game-words.js";
|
|
7
11
|
import { cardIcons, DieIcon, Icon } from "./icons.js";
|
|
8
|
-
import { fieldLabel, groupLabels, phraseLabel, readableIds, shownNotation, shownText } from "./labels.js";
|
|
12
|
+
import { fieldLabel, groupLabels, phraseLabel, readableIds, rollLabel, shownNotation, shownText } from "./labels.js";
|
|
9
13
|
import { arrangedGroups, groupLayout, orderedValues, widgetOf } from "./layout.js";
|
|
10
|
-
import { Markdown, plainLine } from "./markdown.js";
|
|
14
|
+
import { knowersOf, Markdown, plainLine } from "./markdown.js";
|
|
11
15
|
import { MoodFace, moodLabel } from "./mood.js";
|
|
12
16
|
import { MemberToken } from "./party.js";
|
|
13
17
|
import { requestedRow, useRequested } from "./requested.js";
|
|
14
18
|
import { memberStatus } from "./status.js";
|
|
15
19
|
import { StoryBox } from "./story.js";
|
|
16
|
-
import { arrowStep, systemWord, t } from "./text.js";
|
|
17
|
-
import {
|
|
20
|
+
import { arrowStep, listText, systemWord, t } from "./text.js";
|
|
21
|
+
import { Effects, ProgressBar, ValueDrawing } from "./widgets.js";
|
|
18
22
|
// The cards of the page's text, after the system's groups, the whole width: the player character's story in the player's words, then the rest of the text.
|
|
19
23
|
const descriptionCard = "Description";
|
|
20
24
|
const backstoryCard = "Backstory";
|
|
21
|
-
export function MemberSheet({ member, headline, sheet, cards, text, story, version, onRoll, scene }) {
|
|
25
|
+
export function MemberSheet({ member, headline, sheet, cards, text, knownBy, story, version, onRoll, scene }) {
|
|
22
26
|
const { rail, others } = arrangedGroups(sheet, cards);
|
|
23
27
|
const fields = sheetFields(member, sheet);
|
|
24
28
|
const group = (shown) => _jsx(Group, { member: member.name, group: shown, fields: fields, version: version, onRoll: onRoll, first: shown === others[0] }, shown.name);
|
|
@@ -28,7 +32,7 @@ export function MemberSheet({ member, headline, sheet, cards, text, story, versi
|
|
|
28
32
|
const described = story !== undefined && story.trim() !== "" && text.startsWith(story) ? text.slice(story.length).trimStart() : text;
|
|
29
33
|
return (_jsxs("section", { class: "sheet", "aria-label": member.name, children: [_jsxs("header", { class: "band", children: [_jsxs("div", { class: "identity", children: [_jsx(MemberToken, { member: member, large: true, status: memberStatus(member, scene) }), _jsxs("div", { class: "who", children: [_jsx("h2", { children: member.name }), (headline !== undefined && headline !== "") || member.mood !== undefined
|
|
30
34
|
? (_jsxs("p", { class: "headline", children: [headline, headline !== undefined && headline !== "" && member.mood !== undefined && " · ", member.mood !== undefined && (_jsxs("span", { class: "mood-word", children: [_jsx(MoodFace, { mood: member.mood }), moodLabel(member.mood)] }))] }))
|
|
31
|
-
: null, member.place && (_jsxs("p", { class: "place", children: [_jsx(Icon, { name: "place" }), memberPlaceLabel(member.place)] }))] })] }), member.dying && _jsx(DeathSaves, { dying: member.dying }), _jsx(ValueLine, { values: member.counters.filter((value) => !dying.has(value.field)), fields: fields }), _jsx(Effects, { effects: member.effects })] }), _jsxs("div", { class: "sheet-body", children: [rail.length > 0 && _jsx("div", { class: "rail", children: rail.map(group) }), _jsxs("div", { class: "sheet-main", children: [_jsx(FixedColumns, { cards: others.map((shown) => ({ key: shown.name, node: group(shown) })) }), _jsxs("div", { class: "wide-cards", children: [story !== undefined && (_jsxs(Card, { name: backstoryCard, title: t("Backstory"), icon: cardIcons.backstory, layout: "lore", preview: plainLine(story) ?? t("Not written yet"), children: [story.trim() !== "" && _jsx(Markdown, { text: story }), _jsx(StoryBox, { story: story })] })), described.trim() !== "" && (_jsx(Card, { name: descriptionCard, title: t("Description"), icon: cardIcons.description, layout: "lore", preview: plainLine(described), children: _jsx(Markdown, { text: described }) }))] })] })] })] }));
|
|
35
|
+
: null, member.place && (_jsxs("p", { class: "place", children: [_jsx(Icon, { name: "place" }), memberPlaceLabel(member.place)] }))] })] }), member.dying && _jsx(DeathSaves, { dying: member.dying }), _jsx(ValueLine, { values: member.counters.filter((value) => !dying.has(value.field)), fields: fields }), _jsx(Effects, { effects: member.effects })] }), _jsxs("div", { class: "sheet-body", children: [rail.length > 0 && _jsx("div", { class: "rail", children: rail.map(group) }), _jsxs("div", { class: "sheet-main", children: [_jsx(FixedColumns, { cards: others.map((shown) => ({ key: shown.name, node: group(shown) })) }), _jsxs("div", { class: "wide-cards", children: [story !== undefined && (_jsxs(Card, { name: backstoryCard, title: t("Backstory"), icon: cardIcons.backstory, layout: "lore", preview: plainLine(story) ?? t("Not written yet"), children: [story.trim() !== "" && _jsx(Markdown, { text: story }), _jsx(StoryBox, { story: story, who: member.name })] })), described.trim() !== "" && (_jsx(Card, { name: descriptionCard, title: t("Description"), icon: cardIcons.description, layout: "lore", preview: plainLine(described), children: _jsx(Markdown, { text: described, secretKnowers: knowersOf(knownBy) }) }))] }), _jsx(WidgetCards, { place: "page", page: "sheet" })] })] })] }));
|
|
32
36
|
}
|
|
33
37
|
/** What of someone's sheet the Combat section keeps at hand (D-315): the fields it names in a line of boxes, as under the name, then the groups it names as their cards. */
|
|
34
38
|
export function SheetAtHand({ member, sheet, names, version, onRoll }) {
|
|
@@ -38,9 +42,14 @@ export function SheetAtHand({ member, sheet, names, version, onRoll }) {
|
|
|
38
42
|
const groups = names.flatMap((wanted) => sheet.filter((group) => same(group.name, wanted)));
|
|
39
43
|
return (_jsxs(_Fragment, { children: [line.length > 0 && _jsx(ValueLine, { values: line, fields: fields }), groups.map((group) => _jsx(Group, { member: member.name, group: group, fields: fields, version: version, onRoll: onRoll }, group.name))] }));
|
|
40
44
|
}
|
|
45
|
+
/** What a row shows beside its value, when it says something more: a written speed equal to the one that counts now says nothing. */
|
|
46
|
+
function shownBeside(value) {
|
|
47
|
+
const beside = besideLabel(value);
|
|
48
|
+
return beside === value.text ? undefined : beside;
|
|
49
|
+
}
|
|
41
50
|
/** Values in a line of boxes, as under someone's name (D-299): each its label and its drawing, flashing when it changes. */
|
|
42
51
|
function ValueLine({ values, fields }) {
|
|
43
|
-
return (_jsx("div", { class: "line", children: values.map((value) => (_jsxs("span", { class: "line-value", children: [_jsx("span", { class: "label", children: fieldLabel(value.field, fields) }), _jsx(Changing, { text: value.text, children: _jsx(ValueDrawing, { value: value, label: fieldLabel(value.field, fields) }) })] }, value.field))) }));
|
|
52
|
+
return (_jsx("div", { class: "line", children: values.map((value) => (_jsxs("span", { class: "line-value", children: [_jsx("span", { class: "label", children: fieldLabel(value.field, fields) }), _jsx(Changing, { text: value.text, children: _jsx(ValueDrawing, { value: value, label: fieldLabel(value.field, fields) }) }), shownBeside(value) !== undefined && widgetOf(value) !== "progress" && _jsx("span", { class: "beside num", children: shownText(shownBeside(value) ?? "") })] }, value.field))) }));
|
|
44
53
|
}
|
|
45
54
|
/** A group of the sheet as its card; the `first` after the rail starts open on a phone too, the one play needs most as the system orders them. */
|
|
46
55
|
function Group({ member, group, fields, version, onRoll, first }) {
|
|
@@ -80,7 +89,7 @@ function Group({ member, group, fields, version, onRoll, first }) {
|
|
|
80
89
|
const parts = explanations?.get(value.field)?.map((part) => shownText(readableIds(part, fields)));
|
|
81
90
|
const answers = answersOf(value);
|
|
82
91
|
const free = value.roll === undefined || answers !== undefined ? undefined : t("Free roll {dice} · not logged", { dice: shownNotation(value.roll.notation) });
|
|
83
|
-
const lines = [answers === undefined ? undefined : t("Answers the master: {check}", { check: answers.check }), parts?.join(" · "), free].filter((line) => line !== undefined);
|
|
92
|
+
const lines = [answers === undefined ? undefined : t("Answers the master: {check}", { check: answers.check }), stageLine(value), parts?.join(" · "), oddsLine(value.roll), free].filter((line) => line !== undefined);
|
|
84
93
|
return lines.length === 0 ? undefined : lines.join("\n");
|
|
85
94
|
};
|
|
86
95
|
// One stop of the Tab key for a group's numbers; the arrows move among them.
|
|
@@ -101,7 +110,7 @@ function Group({ member, group, fields, version, onRoll, first }) {
|
|
|
101
110
|
const line = (value) => ({ value, label: label(value.field), fields, tip: tip(value), tabIndex: stop(value.field), onRoll: throwOf, answers: answersOf(value) });
|
|
102
111
|
// A card with the number the master asks stays open while it is asked.
|
|
103
112
|
const lit = values.some((value) => answersOf(value) !== undefined);
|
|
104
|
-
return (_jsxs(Card, { name: group.name, title: systemWord("groups", group.name), icon: group.icon ?? cardIcons.plain, layout: layout, preview: preview(group, label), onReach: explain, held: lit, first: first, children: [layout === "table" && _jsx(ItemsTable, { group: group, fields: fields }), layout === "tiles" && (_jsx("div", { class: "tiles", onKeyDown: onKeyDown, children: values.map((value) => _jsx(Tile, { ...line(value) }, value.field)) })), layout === "rows" && (_jsx("div", { class: "rows", onKeyDown: onKeyDown, children: values.map((value) => _jsx(Row, { ...line(value) }, value.field)) }))] }));
|
|
113
|
+
return (_jsxs(Card, { name: group.name, title: systemWord("groups", group.name), icon: group.icon ?? cardIcons.plain, layout: layout, preview: preview(group, label), onReach: explain, held: lit, first: first, children: [layout === "table" && values.length > 0 && (_jsx("div", { class: "rows", onKeyDown: onKeyDown, children: values.map((value) => _jsx(Row, { ...line(value) }, value.field)) })), layout === "table" && _jsx(ItemsTable, { group: group, fields: fields }), layout === "tiles" && (_jsx("div", { class: "tiles", onKeyDown: onKeyDown, children: values.map((value) => _jsx(Tile, { ...line(value) }, value.field)) })), layout === "rows" && (_jsx("div", { class: "rows", onKeyDown: onKeyDown, children: values.map((value) => _jsx(Row, { ...line(value) }, value.field)) }))] }));
|
|
105
114
|
}
|
|
106
115
|
/** A card of the sheet the player opens and closes (D-284): its icon and title on the left, what it holds while closed, the chevron on the right. */
|
|
107
116
|
export function Card({ name, title, icon, layout, preview, onReach, held, first, children }) {
|
|
@@ -113,23 +122,29 @@ export function Card({ name, title, icon, layout, preview, onReach, held, first,
|
|
|
113
122
|
function Tile(props) {
|
|
114
123
|
const { value, label } = props;
|
|
115
124
|
const beside = besideLabel(value);
|
|
116
|
-
return (_jsxs(NumberBox, { ...props, kind: "tile", said: `${label} ${shownText(beside ?? value.text)}`, children: [_jsx("span", { class: "label", children: label }), _jsx(Changing, { text: beside ?? value.text, children: _jsx("span", { class: "big num", children: shownText(beside ?? value.text) }) }), _jsx("span", { class: "small num", children: beside === undefined ? "" : shownText(value.text) }), value.roll && _jsx(RollMark, { roll: value.roll })] }));
|
|
125
|
+
return (_jsxs(NumberBox, { ...props, kind: "tile", said: `${label} ${shownText(beside ?? value.text)}`, children: [_jsx("span", { class: "label", children: label }), _jsx(Changing, { text: beside ?? value.text, children: _jsx("span", { class: "big num", children: shownText(beside ?? value.text) }) }), _jsx("span", { class: "small num", children: beside === undefined ? "" : shownText(value.text, value.kind) }), value.roll && _jsx(RollMark, { roll: value.roll })] }));
|
|
117
126
|
}
|
|
118
127
|
/** A value on a line: its marks, its label as a phrase, its drawing, what is beside it, and under a number's progress its bar; a counter that the band shows as a bar, as hit points, reads here as its number. */
|
|
119
128
|
function Row(props) {
|
|
120
129
|
const { value, label } = props;
|
|
121
130
|
const widget = widgetOf(value);
|
|
122
131
|
const shownLabel = phraseLabel(label);
|
|
123
|
-
const beside =
|
|
132
|
+
const beside = shownBeside(value);
|
|
124
133
|
const marks = value.marks === 0 ? null : _jsx("span", { class: "marks", "aria-label": value.marks === 1 ? t("1 mark") : t("{count} marks", { count: value.marks }), children: "●".repeat(value.marks) });
|
|
125
|
-
|
|
134
|
+
// A list of bonds says how many it holds of the most it may, as 2/3; a load the stage it reaches, as Encumbered.
|
|
135
|
+
const held = value.most === undefined ? undefined : { count: value.items?.length ?? 0, most: value.most };
|
|
136
|
+
const stage = value.load?.stage === undefined ? undefined : systemText(value.load.stage);
|
|
137
|
+
const said = [shownLabel, held === undefined ? "" : t("{count} of {most}", held), shownText(value.text, value.kind), stage ?? "", beside === undefined ? "" : shownText(beside)]
|
|
138
|
+
.filter((part) => part !== "")
|
|
139
|
+
.join(" ");
|
|
140
|
+
return (_jsxs(NumberBox, { ...props, label: shownLabel, kind: ["row", `row-${widget}`, stage === undefined ? "" : "staged"].filter((name) => name !== "").join(" "), said: said, children: [_jsxs("span", { class: "label", children: [marks, shownLabel, held !== undefined && (_jsxs("span", { class: held.count > held.most ? "row-most over num" : "row-most num", children: [_jsx("span", { "aria-hidden": "true", children: `${held.count}/${held.most}` }), _jsx("span", { class: "visually-hidden", children: t("{count} of {most}", held) })] }))] }), _jsxs(Changing, { text: value.text, children: [value.roll && _jsx(RollMark, { roll: value.roll }), stage !== undefined && _jsx("span", { class: "load-stage", "aria-hidden": "true", children: stage }), widget === "progress" || widget === "bar" ? _jsx("span", { class: "num", children: shownText(value.text, value.kind) }) : _jsx(ValueDrawing, { value: value, label: shownLabel, fields: props.fields })] }), beside !== undefined && _jsx("span", { class: "beside num", dir: value.levelNeed === undefined ? undefined : "auto", children: shownText(beside) }), widget === "progress" && _jsx(ProgressBar, { value: value, label: shownLabel })] }));
|
|
126
141
|
}
|
|
127
142
|
/**
|
|
128
143
|
* What a number is drawn in: a button that throws it for fun when the system rolls it (D-280), or answers the master's check that names it, lit (ASK-12);
|
|
129
144
|
* else, when it has a tooltip, a box the keyboard reaches. Its tooltip says how it is made (FOR-8), shown when pointed at or reached, and read to a screen
|
|
130
145
|
* reader as its description.
|
|
131
146
|
*/
|
|
132
|
-
function NumberBox({ value, label, tip, tabIndex, onRoll, answers, kind, said, children }) {
|
|
147
|
+
function NumberBox({ value, label, fields, tip, tabIndex, onRoll, answers, kind, said, children }) {
|
|
133
148
|
const described = useId();
|
|
134
149
|
const shared = {
|
|
135
150
|
class: [kind, tip === undefined ? "" : "tip-wide", answers === undefined ? "" : "requested"].filter((name) => name !== "").join(" "),
|
|
@@ -142,18 +157,106 @@ function NumberBox({ value, label, tip, tabIndex, onRoll, answers, kind, said, c
|
|
|
142
157
|
const description = tip !== undefined && _jsx("span", { id: described, class: "visually-hidden", children: tip });
|
|
143
158
|
return value.roll === undefined && answers === undefined
|
|
144
159
|
? (_jsxs("div", { ...shared, "aria-label": tip === undefined ? undefined : said, role: tip === undefined ? undefined : "group", children: [children, description] }))
|
|
145
|
-
: (_jsxs("button", { type: "button", ...shared, "aria-label": answers === undefined ? said : t("{said}: answer the master", { said }), onClick: () => (answers === undefined ? value.roll && onRoll(value.roll,
|
|
160
|
+
: (_jsxs("button", { type: "button", ...shared, "aria-label": answers === undefined ? said : t("{said}: answer the master", { said }), onClick: () => (answers === undefined ? value.roll && onRoll(value.roll, rollLabel(value.field, fields)) : answers.answer()), children: [children, description] }));
|
|
146
161
|
}
|
|
147
|
-
/** The die inside a number the system rolls
|
|
162
|
+
/** The die inside a number the system rolls, a click throws it; an arrow up when the roll is better, down when worse, both when the two cancel out. */
|
|
148
163
|
function RollMark({ roll }) {
|
|
149
|
-
|
|
164
|
+
const odds = oddsOf(roll);
|
|
165
|
+
return (_jsxs("span", { class: odds === undefined ? "roll-mark" : `roll-mark ${odds}`, "aria-hidden": "true", children: [_jsx(DieIcon, { sides: roll.dice[0] ?? 20 }), odds !== undefined && _jsx(Icon, { name: odds })] }));
|
|
166
|
+
}
|
|
167
|
+
/** Whether a roll is better, worse, or both, which cancel out; undefined when nothing changes it. */
|
|
168
|
+
function oddsOf(roll) {
|
|
169
|
+
const better = (roll.odds?.better.length ?? 0) > 0;
|
|
170
|
+
const worse = (roll.odds?.worse.length ?? 0) > 0;
|
|
171
|
+
return better && worse ? "even" : better ? "better" : worse ? "worse" : undefined;
|
|
172
|
+
}
|
|
173
|
+
/** Why a roll is better or worse, in the system's words, for its tooltip: Rolled worse: Poisoned; both, and that they cancel out. */
|
|
174
|
+
function oddsLine(roll) {
|
|
175
|
+
const odds = roll === undefined ? undefined : oddsOf(roll);
|
|
176
|
+
const better = listText((roll?.odds?.better ?? []).map(systemText));
|
|
177
|
+
const worse = listText((roll?.odds?.worse ?? []).map(systemText));
|
|
178
|
+
return odds === undefined
|
|
179
|
+
? undefined
|
|
180
|
+
: odds === "even"
|
|
181
|
+
? t("Better for {better} and worse for {worse}: they cancel out", { better, worse })
|
|
182
|
+
: odds === "better"
|
|
183
|
+
? t("Rolled better: {why}", { why: better })
|
|
184
|
+
: t("Rolled worse: {why}", { why: worse });
|
|
185
|
+
}
|
|
186
|
+
/** The stage a load reaches, for its tooltip: the system's word, and that the master knows what it brings. */
|
|
187
|
+
function stageLine(value) {
|
|
188
|
+
return value.load?.stage === undefined ? undefined : t("{stage}, by the weight you carry: the master knows what it brings", { stage: systemText(value.load.stage) });
|
|
150
189
|
}
|
|
151
|
-
/** A
|
|
190
|
+
/** A word of the system, as a load's stage or what makes a roll worse, in the campaign's language. */
|
|
191
|
+
function systemText(word) {
|
|
192
|
+
return systemWord("words", word) ?? word;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* A group the items of a list give, as the attacks: a head with the labels of their values, then an item a line, with its values. What is inside another
|
|
196
|
+
* thing stands under it, a step in for each level, and its container opens and closes it, as a tree of files (D-431).
|
|
197
|
+
*/
|
|
152
198
|
function ItemsTable({ group, fields }) {
|
|
199
|
+
const acts = usePlayerActs();
|
|
200
|
+
const [closed, setClosed] = useState(new Set());
|
|
153
201
|
const items = group.items ?? [];
|
|
154
202
|
const columns = items[0]?.values.map((value) => value.field) ?? [];
|
|
155
203
|
const labels = groupLabels(columns, fields);
|
|
156
|
-
|
|
204
|
+
const depths = items.map((item) => item.depth ?? 0);
|
|
205
|
+
const holds = (index) => (depths[index + 1] ?? 0) > depths[index];
|
|
206
|
+
const key = (index) => `${depths[index]} ${items[index].inside ?? ""} ${items[index].item}`;
|
|
207
|
+
const toggle = (index) => setClosed((before) => (before.has(key(index)) ? new Set([...before].filter((one) => one !== key(index))) : new Set([...before, key(index)])));
|
|
208
|
+
const shown = shownLines(depths, (index) => closed.has(key(index)));
|
|
209
|
+
// When something is equipped or holds other things, every name has its picture, golden on what is equipped; a container's chevron stands where the
|
|
210
|
+
// picture of a thing at its level would, so that only what is inside steps in (Stefano, 15 October).
|
|
211
|
+
const marked = items.some((item, index) => item.equipped === true || holds(index));
|
|
212
|
+
// What is carried tells how many after its name, as Torce (6), with no column of its own (Stefano, 15 October).
|
|
213
|
+
const carried = columns.length === 1 && columns[0] === "quantity";
|
|
214
|
+
const count = (item) => (carried ? item.values[0]?.text ?? "" : "");
|
|
215
|
+
return (_jsxs("table", { class: ["items", marked ? "marked" : "", carried ? "carried" : ""].filter((name) => name !== "").join(" "), children: [_jsx("thead", { class: carried ? "visually-hidden" : undefined, children: _jsxs("tr", { children: [_jsx("th", { scope: "col", children: _jsx("span", { class: "visually-hidden", children: t("Name") }) }), !carried && columns.map((field) => _jsx("th", { scope: "col", children: phraseLabel(labels.get(field) ?? fieldLabel(field, fields)) }, field))] }) }), _jsx("tbody", { children: items.map((item, index) => {
|
|
216
|
+
if (!shown[index]) {
|
|
217
|
+
return null;
|
|
218
|
+
}
|
|
219
|
+
const name = itemName(item.item);
|
|
220
|
+
const bonds = (item.bonds ?? []).map((list) => fieldLabel(list, fields));
|
|
221
|
+
const said = [
|
|
222
|
+
item.inside === undefined ? undefined : t("in {container}", { container: itemName(item.inside) }),
|
|
223
|
+
item.equipped === true ? t("Equipped") : undefined,
|
|
224
|
+
...bonds,
|
|
225
|
+
].filter((part) => part !== undefined).map((part) => `, ${part}`).join("");
|
|
226
|
+
const words = (_jsxs(_Fragment, { children: [marked && _jsx(ItemPicture, { image: item.image, equipped: item.equipped === true }), _jsx("span", { children: name }), count(item) !== "" && _jsx("span", { class: "item-count", children: ` (${count(item)})` }), bonds.length > 0 && (_jsx("span", { class: "item-bond", "data-tip": bonds.join(", "), "aria-hidden": "true", children: _jsx(Icon, { name: "bond" }) })), said !== "" && _jsx("span", { class: "visually-hidden", children: said })] }));
|
|
227
|
+
// The name acts, when the system names a verb for it; a container's opens and closes what it holds (D-495).
|
|
228
|
+
const verbs = holds(index) ? undefined : itemVerbs(acts?.actions, item);
|
|
229
|
+
return (_jsxs("tr", { class: item.depth === undefined ? undefined : "inside", children: [_jsx("th", { scope: "row", class: holds(index) ? "holds" : undefined, style: item.depth === undefined ? undefined : { "--depth": item.depth }, children: holds(index)
|
|
230
|
+
? (_jsxs("button", { type: "button", class: "fold", "aria-expanded": !closed.has(key(index)), onClick: () => toggle(index), children: [_jsx(Icon, { name: "fold" }), words] }))
|
|
231
|
+
: verbs === undefined
|
|
232
|
+
? words
|
|
233
|
+
: _jsx(ActName, { verbs: verbs, item: name, said: `${count(item) === "" ? "" : ` (${count(item)})`}${said}`, children: words }) }), !carried && item.values.map((value) => _jsx("td", { class: widgetOf(value) === "text" ? undefined : "num", children: shownText(value.text, value.kind) }, value.field))] }, key(index)));
|
|
234
|
+
}) })] }));
|
|
235
|
+
}
|
|
236
|
+
/** A thing's picture, one colour as the words beside it, gold when equipped: the game's drawing of its kind as a mask, or the page's own of any thing. */
|
|
237
|
+
function ItemPicture({ image, equipped }) {
|
|
238
|
+
const kind = ["item-picture", image === undefined ? "" : "drawn", equipped ? "equipped" : ""].filter((name) => name !== "").join(" ");
|
|
239
|
+
const title = equipped ? t("Equipped") : undefined;
|
|
240
|
+
return image === undefined
|
|
241
|
+
? (_jsx("span", { class: kind, title: title, "aria-hidden": "true", children: _jsx(Icon, { name: "thing" }) }))
|
|
242
|
+
: _jsx("span", { class: kind, title: title, "aria-hidden": "true", style: { "--picture-url": `url("/images/${encodeURIComponent(image.file)}?v=${image.version}")` } });
|
|
243
|
+
}
|
|
244
|
+
/** Which lines of a list show: those whose containers are all open, by the lines' depths. */
|
|
245
|
+
function shownLines(depths, isClosed) {
|
|
246
|
+
// The containers above the line, as the index of each, from the outermost.
|
|
247
|
+
const above = [];
|
|
248
|
+
return depths.map((depth, index) => {
|
|
249
|
+
above.splice(depth);
|
|
250
|
+
const shown = above.every((container) => !isClosed(container));
|
|
251
|
+
above[depth] = index;
|
|
252
|
+
return shown;
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
/** A thing's name as the page writes it, with a capital, whatever the page that has it says: "torce" as "Torce". */
|
|
256
|
+
function itemName(name) {
|
|
257
|
+
// A thing of the system, as Unarmed Strike, in the campaign's language (playtest 15).
|
|
258
|
+
const said = systemWord("words", name) ?? name;
|
|
259
|
+
return said.charAt(0).toLocaleUpperCase() + said.slice(1);
|
|
157
260
|
}
|
|
158
261
|
/** Flashes its content once when its text changes, as when a number goes down. */
|
|
159
262
|
function Changing({ text, children }) {
|
|
@@ -174,7 +277,8 @@ function sheetFields(member, sheet) {
|
|
|
174
277
|
/** What a closed group says of itself: its first values, or its items. */
|
|
175
278
|
function preview(group, label) {
|
|
176
279
|
if (group.items !== undefined) {
|
|
177
|
-
|
|
280
|
+
// The group's own values first, as the money above the things carried: their text alone, as the card is narrow.
|
|
281
|
+
return [...group.values.map((value) => shownText(value.text, value.kind)), ...group.items.map((item) => itemName(item.item))].join(" · ");
|
|
178
282
|
}
|
|
179
283
|
return group.values.slice(0, 4).map((value) => `${label(value.field)} ${shownText(besideLabel(value) ?? value.text)}`).join(" · ");
|
|
180
284
|
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
|
|
2
|
+
// 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 that stays while the player rolls, one
|
|
3
|
+
// die at a time. Who rests 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;
|
|
4
|
+
// the dice rolled as chips; the one button that ends it. What a roll changes shows once its dice land.
|
|
5
|
+
import { useEffect, useRef, useState } from "preact/hooks";
|
|
6
|
+
import { DieIcon, Icon } from "./icons.js";
|
|
7
|
+
import { fieldLabel, signed } from "./labels.js";
|
|
8
|
+
import { Token } from "./party.js";
|
|
9
|
+
import { t } from "./text.js";
|
|
10
|
+
// How long the points take to climb to what a die gave.
|
|
11
|
+
const climbTime = 400;
|
|
12
|
+
export function SpendCard({ asked, spend, member, flying, onSpend, onDone }) {
|
|
13
|
+
const card = useRef(null);
|
|
14
|
+
const done = useRef(null);
|
|
15
|
+
// A die asked of the engine, until its roll comes back: its counter, and how many rolls there were then.
|
|
16
|
+
const [sent, setSent] = useState();
|
|
17
|
+
const [leaving, setLeaving] = useState(false);
|
|
18
|
+
const waiting = (sent !== undefined && spend.rolls.length <= sent.rolls) || spend.rolls.some((roll) => roll.id === flying);
|
|
19
|
+
// What the card shows: the dice as they were until the last roll's dice land.
|
|
20
|
+
const steady = useRef(spend);
|
|
21
|
+
if (!waiting) {
|
|
22
|
+
steady.current = spend;
|
|
23
|
+
}
|
|
24
|
+
const shown = steady.current;
|
|
25
|
+
const { gives } = shown;
|
|
26
|
+
const value = useClimb(gives.value);
|
|
27
|
+
const gained = gives.value - gives.from;
|
|
28
|
+
const full = gives.max !== undefined && gives.value >= gives.max;
|
|
29
|
+
const left = shown.dice.some((dice) => dice.value > 0);
|
|
30
|
+
const last = shown.rolls.at(-1);
|
|
31
|
+
const busy = waiting || leaving;
|
|
32
|
+
// While it is there, the rolls beside the sheet stay in sight under it, as under the master's question (D-291).
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
const element = card.current;
|
|
35
|
+
if (element === null) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const root = document.documentElement;
|
|
39
|
+
const observer = new ResizeObserver(() => root.style.setProperty("--asked-space", `${element.offsetHeight + 16}px`));
|
|
40
|
+
observer.observe(element);
|
|
41
|
+
return () => {
|
|
42
|
+
observer.disconnect();
|
|
43
|
+
root.style.removeProperty("--asked-space");
|
|
44
|
+
};
|
|
45
|
+
}, []);
|
|
46
|
+
// The last die spent, the focus that was on a button to roll goes to the one that ends it.
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
if (!left && card.current?.contains(document.activeElement) === true) {
|
|
49
|
+
done.current?.focus();
|
|
50
|
+
}
|
|
51
|
+
}, [left]);
|
|
52
|
+
const spendOne = async (field) => {
|
|
53
|
+
if (busy) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
setSent({ field, rolls: spend.rolls.length });
|
|
57
|
+
if (!await onSpend(field)) {
|
|
58
|
+
setSent(undefined);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const end = async () => {
|
|
62
|
+
if (busy) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
setLeaving(true);
|
|
66
|
+
if (!await onDone(card.current?.contains(document.activeElement) === true)) {
|
|
67
|
+
setLeaving(false);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
return (_jsxs("section", { ref: card, class: leaving ? "asked spend-card leaving" : "asked spend-card", "aria-labelledby": `spend-${asked.id}`, children: [_jsx("img", { class: "asked-robot", src: "/assets/favicon.svg", alt: "" }), _jsxs("div", { class: "asked-body", children: [_jsx("p", { class: "eyebrow asked-turn", children: asked.title }), _jsx("p", { id: `spend-${asked.id}`, class: "asked-question", role: "alert", children: asked.question }), _jsxs("div", { class: "spend-play", children: [_jsxs("div", { class: "spend-life", children: [_jsx("span", { class: "spend-token", children: member !== undefined && _jsx(Token, { member: member }) }), _jsxs("div", { class: "spend-points", children: [_jsxs("span", { class: "spend-points-head", children: [_jsx("span", { class: "eyebrow spend-points-name", children: fieldLabel(gives.field) }), _jsxs("span", { class: "spend-points-number", children: [_jsx("b", { children: value }), gives.max !== undefined && _jsxs("span", { class: "spend-points-max", children: ["/", gives.max] })] }), gained > 0 && _jsxs("span", { class: "spend-gain", children: ["+", gained] }), full && (_jsxs("span", { class: "spend-full", children: [_jsx(Icon, { name: "check" }), t("at the maximum")] }))] }), gives.max !== undefined && gives.max > 0 && (_jsxs("span", { class: "bar spend-bar", role: "meter", "aria-label": fieldLabel(gives.field), "aria-valuemin": 0, "aria-valuemax": gives.max, "aria-valuenow": gives.value, "aria-valuetext": t("{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: shown.dice.map((dice) => {
|
|
71
|
+
const out = dice.value <= 0;
|
|
72
|
+
const label = fieldLabel(dice.field);
|
|
73
|
+
return (_jsxs("li", { class: out ? "spend-row out" : "spend-row", children: [_jsx("span", { class: "spend-row-name", children: label }), dice.max <= 10
|
|
74
|
+
? (_jsx("span", { class: "pips spend-pips", role: "img", "aria-label": `${label}: ${t("{value} of {max}", { value: dice.value, max: dice.max })}`, children: Array.from({ length: dice.max }, (_, index) => (_jsx("span", { class: ["pip", index < dice.value ? "on" : "", last?.field === dice.field && index === dice.value ? "fresh" : ""].filter((name) => name !== "").join(" ") }, index))) }))
|
|
75
|
+
: _jsx("span", { class: "spend-count", children: t("{value} of {max}", { value: dice.value, max: dice.max }) }), _jsxs("button", { type: "button", class: sent?.field === dice.field && waiting ? "spend-roll sent" : "spend-roll", "aria-disabled": out || busy ? "true" : undefined, onClick: () => !out && void spendOne(dice.field), children: [_jsx(DieIcon, { sides: dice.sides }), _jsx("span", { class: "asked-check-name", children: out ? t("None left") : t("Roll") }), !out && dice.adds !== 0 && _jsx("span", { class: "asked-dice", children: signed(dice.adds) }), _jsx("span", { class: "visually-hidden", children: label })] })] }, dice.field));
|
|
76
|
+
}) })] }), _jsxs("div", { class: "spend-foot", children: [shown.rolls.length === 0
|
|
77
|
+
? _jsx("p", { class: "spend-hint", children: t("One die at a time: stop when you like.") })
|
|
78
|
+
: (_jsx("ol", { class: "spend-chips", "aria-label": t("Dice rolled"), children: shown.rolls.map((roll) => (_jsxs("li", { class: roll.id === last?.id ? "spend-chip fresh" : "spend-chip", children: [_jsxs("span", { class: "die-chip", children: [_jsx(DieIcon, { sides: shown.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: () => void end(), children: shown.rolls.length === 0 ? t("I spend none") : t("Done") })] }), _jsx("p", { class: "visually-hidden", role: "status", children: last === undefined ? "" : landedText(shown, last) })] })] }));
|
|
79
|
+
}
|
|
80
|
+
/** "Hit dice d8: 6 +2 = 8. HP: 22 of 27. Left: 1.": a die as it landed, for a screen reader. */
|
|
81
|
+
function landedText(spend, roll) {
|
|
82
|
+
const dice = spend.dice.find((counter) => counter.field === roll.field);
|
|
83
|
+
const points = spend.gives.max === undefined ? String(spend.gives.value) : t("{value} of {max}", { value: spend.gives.value, max: spend.gives.max });
|
|
84
|
+
const rolled = `${roll.face}${roll.adds === 0 ? "" : ` ${signed(roll.adds)}`} = ${roll.total}`;
|
|
85
|
+
return `${fieldLabel(roll.field)}: ${rolled}. ${fieldLabel(spend.gives.field)}: ${points}.${dice === undefined ? "" : ` ${t("Left: {count}", { count: dice.value })}`}`;
|
|
86
|
+
}
|
|
87
|
+
/** A value's share of its maximum, from 0 to 1. */
|
|
88
|
+
function share(value, max) {
|
|
89
|
+
return Math.min(1, Math.max(0, value / max));
|
|
90
|
+
}
|
|
91
|
+
/** A number that climbs to its new value in a moment, at once for a player who asked for less motion. */
|
|
92
|
+
function useClimb(target) {
|
|
93
|
+
const [value, setValue] = useState(target);
|
|
94
|
+
const from = useRef(target);
|
|
95
|
+
useEffect(() => {
|
|
96
|
+
const start = from.current;
|
|
97
|
+
from.current = target;
|
|
98
|
+
if (start === target || window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
|
99
|
+
setValue(target);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const began = performance.now();
|
|
103
|
+
let frame = 0;
|
|
104
|
+
const step = (now) => {
|
|
105
|
+
const part = Math.min(1, (now - began) / climbTime);
|
|
106
|
+
setValue(Math.round(start + (target - start) * part));
|
|
107
|
+
if (part < 1) {
|
|
108
|
+
frame = requestAnimationFrame(step);
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
frame = requestAnimationFrame(step);
|
|
112
|
+
return () => cancelAnimationFrame(frame);
|
|
113
|
+
}, [target]);
|
|
114
|
+
return value;
|
|
115
|
+
}
|
package/dist/dashboard/status.js
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx } from "preact/jsx-runtime";
|
|
2
|
+
import { stableWord } from "./dying.js";
|
|
2
3
|
import { effectLabel } from "./game-words.js";
|
|
3
4
|
import { statusIcons } from "./icons.js";
|
|
4
5
|
import { conditionsPref, useChoice } from "./prefs.js";
|
|
6
|
+
import { dyingState, effectsBesideState } from "./save-outcome.js";
|
|
5
7
|
import { t } from "./text.js";
|
|
6
8
|
/** The marks of someone's state, the one that counts most first: dead, at 0, kept from acting, then the conditions, the last put on first; with `all`, their other effects after them. */
|
|
7
9
|
export function statusMarks(status, all = false) {
|
|
8
|
-
const effects = status.effects ?? [];
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
const effects = effectsBesideState(status.effects ?? [], status.counters);
|
|
11
|
+
// At 0 one of the party has a heartbeat, dying or stable; anyone else falls to the ground. The dead a red skull (D-461).
|
|
12
|
+
const down = status.party === true
|
|
13
|
+
? { icon: statusIcons.down, label: status.dying === "stable" ? stableWord(status.counters) : t("Dying"), kind: "state", tone: status.dying === "stable" ? "stable" : "dying" }
|
|
14
|
+
: { icon: statusIcons.fallen, label: t("down"), kind: "state", tone: "down" };
|
|
15
|
+
const states = status.dead === true || status.dying === "dead"
|
|
16
|
+
? [{ icon: statusIcons.dead, label: t("dead"), kind: "state", tone: "dead", filled: true }]
|
|
11
17
|
: [
|
|
12
|
-
...(status.down === true ? [
|
|
18
|
+
...(status.down === true ? [down] : []),
|
|
13
19
|
...(status.inactive === true ? [{ icon: statusIcons.inactive, label: t("Can't act"), kind: "state" }] : []),
|
|
14
20
|
];
|
|
15
21
|
const conditions = effects.filter((effect) => effect.condition === true).reverse().map((effect) => ({ icon: effect.icon ?? statusIcons.condition, label: effectLabel(effect), kind: "condition" }));
|
|
@@ -19,7 +25,7 @@ export function statusMarks(status, all = false) {
|
|
|
19
25
|
/** The state of one of the party: their effects, whether dead or at their dying point, and whether the open scene says they cannot act. */
|
|
20
26
|
export function memberStatus(member, scene) {
|
|
21
27
|
const inScene = scene?.fighters?.find((fighter) => fighter.name === member.name) ?? scene?.who.find((person) => person.name === member.name);
|
|
22
|
-
return { effects: member.effects, dead: member.dead, down: member.dying !== undefined, inactive: inScene?.inactive === true };
|
|
28
|
+
return { effects: member.effects, dead: member.dead, down: member.dying !== undefined, inactive: inScene?.inactive === true, dying: dyingState(member.dying), counters: member.dying, party: true };
|
|
23
29
|
}
|
|
24
30
|
/** The pip of someone's state on their token, its marks in its tooltip; none without a mark, or while the player keeps them off. */
|
|
25
31
|
export function StatusPip({ status }) {
|
|
@@ -28,13 +34,19 @@ export function StatusPip({ status }) {
|
|
|
28
34
|
if (shown === "never" || marks.length === 0) {
|
|
29
35
|
return null;
|
|
30
36
|
}
|
|
31
|
-
const classes = ["status-pip", marks[0].kind === "state" ? "strong" : "", marks.length > 1 ? "stacked" : "", shown === "hover" ? "on-hover" : ""];
|
|
32
|
-
return (_jsx("span", { class: classes.filter((name) => name !== "").join(" "), "data-tip": marks.map((mark) => mark.label).join(", "), children: _jsx("svg", { viewBox: "-3 -3 30 30", "aria-hidden": "true", children: _jsx("path", { d: marks[0].icon }) }) }));
|
|
37
|
+
const classes = ["status-pip", marks[0].kind === "state" ? "strong" : "", marks[0].tone ?? "", marks.length > 1 ? "stacked" : "", shown === "hover" ? "on-hover" : ""];
|
|
38
|
+
return (_jsx("span", { class: classes.filter((name) => name !== "").join(" "), "data-tip": marks.map((mark) => mark.label).join(", "), children: _jsx("svg", { viewBox: "-3 -3 30 30", "aria-hidden": "true", children: _jsx("path", { d: marks[0].icon, class: marks[0].filled ? "filled" : undefined }) }) }));
|
|
33
39
|
}
|
|
34
|
-
/**
|
|
35
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Each mark of someone's state as an icon with its words, for a screen reader too and for the keyboard, as Combat's order shows them (D-419); a foe's fall only
|
|
42
|
+
* drawn when its words already say it.
|
|
43
|
+
*/
|
|
44
|
+
export function StatusIcons({ status, downSaid = false }) {
|
|
36
45
|
const marks = statusMarks(status, true);
|
|
37
|
-
return marks.length === 0 ? null : (_jsx("span", { class: "status-icons", children: marks.map((mark, index) =>
|
|
46
|
+
return marks.length === 0 ? null : (_jsx("span", { class: "status-icons", children: marks.map((mark, index) => {
|
|
47
|
+
const said = downSaid && mark.tone === "down";
|
|
48
|
+
return (_jsx("span", { class: ["status-icon", mark.kind, mark.tone ?? ""].filter((name) => name !== "").join(" "), ...(said ? { "aria-hidden": "true" } : { role: "img", "aria-label": mark.label, tabIndex: 0 }), "data-tip": mark.label, children: _jsx("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { d: mark.icon, class: mark.filled ? "filled" : undefined }) }) }, `${mark.label} ${index}`));
|
|
49
|
+
}) }));
|
|
38
50
|
}
|
|
39
51
|
/** The words of someone's state for a screen reader, as a token's name says them. */
|
|
40
52
|
export function statusWords(status) {
|
package/dist/dashboard/story.js
CHANGED
|
@@ -5,7 +5,7 @@ import { useEffect, useId, useRef, useState } from "preact/hooks";
|
|
|
5
5
|
import { readStory, sendStory } from "./api.js";
|
|
6
6
|
import { Icon } from "./icons.js";
|
|
7
7
|
import { t } from "./text.js";
|
|
8
|
-
export function StoryBox({ story }) {
|
|
8
|
+
export function StoryBox({ story, who }) {
|
|
9
9
|
const [editing, setEditing] = useState(false);
|
|
10
10
|
const [draft, setDraft] = useState(story);
|
|
11
11
|
// The proposal the master has not written yet, as the game keeps it: read again whenever the page's story changes.
|
|
@@ -17,8 +17,8 @@ export function StoryBox({ story }) {
|
|
|
17
17
|
const pencil = useRef(null);
|
|
18
18
|
const wasEditing = useRef(false);
|
|
19
19
|
useEffect(() => {
|
|
20
|
-
void readStory().then(setProposed, () => setProposed(undefined));
|
|
21
|
-
}, [story]);
|
|
20
|
+
void readStory(who).then(setProposed, () => setProposed(undefined));
|
|
21
|
+
}, [story, who]);
|
|
22
22
|
// Opened, the field takes the focus; closed, the button that opens it.
|
|
23
23
|
useEffect(() => {
|
|
24
24
|
if (editing) {
|
|
@@ -32,7 +32,7 @@ export function StoryBox({ story }) {
|
|
|
32
32
|
const send = async (event) => {
|
|
33
33
|
event.preventDefault();
|
|
34
34
|
setBusy(true);
|
|
35
|
-
const refused = await sendStory(draft);
|
|
35
|
+
const refused = await sendStory(draft, who);
|
|
36
36
|
setBusy(false);
|
|
37
37
|
setProblem(refused);
|
|
38
38
|
if (refused === undefined) {
|
|
@@ -41,11 +41,11 @@ export function StoryBox({ story }) {
|
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
if (!editing) {
|
|
44
|
-
return (_jsxs("div", { class: "story-box", children: [proposed !== undefined && (_jsxs("p", { class: "story-sent", children: [_jsx(Icon, { name: "send" }), " ", t("Sent to the master: they write it in your page once you agree in the chat.")] })), _jsxs("button", { ref: pencil, type: "button", class: "
|
|
44
|
+
return (_jsxs("div", { class: "story-box", children: [proposed !== undefined && (_jsxs("p", { class: "story-sent", children: [_jsx(Icon, { name: "send" }), " ", t("Sent to the master: they write it in your page once you agree in the chat.")] })), _jsxs("button", { ref: pencil, type: "button", class: "button", onClick: () => {
|
|
45
45
|
setDraft(proposed ?? story);
|
|
46
46
|
setProblem(undefined);
|
|
47
47
|
setEditing(true);
|
|
48
48
|
}, children: [_jsx(Icon, { name: "pencil" }), " ", proposed !== undefined ? t("Change what you sent") : story === "" ? t("Write your character's story") : t("Propose changes to your story")] })] }));
|
|
49
49
|
}
|
|
50
|
-
return (_jsxs("form", { class: "story-box editing", onSubmit: (event) => void send(event), children: [_jsx("label", { for: id, children: t("Your character's story and look, in your words. It goes to the master, who writes it in your page with you.") }), _jsx("textarea", { ref: field, id: id, value: draft, rows: 10, maxLength: 20_000, onInput: (event) => setDraft(event.currentTarget.value) }), _jsxs("div", { class: "story-buttons", children: [_jsx("span", { class: "story-status", role: "alert", children: problem }), _jsx("button", { type: "button", class: "
|
|
50
|
+
return (_jsxs("form", { class: "story-box editing", onSubmit: (event) => void send(event), children: [_jsx("label", { for: id, children: t("Your character's story and look, in your words. It goes to the master, who writes it in your page with you.") }), _jsx("textarea", { ref: field, id: id, value: draft, rows: 10, maxLength: 20_000, onInput: (event) => setDraft(event.currentTarget.value) }), _jsxs("div", { class: "story-buttons", children: [_jsx("span", { class: "story-status", role: "alert", children: problem }), _jsx("button", { type: "button", class: "button", onClick: () => setEditing(false), children: t("Cancel") }), _jsxs("button", { type: "submit", class: "button gold", disabled: busy || draft.trim() === "" || draft.trim() === (proposed ?? story).trim(), children: [_jsx(Icon, { name: "send" }), " ", t("Send to the master")] })] })] }));
|
|
51
51
|
}
|