rpg-engine 0.2.0 → 0.3.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 +33 -2
- package/dist/campaign/settings.js +49 -12
- package/dist/cli.js +10 -1
- package/dist/command-line.js +20 -2
- 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 +179 -79
- 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-mode.js +3 -3
- 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 +165 -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 +85 -9
- package/dist/commands/package.js +378 -50
- 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 +2 -0
- package/dist/commands/roll.js +23 -7
- 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 +131 -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 +361 -16
- package/dist/dashboard/i18n/cs.json +361 -16
- package/dist/dashboard/i18n/da.json +361 -16
- package/dist/dashboard/i18n/de.json +361 -16
- package/dist/dashboard/i18n/el.json +361 -16
- package/dist/dashboard/i18n/es.json +361 -16
- package/dist/dashboard/i18n/fi.json +361 -16
- package/dist/dashboard/i18n/fr.json +361 -16
- package/dist/dashboard/i18n/he.json +361 -16
- package/dist/dashboard/i18n/hi.json +361 -16
- package/dist/dashboard/i18n/hu.json +361 -16
- package/dist/dashboard/i18n/is.json +361 -16
- package/dist/dashboard/i18n/it.json +363 -18
- package/dist/dashboard/i18n/ja.json +361 -16
- package/dist/dashboard/i18n/ko.json +361 -16
- package/dist/dashboard/i18n/nb.json +361 -16
- package/dist/dashboard/i18n/nl.json +361 -16
- package/dist/dashboard/i18n/pl.json +361 -16
- package/dist/dashboard/i18n/pt.json +361 -16
- package/dist/dashboard/i18n/ro.json +361 -16
- package/dist/dashboard/i18n/ru.json +361 -16
- package/dist/dashboard/i18n/sv.json +361 -16
- package/dist/dashboard/i18n/tr.json +361 -16
- package/dist/dashboard/i18n/uk.json +361 -16
- package/dist/dashboard/i18n/zh.json +361 -16
- package/dist/dashboard/icons.js +38 -4
- package/dist/dashboard/journal.js +203 -49
- package/dist/dashboard/labels.js +42 -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 +70 -12
- 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/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 +127 -15
- 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 +7 -0
- package/dist/pages/markdown.js +27 -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 +4 -4
- 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 +5 -5
- 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 +6 -2
- 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 +5 -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/icons.js
CHANGED
|
@@ -33,11 +33,18 @@ const iconPaths = {
|
|
|
33
33
|
place: "M12 21s-6.5-5.6-6.5-11a6.5 6.5 0 0 1 13 0c0 5.4-6.5 11-6.5 11Z M12 7.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 1 0 0-5Z",
|
|
34
34
|
aside: "M6 6l6 6-6 6 M12 6l6 6-6 6",
|
|
35
35
|
send: "M5 12h13 M13 6l6 6-6 6",
|
|
36
|
+
// The doorbell that called the master for the player's sentence (D-495).
|
|
37
|
+
bell: "M6 16.5V11a6 6 0 0 1 12 0v5.5l1.5 2h-15Z M10 20.5a2 2 0 0 0 4 0",
|
|
38
|
+
copy: "M9 9h10.5v11.5H9Z M15 9V3.5H4.5V15H9",
|
|
36
39
|
// The page's foot: the code, the package, a heart for support.
|
|
37
40
|
github: "M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.4 5.4 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65S8.93 17.38 9 18v4 M9 18c-4.51 2-5-2-7-2",
|
|
38
41
|
npm: "M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73Z M12 22V12 M3.29 7 12 12l8.71-5 M7.5 4.27l9 5.15",
|
|
39
42
|
heart: "M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",
|
|
40
43
|
check: "M5 12.5l4.5 4.5L19 7.5",
|
|
44
|
+
// What opens and closes the things a container holds, pointing at them (D-431).
|
|
45
|
+
fold: "M9.5 6.5l5.5 5.5-5.5 5.5",
|
|
46
|
+
// Any thing carried that the game has no drawing for: a parcel tied with string (D-431).
|
|
47
|
+
thing: "M3.5 7.5 12 3.5l8.5 4v9L12 20.5l-8.5-4Z M3.5 7.5 12 11.5l8.5-4 M12 11.5v9 M7.8 5.5l8.4 4v3",
|
|
41
48
|
undo: "M9 14 4 9l5-5 M4 9h10.5a5.5 5.5 0 0 1 0 11H11",
|
|
42
49
|
pencil: "M4 20h4L18.5 9.5a2.1 2.1 0 0 0-3-3L5 17v3 M13.5 8.5l3 3",
|
|
43
50
|
alert: "M12 3.5 21.5 20h-19Z M12 9.5v5 M12 17.2v.3",
|
|
@@ -57,6 +64,17 @@ const iconPaths = {
|
|
|
57
64
|
// A gear standing straight, a tooth at the top (D-409).
|
|
58
65
|
settings: "M10.33 5.3L10.42 2.53L13.58 2.53L13.67 5.3A6.9 6.9 0 0 1 15.55 6.09L17.57 4.18L19.82 6.43L17.91 8.45A6.9 6.9 0 0 1 18.7 10.33L21.47 10.42L21.47 13.58L18.7 13.67A6.9 6.9 0 0 1 17.91 15.55L19.82 17.57L17.57 19.82L15.55 17.91A6.9 6.9 0 0 1 13.67 18.7L13.58 21.47L10.42 21.47L10.33 18.7A6.9 6.9 0 0 1 8.45 17.91L6.43 19.82L4.18 17.57L6.09 15.55A6.9 6.9 0 0 1 5.3 13.67L2.53 13.58L2.53 10.42L5.3 10.33A6.9 6.9 0 0 1 6.09 8.45L4.18 6.43L6.43 4.18L8.45 6.09A6.9 6.9 0 0 1 10.33 5.3Z M12 9a3 3 0 1 0 0 6a3 3 0 1 0 0-6Z",
|
|
59
66
|
about: "M12 3a9 9 0 1 0 0 18a9 9 0 1 0 0-18Z M12 11v6 M12 7.6v.3",
|
|
67
|
+
// The packages (D-475): a box, as npm draws it; what is done with one, and the system that stays.
|
|
68
|
+
packages: "M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73Z M12 22V12 M3.29 7 12 12l8.71-5 M7.5 4.27l9 5.15",
|
|
69
|
+
download: "M12 4v11 M7 10.5l5 5 5-5 M5 20h14",
|
|
70
|
+
update: "M20 12a8 8 0 1 1-2.3-5.6 M20 4v4.5h-4.5",
|
|
71
|
+
lock: "M6.5 10.5h11v10h-11Z M8.5 10.5V7.5a3.5 3.5 0 0 1 7 0v3",
|
|
72
|
+
verified: "M12 3 5 6v5c0 4.5 3 8.3 7 10 4-1.7 7-5.5 7-10V6Z M8.8 12.2l2.2 2.2 4.4-4.6",
|
|
73
|
+
unverified: "M12 3 5 6v5c0 4.5 3 8.3 7 10 4-1.7 7-5.5 7-10V6Z M12 8v5 M12 16v.3",
|
|
74
|
+
offline: "M3 3l18 18 M8.5 16.5a5 5 0 0 1 7 0 M5 12.5a10 10 0 0 1 4.5-2.4 M14.5 10.2A10 10 0 0 1 19 12.5 M2 8.8a15 15 0 0 1 4.3-2.6 M10.5 5.1A15 15 0 0 1 22 8.8 M12 20h.01",
|
|
75
|
+
terminal: "M3.5 4.5h17v15h-17Z M7 9l3 3-3 3 M12.5 15H17",
|
|
76
|
+
// The campaign shared as an adventure (D-483): out of the box.
|
|
77
|
+
share: "M12 15V3.5 M7.5 8 12 3.5 16.5 8 M8 11H5v9.5h14V11h-3",
|
|
60
78
|
// Help's parts (D-409): the chat with the master, and the dice.
|
|
61
79
|
chat: "M4.5 5h15v10.5H10l-4.5 3.5v-3.5h-1Z M8 9h8 M8 12h5",
|
|
62
80
|
dice: diePaths[20],
|
|
@@ -66,14 +84,30 @@ const iconPaths = {
|
|
|
66
84
|
// Rolling by hand, from the sheet or the tray (D-330).
|
|
67
85
|
hand: "M8 12.5V5.5a1.5 1.5 0 0 1 3 0V11 M11 11V4a1.5 1.5 0 0 1 3 0v7 M14 11V5.5a1.5 1.5 0 0 1 3 0V13 M17 10.5a1.5 1.5 0 0 1 3 0V14a6.5 6.5 0 0 1-6.5 6.5H12c-2 0-3.3-.7-4.5-1.9l-3.3-3.4a1.5 1.5 0 0 1 2.1-2.1L8 14.8",
|
|
68
86
|
licence: "M6.5 3H14l4 4v14H6.5Z M14 3v4h4 M9.5 14l2 2 3.5-4",
|
|
87
|
+
// The Packages page (D-486): a file to add, the catalog's search, a language, the window of the computer where the yes is given, more rows.
|
|
88
|
+
file: "M6 3h8l4 4v14H6Z M14 3v4h4 M9 13h6 M9 16.5h6",
|
|
89
|
+
folder: "M3 5h6.5l2 2.5H21V20H3Z",
|
|
90
|
+
library: "M4 6h3.5v14.5H4Z M9 3.5h3.5v17H9Z M9 7.5h3.5 M16.5 20.5l3.3-.9-3.4-12.5-3.3.9Z",
|
|
91
|
+
search: "M10.5 4a6.5 6.5 0 1 0 0 13a6.5 6.5 0 1 0 0-13Z M15.5 15.5 20 20",
|
|
92
|
+
language: "M4 5h9 M8.5 3v2 M6 5c.5 3 2.8 5.5 6 7 M11 5c-.6 3-2.5 5.6-5.5 7.3 M12.5 21l4-9 4 9 M14 17.5h5",
|
|
93
|
+
window: "M3 5h18v14H3Z M3 9h18 M6 7h.01 M8.5 7h.01",
|
|
94
|
+
more: "M6 9l6 6 6-6",
|
|
95
|
+
// A thing in a list of bonds, as attuned: two rings linked.
|
|
96
|
+
bond: "M9 7.5a4.5 4.5 0 1 0 0 9a4.5 4.5 0 1 0 0-9Z M15 7.5a4.5 4.5 0 1 0 0 9a4.5 4.5 0 1 0 0-9Z",
|
|
97
|
+
// A roll the sheet makes better, worse, or both, which cancel out.
|
|
98
|
+
better: "M12 19.5V5 M6 11l6-6 6 6",
|
|
99
|
+
worse: "M12 4.5V19 M6 13l6 6 6-6",
|
|
100
|
+
even: "M8 19.5V4.5 M4 8.5l4-4 4 4 M16 4.5v15 M12 15.5l4 4 4-4",
|
|
69
101
|
};
|
|
70
102
|
/**
|
|
71
|
-
* The engine's states on a token and in Combat (D-419), for any game: dead,
|
|
72
|
-
* for. The conditions' own pictures are the system's (`condition-icons`).
|
|
103
|
+
* The engine's states on a token and in Combat (D-419), for any game: dead, one of the party at 0 (a heartbeat), anyone else down (fallen to the ground), kept
|
|
104
|
+
* from acting; and the mark of a condition the system draws no picture for. The conditions' own pictures are the system's (`condition-icons`). The skull of
|
|
105
|
+
* the dead is filled, its eyes, nose and teeth holes, to read on a pip of 12 pixels (D-461).
|
|
73
106
|
*/
|
|
74
107
|
export const statusIcons = {
|
|
75
|
-
dead: "
|
|
108
|
+
dead: "M12 2.5C7 2.5 3.5 6 3.5 10.6c0 2.7 1.2 4.8 3.2 6.1V19.5c0 1.1.9 2 2 2h6.6c1.1 0 2-.9 2-2v-2.8c2-1.3 3.2-3.4 3.2-6.1C20.5 6 17 2.5 12 2.5Z M8.6 8.8a2.3 2.4 0 1 0 0 4.8a2.3 2.4 0 1 0 0-4.8Z M15.4 8.8a2.3 2.4 0 1 0 0 4.8a2.3 2.4 0 1 0 0-4.8Z M12 13.8l-1.4 2.5h2.8Z M10.1 18.4h1.1v3.4h-1.1Z M12.8 18.4h1.1v3.4h-1.1Z",
|
|
76
109
|
down: "M3 12.5h4.5l2-5 3 10 2.5-5H21",
|
|
110
|
+
fallen: "M12 4v10.5 M7.5 10l4.5 4.5 4.5-4.5 M4.5 19.5h15",
|
|
77
111
|
inactive: "M12 3.5a8.5 8.5 0 1 0 0 17a8.5 8.5 0 1 0 0-17Z M10 9v6 M14 9v6",
|
|
78
112
|
condition: "M12 4l1.8 6.2L20 12l-6.2 1.8L12 20l-1.8-6.2L4 12l6.2-1.8Z",
|
|
79
113
|
};
|
|
@@ -86,7 +120,7 @@ export const cardIcons = {
|
|
|
86
120
|
plain: "M5 5.5a1 1 0 1 1 0 2a1 1 0 1 1 0-2Z M5 11a1 1 0 1 1 0 2a1 1 0 1 1 0-2Z M5 16.5a1 1 0 1 1 0 2a1 1 0 1 1 0-2Z M9 6.5h10.5 M9 12h10.5 M9 17.5h10.5",
|
|
87
121
|
};
|
|
88
122
|
// The icons that point a way, which turn in a language written from right to left.
|
|
89
|
-
const turning = new Set(["send", "undo", "aside"]);
|
|
123
|
+
const turning = new Set(["send", "undo", "aside", "fold"]);
|
|
90
124
|
/** A die's picture, by its sides; nothing for a die the page does not draw. */
|
|
91
125
|
export function DieIcon({ sides, faded }) {
|
|
92
126
|
const drawn = drawnDie(sides);
|
|
@@ -1,49 +1,147 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "preact/jsx-runtime";
|
|
2
2
|
// The Journal section (D-367, D-369, D-371, D-384, D-388): the quests the character knows as a video game's quest log, each with the time left before its deadline at its top, its
|
|
3
|
-
// goals, its counters as bars and its clock with its name, the main ones first and in gold; the
|
|
4
|
-
// small in Scene and Combat
|
|
3
|
+
// goals, its counters as bars and its clock with its name, the main ones first and in gold; the ones the player follows, the main one until they choose, shown
|
|
4
|
+
// small beside the page, or in Scene and Combat on a narrow screen; the story by its scenes, as chapters, the last first, each with what the diary tells of it; the companions'
|
|
5
|
+
// diaries (D-497); and the player's own notes.
|
|
5
6
|
import { useEffect, useRef, useState } from "preact/hooks";
|
|
6
7
|
import { sectionAddress } from "./address.js";
|
|
7
|
-
import { readJournal } from "./api.js";
|
|
8
|
+
import { pictureAddress, readJournal } from "./api.js";
|
|
9
|
+
import { CardHeader, useOpen } from "./card.js";
|
|
10
|
+
import { WidgetCards } from "./extension-widgets.js";
|
|
8
11
|
import { byDateLabel, factLabel, gameDateLabel } from "./game-words.js";
|
|
9
|
-
import { Icon } from "./icons.js";
|
|
12
|
+
import { Icon, iconPath } from "./icons.js";
|
|
10
13
|
import { fieldLabel, phraseLabel, sceneTypeLabel } from "./labels.js";
|
|
14
|
+
import { endedQuests, followedQuests, keptFollowed } from "./layout.js";
|
|
11
15
|
import { placeKinds } from "./map-symbols.js";
|
|
12
|
-
import { Markdown } from "./markdown.js";
|
|
16
|
+
import { knowersOf, Markdown } from "./markdown.js";
|
|
13
17
|
import { Notes } from "./notes.js";
|
|
14
18
|
import { PageHead } from "./pages.js";
|
|
15
19
|
import { useChoice, useKeptText } from "./prefs.js";
|
|
20
|
+
import { PageTabs } from "./tabs.js";
|
|
16
21
|
import { arrowStep, t } from "./text.js";
|
|
17
22
|
// The tab the player last chose, kept in this browser.
|
|
18
|
-
const tabChoice = { key: "rpg-engine.journal-tab", initial: "quests", values: ["quests", "story", "notes"] };
|
|
19
|
-
|
|
23
|
+
const tabChoice = { key: "rpg-engine.journal-tab", initial: "quests", values: ["quests", "story", "companions", "notes"] };
|
|
24
|
+
/** The Journal: the tab the player last chose, or the one the address says, as #/journal/story, and a chapter in the story, as #/journal/story/3. */
|
|
25
|
+
export function JournalView({ version, campaign, tab: asked, item }) {
|
|
20
26
|
const journal = useJournal(version);
|
|
21
|
-
const [
|
|
27
|
+
const [chosen, setTab] = useChoice(tabChoice);
|
|
22
28
|
const [followed, setFollowed] = useFollowed(campaign, journal.read?.quests);
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
// The companions' tab only once one of them has written: a diary no one keeps shows nothing.
|
|
30
|
+
const shown = tabChoice.values.filter((value) => value !== "companions" || (journal.read?.thoughts?.length ?? 0) > 0);
|
|
31
|
+
const tab = shown.includes(chosen) ? chosen : tabChoice.initial;
|
|
32
|
+
// A tab the address says becomes the one chosen.
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
if (asked !== undefined && tabChoice.values.includes(asked)) {
|
|
35
|
+
setTab(asked);
|
|
29
36
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
}, [asked]);
|
|
38
|
+
// A chapter the address says, as the calendar's scenes lead to, brought into view once the story is read.
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
const chapter = item === undefined || tab !== "story" ? null : document.querySelector(`.chapter[data-number="${CSS.escape(item)}"]`);
|
|
41
|
+
chapter?.scrollIntoView({ block: "center" });
|
|
42
|
+
chapter?.focus({ preventScroll: true });
|
|
43
|
+
}, [item, tab, journal.read !== undefined]);
|
|
44
|
+
return (_jsxs("section", { class: "journal", "aria-labelledby": "journal-title", children: [_jsx(PageHead, { section: "journal", id: "journal-title" }), _jsx(PageTabs, { section: "journal", label: t("Journal"), chosen: tab, tabs: shown.map((key) => ({ key, name: tabName(key) })), onChoose: setTab }), _jsxs("div", { id: "journal-panel", role: "tabpanel", "aria-labelledby": `journal-tab-${tab}`, children: [journal.problem !== undefined && _jsx("p", { class: "journal-problem", role: "alert", children: journal.problem }), journal.read !== undefined && tab === "quests" && _jsx(QuestLog, { quests: journal.read.quests, followed: followed, onFollow: setFollowed }), journal.read !== undefined && tab === "story" && _jsx(Story, { chapters: journal.read.chapters, now: journal.read.now }), journal.read !== undefined && tab === "companions" && _jsx(Diaries, { thoughts: journal.read.thoughts ?? [] }), tab === "notes" && _jsx(Notes, { version: version }), journal.read === undefined && journal.problem === undefined && journal.done && tab !== "notes" && _jsx("p", { class: "journal-none", children: t("The journal starts with the player character.") })] }), _jsx(WidgetCards, { place: "page", page: "journal" })] }));
|
|
36
45
|
}
|
|
37
|
-
/**
|
|
38
|
-
|
|
46
|
+
/**
|
|
47
|
+
* The quests the player follows (D-369), the main ones first, then the others, each group in the order they were followed. Beside the page one card, as a video
|
|
48
|
+
* game's quest tracker, that closes to its header: for each its mark, its name, its next goal, its clock and time left, with no command; a click opens it where
|
|
49
|
+
* it stands into its goals, done ones ticked, and a button that stops following it. On a narrow screen a strip for each, in the same order, at the top of Scene
|
|
50
|
+
* and Combat. A quest done or failed leaves by itself, told by QuestEndings.
|
|
51
|
+
*/
|
|
52
|
+
export function FollowedQuests({ version, campaign, beside = false }) {
|
|
39
53
|
const journal = useJournal(version);
|
|
40
|
-
const [followed,
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
54
|
+
const [followed, follow] = useFollowed(campaign, journal.read?.quests);
|
|
55
|
+
const quests = followed.flatMap((name) => journal.read?.quests.find((quest) => quest.name === name) ?? []).toSorted((first, second) => Number(second.main) - Number(first.main));
|
|
56
|
+
if (quests.length === 0) {
|
|
43
57
|
return null;
|
|
44
58
|
}
|
|
59
|
+
if (beside) {
|
|
60
|
+
return _jsx(QuestTracker, { quests: quests, onUnfollow: (name) => follow(name, false) });
|
|
61
|
+
}
|
|
62
|
+
return (_jsx("aside", { class: "followed-quests", "aria-label": quests.length === 1 ? t("The quest you follow") : t("The quests you follow"), children: quests.map((quest) => _jsx(FollowedStrip, { quest: quest, onUnfollow: () => follow(quest.name, false) }, quest.name)) }));
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* A followed quest done or failed while the page is open, told for a few seconds as it leaves the quests followed: the full star in the gold of quests, or the
|
|
66
|
+
* empty one in grey; over the page, in sight while it scrolls, or beside it over the quests' card. A screen reader hears it once; a quest that ended before the
|
|
67
|
+
* page read the journal is never told.
|
|
68
|
+
*/
|
|
69
|
+
export function QuestEndings({ version, campaign, beside = false }) {
|
|
70
|
+
const journal = useJournal(version);
|
|
71
|
+
const [followed] = useFollowed(campaign, journal.read?.quests);
|
|
72
|
+
const before = useRef();
|
|
73
|
+
const [endings, setEndings] = useState([]);
|
|
74
|
+
const [told, setTold] = useState("");
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
const quests = journal.read?.quests;
|
|
77
|
+
if (quests === undefined) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
const last = before.current;
|
|
81
|
+
before.current = { campaign, names: followed };
|
|
82
|
+
const ended = last === undefined || last.campaign !== campaign ? [] : endedQuests(last.names, quests);
|
|
83
|
+
if (ended.length === 0) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const at = Date.now();
|
|
87
|
+
setEndings((shown) => [...shown.filter((ending) => !ended.some((quest) => quest.name === ending.name)), ...ended.map((quest) => ({ name: quest.name, done: quest.status === "done", at }))]);
|
|
88
|
+
setTold(ended.map((quest) => endingWords(quest.name, quest.status === "done")).join(" "));
|
|
89
|
+
}, [journal.read, followed.join("\n"), campaign]);
|
|
90
|
+
// Each stays its time, then folds away; the words a screen reader heard go with the last.
|
|
91
|
+
useEffect(() => {
|
|
92
|
+
if (endings.length === 0) {
|
|
93
|
+
setTold("");
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const timers = endings.map((ending) => window.setTimeout(() => setEndings((shown) => (ending.leaving ? shown.filter((one) => one !== ending) : shown.map((one) => (one === ending ? { ...one, leaving: true } : one)))), ending.leaving ? endingFold : Math.max(0, ending.at + endingTime - Date.now())));
|
|
97
|
+
return () => timers.forEach((timer) => window.clearTimeout(timer));
|
|
98
|
+
}, [endings]);
|
|
99
|
+
return (_jsxs(_Fragment, { children: [_jsx("p", { class: "visually-hidden", role: "status", children: told }), endings.length > 0 && (_jsx("div", { class: beside ? "quest-endings beside" : "quest-endings", children: endings.map((ending) => (_jsxs("p", { class: ["notice", "quest-ended", ending.done ? "done" : "failed", ending.leaving ? "leaving" : ""].join(" ").trim(), children: [_jsx(Star, {}), _jsx("span", { children: _jsx(NamedWords, { words: endingWords(ending.name, ending.done), name: ending.name }) })] }, `${ending.name} ${ending.at}`))) }))] }));
|
|
100
|
+
}
|
|
101
|
+
// How long an ended quest is told, and how long it takes to fold away (the CSS's --short).
|
|
102
|
+
const endingTime = 8000;
|
|
103
|
+
const endingFold = 250;
|
|
104
|
+
function endingWords(quest, done) {
|
|
105
|
+
return done ? t("Quest completed: {quest}", { quest }) : t("Quest failed: {quest}", { quest });
|
|
106
|
+
}
|
|
107
|
+
/** A sentence with a name of the game in it, the name bold and kept apart from the page's direction. */
|
|
108
|
+
function NamedWords({ words, name }) {
|
|
109
|
+
const at = words.indexOf(name);
|
|
110
|
+
if (at < 0) {
|
|
111
|
+
return _jsx(_Fragment, { children: words });
|
|
112
|
+
}
|
|
113
|
+
return (_jsxs(_Fragment, { children: [words.slice(0, at), _jsx("bdi", { children: _jsx("b", { children: name }) }), words.slice(at + name.length)] }));
|
|
114
|
+
}
|
|
115
|
+
/** The card of the quests followed, beside the page: a line for each, which opens where it stands; the way to the Journal in its header. */
|
|
116
|
+
function QuestTracker({ quests, onUnfollow }) {
|
|
117
|
+
const [open, toggle] = useOpen("Quests followed");
|
|
118
|
+
return (_jsxs("section", { class: "quest-tracker", "aria-labelledby": "tracker-title", children: [_jsxs("details", { class: "table-card", open: open, children: [_jsx(CardHeader, { icon: iconPath("journal"), title: _jsx("h2", { id: "tracker-title", children: t("Quests") }), preview: quests.map((quest) => quest.name).join(" · "), open: open, onToggle: toggle }), _jsx("ul", { class: "tracker-list", children: quests.map((quest) => _jsx(TrackedQuest, { quest: quest, onUnfollow: () => onUnfollow(quest.name) }, quest.name)) })] }), _jsx("a", { class: "icon-button tracker-journal tip-left", href: sectionAddress("journal"), "aria-label": t("Journal"), "data-tip": t("Journal"), children: _jsx(Icon, { name: "journal" }) })] }));
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* A followed quest on the table: its mark, main or not; its name, the button that opens it into its goals, open or closed as the player left it, and while
|
|
122
|
+
* closed its next goal; its clock and time left; open, its goals and the button that stops following it.
|
|
123
|
+
*/
|
|
124
|
+
function TrackedQuest({ quest, onUnfollow }) {
|
|
125
|
+
const [open, toggle] = useOpen(`Quest ${quest.name}`, false, false);
|
|
45
126
|
const next = quest.goals.find((goal) => !goal.done);
|
|
46
|
-
|
|
127
|
+
const id = `tracked-${quest.name.replace(/[^\p{L}\p{N}]+/gu, "-")}`;
|
|
128
|
+
const kind = quest.main ? t("Main") : t("Side quest");
|
|
129
|
+
return (_jsxs("li", { class: open ? "tracked open" : "tracked", children: [_jsx("span", { class: "tracked-mark", role: "img", "aria-label": kind, "data-tip": kind, children: _jsx("svg", { class: quest.main ? "main" : undefined, viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { d: questFlag }) }) }), _jsxs("button", { type: "button", class: "tracked-what", "aria-expanded": open, "aria-controls": id, onClick: toggle, children: [_jsx("span", { class: "followed-name", children: quest.name }), !open && next !== undefined && _jsx("span", { class: "followed-next", children: plainText(next.text) })] }), _jsxs("span", { class: "tracked-time", children: [quest.clock !== undefined && _jsx(ClockTip, { clock: quest.clock }), quest.deadline !== undefined && _jsx(Deadline, { deadline: quest.deadline })] }), open && (_jsxs("div", { class: "tracked-more", id: id, children: [_jsx(Goals, { quest: quest }), _jsx("button", { type: "button", class: "tracked-unfollow", onClick: onUnfollow, children: t("Stop following") })] }))] }));
|
|
130
|
+
}
|
|
131
|
+
/** A quest's clock, small, with its name and count as its tooltip. */
|
|
132
|
+
function ClockTip({ clock }) {
|
|
133
|
+
const label = clockLabel(clock);
|
|
134
|
+
return (_jsx("span", { class: "clock-tip", role: "img", "aria-label": label, "data-tip": label, children: _jsx(ClockFace, { clock: clock, small: true, hidden: true }) }));
|
|
135
|
+
}
|
|
136
|
+
/** One followed quest as a strip, on a narrow screen: its star, which stops following it, its picture, its name and next goal leading to the Journal, its clock and time left. */
|
|
137
|
+
function FollowedStrip({ quest, onUnfollow }) {
|
|
138
|
+
const next = quest.goals.find((goal) => !goal.done);
|
|
139
|
+
return (_jsxs("div", { class: "followed", children: [_jsx("button", { type: "button", class: "followed-star on", "aria-label": t("Follow {quest}", { quest: quest.name }), "aria-pressed": true, onClick: onUnfollow, children: _jsx(Star, {}) }), _jsx(QuestFace, { quest: quest, small: true }), _jsxs("a", { class: "followed-what", href: sectionAddress("journal"), children: [_jsx("span", { class: "followed-name", children: quest.name }), next !== undefined && _jsx("span", { class: "followed-next", children: plainText(next.text) })] }), quest.clock !== undefined && _jsx(ClockFace, { clock: quest.clock, small: true }), quest.deadline !== undefined && _jsx(Deadline, { deadline: quest.deadline })] }));
|
|
140
|
+
}
|
|
141
|
+
/** A quest's goals, done ones ticked; a failed quest's undone ones marked missed. */
|
|
142
|
+
function Goals({ quest }) {
|
|
143
|
+
const open = quest.status === "open";
|
|
144
|
+
return (_jsx("ul", { class: "quest-goals", "aria-label": t("Goals"), children: quest.goals.map((goal, index) => (_jsxs("li", { class: goal.done ? "done" : quest.status === "failed" ? "missed" : undefined, children: [_jsx("span", { class: "quest-tick", "aria-hidden": "true", children: goal.done ? "✓" : quest.status === "failed" ? "–" : "" }), _jsx("span", { children: _jsx(Markdown, { text: goal.text }) }), _jsx("span", { class: "visually-hidden", children: goal.done ? t("done") : open ? t("to do") : t("not done") })] }, index))) }));
|
|
47
145
|
}
|
|
48
146
|
/** The quests in three groups, open ones whole, done and failed ones folded. */
|
|
49
147
|
function QuestLog({ quests, followed, onFollow }) {
|
|
@@ -53,8 +151,8 @@ function QuestLog({ quests, followed, onFollow }) {
|
|
|
53
151
|
if (quests.length === 0) {
|
|
54
152
|
return _jsx("p", { class: "journal-none", children: t("No quests yet: the ones your character takes come here.") });
|
|
55
153
|
}
|
|
56
|
-
const card = (quest) => _jsx(QuestCard, { quest: quest, followed: quest.name
|
|
57
|
-
return (_jsxs("div", { class: "quest-log", children: [_jsxs("h3", { class: "quest-group", children: [t("Active"), " ", _jsx("span", { children: open.length })] }), open.length === 0 ? _jsx("p", { class: "journal-none", children: t("None open now.") }) : _jsx("div", { class: "quest-cards", children: open.map(card) }), done.length > 0 && (_jsxs("details", { class: "quest-folded", children: [_jsxs("summary", { class: "quest-group", children: [t("Completed"), " ", _jsx("span", { children: done.length })] }), _jsx("div", { class: "quest-cards", children: done.map(card) })] })), failed.length > 0 && (_jsxs("details", { class: "quest-folded", children: [_jsxs("summary", { class: "quest-group", children: [t("Failed"), " ", _jsx("span", { children: failed.length })] }), _jsx("div", { class: "quest-cards", children: failed.map(card) })] }))] }));
|
|
154
|
+
const card = (quest) => _jsx(QuestCard, { quest: quest, followed: followed.includes(quest.name), onFollow: onFollow }, quest.name);
|
|
155
|
+
return (_jsxs("div", { class: "quest-log", children: [_jsxs("h3", { class: "eyebrow quest-group", children: [t("Active"), " ", _jsx("span", { children: open.length })] }), open.length === 0 ? _jsx("p", { class: "journal-none", children: t("None open now.") }) : _jsx("div", { class: "quest-cards", children: open.map(card) }), done.length > 0 && (_jsxs("details", { class: "quest-folded", children: [_jsxs("summary", { class: "eyebrow quest-group", children: [t("Completed"), " ", _jsx("span", { children: done.length })] }), _jsx("div", { class: "quest-cards", children: done.map(card) })] })), failed.length > 0 && (_jsxs("details", { class: "quest-folded", children: [_jsxs("summary", { class: "eyebrow quest-group", children: [t("Failed"), " ", _jsx("span", { children: failed.length })] }), _jsx("div", { class: "quest-cards", children: failed.map(card) })] }))] }));
|
|
58
156
|
}
|
|
59
157
|
/** A quest as its card shows it: the star that follows it, its name, its badge and the time left; who gave it, where and by when; its text, goals and measures. */
|
|
60
158
|
function QuestCard({ quest, followed, onFollow }) {
|
|
@@ -65,7 +163,7 @@ function QuestCard({ quest, followed, onFollow }) {
|
|
|
65
163
|
quest.place === undefined ? undefined : t("at {place}", { place: quest.place }),
|
|
66
164
|
quest.deadline === undefined ? undefined : byDateLabel(quest.deadline.date),
|
|
67
165
|
].filter((part) => part !== undefined);
|
|
68
|
-
return (_jsxs("article", { class: ["quest-card", quest.main ? "main" : "", quest.status].filter((name) => name !== "").join(" "), "aria-labelledby": id, children: [_jsxs("header", { class: "quest-cover", children: [_jsx(QuestFace, { quest: quest }), _jsxs("div", { class: "quest-cover-top", children: [open && (_jsx("button", { type: "button", class: followed ? "followed-star on" : "followed-star", "aria-pressed": followed, "aria-label": t("Follow {quest}", { quest: quest.name }), "data-tip": t("
|
|
166
|
+
return (_jsxs("article", { class: ["quest-card", quest.main ? "main" : "", quest.status].filter((name) => name !== "").join(" "), "aria-labelledby": id, children: [_jsxs("header", { class: "quest-cover", children: [_jsx(QuestFace, { quest: quest }), _jsxs("div", { class: "quest-cover-top", children: [open && (_jsx("button", { type: "button", class: followed ? "followed-star on" : "followed-star", "aria-pressed": followed, "aria-label": t("Follow {quest}", { quest: quest.name }), "data-tip": t("Follow {quest}", { quest: quest.name }), onClick: () => onFollow(quest.name, !followed), children: _jsx(Star, {}) })), open && quest.deadline !== undefined && _jsx(Deadline, { deadline: quest.deadline }), quest.main && _jsx("span", { class: "quest-badge", children: t("Main") })] }), _jsx("h4", { class: "quest-name", id: id, title: quest.name, children: quest.name })] }), from.length > 0 && _jsx("p", { class: "quest-from", children: from.join(" · ") }), quest.text !== "" && (_jsx("div", { class: "quest-text", children: _jsx(Markdown, { text: quest.text, secretKnowers: knowersOf(quest.knownBy) }) })), quest.goals.length > 0 && _jsx(Goals, { quest: quest }), (quest.counters.length > 0 || quest.clock !== undefined) && (_jsxs("div", { class: "quest-measures", children: [quest.counters.map((counter) => _jsx(QuestBar, { counter: counter }, counter.field)), quest.clock !== undefined && (_jsxs("span", { class: "quest-clock", children: [_jsx(ClockFace, { clock: quest.clock, hidden: true }), _jsxs("span", { children: [quest.clock.name ?? t("Clock"), " ", quest.clock.value, "/", quest.clock.max] })] }))] }))] }));
|
|
69
167
|
}
|
|
70
168
|
// The mark of a quest whose place has no kind the map draws: a flag.
|
|
71
169
|
const questFlag = "M6 21V3.5 M6 4.5h11l-2.6 4 2.6 4H6";
|
|
@@ -97,13 +195,13 @@ function ClockFace({ clock, small = false, hidden = false }) {
|
|
|
97
195
|
const angle = (index / slices) * 2 * Math.PI - Math.PI / 2;
|
|
98
196
|
return `${centre + radius * Math.cos(angle)} ${centre + radius * Math.sin(angle)}`;
|
|
99
197
|
};
|
|
100
|
-
const label =
|
|
198
|
+
const label = clockLabel(clock);
|
|
101
199
|
return (_jsx("svg", { class: "clock-face", width: size, height: size, viewBox: `0 0 ${size} ${size}`, ...(hidden ? { "aria-hidden": "true" } : { role: "img", "aria-label": label }), children: Array.from({ length: slices }, (_, index) => (_jsx("path", { class: index < filled ? "clock-slice filled" : "clock-slice", d: slices === 1
|
|
102
200
|
? `M ${centre} ${centre - radius} A ${radius} ${radius} 0 1 1 ${centre - 0.01} ${centre - radius} Z`
|
|
103
201
|
: `M ${centre} ${centre} L ${point(index)} A ${radius} ${radius} 0 0 1 ${point(index + 1)} Z` }, index))) }));
|
|
104
202
|
}
|
|
105
203
|
/** The time left before a deadline, as a game's timer: an hourglass and 1d 12h left, red under a day; Time is up once it has come. */
|
|
106
|
-
function Deadline({ deadline }) {
|
|
204
|
+
export function Deadline({ deadline }) {
|
|
107
205
|
const minutes = deadline.minutes;
|
|
108
206
|
const near = minutes !== undefined && minutes < 24 * 60;
|
|
109
207
|
const text = minutes === undefined ? byDateLabel(deadline.date) : minutes <= 0 ? t("Time is up") : durationText(minutes);
|
|
@@ -116,9 +214,32 @@ function Story({ chapters, now }) {
|
|
|
116
214
|
if (chapters.length === 0) {
|
|
117
215
|
return _jsx("p", { class: "journal-none", children: t("The story starts with the first scene.") });
|
|
118
216
|
}
|
|
119
|
-
return (_jsxs("ol", { class: "story", children: [_jsxs("li", { class: "story-mark now", children: [_jsx("b", { children: t("Now") }), now !== undefined && _jsx("span", { children: phraseLabel(gameDateLabel(now)) })] }), chapters.map((chapter, index) => chapter.title === undefined
|
|
217
|
+
return (_jsxs("ol", { class: "story", children: [_jsxs("li", { class: "eyebrow story-mark now", children: [_jsx("b", { children: t("Now") }), now !== undefined && _jsx("span", { children: phraseLabel(gameDateLabel(now)) })] }), chapters.map((chapter, index) => chapter.title === undefined
|
|
120
218
|
? _jsx(Between, { chapter: chapter }, index)
|
|
121
|
-
: (_jsxs("li", { class: ["chapter", chapter.open ? "now" : "", chapter.picture === undefined && placeKinds[chapter.kind ?? ""] === undefined ? "bare" : ""].join(" ").trim(), children: [_jsx(ChapterPicture, { chapter: chapter }), _jsxs("div", { class: "chapter-body", children: [_jsxs("header", { class: "chapter-head", children: [chapter.number !== undefined && _jsx("span", { class: "chapter-number", children: t("Chapter {number}", { number: chapter.number }) }), _jsx("h3", { children: chapter.title }), chapter.open && _jsx("span", { class: "chapter-now", children: t("Now") }), chapter.type !== undefined && _jsx("span", { class: "chapter-type", children: phraseLabel(sceneTypeLabel(chapter.type)) })] }), (chapter.place !== undefined || chapter.date !== undefined) && (_jsx("p", { class: "chapter-when", children: [chapter.place, chapter.date === undefined ? undefined : phraseLabel(gameDateLabel(chapter.date))].filter((part) => part !== undefined).join(" · ") })), chapter.summary !== undefined && _jsx("p", { class: "chapter-summary", children: chapter.summary }), chapter.facts.length > 0 && (_jsxs("details", { class: "chapter-facts", children: [_jsx("summary", { children: chapter.facts.length === 1 ? t("1 thing that happened") : t("{count} things that happened", { count: chapter.facts.length }) }), _jsx(Facts, { facts: chapter.facts })] }))] })] }, index))), _jsx("li", { class: "story-mark start", children: _jsx("b", { children: t("The start") }) })] }));
|
|
219
|
+
: (_jsxs("li", { class: ["chapter", chapter.open ? "now" : "", chapter.picture === undefined && placeKinds[chapter.kind ?? ""] === undefined ? "bare" : ""].join(" ").trim(), "data-number": chapter.number, tabIndex: -1, children: [_jsx(ChapterPicture, { chapter: chapter }), _jsxs("div", { class: "chapter-body", children: [_jsxs("header", { class: "chapter-head", children: [chapter.number !== undefined && _jsx("span", { class: "eyebrow chapter-number", children: t("Chapter {number}", { number: chapter.number }) }), _jsx("h3", { children: chapter.title }), chapter.open && _jsx("span", { class: "chapter-now", children: t("Now") }), chapter.type !== undefined && _jsx("span", { class: "chapter-type", children: phraseLabel(sceneTypeLabel(chapter.type)) })] }), (chapter.place !== undefined || chapter.date !== undefined) && (_jsx("p", { class: "chapter-when", children: [chapter.place, chapter.date === undefined ? undefined : phraseLabel(gameDateLabel(chapter.date))].filter((part) => part !== undefined).join(" · ") })), chapter.summary !== undefined && _jsx("p", { class: "chapter-summary", children: chapter.summary }), chapter.facts.length > 0 && (_jsxs("details", { class: "chapter-facts", children: [_jsx("summary", { children: chapter.facts.length === 1 ? t("1 thing that happened") : t("{count} things that happened", { count: chapter.facts.length }) }), _jsx(Facts, { facts: chapter.facts })] }))] })] }, index))), _jsx("li", { class: "eyebrow story-mark start", children: _jsx("b", { children: t("The start") }) })] }));
|
|
220
|
+
}
|
|
221
|
+
/** The companions' diaries, the last line first, all of them or one companion's (D-497): each line with who wrote it and when, in their own words. */
|
|
222
|
+
function Diaries({ thoughts }) {
|
|
223
|
+
const [who, setWho] = useState(undefined);
|
|
224
|
+
const chips = useRef(null);
|
|
225
|
+
// By name, so a chip never moves when its companion writes again.
|
|
226
|
+
const writers = [...new Set(thoughts.map((thought) => thought.who))].toSorted((first, second) => first.localeCompare(second));
|
|
227
|
+
const chosen = who !== undefined && writers.includes(who) ? who : undefined;
|
|
228
|
+
const lines = thoughts.filter((thought) => chosen === undefined || thought.who === chosen);
|
|
229
|
+
// The chips are one stop of Tab; the arrows go along them, as in the catalog of Packages.
|
|
230
|
+
const chipKey = (event) => {
|
|
231
|
+
const buttons = [...chips.current?.querySelectorAll("button") ?? []];
|
|
232
|
+
const at = buttons.indexOf(event.target);
|
|
233
|
+
const step = arrowStep(event.key, true);
|
|
234
|
+
if (step !== 0 && at >= 0) {
|
|
235
|
+
event.preventDefault();
|
|
236
|
+
const to = buttons[(at + step + buttons.length) % buttons.length];
|
|
237
|
+
to?.focus();
|
|
238
|
+
to?.click();
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
const chip = (one) => (_jsx("button", { type: "button", "aria-pressed": chosen === one, tabIndex: chosen === one ? 0 : -1, onClick: () => setWho(one), children: one ?? t("All") }, one ?? ""));
|
|
242
|
+
return (_jsxs("div", { class: "diaries", children: [writers.length > 1 && (_jsxs("div", { class: "filter-chips", role: "group", "aria-label": t("Companions"), ref: chips, onKeyDown: chipKey, children: [chip(undefined), writers.map(chip)] })), _jsx("ol", { class: "diary-lines", children: lines.map((thought, index) => (_jsxs("li", { children: [_jsxs("p", { class: "diary-when", children: [_jsx("b", { children: thought.who }), thought.date !== undefined && _jsx("span", { children: phraseLabel(gameDateLabel(thought.date)) })] }), _jsx("blockquote", { children: thought.text })] }, index))) })] }));
|
|
122
243
|
}
|
|
123
244
|
/** The picture of a chapter's place, or the mark of its kind on the map's paper, as Saves has them; nothing for a place with neither (D-384). */
|
|
124
245
|
function ChapterPicture({ chapter }) {
|
|
@@ -132,41 +253,74 @@ function ChapterPicture({ chapter }) {
|
|
|
132
253
|
function Between({ chapter }) {
|
|
133
254
|
return (_jsx("li", { class: "chapter between", children: _jsxs("details", { class: "chapter-facts", children: [_jsx("summary", { children: `${t("Between scenes")} · ${chapter.facts.length === 1 ? t("1 thing") : t("{count} things", { count: chapter.facts.length })}` }), _jsx(Facts, { facts: chapter.facts })] }) }));
|
|
134
255
|
}
|
|
135
|
-
/**
|
|
256
|
+
/**
|
|
257
|
+
* The facts of a chapter, the game date written once whenever it changes, as the days in a chat; what the day's upkeep used up together, under its name.
|
|
258
|
+
*/
|
|
136
259
|
function Facts({ facts }) {
|
|
137
260
|
let last;
|
|
138
|
-
return (_jsx("ul", { children: facts.flatMap((
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
|
|
261
|
+
return (_jsx("ul", { children: factRuns(facts).flatMap(({ facts: run, at }) => {
|
|
262
|
+
const date = run[0].date;
|
|
263
|
+
const header = date !== undefined && date !== last ? [_jsx("li", { class: "fact-date", children: phraseLabel(gameDateLabel(date)) }, `date-${at}`)] : [];
|
|
264
|
+
last = date ?? last;
|
|
265
|
+
const upkeep = run[0].kind === "counter" && run[0].upkeep === true;
|
|
266
|
+
return [
|
|
267
|
+
...header,
|
|
268
|
+
upkeep
|
|
269
|
+
? (_jsxs("li", { class: "fact-upkeep", children: [t("The day's upkeep"), _jsx("ul", { children: run.map((fact, index) => _jsx("li", { children: factLabel(fact) }, index)) })] }, at))
|
|
270
|
+
: _jsx("li", { children: factLabel(run[0]) }, at),
|
|
271
|
+
];
|
|
142
272
|
}) }));
|
|
143
273
|
}
|
|
274
|
+
/** The facts in runs: what the day's upkeep wrote at one date together, any other fact alone; each run with where it starts. */
|
|
275
|
+
function factRuns(facts) {
|
|
276
|
+
const upkeep = (fact) => fact?.kind === "counter" && fact.upkeep === true;
|
|
277
|
+
return facts.reduce((runs, fact, at) => {
|
|
278
|
+
const open = runs.at(-1);
|
|
279
|
+
const joins = open !== undefined && upkeep(fact) && upkeep(open.facts[0]) && open.facts[0].date === fact.date;
|
|
280
|
+
return joins ? [...runs.slice(0, -1), { ...open, facts: [...open.facts, fact] }] : [...runs, { facts: [fact], at }];
|
|
281
|
+
}, []);
|
|
282
|
+
}
|
|
144
283
|
function Star() {
|
|
145
284
|
return (_jsx("svg", { class: "star", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { d: "M12 3.2l2.6 5.5 6 .8-4.4 4.1 1.1 6-5.3-2.9-5.3 2.9 1.1-6L3.4 9.5l6-.8Z" }) }));
|
|
146
285
|
}
|
|
286
|
+
// The journal of the campaign's last version, read once for all that show it: the quests followed, how they end, the Journal itself.
|
|
287
|
+
let journalRead;
|
|
147
288
|
/** The journal, read again whenever the campaign changes; only the last reading counts. */
|
|
148
289
|
function useJournal(version) {
|
|
149
290
|
const [state, setState] = useState({ done: false });
|
|
150
291
|
const reads = useRef(0);
|
|
151
292
|
useEffect(() => {
|
|
152
293
|
const reading = ++reads.current;
|
|
153
|
-
void
|
|
294
|
+
void journalOf(version).then((read) => reading === reads.current && setState({ read, done: true }), (error) => reading === reads.current && setState({ problem: error instanceof Error ? error.message : String(error), done: true }));
|
|
154
295
|
}, [version]);
|
|
155
296
|
return state;
|
|
156
297
|
}
|
|
298
|
+
/** The journal of a version of the campaign, read once; a reading that failed is tried again by the next that asks. */
|
|
299
|
+
function journalOf(version) {
|
|
300
|
+
if (journalRead?.version === version) {
|
|
301
|
+
return journalRead.read;
|
|
302
|
+
}
|
|
303
|
+
const read = readJournal();
|
|
304
|
+
journalRead = { version, read };
|
|
305
|
+
read.catch(() => {
|
|
306
|
+
if (journalRead?.read === read) {
|
|
307
|
+
journalRead = undefined;
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
return read;
|
|
311
|
+
}
|
|
157
312
|
/**
|
|
158
|
-
* The
|
|
159
|
-
* chose none.
|
|
313
|
+
* The quests the player follows in this campaign, kept in this browser (D-369), in the order they were followed; until they choose, the main open quest, or the
|
|
314
|
+
* only open one; none once they chose none. A list kept by an older page, a name alone, is read as it was.
|
|
160
315
|
*/
|
|
161
316
|
function useFollowed(campaign, quests) {
|
|
162
317
|
const [kept, keep] = useKeptText(`rpg-engine.followed-quest.${campaign ?? ""}`);
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
return [kept === undefined ? usual : kept === "" ? undefined : kept, (name) => keep(name ?? "")];
|
|
318
|
+
const followed = followedQuests(kept, quests ?? []);
|
|
319
|
+
return [followed, (name, follow) => keep(keptFollowed(followed, name, follow))];
|
|
166
320
|
}
|
|
167
|
-
/** A
|
|
168
|
-
function
|
|
169
|
-
return
|
|
321
|
+
/** A clock's name and count, as a screen reader and a tooltip say it. */
|
|
322
|
+
function clockLabel(clock) {
|
|
323
|
+
return `${clock.name ?? t("Clock")}: ${t("{value} of {max}", { value: clock.value, max: clock.max })}`;
|
|
170
324
|
}
|
|
171
325
|
/** "1d 12h", "3h 20m", "45m": time in the game's days, hours and minutes. */
|
|
172
326
|
function durationText(minutes) {
|
|
@@ -184,5 +338,5 @@ function plainText(text) {
|
|
|
184
338
|
}
|
|
185
339
|
/** A tab's name in the page's language. */
|
|
186
340
|
function tabName(tab) {
|
|
187
|
-
return tab === "quests" ? t("Quests") : tab === "story" ? t("Story") : t("Notes");
|
|
341
|
+
return tab === "quests" ? t("Quests") : tab === "story" ? t("Story") : tab === "companions" ? t("Companions") : t("Notes");
|
|
188
342
|
}
|
package/dist/dashboard/labels.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
// Labels from the names of the fields, in English (D-273): "hit-dice-d8" reads "hit dice d8", "str-save" "STR save"; names in the campaign's language come later.
|
|
2
|
-
import { systemWord, t } from "./text.js";
|
|
2
|
+
import { isolated, numberText, systemWord, t, timeText } from "./text.js";
|
|
3
3
|
// The dice the page has a picture of: the d% as 100, the coin as 2.
|
|
4
4
|
const drawnDice = [2, 4, 6, 8, 10, 12, 20, 100];
|
|
5
5
|
/** A field's name as a label: its words apart, in capitals the short ones that name a field, such as str or ac, and those of two letters without a vowel, such as hp. */
|
|
6
6
|
export function fieldLabel(field, fields = new Set()) {
|
|
7
7
|
return systemWord("fields", field) ?? words(field).map((word) => (isShortName(word, fields) ? word.toUpperCase() : word)).join(" ");
|
|
8
8
|
}
|
|
9
|
+
/** A field's name in full, as a roll says it: the system's long name where its label is short, as Charisma for CHA; else its label. */
|
|
10
|
+
export function rollLabel(field, fields = new Set()) {
|
|
11
|
+
return systemWord("names", field) ?? phraseLabel(fieldLabel(field, fields));
|
|
12
|
+
}
|
|
9
13
|
/**
|
|
10
14
|
* The dice of a notation, by their sides, with how many of each, in the order they come: 2d20kh1+5 is two d20, 1d20+1d4+3 a d20 and a d4, d% a d% (100), 4dF
|
|
11
15
|
* four dF; numbers alone are not dice.
|
|
@@ -84,9 +88,22 @@ export function notationModifier(notation) {
|
|
|
84
88
|
const match = /([+-]\d+)$/.exec(notation.replace(/\s+/g, ""));
|
|
85
89
|
return match === null ? 0 : Number(match[1]);
|
|
86
90
|
}
|
|
87
|
-
/**
|
|
88
|
-
|
|
89
|
-
|
|
91
|
+
/**
|
|
92
|
+
* A number as it reads in the page's language: −1 with a minus sign rather than a hyphen, 4,2 m with the Italian comma; a field whose kind is duration, as 3m
|
|
93
|
+
* of the engine, in words: 3 minuti.
|
|
94
|
+
*/
|
|
95
|
+
export function shownText(text, kind) {
|
|
96
|
+
const time = kind === "duration" ? durationText(text) : undefined;
|
|
97
|
+
if (time !== undefined) {
|
|
98
|
+
return time;
|
|
99
|
+
}
|
|
100
|
+
// A number then a word of the system, as a weapon's 1d6+2 bludgeoning, says the word in the campaign's language (playtest 15).
|
|
101
|
+
const tail = /^(.*\d)\s+(\D+)$/.exec(text);
|
|
102
|
+
const tailWord = tail === null ? undefined : systemWord("words", tail[2]);
|
|
103
|
+
const said = systemWord("words", text) ?? (tail === null || tailWord === undefined ? text : `${tail[1]} ${tailWord}`);
|
|
104
|
+
// A decimal as the engine writes it, at most two digits, with the language's mark and its digits kept: 1.000 written by hand is a thousand, never 1.
|
|
105
|
+
const mark = numberText(1.5).replace(/\d/g, "");
|
|
106
|
+
return said.replace(/(?<![\w.])(\d+)\.(\d{1,2})(?![\w.])/g, `$1${mark}$2`).replace(/(^|[\s(])-(?=\d)/g, "$1−");
|
|
90
107
|
}
|
|
91
108
|
/** Dice as they read: 1d20−1 with a minus sign rather than a hyphen. */
|
|
92
109
|
export function shownNotation(notation) {
|
|
@@ -100,6 +117,17 @@ export function initials(name) {
|
|
|
100
117
|
export function nameHue(name) {
|
|
101
118
|
return [...name].reduce((hash, character) => (hash * 31 + (character.codePointAt(0) ?? 0)) % 360, 7);
|
|
102
119
|
}
|
|
120
|
+
/** A duration as the engine writes it, 1h 30m or 30s, in the page's words: 1 ora 30 minuti; undefined for any other text. */
|
|
121
|
+
function durationText(text) {
|
|
122
|
+
const units = { d: "day", h: "hour", m: "minute", s: "second" };
|
|
123
|
+
const parts = text.split(" ").map((part) => /^(\d+)([dhms])$/.exec(part));
|
|
124
|
+
const order = parts.map((part) => (part === null ? -1 : "dhms".indexOf(part[2])));
|
|
125
|
+
if (parts.some((part) => part === null) || order.some((place, index) => index > 0 && place <= order[index - 1])) {
|
|
126
|
+
return undefined;
|
|
127
|
+
}
|
|
128
|
+
// Isolated by its first letter: words of a language written from right to left keep its order inside a number's box, which reads left to right.
|
|
129
|
+
return isolated(parts.map((part) => (part === null ? "" : timeText(Number(part[1]), units[part[2]]))).join(" "));
|
|
130
|
+
}
|
|
103
131
|
function words(field) {
|
|
104
132
|
return field.split("-").filter((word) => word !== "");
|
|
105
133
|
}
|
|
@@ -165,7 +193,9 @@ export function settingLabel(name) {
|
|
|
165
193
|
style: t("In your words"),
|
|
166
194
|
dice: t("Dice"),
|
|
167
195
|
units: t("Units"),
|
|
196
|
+
voices: t("Character voices"),
|
|
168
197
|
pictures: t("Pictures"),
|
|
198
|
+
effort: t("Master's thinking"),
|
|
169
199
|
lines: t("Lines"),
|
|
170
200
|
veils: t("Veils"),
|
|
171
201
|
language: t("Language"),
|
|
@@ -206,6 +236,10 @@ export function valueLabel(value) {
|
|
|
206
236
|
metric: t("Metric"),
|
|
207
237
|
imperial: t("Imperial"),
|
|
208
238
|
none: t("None"),
|
|
239
|
+
low: t("Low"),
|
|
240
|
+
medium: t("Medium"),
|
|
241
|
+
high: t("High"),
|
|
242
|
+
app: t("Your app decides"),
|
|
209
243
|
"on request": t("On request"),
|
|
210
244
|
"new elements": t("New places, quests and those you meet"),
|
|
211
245
|
"made with the player": t("Made with the player"),
|
|
@@ -221,6 +255,10 @@ export function valueLabel(value) {
|
|
|
221
255
|
mystery: t("Mystery"),
|
|
222
256
|
"on the fly": t("On the fly"),
|
|
223
257
|
"all at the start": t("All at the start"),
|
|
258
|
+
auto: t("Sometimes"),
|
|
259
|
+
master: t("The master"),
|
|
260
|
+
important: t("Main characters"),
|
|
261
|
+
always: t("Everyone"),
|
|
224
262
|
};
|
|
225
263
|
return labels[value] ?? itemLabel(value);
|
|
226
264
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// The languages the player may choose for the game (D-394): every language the master can play in, each named in its own words and in the page's by the
|
|
2
2
|
// browser; a code not listed can still be written. Those the page is written in come first.
|
|
3
|
-
import { pageLanguages } from "./text.js";
|
|
3
|
+
import { foldedText, pageLanguages } from "./text.js";
|
|
4
4
|
// The languages of the list, by code: ISO 639-1, with the regional variants that read differently.
|
|
5
5
|
const codes = [
|
|
6
6
|
"af",
|
|
@@ -140,5 +140,5 @@ function capitalized(name, code) {
|
|
|
140
140
|
return name.charAt(0).toLocaleUpperCase(code) + name.slice(1);
|
|
141
141
|
}
|
|
142
142
|
function plain(text) {
|
|
143
|
-
return text
|
|
143
|
+
return foldedText(text).trim();
|
|
144
144
|
}
|
package/dist/dashboard/layout.js
CHANGED
|
@@ -51,6 +51,25 @@ export function columnsByHeight(heights, count) {
|
|
|
51
51
|
return shortest;
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* The quests the player follows (D-369), as a video game tracks them: those open of the names this browser kept, in the order they were followed, or of the one
|
|
56
|
+
* name an older page kept; until the player chooses, the main open quest or the only open one; none once they chose none.
|
|
57
|
+
*/
|
|
58
|
+
export function followedQuests(kept, quests) {
|
|
59
|
+
const open = quests.filter((quest) => quest.status === "open");
|
|
60
|
+
const usual = open.find((quest) => quest.main)?.name ?? (open.length === 1 ? open[0].name : undefined);
|
|
61
|
+
const names = kept === undefined ? (usual === undefined ? [] : [usual]) : keptNames(kept);
|
|
62
|
+
return [...new Set(names)].filter((name) => open.some((quest) => quest.name === name));
|
|
63
|
+
}
|
|
64
|
+
/** The quests followed at the last reading that are done or failed now, in the order they were followed: each told for a moment before it leaves. */
|
|
65
|
+
export function endedQuests(followedBefore, quests) {
|
|
66
|
+
return followedBefore.flatMap((name) => quests.find((quest) => quest.name === name && quest.status !== "open") ?? []);
|
|
67
|
+
}
|
|
68
|
+
/** What the browser keeps once the player follows a quest or no longer does: the names followed, the new one last, as a list. */
|
|
69
|
+
export function keptFollowed(followed, name, follow) {
|
|
70
|
+
const others = followed.filter((one) => one !== name);
|
|
71
|
+
return JSON.stringify(follow ? [...others, name] : others);
|
|
72
|
+
}
|
|
54
73
|
/**
|
|
55
74
|
* The rolls the page shows (D-302): of those read, the ones of the last half hour since the player last cleared the list, and as many older ones as they asked
|
|
56
75
|
* for; how many older ones the page has read, and whether there are more, read or still in the log, unless the list was cleared before them.
|
|
@@ -92,3 +111,19 @@ function rollTime(roll) {
|
|
|
92
111
|
const time = Date.parse(roll.at);
|
|
93
112
|
return Number.isNaN(time) ? 0 : time;
|
|
94
113
|
}
|
|
114
|
+
/** The names a browser kept: a list, or the one name an older page kept, or none. */
|
|
115
|
+
function keptNames(kept) {
|
|
116
|
+
if (kept === "") {
|
|
117
|
+
return [];
|
|
118
|
+
}
|
|
119
|
+
try {
|
|
120
|
+
const read = JSON.parse(kept);
|
|
121
|
+
if (Array.isArray(read) && read.every((name) => typeof name === "string")) {
|
|
122
|
+
return read;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
// One name, as an older page kept it.
|
|
127
|
+
}
|
|
128
|
+
return [kept];
|
|
129
|
+
}
|