rpg-engine 0.2.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/adventures/index.d.ts +3 -0
- package/dist/adventures/index.js +5 -0
- package/dist/adventures/manifest.d.ts +39 -0
- package/dist/adventures/manifest.js +89 -0
- package/dist/adventures/placement.d.ts +4 -0
- package/dist/adventures/placement.js +14 -0
- package/dist/adventures/source.d.ts +21 -0
- package/dist/adventures/source.js +108 -0
- package/dist/bell-listener.d.ts +9 -0
- package/dist/bell-listener.js +83 -0
- package/dist/campaign/create-campaign.d.ts +3 -2
- package/dist/campaign/create-campaign.js +5 -5
- package/dist/campaign/host-files.d.ts +23 -6
- package/dist/campaign/host-files.js +130 -40
- package/dist/campaign/index.d.ts +2 -2
- package/dist/campaign/index.js +2 -2
- package/dist/campaign/settings.d.ts +43 -3
- package/dist/campaign/settings.js +58 -14
- package/dist/cli.js +10 -1
- package/dist/command-line.js +26 -3
- package/dist/commands/advance.js +6 -2
- package/dist/commands/ask.d.ts +11 -4
- package/dist/commands/ask.js +249 -23
- package/dist/commands/change.d.ts +29 -0
- package/dist/commands/change.js +260 -41
- package/dist/commands/config.d.ts +6 -3
- package/dist/commands/config.js +217 -83
- package/dist/commands/effect.js +38 -9
- package/dist/commands/game-advance.d.ts +11 -2
- package/dist/commands/game-advance.js +22 -7
- package/dist/commands/game-adventures.d.ts +70 -0
- package/dist/commands/game-adventures.js +418 -0
- package/dist/commands/game-bonds.d.ts +9 -0
- package/dist/commands/game-bonds.js +84 -0
- package/dist/commands/game-catalog.d.ts +36 -0
- package/dist/commands/game-catalog.js +122 -0
- package/dist/commands/game-checks.d.ts +17 -0
- package/dist/commands/game-checks.js +128 -0
- package/dist/commands/game-damage.d.ts +18 -0
- package/dist/commands/game-damage.js +74 -0
- package/dist/commands/game-effects.d.ts +5 -0
- package/dist/commands/game-effects.js +2 -2
- package/dist/commands/game-events.js +8 -4
- package/dist/commands/game-experience.js +2 -2
- package/dist/commands/game-extensions.d.ts +8 -1
- package/dist/commands/game-extensions.js +8 -3
- package/dist/commands/game-grid-moves.d.ts +4 -1
- package/dist/commands/game-grid-moves.js +8 -2
- package/dist/commands/game-hit-dice.d.ts +39 -0
- package/dist/commands/game-hit-dice.js +120 -0
- package/dist/commands/game-import.d.ts +11 -0
- package/dist/commands/game-import.js +154 -0
- package/dist/commands/game-journey.d.ts +6 -2
- package/dist/commands/game-journey.js +17 -6
- package/dist/commands/game-knowledge.d.ts +56 -6
- package/dist/commands/game-knowledge.js +152 -23
- package/dist/commands/game-library.d.ts +112 -0
- package/dist/commands/game-library.js +388 -0
- package/dist/commands/game-limits.d.ts +7 -0
- package/dist/commands/game-limits.js +67 -0
- package/dist/commands/game-master-rolls.d.ts +15 -0
- package/dist/commands/game-master-rolls.js +34 -0
- package/dist/commands/game-mode.js +5 -4
- package/dist/commands/game-moves.d.ts +14 -1
- package/dist/commands/game-moves.js +24 -9
- package/dist/commands/game-recipe-pace.d.ts +6 -0
- package/dist/commands/game-recipe-pace.js +25 -0
- package/dist/commands/game-recipes.js +10 -3
- package/dist/commands/game-reminders.d.ts +3 -3
- package/dist/commands/game-reminders.js +10 -5
- package/dist/commands/game-roads.d.ts +11 -4
- package/dist/commands/game-roads.js +89 -26
- package/dist/commands/game-saves.d.ts +12 -0
- package/dist/commands/game-saves.js +44 -5
- package/dist/commands/game-scene.js +3 -1
- package/dist/commands/game-stacks.d.ts +78 -0
- package/dist/commands/game-stacks.js +198 -0
- package/dist/commands/game-system-code.d.ts +25 -0
- package/dist/commands/game-system-code.js +172 -0
- package/dist/commands/game-tables.d.ts +7 -0
- package/dist/commands/game-tables.js +40 -0
- package/dist/commands/game-thoughts.d.ts +25 -0
- package/dist/commands/game-thoughts.js +57 -0
- package/dist/commands/game-turn-uses.d.ts +33 -0
- package/dist/commands/game-turn-uses.js +137 -0
- package/dist/commands/game-upkeep.d.ts +20 -0
- package/dist/commands/game-upkeep.js +190 -0
- package/dist/commands/game-view-journal.d.ts +14 -1
- package/dist/commands/game-view-journal.js +5 -2
- package/dist/commands/game-view-map.d.ts +3 -0
- package/dist/commands/game-view-map.js +5 -1
- package/dist/commands/game-view-place.d.ts +22 -3
- package/dist/commands/game-view-place.js +61 -24
- package/dist/commands/game-view-world.d.ts +98 -0
- package/dist/commands/game-view-world.js +98 -0
- package/dist/commands/game-voices.d.ts +5 -0
- package/dist/commands/game-voices.js +13 -0
- package/dist/commands/game-widgets.d.ts +66 -0
- package/dist/commands/game-widgets.js +274 -0
- package/dist/commands/game-world.d.ts +8 -1
- package/dist/commands/game-world.js +23 -3
- package/dist/commands/image.js +2 -3
- package/dist/commands/import.d.ts +47 -0
- package/dist/commands/import.js +390 -0
- package/dist/commands/index.js +6 -0
- package/dist/commands/init.js +2 -2
- package/dist/commands/install.js +2 -1
- package/dist/commands/instructions.js +26 -1
- package/dist/commands/mode.js +3 -1
- package/dist/commands/move.d.ts +2 -0
- package/dist/commands/move.js +86 -12
- package/dist/commands/package.d.ts +57 -3
- package/dist/commands/package.js +308 -51
- package/dist/commands/parts.d.ts +3 -0
- package/dist/commands/parts.js +5 -0
- package/dist/commands/problems.js +6 -0
- package/dist/commands/rename.js +3 -0
- package/dist/commands/reveal.js +12 -7
- package/dist/commands/roll.d.ts +6 -0
- package/dist/commands/roll.js +95 -24
- package/dist/commands/route.js +4 -5
- package/dist/commands/rules.d.ts +3 -0
- package/dist/commands/rules.js +38 -6
- package/dist/commands/save.d.ts +1 -1
- package/dist/commands/save.js +2 -2
- package/dist/commands/scene.d.ts +10 -1
- package/dist/commands/scene.js +146 -29
- package/dist/commands/sheet.d.ts +47 -6
- package/dist/commands/sheet.js +179 -33
- package/dist/commands/show.d.ts +33 -0
- package/dist/commands/show.js +19 -2
- package/dist/commands/status.d.ts +9 -3
- package/dist/commands/status.js +59 -17
- package/dist/commands/thoughts.d.ts +11 -0
- package/dist/commands/thoughts.js +54 -0
- package/dist/commands/trade.d.ts +17 -0
- package/dist/commands/trade.js +273 -0
- package/dist/commands/travel.d.ts +2 -0
- package/dist/commands/travel.js +40 -14
- package/dist/commands/validate.js +2 -1
- package/dist/commands/view.d.ts +99 -2
- package/dist/commands/view.js +273 -57
- package/dist/commands/worked-out.d.ts +16 -0
- package/dist/commands/worked-out.js +108 -13
- package/dist/commands/write.d.ts +1 -0
- package/dist/commands/write.js +93 -21
- package/dist/confirm/confirm.d.ts +35 -0
- package/dist/confirm/confirm.js +94 -0
- package/dist/confirm/index.d.ts +1 -0
- package/dist/confirm/index.js +3 -0
- package/dist/core/archive-paths.d.ts +8 -0
- package/dist/core/archive-paths.js +39 -0
- package/dist/core/context.d.ts +127 -5
- package/dist/core/context.js +4 -3
- package/dist/core/download.d.ts +2 -0
- package/dist/core/download.js +31 -0
- package/dist/core/field-kind.d.ts +4 -3
- package/dist/core/field-kind.js +4 -3
- package/dist/core/files.d.ts +10 -0
- package/dist/core/files.js +58 -2
- package/dist/core/formula.d.ts +3 -1
- package/dist/core/formula.js +13 -2
- package/dist/core/progression-rule.d.ts +2 -0
- package/dist/core/version.d.ts +2 -0
- package/dist/core/version.js +7 -0
- package/dist/dashboard/act-names.js +27 -0
- package/dist/dashboard/act-sheet.js +100 -0
- package/dist/dashboard/act-strip.js +49 -0
- package/dist/dashboard/acts.js +140 -0
- package/dist/dashboard/address.js +16 -12
- package/dist/dashboard/api.js +140 -10
- package/dist/dashboard/app.js +370 -41
- package/dist/dashboard/asked.js +297 -19
- package/dist/dashboard/calendar.js +56 -0
- package/dist/dashboard/card.js +13 -12
- package/dist/dashboard/coins.js +13 -0
- package/dist/dashboard/death-save.js +67 -0
- package/dist/dashboard/dice/pool.js +22 -0
- package/dist/dashboard/dice/roller.js +1 -1
- package/dist/dashboard/dice/stage.js +12 -4
- package/dist/dashboard/dice/tray.js +28 -15
- package/dist/dashboard/dying.js +46 -0
- package/dist/dashboard/extension-widgets.js +160 -0
- package/dist/dashboard/game-words.js +33 -4
- package/dist/dashboard/guide/ar.md +105 -100
- package/dist/dashboard/guide/cs.md +111 -106
- package/dist/dashboard/guide/da.md +95 -90
- package/dist/dashboard/guide/de.md +93 -88
- package/dist/dashboard/guide/el.md +110 -105
- package/dist/dashboard/guide/en.md +21 -16
- package/dist/dashboard/guide/es.md +79 -74
- package/dist/dashboard/guide/fi.md +99 -94
- package/dist/dashboard/guide/fr.md +83 -78
- package/dist/dashboard/guide/he.md +109 -104
- package/dist/dashboard/guide/hi.md +103 -98
- package/dist/dashboard/guide/hu.md +113 -108
- package/dist/dashboard/guide/is.md +102 -97
- package/dist/dashboard/guide/it.md +22 -17
- package/dist/dashboard/guide/ja.md +108 -103
- package/dist/dashboard/guide/ko.md +113 -108
- package/dist/dashboard/guide/nb.md +95 -90
- package/dist/dashboard/guide/nl.md +89 -84
- package/dist/dashboard/guide/pl.md +104 -99
- package/dist/dashboard/guide/pt.md +82 -77
- package/dist/dashboard/guide/ro.md +113 -108
- package/dist/dashboard/guide/ru.md +109 -104
- package/dist/dashboard/guide/sv.md +96 -91
- package/dist/dashboard/guide/tr.md +102 -97
- package/dist/dashboard/guide/uk.md +113 -108
- package/dist/dashboard/guide/zh.md +110 -105
- package/dist/dashboard/guide-markdown.js +4 -0
- package/dist/dashboard/help.js +4 -5
- package/dist/dashboard/i18n/ar.json +367 -16
- package/dist/dashboard/i18n/cs.json +367 -16
- package/dist/dashboard/i18n/da.json +367 -16
- package/dist/dashboard/i18n/de.json +367 -16
- package/dist/dashboard/i18n/el.json +367 -16
- package/dist/dashboard/i18n/es.json +367 -16
- package/dist/dashboard/i18n/fi.json +367 -16
- package/dist/dashboard/i18n/fr.json +367 -16
- package/dist/dashboard/i18n/he.json +367 -16
- package/dist/dashboard/i18n/hi.json +367 -16
- package/dist/dashboard/i18n/hu.json +367 -16
- package/dist/dashboard/i18n/is.json +367 -16
- package/dist/dashboard/i18n/it.json +369 -18
- package/dist/dashboard/i18n/ja.json +367 -16
- package/dist/dashboard/i18n/ko.json +367 -16
- package/dist/dashboard/i18n/nb.json +367 -16
- package/dist/dashboard/i18n/nl.json +367 -16
- package/dist/dashboard/i18n/pl.json +367 -16
- package/dist/dashboard/i18n/pt.json +367 -16
- package/dist/dashboard/i18n/ro.json +367 -16
- package/dist/dashboard/i18n/ru.json +367 -16
- package/dist/dashboard/i18n/sv.json +367 -16
- package/dist/dashboard/i18n/tr.json +367 -16
- package/dist/dashboard/i18n/uk.json +367 -16
- package/dist/dashboard/i18n/zh.json +367 -16
- package/dist/dashboard/icons.js +38 -4
- package/dist/dashboard/journal.js +203 -49
- package/dist/dashboard/labels.js +45 -4
- package/dist/dashboard/languages.js +2 -2
- package/dist/dashboard/layout.js +35 -0
- package/dist/dashboard/lore.js +44 -0
- package/dist/dashboard/markdown.js +136 -30
- package/dist/dashboard/master.js +2 -2
- package/dist/dashboard/notes.js +5 -5
- package/dist/dashboard/notices.js +24 -4
- package/dist/dashboard/packages.js +678 -0
- package/dist/dashboard/pages.js +0 -8
- package/dist/dashboard/party.js +17 -4
- package/dist/dashboard/place-map-view.js +47 -9
- package/dist/dashboard/rolls.js +35 -93
- package/dist/dashboard/save-outcome.js +42 -0
- package/dist/dashboard/saves.js +14 -11
- package/dist/dashboard/scene.js +114 -20
- package/dist/dashboard/settings.js +71 -13
- package/dist/dashboard/setup.js +4 -4
- package/dist/dashboard/sheet.js +123 -19
- package/dist/dashboard/spend.js +115 -0
- package/dist/dashboard/status.js +22 -10
- package/dist/dashboard/story.js +6 -6
- package/dist/dashboard/style.css +8047 -3468
- package/dist/dashboard/table.js +145 -0
- package/dist/dashboard/tabs.js +34 -0
- package/dist/dashboard/text.js +19 -1
- package/dist/dashboard/top.js +91 -31
- package/dist/dashboard/turns.js +150 -0
- package/dist/dashboard/widgets.js +21 -14
- package/dist/dashboard/world-calendar.js +101 -0
- package/dist/dashboard/world-lore.js +231 -0
- package/dist/dashboard/world.js +87 -29
- package/dist/dashboard-server.d.ts +10 -1
- package/dist/dashboard-server.js +738 -26
- package/dist/dice/index.d.ts +2 -0
- package/dist/dice/index.js +3 -1
- package/dist/dice/oracle.d.ts +19 -0
- package/dist/dice/oracle.js +22 -0
- package/dist/dice/tables.d.ts +29 -0
- package/dist/dice/tables.js +123 -0
- package/dist/documents/index.d.ts +2 -0
- package/dist/documents/index.js +5 -0
- package/dist/documents/markup.d.ts +10 -0
- package/dist/documents/markup.js +124 -0
- package/dist/documents/ocr.d.ts +9 -0
- package/dist/documents/ocr.js +101 -0
- package/dist/documents/png.d.ts +9 -0
- package/dist/documents/png.js +75 -0
- package/dist/documents/read.d.ts +54 -0
- package/dist/documents/read.js +375 -0
- package/dist/extensions/api.d.ts +91 -9
- package/dist/extensions/extension.d.ts +28 -2
- package/dist/extensions/extension.js +49 -11
- package/dist/extensions/index.d.ts +5 -3
- package/dist/extensions/index.js +4 -2
- package/dist/extensions/packages.d.ts +13 -4
- package/dist/extensions/packages.js +114 -16
- package/dist/extensions/tarball.d.ts +6 -0
- package/dist/extensions/tarball.js +87 -0
- package/dist/extensions/words.d.ts +13 -0
- package/dist/extensions/words.js +42 -0
- package/dist/importer/index.d.ts +1 -0
- package/dist/importer/index.js +3 -0
- package/dist/importer/work.d.ts +132 -0
- package/dist/importer/work.js +306 -0
- package/dist/index.d.ts +3 -1
- package/dist/instructions/index.d.ts +7 -0
- package/dist/instructions/index.js +10 -0
- package/dist/languages/index.d.ts +1 -0
- package/dist/languages/index.js +3 -0
- package/dist/languages/language-pack.d.ts +32 -0
- package/dist/languages/language-pack.js +86 -0
- package/dist/library/books.d.ts +76 -0
- package/dist/library/books.js +378 -0
- package/dist/library/folders.d.ts +11 -0
- package/dist/library/folders.js +70 -0
- package/dist/library/index.d.ts +3 -0
- package/dist/library/index.js +5 -0
- package/dist/library/language.d.ts +2 -0
- package/dist/library/language.js +40 -0
- package/dist/library-reader.d.ts +7 -0
- package/dist/library-reader.js +36 -0
- package/dist/mcp-server.js +90 -7
- package/dist/money/index.d.ts +1 -1
- package/dist/money/index.js +1 -1
- package/dist/money/money.d.ts +6 -0
- package/dist/money/money.js +11 -0
- package/dist/page-words.js +4 -1
- package/dist/pages/check.d.ts +5 -0
- package/dist/pages/check.js +111 -5
- package/dist/pages/containers.d.ts +19 -1
- package/dist/pages/containers.js +50 -7
- package/dist/pages/index.d.ts +8 -5
- package/dist/pages/index.js +8 -5
- package/dist/pages/load.d.ts +11 -0
- package/dist/pages/load.js +69 -0
- package/dist/pages/markdown.d.ts +15 -0
- package/dist/pages/markdown.js +54 -3
- package/dist/pages/page-file.d.ts +2 -0
- package/dist/pages/page-file.js +28 -5
- package/dist/pages/rename-page.js +3 -2
- package/dist/pages/stack-entry.d.ts +47 -0
- package/dist/pages/stack-entry.js +83 -0
- package/dist/pages/stack-writes.d.ts +22 -0
- package/dist/pages/stack-writes.js +128 -0
- package/dist/pages/stacks.d.ts +52 -0
- package/dist/pages/stacks.js +168 -0
- package/dist/pages/standard-fields.js +1 -1
- package/dist/pages/system-pages.d.ts +5 -2
- package/dist/pages/system-pages.js +11 -5
- package/dist/pages/world.d.ts +29 -3
- package/dist/pages/world.js +66 -12
- package/dist/pages/write-page.js +15 -6
- package/dist/pictures/chosen.d.ts +5 -1
- package/dist/pictures/chosen.js +12 -3
- package/dist/pictures/claude.d.ts +3 -1
- package/dist/pictures/claude.js +38 -0
- package/dist/pictures/codex.d.ts +3 -1
- package/dist/pictures/codex.js +32 -0
- package/dist/pictures/helpers.d.ts +10 -0
- package/dist/pictures/helpers.js +53 -6
- package/dist/pictures/index.d.ts +5 -4
- package/dist/pictures/index.js +5 -4
- package/dist/pictures/stop.d.ts +2 -0
- package/dist/pictures/stop.js +18 -0
- package/dist/player-acts.d.ts +27 -0
- package/dist/player-acts.js +56 -0
- package/dist/rules/index.d.ts +1 -0
- package/dist/rules/index.js +3 -1
- package/dist/rules/page-search.d.ts +36 -0
- package/dist/rules/page-search.js +216 -0
- package/dist/rules/search.d.ts +7 -0
- package/dist/rules/search.js +2 -2
- package/dist/scene/scene.d.ts +2 -0
- package/dist/scene/scene.js +1 -0
- package/dist/systems/game-system.d.ts +161 -4
- package/dist/systems/game-system.js +237 -34
- package/dist/systems/index.d.ts +3 -1
- package/dist/systems/index.js +3 -1
- package/dist/systems/system-code.d.ts +97 -0
- package/dist/systems/system-code.js +62 -0
- package/dist/systems/system-folders.d.ts +11 -0
- package/dist/systems/system-folders.js +11 -0
- package/dist/systems/words.d.ts +2 -0
- package/dist/systems/words.js +3 -3
- package/instructions/author.md +1 -1
- package/instructions/buttons-physical-dice.md +1 -1
- package/instructions/buttons.md +1 -1
- package/instructions/character.md +15 -0
- package/instructions/combat.md +3 -1
- package/instructions/core.md +5 -5
- package/instructions/dashboard.md +4 -4
- package/instructions/import.md +14 -0
- package/instructions/mentor-hints.md +1 -1
- package/instructions/party.md +11 -0
- package/instructions/play.md +6 -6
- package/instructions/session-zero.md +1 -1
- package/instructions/setup.md +1 -1
- package/instructions/voices-always.md +1 -0
- package/instructions/voices-important.md +1 -0
- package/instructions/voices.md +14 -0
- package/package.json +7 -3
- package/systems/5e/LICENSE.md +1 -1
- package/systems/5e/dist/dying.js +193 -0
- package/systems/5e/dist/index.js +3 -0
- package/systems/5e/images/abacus.svg +1 -0
- package/systems/5e/images/acid-tube.svg +1 -0
- package/systems/5e/images/animal-hide.svg +1 -0
- package/systems/5e/images/anvil.svg +1 -0
- package/systems/5e/images/arrow-cluster.svg +1 -0
- package/systems/5e/images/backpack.svg +1 -0
- package/systems/5e/images/bagpipes.svg +1 -0
- package/systems/5e/images/barbed-spear.svg +1 -0
- package/systems/5e/images/barrel.svg +1 -0
- package/systems/5e/images/basket.svg +1 -0
- package/systems/5e/images/battle-axe.svg +1 -0
- package/systems/5e/images/beer-horn.svg +1 -0
- package/systems/5e/images/belt-buckles.svg +1 -0
- package/systems/5e/images/bird-scepter.svg +1 -0
- package/systems/5e/images/blanket.svg +1 -0
- package/systems/5e/images/book-cover.svg +1 -0
- package/systems/5e/images/boots.svg +1 -0
- package/systems/5e/images/bottle-vapors.svg +1 -0
- package/systems/5e/images/bow-arrow.svg +1 -0
- package/systems/5e/images/bowl-spiral.svg +1 -0
- package/systems/5e/images/bracer.svg +1 -0
- package/systems/5e/images/broadsword.svg +1 -0
- package/systems/5e/images/broom.svg +1 -0
- package/systems/5e/images/bullets.svg +1 -0
- package/systems/5e/images/caltrops.svg +1 -0
- package/systems/5e/images/camp-cooking-pot.svg +1 -0
- package/systems/5e/images/campfire.svg +1 -0
- package/systems/5e/images/camping-tent.svg +1 -0
- package/systems/5e/images/candle-flame.svg +1 -0
- package/systems/5e/images/candle-light.svg +1 -0
- package/systems/5e/images/canoe.svg +1 -0
- package/systems/5e/images/cape.svg +1 -0
- package/systems/5e/images/caravel.svg +1 -0
- package/systems/5e/images/card-pick.svg +1 -0
- package/systems/5e/images/chain-mail.svg +1 -0
- package/systems/5e/images/chained-arrow-heads.svg +1 -0
- package/systems/5e/images/chariot.svg +1 -0
- package/systems/5e/images/chest.svg +1 -0
- package/systems/5e/images/chisel.svg +1 -0
- package/systems/5e/images/claw-hammer.svg +1 -0
- package/systems/5e/images/colombian-statue.svg +1 -0
- package/systems/5e/images/cooking-pot.svg +1 -0
- package/systems/5e/images/crescent-staff.svg +1 -0
- package/systems/5e/images/crossbow.svg +1 -0
- package/systems/5e/images/crossed-chains.svg +1 -0
- package/systems/5e/images/crowbar.svg +1 -0
- package/systems/5e/images/crystal-ball.svg +1 -0
- package/systems/5e/images/crystal-cluster.svg +1 -0
- package/systems/5e/images/crystal-eye.svg +1 -0
- package/systems/5e/images/cubes.svg +1 -0
- package/systems/5e/images/dart.svg +1 -0
- package/systems/5e/images/dice-six-faces-five.svg +1 -0
- package/systems/5e/images/dragon-orb.svg +1 -0
- package/systems/5e/images/drakkar.svg +1 -0
- package/systems/5e/images/drum.svg +1 -0
- package/systems/5e/images/empty-wood-bucket-handle.svg +1 -0
- package/systems/5e/images/eye-shield.svg +1 -0
- package/systems/5e/images/fairy-wand.svg +1 -0
- package/systems/5e/images/feather.svg +1 -0
- package/systems/5e/images/feathered-wing.svg +1 -0
- package/systems/5e/images/fire-bottle.svg +1 -0
- package/systems/5e/images/fire-gem.svg +1 -0
- package/systems/5e/images/first-aid-kit.svg +1 -0
- package/systems/5e/images/fishing-hook.svg +1 -0
- package/systems/5e/images/fishing-net.svg +1 -0
- package/systems/5e/images/fishing-pole.svg +1 -0
- package/systems/5e/images/fist.svg +1 -0
- package/systems/5e/images/flail.svg +1 -0
- package/systems/5e/images/flanged-mace.svg +1 -0
- package/systems/5e/images/flat-hammer.svg +1 -0
- package/systems/5e/images/flint-spark.svg +1 -0
- package/systems/5e/images/floating-crystal.svg +1 -0
- package/systems/5e/images/flute.svg +1 -0
- package/systems/5e/images/galleon.svg +1 -0
- package/systems/5e/images/gauntlet.svg +1 -0
- package/systems/5e/images/gem-necklace.svg +1 -0
- package/systems/5e/images/gem-pendant.svg +1 -0
- package/systems/5e/images/gems.svg +1 -0
- package/systems/5e/images/gladius.svg +1 -0
- package/systems/5e/images/glaive.svg +1 -0
- package/systems/5e/images/glass-ball.svg +1 -0
- package/systems/5e/images/gloves.svg +1 -0
- package/systems/5e/images/gold-scarab.svg +1 -0
- package/systems/5e/images/grain-bundle.svg +1 -0
- package/systems/5e/images/halberd.svg +1 -0
- package/systems/5e/images/hand-saw.svg +1 -0
- package/systems/5e/images/handheld-fan.svg +1 -0
- package/systems/5e/images/harp.svg +1 -0
- package/systems/5e/images/hatchet.svg +1 -0
- package/systems/5e/images/headband-knot.svg +1 -0
- package/systems/5e/images/health-potion.svg +1 -0
- package/systems/5e/images/heart-bottle.svg +1 -0
- package/systems/5e/images/herbs-bundle.svg +1 -0
- package/systems/5e/images/hole-ladder.svg +1 -0
- package/systems/5e/images/holy-symbol.svg +1 -0
- package/systems/5e/images/holy-water.svg +1 -0
- package/systems/5e/images/honey-jar.svg +1 -0
- package/systems/5e/images/hood.svg +1 -0
- package/systems/5e/images/horseshoe.svg +1 -0
- package/systems/5e/images/hourglass.svg +1 -0
- package/systems/5e/images/hunting-horn.svg +1 -0
- package/systems/5e/images/jester-hat.svg +1 -0
- package/systems/5e/images/jug.svg +1 -0
- package/systems/5e/images/katana.svg +1 -0
- package/systems/5e/images/key-lock.svg +1 -0
- package/systems/5e/images/kitchen-scale.svg +1 -0
- package/systems/5e/images/knapsack.svg +1 -0
- package/systems/5e/images/ladder.svg +1 -0
- package/systems/5e/images/lantern.svg +1 -0
- package/systems/5e/images/leather-armor.svg +1 -0
- package/systems/5e/images/leather-boot.svg +1 -0
- package/systems/5e/images/leather-vest.svg +1 -0
- package/systems/5e/images/light-backpack.svg +1 -0
- package/systems/5e/images/light-helm.svg +1 -0
- package/systems/5e/images/locked-box.svg +1 -0
- package/systems/5e/images/locked-fortress.svg +1 -0
- package/systems/5e/images/lockpicks.svg +1 -0
- package/systems/5e/images/lunar-wand.svg +1 -0
- package/systems/5e/images/lyre.svg +1 -0
- package/systems/5e/images/magic-lamp.svg +1 -0
- package/systems/5e/images/magnifying-glass.svg +1 -0
- package/systems/5e/images/mail-shirt.svg +1 -0
- package/systems/5e/images/manacles.svg +1 -0
- package/systems/5e/images/marbles.svg +1 -0
- package/systems/5e/images/meat.svg +1 -0
- package/systems/5e/images/medal.svg +1 -0
- package/systems/5e/images/mirror-mirror.svg +1 -0
- package/systems/5e/images/mountain-climbing.svg +1 -0
- package/systems/5e/images/oil-can.svg +1 -0
- package/systems/5e/images/old-lantern.svg +1 -0
- package/systems/5e/images/old-wagon.svg +1 -0
- package/systems/5e/images/orb-wand.svg +1 -0
- package/systems/5e/images/oyster-pearl.svg +1 -0
- package/systems/5e/images/paint-brush.svg +1 -0
- package/systems/5e/images/painted-pottery.svg +1 -0
- package/systems/5e/images/palette.svg +1 -0
- package/systems/5e/images/paper.svg +1 -0
- package/systems/5e/images/pencil.svg +1 -0
- package/systems/5e/images/perfume-bottle.svg +1 -0
- package/systems/5e/images/pilgrim-hat.svg +1 -0
- package/systems/5e/images/pipes.svg +1 -0
- package/systems/5e/images/plain-arrow.svg +1 -0
- package/systems/5e/images/plain-dagger.svg +1 -0
- package/systems/5e/images/poison-bottle.svg +1 -0
- package/systems/5e/images/powder-bag.svg +1 -0
- package/systems/5e/images/prayer-beads.svg +1 -0
- package/systems/5e/images/pulley-hook.svg +1 -0
- package/systems/5e/images/quill-ink.svg +1 -0
- package/systems/5e/images/quill.svg +1 -0
- package/systems/5e/images/quiver.svg +1 -0
- package/systems/5e/images/red-carpet.svg +1 -0
- package/systems/5e/images/ring.svg +1 -0
- package/systems/5e/images/ringing-bell.svg +1 -0
- package/systems/5e/images/robe.svg +1 -0
- package/systems/5e/images/rope-coil.svg +1 -0
- package/systems/5e/images/round-bottom-flask.svg +1 -0
- package/systems/5e/images/round-potion.svg +1 -0
- package/systems/5e/images/rune-stone.svg +1 -0
- package/systems/5e/images/saddle.svg +1 -0
- package/systems/5e/images/scale-mail.svg +1 -0
- package/systems/5e/images/scroll-unfurled.svg +1 -0
- package/systems/5e/images/secret-book.svg +1 -0
- package/systems/5e/images/sewing-needle.svg +1 -0
- package/systems/5e/images/shield.svg +1 -0
- package/systems/5e/images/shirt-button.svg +1 -0
- package/systems/5e/images/sickle.svg +1 -0
- package/systems/5e/images/siege-ram.svg +1 -0
- package/systems/5e/images/skull-staff.svg +1 -0
- package/systems/5e/images/sleeping-bag.svg +1 -0
- package/systems/5e/images/sling.svg +1 -0
- package/systems/5e/images/slippers.svg +1 -0
- package/systems/5e/images/small-fishing-sailboat.svg +1 -0
- package/systems/5e/images/smoking-orb.svg +1 -0
- package/systems/5e/images/soap.svg +1 -0
- package/systems/5e/images/spade.svg +1 -0
- package/systems/5e/images/sparkling-sabre.svg +1 -0
- package/systems/5e/images/spell-book.svg +1 -0
- package/systems/5e/images/spiked-armor.svg +1 -0
- package/systems/5e/images/spiked-mace.svg +1 -0
- package/systems/5e/images/spikes.svg +1 -0
- package/systems/5e/images/spinning-wheel.svg +1 -0
- package/systems/5e/images/spyglass.svg +1 -0
- package/systems/5e/images/steampunk-goggles.svg +1 -0
- package/systems/5e/images/stone-block.svg +1 -0
- package/systems/5e/images/stone-pile.svg +1 -0
- package/systems/5e/images/stone-sphere.svg +1 -0
- package/systems/5e/images/straight-pipe.svg +1 -0
- package/systems/5e/images/swap-bag.svg +1 -0
- package/systems/5e/images/thor-hammer.svg +1 -0
- package/systems/5e/images/thrown-spear.svg +1 -0
- package/systems/5e/images/tiara.svg +1 -0
- package/systems/5e/images/tied-scroll.svg +1 -0
- package/systems/5e/images/tinker.svg +1 -0
- package/systems/5e/images/torch.svg +1 -0
- package/systems/5e/images/totem.svg +1 -0
- package/systems/5e/images/trap-mask.svg +1 -0
- package/systems/5e/images/treasure-map.svg +1 -0
- package/systems/5e/images/tribal-pendant.svg +1 -0
- package/systems/5e/images/trident.svg +1 -0
- package/systems/5e/images/two-handed-sword.svg +1 -0
- package/systems/5e/images/vial.svg +1 -0
- package/systems/5e/images/violin.svg +1 -0
- package/systems/5e/images/war-axe.svg +1 -0
- package/systems/5e/images/war-pick.svg +1 -0
- package/systems/5e/images/warhammer.svg +1 -0
- package/systems/5e/images/water-bottle.svg +1 -0
- package/systems/5e/images/waterskin.svg +1 -0
- package/systems/5e/images/wavy-chains.svg +1 -0
- package/systems/5e/images/wax-seal.svg +1 -0
- package/systems/5e/images/wheelbarrow.svg +1 -0
- package/systems/5e/images/whip.svg +1 -0
- package/systems/5e/images/whistle.svg +1 -0
- package/systems/5e/images/wing-cloak.svg +1 -0
- package/systems/5e/images/winged-scepter.svg +1 -0
- package/systems/5e/images/wizard-staff.svg +1 -0
- package/systems/5e/images/wolf-trap.svg +1 -0
- package/systems/5e/images/wood-canoe.svg +1 -0
- package/systems/5e/images/wood-club.svg +1 -0
- package/systems/5e/instructions/import.md +1 -0
- package/systems/5e/instructions/play.md +6 -0
- package/systems/5e/instructions/session-zero.md +1 -1
- package/systems/5e/package.json +11 -0
- package/systems/5e/system.yaml +231 -31
- package/systems/5e/words/ar.yaml +74 -0
- package/systems/5e/words/cs.yaml +74 -0
- package/systems/5e/words/da.yaml +74 -0
- package/systems/5e/words/de.yaml +74 -0
- package/systems/5e/words/el.yaml +74 -0
- package/systems/5e/words/en.yaml +20 -0
- package/systems/5e/words/es.yaml +74 -0
- package/systems/5e/words/fi.yaml +74 -0
- package/systems/5e/words/fr.yaml +74 -0
- package/systems/5e/words/he.yaml +74 -0
- package/systems/5e/words/hi.yaml +74 -0
- package/systems/5e/words/hu.yaml +74 -0
- package/systems/5e/words/is.yaml +74 -0
- package/systems/5e/words/it.yaml +84 -1
- package/systems/5e/words/ja.yaml +74 -0
- package/systems/5e/words/ko.yaml +74 -0
- package/systems/5e/words/nb.yaml +74 -0
- package/systems/5e/words/nl.yaml +74 -0
- package/systems/5e/words/pl.yaml +74 -0
- package/systems/5e/words/pt.yaml +74 -0
- package/systems/5e/words/ro.yaml +74 -0
- package/systems/5e/words/ru.yaml +74 -0
- package/systems/5e/words/sv.yaml +74 -0
- package/systems/5e/words/tr.yaml +74 -0
- package/systems/5e/words/uk.yaml +74 -0
- package/systems/5e/words/zh.yaml +74 -0
- package/systems/5e/world/creatures/Aboleth.md +1 -0
- package/systems/5e/world/creatures/Adult Black Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Blue Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Brass Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Bronze Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Copper Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Gold Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Green Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Red Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Silver Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult White Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Black Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Blue Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Brass Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Bronze Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Copper Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Gold Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Green Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Red Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Silver Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient White Dragon.md +2 -0
- package/systems/5e/world/creatures/Androsphinx.md +1 -0
- package/systems/5e/world/creatures/Dwarf.md +1 -0
- package/systems/5e/world/creatures/Gynosphinx.md +1 -0
- package/systems/5e/world/creatures/Kraken.md +1 -0
- package/systems/5e/world/creatures/Lich.md +2 -0
- package/systems/5e/world/creatures/Mummy Lord.md +1 -0
- package/systems/5e/world/creatures/Solar.md +1 -0
- package/systems/5e/world/creatures/Tarrasque.md +2 -0
- package/systems/5e/world/creatures/Unicorn.md +1 -0
- package/systems/5e/world/creatures/Vampire.md +2 -0
- package/systems/5e/world/items/Abacus.md +1 -0
- package/systems/5e/world/items/Acid.md +1 -0
- package/systems/5e/world/items/Adamantine Armor.md +1 -0
- package/systems/5e/world/items/Alchemist's Fire.md +1 -0
- package/systems/5e/world/items/Alchemist's Supplies.md +1 -0
- package/systems/5e/world/items/Ammunition, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Amulet of Health.md +2 -0
- package/systems/5e/world/items/Amulet of Proof against Detection and Location.md +1 -0
- package/systems/5e/world/items/Amulet of the Planes.md +1 -0
- package/systems/5e/world/items/Amulet.md +1 -0
- package/systems/5e/world/items/Animated Shield.md +1 -0
- package/systems/5e/world/items/Antitoxin.md +1 -0
- package/systems/5e/world/items/Apparatus of the Crab.md +1 -0
- package/systems/5e/world/items/Armor of Invulnerability.md +2 -0
- package/systems/5e/world/items/Armor of Resistance.md +1 -0
- package/systems/5e/world/items/Armor of Vulnerability.md +1 -0
- package/systems/5e/world/items/Armor, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Arrow of Slaying.md +1 -0
- package/systems/5e/world/items/Arrow-Catching Shield.md +1 -0
- package/systems/5e/world/items/Arrows.md +2 -0
- package/systems/5e/world/items/Backpack.md +1 -0
- package/systems/5e/world/items/Bag of Beans.md +1 -0
- package/systems/5e/world/items/Bag of Devouring.md +1 -0
- package/systems/5e/world/items/Bag of Holding.md +3 -0
- package/systems/5e/world/items/Bag of Tricks.md +1 -0
- package/systems/5e/world/items/Bagpipes.md +1 -0
- package/systems/5e/world/items/Ball Bearings.md +1 -0
- package/systems/5e/world/items/Barding.md +1 -0
- package/systems/5e/world/items/Barrel.md +1 -0
- package/systems/5e/world/items/Basic Poison.md +1 -0
- package/systems/5e/world/items/Basket.md +1 -0
- package/systems/5e/world/items/Battleaxe.md +1 -0
- package/systems/5e/world/items/Bead of Force.md +1 -0
- package/systems/5e/world/items/Bedroll.md +1 -0
- package/systems/5e/world/items/Bell.md +1 -0
- package/systems/5e/world/items/Belt of Dwarvenkind.md +1 -0
- package/systems/5e/world/items/Belt of Giant Strength.md +1 -0
- package/systems/5e/world/items/Berserker Axe.md +1 -0
- package/systems/5e/world/items/Bit and Bridle.md +1 -0
- package/systems/5e/world/items/Blanket.md +1 -0
- package/systems/5e/world/items/Block and Tackle.md +1 -0
- package/systems/5e/world/items/Blowgun Needles.md +2 -0
- package/systems/5e/world/items/Blowgun.md +1 -0
- package/systems/5e/world/items/Book.md +1 -0
- package/systems/5e/world/items/Boots of Elvenkind.md +1 -0
- package/systems/5e/world/items/Boots of Levitation.md +1 -0
- package/systems/5e/world/items/Boots of Speed.md +1 -0
- package/systems/5e/world/items/Boots of Striding and Springing.md +1 -0
- package/systems/5e/world/items/Boots of the Winterlands.md +2 -0
- package/systems/5e/world/items/Bowl of Commanding Water Elementals.md +1 -0
- package/systems/5e/world/items/Bracers of Archery.md +1 -0
- package/systems/5e/world/items/Bracers of Defense.md +1 -0
- package/systems/5e/world/items/Brazier of Commanding Fire Elementals.md +1 -0
- package/systems/5e/world/items/Breastplate.md +1 -0
- package/systems/5e/world/items/Brewer's Supplies.md +1 -0
- package/systems/5e/world/items/Brooch of Shielding.md +2 -0
- package/systems/5e/world/items/Broom of Flying.md +1 -0
- package/systems/5e/world/items/Bucket.md +1 -0
- package/systems/5e/world/items/Bullseye Lantern.md +1 -0
- package/systems/5e/world/items/Burglar's Pack.md +3 -0
- package/systems/5e/world/items/Calligrapher's Supplies.md +1 -0
- package/systems/5e/world/items/Caltrops.md +1 -0
- package/systems/5e/world/items/Candle of Invocation.md +1 -0
- package/systems/5e/world/items/Candle.md +1 -0
- package/systems/5e/world/items/Cape of the Mountebank.md +1 -0
- package/systems/5e/world/items/Carpenter's Tools.md +1 -0
- package/systems/5e/world/items/Carpet of Flying.md +1 -0
- package/systems/5e/world/items/Carriage.md +1 -0
- package/systems/5e/world/items/Cart.md +1 -0
- package/systems/5e/world/items/Cartographer's Tools.md +1 -0
- package/systems/5e/world/items/Censer of Controlling Air Elementals.md +1 -0
- package/systems/5e/world/items/Chain Mail.md +2 -0
- package/systems/5e/world/items/Chain Shirt.md +1 -0
- package/systems/5e/world/items/Chain.md +1 -0
- package/systems/5e/world/items/Chalk.md +1 -0
- package/systems/5e/world/items/Chariot.md +1 -0
- package/systems/5e/world/items/Chest.md +1 -0
- package/systems/5e/world/items/Chime of Opening.md +1 -0
- package/systems/5e/world/items/Circlet of Blasting.md +1 -0
- package/systems/5e/world/items/Climber's Kit.md +1 -0
- package/systems/5e/world/items/Cloak of Arachnida.md +2 -0
- package/systems/5e/world/items/Cloak of Displacement.md +1 -0
- package/systems/5e/world/items/Cloak of Elvenkind.md +1 -0
- package/systems/5e/world/items/Cloak of Protection.md +3 -0
- package/systems/5e/world/items/Cloak of the Bat.md +1 -0
- package/systems/5e/world/items/Cloak of the Manta Ray.md +1 -0
- package/systems/5e/world/items/Club.md +1 -0
- package/systems/5e/world/items/Cobbler's Tools.md +1 -0
- package/systems/5e/world/items/Common Clothes.md +1 -0
- package/systems/5e/world/items/Component Pouch.md +1 -0
- package/systems/5e/world/items/Cook's Utensils.md +1 -0
- package/systems/5e/world/items/Costume Clothes.md +1 -0
- package/systems/5e/world/items/Crossbow Bolt Case.md +1 -0
- package/systems/5e/world/items/Crossbow Bolts.md +2 -0
- package/systems/5e/world/items/Crowbar.md +1 -0
- package/systems/5e/world/items/Crystal Ball.md +1 -0
- package/systems/5e/world/items/Crystal.md +1 -0
- package/systems/5e/world/items/Cube of Force.md +2 -0
- package/systems/5e/world/items/Cubic Gate.md +2 -0
- package/systems/5e/world/items/Dagger of Venom.md +1 -0
- package/systems/5e/world/items/Dagger.md +1 -0
- package/systems/5e/world/items/Dancing Sword.md +1 -0
- package/systems/5e/world/items/Dart.md +1 -0
- package/systems/5e/world/items/Decanter of Endless Water.md +1 -0
- package/systems/5e/world/items/Deck of Illusions.md +1 -0
- package/systems/5e/world/items/Deck of Many Things.md +1 -0
- package/systems/5e/world/items/Defender.md +1 -0
- package/systems/5e/world/items/Demon Armor.md +1 -0
- package/systems/5e/world/items/Dice Set.md +1 -0
- package/systems/5e/world/items/Dimensional Shackles.md +1 -0
- package/systems/5e/world/items/Diplomat's Pack.md +3 -0
- package/systems/5e/world/items/Disguise Kit.md +1 -0
- package/systems/5e/world/items/Dragon Scale Mail.md +1 -0
- package/systems/5e/world/items/Dragon Slayer.md +1 -0
- package/systems/5e/world/items/Drum.md +1 -0
- package/systems/5e/world/items/Dulcimer.md +1 -0
- package/systems/5e/world/items/Dungeoneer's Pack.md +3 -0
- package/systems/5e/world/items/Dust of Disappearance.md +1 -0
- package/systems/5e/world/items/Dust of Dryness.md +1 -0
- package/systems/5e/world/items/Dust of Sneezing and Choking.md +1 -0
- package/systems/5e/world/items/Dwarven Plate.md +1 -0
- package/systems/5e/world/items/Dwarven Thrower.md +1 -0
- package/systems/5e/world/items/Efficient Quiver.md +1 -0
- package/systems/5e/world/items/Efreeti Bottle.md +1 -0
- package/systems/5e/world/items/Elemental Gem.md +1 -0
- package/systems/5e/world/items/Elven Chain.md +1 -0
- package/systems/5e/world/items/Emblem.md +1 -0
- package/systems/5e/world/items/Entertainer's Pack.md +3 -0
- package/systems/5e/world/items/Eversmoking Bottle.md +1 -0
- package/systems/5e/world/items/Exotic Saddle.md +1 -0
- package/systems/5e/world/items/Explorer's Pack.md +3 -0
- package/systems/5e/world/items/Eyes of Charming.md +1 -0
- package/systems/5e/world/items/Eyes of Minute Seeing.md +1 -0
- package/systems/5e/world/items/Eyes of the Eagle.md +1 -0
- package/systems/5e/world/items/Feather Token.md +1 -0
- package/systems/5e/world/items/Feed.md +1 -0
- package/systems/5e/world/items/Figurine of Wondrous Power.md +1 -0
- package/systems/5e/world/items/Fine Clothes.md +1 -0
- package/systems/5e/world/items/Fishing Tackle.md +1 -0
- package/systems/5e/world/items/Flail.md +1 -0
- package/systems/5e/world/items/Flame Tongue.md +1 -0
- package/systems/5e/world/items/Flask or Tankard.md +1 -0
- package/systems/5e/world/items/Flute.md +1 -0
- package/systems/5e/world/items/Folding Boat.md +1 -0
- package/systems/5e/world/items/Forgery Kit.md +1 -0
- package/systems/5e/world/items/Frost Brand.md +2 -0
- package/systems/5e/world/items/Galley.md +1 -0
- package/systems/5e/world/items/Gauntlets of Ogre Power.md +2 -0
- package/systems/5e/world/items/Gem of Brightness.md +2 -0
- package/systems/5e/world/items/Gem of Seeing.md +2 -0
- package/systems/5e/world/items/Giant Slayer.md +1 -0
- package/systems/5e/world/items/Glaive.md +1 -0
- package/systems/5e/world/items/Glamoured Studded Leather.md +1 -0
- package/systems/5e/world/items/Glass Bottle.md +1 -0
- package/systems/5e/world/items/Glassblower's Tools.md +1 -0
- package/systems/5e/world/items/Gloves of Missile Snaring.md +1 -0
- package/systems/5e/world/items/Gloves of Swimming and Climbing.md +1 -0
- package/systems/5e/world/items/Goggles of Night.md +1 -0
- package/systems/5e/world/items/Grappling Hook.md +1 -0
- package/systems/5e/world/items/Greataxe.md +1 -0
- package/systems/5e/world/items/Greatclub.md +1 -0
- package/systems/5e/world/items/Greatsword.md +1 -0
- package/systems/5e/world/items/Halberd.md +1 -0
- package/systems/5e/world/items/Half Plate Armor.md +1 -0
- package/systems/5e/world/items/Hammer of Thunderbolts.md +2 -0
- package/systems/5e/world/items/Hammer.md +1 -0
- package/systems/5e/world/items/Hand Crossbow.md +1 -0
- package/systems/5e/world/items/Handaxe.md +1 -0
- package/systems/5e/world/items/Handy Haversack.md +3 -0
- package/systems/5e/world/items/Hat of Disguise.md +1 -0
- package/systems/5e/world/items/Headband of Intellect.md +2 -0
- package/systems/5e/world/items/Healer's Kit.md +1 -0
- package/systems/5e/world/items/Heavy Crossbow.md +1 -0
- package/systems/5e/world/items/Helm of Brilliance.md +1 -0
- package/systems/5e/world/items/Helm of Comprehending Languages.md +1 -0
- package/systems/5e/world/items/Helm of Telepathy.md +1 -0
- package/systems/5e/world/items/Helm of Teleportation.md +2 -0
- package/systems/5e/world/items/Hempen Rope.md +1 -0
- package/systems/5e/world/items/Herbalism Kit.md +1 -0
- package/systems/5e/world/items/Hide Armor.md +1 -0
- package/systems/5e/world/items/Holy Avenger.md +1 -0
- package/systems/5e/world/items/Holy Water.md +1 -0
- package/systems/5e/world/items/Hooded Lantern.md +1 -0
- package/systems/5e/world/items/Horn of Blasting.md +1 -0
- package/systems/5e/world/items/Horn of Valhalla.md +1 -0
- package/systems/5e/world/items/Horn.md +1 -0
- package/systems/5e/world/items/Horseshoes of Speed.md +1 -0
- package/systems/5e/world/items/Horseshoes of a Zephyr.md +1 -0
- package/systems/5e/world/items/Hourglass.md +1 -0
- package/systems/5e/world/items/Hunting Trap.md +1 -0
- package/systems/5e/world/items/Immovable Rod.md +1 -0
- package/systems/5e/world/items/Ink Pen.md +1 -0
- package/systems/5e/world/items/Ink.md +1 -0
- package/systems/5e/world/items/Instant Fortress.md +1 -0
- package/systems/5e/world/items/Ioun Stone.md +1 -0
- package/systems/5e/world/items/Iron Bands of Binding.md +1 -0
- package/systems/5e/world/items/Iron Flask.md +1 -0
- package/systems/5e/world/items/Iron Pot.md +1 -0
- package/systems/5e/world/items/Iron Spikes.md +2 -0
- package/systems/5e/world/items/Javelin of Lightning.md +1 -0
- package/systems/5e/world/items/Javelin.md +1 -0
- package/systems/5e/world/items/Jeweler's Tools.md +1 -0
- package/systems/5e/world/items/Jug or Pitcher.md +1 -0
- package/systems/5e/world/items/Keelboat.md +1 -0
- package/systems/5e/world/items/Ladder.md +1 -0
- package/systems/5e/world/items/Lamp.md +1 -0
- package/systems/5e/world/items/Lance.md +1 -0
- package/systems/5e/world/items/Lantern of Revealing.md +1 -0
- package/systems/5e/world/items/Leather Armor.md +1 -0
- package/systems/5e/world/items/Leatherworker's Tools.md +1 -0
- package/systems/5e/world/items/Light Crossbow.md +1 -0
- package/systems/5e/world/items/Light Hammer.md +1 -0
- package/systems/5e/world/items/Lock.md +1 -0
- package/systems/5e/world/items/Longbow.md +1 -0
- package/systems/5e/world/items/Longship.md +1 -0
- package/systems/5e/world/items/Longsword.md +1 -0
- package/systems/5e/world/items/Luck Blade.md +1 -0
- package/systems/5e/world/items/Lute.md +1 -0
- package/systems/5e/world/items/Lyre.md +1 -0
- package/systems/5e/world/items/Mace of Disruption.md +1 -0
- package/systems/5e/world/items/Mace of Smiting.md +1 -0
- package/systems/5e/world/items/Mace of Terror.md +2 -0
- package/systems/5e/world/items/Mace.md +1 -0
- package/systems/5e/world/items/Magnifying Glass.md +1 -0
- package/systems/5e/world/items/Manacles.md +1 -0
- package/systems/5e/world/items/Mantle of Spell Resistance.md +1 -0
- package/systems/5e/world/items/Manual of Bodily Health.md +1 -0
- package/systems/5e/world/items/Manual of Gainful Exercise.md +1 -0
- package/systems/5e/world/items/Manual of Golems.md +1 -0
- package/systems/5e/world/items/Manual of Quickness of Action.md +1 -0
- package/systems/5e/world/items/Map or Scroll Case.md +1 -0
- package/systems/5e/world/items/Marvelous Pigments.md +1 -0
- package/systems/5e/world/items/Mason's Tools.md +1 -0
- package/systems/5e/world/items/Maul.md +1 -0
- package/systems/5e/world/items/Medallion of Thoughts.md +2 -0
- package/systems/5e/world/items/Merchant's Scale.md +1 -0
- package/systems/5e/world/items/Mess Kit.md +1 -0
- package/systems/5e/world/items/Military Saddle.md +1 -0
- package/systems/5e/world/items/Miner's Pick.md +1 -0
- package/systems/5e/world/items/Mirror of Life Trapping.md +1 -0
- package/systems/5e/world/items/Mithral Armor.md +1 -0
- package/systems/5e/world/items/Morningstar.md +1 -0
- package/systems/5e/world/items/Navigator's Tools.md +1 -0
- package/systems/5e/world/items/Necklace of Adaptation.md +1 -0
- package/systems/5e/world/items/Necklace of Fireballs.md +1 -0
- package/systems/5e/world/items/Necklace of Prayer Beads.md +1 -0
- package/systems/5e/world/items/Net.md +1 -0
- package/systems/5e/world/items/Nine Lives Stealer.md +1 -0
- package/systems/5e/world/items/Oathbow.md +1 -0
- package/systems/5e/world/items/Oil of Etherealness.md +1 -0
- package/systems/5e/world/items/Oil of Sharpness.md +1 -0
- package/systems/5e/world/items/Oil of Slipperiness.md +1 -0
- package/systems/5e/world/items/Oil.md +1 -0
- package/systems/5e/world/items/Orb of Dragonkind.md +2 -0
- package/systems/5e/world/items/Orb.md +1 -0
- package/systems/5e/world/items/Pack Saddle.md +1 -0
- package/systems/5e/world/items/Padded Armor.md +1 -0
- package/systems/5e/world/items/Painter's Supplies.md +1 -0
- package/systems/5e/world/items/Pan Flute.md +1 -0
- package/systems/5e/world/items/Paper.md +1 -0
- package/systems/5e/world/items/Parchment.md +1 -0
- package/systems/5e/world/items/Pearl of Power.md +1 -0
- package/systems/5e/world/items/Perfume.md +1 -0
- package/systems/5e/world/items/Periapt of Health.md +1 -0
- package/systems/5e/world/items/Periapt of Proof against Poison.md +1 -0
- package/systems/5e/world/items/Periapt of Wound Closure.md +1 -0
- package/systems/5e/world/items/Philter of Love.md +1 -0
- package/systems/5e/world/items/Pike.md +1 -0
- package/systems/5e/world/items/Pipes of Haunting.md +1 -0
- package/systems/5e/world/items/Pipes of the Sewers.md +1 -0
- package/systems/5e/world/items/Piton.md +1 -0
- package/systems/5e/world/items/Plate Armor of Etherealness.md +1 -0
- package/systems/5e/world/items/Plate Armor.md +2 -0
- package/systems/5e/world/items/Playing Card Set.md +1 -0
- package/systems/5e/world/items/Poisoner's Kit.md +1 -0
- package/systems/5e/world/items/Pole.md +1 -0
- package/systems/5e/world/items/Portable Hole.md +2 -0
- package/systems/5e/world/items/Portable Ram.md +1 -0
- package/systems/5e/world/items/Potion of Animal Friendship.md +1 -0
- package/systems/5e/world/items/Potion of Clairvoyance.md +1 -0
- package/systems/5e/world/items/Potion of Climbing.md +1 -0
- package/systems/5e/world/items/Potion of Diminution.md +1 -0
- package/systems/5e/world/items/Potion of Flying.md +1 -0
- package/systems/5e/world/items/Potion of Gaseous Form.md +1 -0
- package/systems/5e/world/items/Potion of Giant Strength.md +1 -0
- package/systems/5e/world/items/Potion of Growth.md +1 -0
- package/systems/5e/world/items/Potion of Healing.md +1 -0
- package/systems/5e/world/items/Potion of Heroism.md +1 -0
- package/systems/5e/world/items/Potion of Invisibility.md +1 -0
- package/systems/5e/world/items/Potion of Mind Reading.md +1 -0
- package/systems/5e/world/items/Potion of Poison.md +1 -0
- package/systems/5e/world/items/Potion of Resistance.md +1 -0
- package/systems/5e/world/items/Potion of Speed.md +1 -0
- package/systems/5e/world/items/Potion of Water Breathing.md +1 -0
- package/systems/5e/world/items/Potter's Tools.md +1 -0
- package/systems/5e/world/items/Pouch.md +1 -0
- package/systems/5e/world/items/Priest's Pack.md +3 -0
- package/systems/5e/world/items/Quarterstaff.md +1 -0
- package/systems/5e/world/items/Quiver.md +1 -0
- package/systems/5e/world/items/Rapier.md +1 -0
- package/systems/5e/world/items/Rations.md +1 -0
- package/systems/5e/world/items/Reliquary.md +1 -0
- package/systems/5e/world/items/Restorative Ointment.md +1 -0
- package/systems/5e/world/items/Riding Saddle.md +1 -0
- package/systems/5e/world/items/Ring Mail.md +1 -0
- package/systems/5e/world/items/Ring of Animal Influence.md +2 -0
- package/systems/5e/world/items/Ring of Djinni Summoning.md +1 -0
- package/systems/5e/world/items/Ring of Elemental Command.md +2 -0
- package/systems/5e/world/items/Ring of Evasion.md +2 -0
- package/systems/5e/world/items/Ring of Feather Falling.md +1 -0
- package/systems/5e/world/items/Ring of Free Action.md +1 -0
- package/systems/5e/world/items/Ring of Invisibility.md +1 -0
- package/systems/5e/world/items/Ring of Jumping.md +1 -0
- package/systems/5e/world/items/Ring of Mind Shielding.md +1 -0
- package/systems/5e/world/items/Ring of Protection.md +3 -0
- package/systems/5e/world/items/Ring of Regeneration.md +1 -0
- package/systems/5e/world/items/Ring of Resistance.md +1 -0
- package/systems/5e/world/items/Ring of Shooting Stars.md +2 -0
- package/systems/5e/world/items/Ring of Spell Storing.md +1 -0
- package/systems/5e/world/items/Ring of Spell Turning.md +1 -0
- package/systems/5e/world/items/Ring of Swimming.md +1 -0
- package/systems/5e/world/items/Ring of Telekinesis.md +1 -0
- package/systems/5e/world/items/Ring of Three Wishes.md +1 -0
- package/systems/5e/world/items/Ring of Warmth.md +2 -0
- package/systems/5e/world/items/Ring of Water Walking.md +1 -0
- package/systems/5e/world/items/Ring of X-ray Vision.md +1 -0
- package/systems/5e/world/items/Ring of the Ram.md +2 -0
- package/systems/5e/world/items/Robe of Eyes.md +1 -0
- package/systems/5e/world/items/Robe of Scintillating Colors.md +2 -0
- package/systems/5e/world/items/Robe of Stars.md +1 -0
- package/systems/5e/world/items/Robe of Useful Items.md +1 -0
- package/systems/5e/world/items/Robe of the Archmagi.md +3 -0
- package/systems/5e/world/items/Robes.md +1 -0
- package/systems/5e/world/items/Rod of Absorption.md +1 -0
- package/systems/5e/world/items/Rod of Alertness.md +1 -0
- package/systems/5e/world/items/Rod of Lordly Might.md +1 -0
- package/systems/5e/world/items/Rod of Rulership.md +1 -0
- package/systems/5e/world/items/Rod of Security.md +1 -0
- package/systems/5e/world/items/Rod.md +1 -0
- package/systems/5e/world/items/Rope of Climbing.md +1 -0
- package/systems/5e/world/items/Rope of Entanglement.md +1 -0
- package/systems/5e/world/items/Rowboat.md +1 -0
- package/systems/5e/world/items/Sack.md +1 -0
- package/systems/5e/world/items/Saddlebags.md +1 -0
- package/systems/5e/world/items/Sailing Ship.md +1 -0
- package/systems/5e/world/items/Scale Mail.md +1 -0
- package/systems/5e/world/items/Scarab of Protection.md +2 -0
- package/systems/5e/world/items/Scholar's Pack.md +3 -0
- package/systems/5e/world/items/Scimitar of Speed.md +1 -0
- package/systems/5e/world/items/Scimitar.md +1 -0
- package/systems/5e/world/items/Sealing Wax.md +1 -0
- package/systems/5e/world/items/Shawm.md +1 -0
- package/systems/5e/world/items/Shield of Missile Attraction.md +2 -0
- package/systems/5e/world/items/Shield, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Shield.md +1 -0
- package/systems/5e/world/items/Shortbow.md +1 -0
- package/systems/5e/world/items/Shortsword.md +1 -0
- package/systems/5e/world/items/Shovel.md +1 -0
- package/systems/5e/world/items/Sickle.md +1 -0
- package/systems/5e/world/items/Signal Whistle.md +1 -0
- package/systems/5e/world/items/Signet Ring.md +1 -0
- package/systems/5e/world/items/Silk Rope.md +1 -0
- package/systems/5e/world/items/Sled.md +1 -0
- package/systems/5e/world/items/Sledgehammer.md +1 -0
- package/systems/5e/world/items/Sling Bullets.md +2 -0
- package/systems/5e/world/items/Sling.md +1 -0
- package/systems/5e/world/items/Slippers of Spider Climbing.md +1 -0
- package/systems/5e/world/items/Smith's Tools.md +1 -0
- package/systems/5e/world/items/Soap.md +1 -0
- package/systems/5e/world/items/Sovereign Glue.md +1 -0
- package/systems/5e/world/items/Spear.md +1 -0
- package/systems/5e/world/items/Spell Scroll.md +1 -0
- package/systems/5e/world/items/Spellbook.md +1 -0
- package/systems/5e/world/items/Spellguard Shield.md +1 -0
- package/systems/5e/world/items/Sphere of Annihilation.md +1 -0
- package/systems/5e/world/items/Splint Armor.md +2 -0
- package/systems/5e/world/items/Sprig of Mistletoe.md +1 -0
- package/systems/5e/world/items/Spyglass.md +1 -0
- package/systems/5e/world/items/Staff of Charming.md +1 -0
- package/systems/5e/world/items/Staff of Fire.md +3 -0
- package/systems/5e/world/items/Staff of Frost.md +3 -0
- package/systems/5e/world/items/Staff of Healing.md +2 -0
- package/systems/5e/world/items/Staff of Power.md +5 -0
- package/systems/5e/world/items/Staff of Striking.md +2 -0
- package/systems/5e/world/items/Staff of Swarming Insects.md +2 -0
- package/systems/5e/world/items/Staff of Thunder and Lightning.md +1 -0
- package/systems/5e/world/items/Staff of Withering.md +2 -0
- package/systems/5e/world/items/Staff of the Magi.md +3 -0
- package/systems/5e/world/items/Staff of the Python.md +1 -0
- package/systems/5e/world/items/Staff of the Woodlands.md +2 -0
- package/systems/5e/world/items/Staff.md +1 -0
- package/systems/5e/world/items/Steel Mirror.md +1 -0
- package/systems/5e/world/items/Stone of Controlling Earth Elementals.md +1 -0
- package/systems/5e/world/items/Stone of Good Luck.md +4 -0
- package/systems/5e/world/items/Studded Leather Armor.md +1 -0
- package/systems/5e/world/items/Sun Blade.md +1 -0
- package/systems/5e/world/items/Sword of Life Stealing.md +1 -0
- package/systems/5e/world/items/Sword of Sharpness.md +1 -0
- package/systems/5e/world/items/Sword of Wounding.md +1 -0
- package/systems/5e/world/items/Talisman of Pure Good.md +2 -0
- package/systems/5e/world/items/Talisman of Ultimate Evil.md +2 -0
- package/systems/5e/world/items/Talisman of the Sphere.md +1 -0
- package/systems/5e/world/items/Thieves' Tools.md +1 -0
- package/systems/5e/world/items/Tinderbox.md +1 -0
- package/systems/5e/world/items/Tinker's Tools.md +1 -0
- package/systems/5e/world/items/Tome of Clear Thought.md +1 -0
- package/systems/5e/world/items/Tome of Leadership and Influence.md +1 -0
- package/systems/5e/world/items/Tome of Understanding.md +1 -0
- package/systems/5e/world/items/Torch.md +1 -0
- package/systems/5e/world/items/Totem.md +1 -0
- package/systems/5e/world/items/Traveler's Clothes.md +1 -0
- package/systems/5e/world/items/Trident of Fish Command.md +2 -0
- package/systems/5e/world/items/Trident.md +1 -0
- package/systems/5e/world/items/Two-Person Tent.md +1 -0
- package/systems/5e/world/items/Unarmed Strike.md +1 -0
- package/systems/5e/world/items/Universal Solvent.md +1 -0
- package/systems/5e/world/items/Vial.md +1 -0
- package/systems/5e/world/items/Vicious Weapon.md +1 -0
- package/systems/5e/world/items/Viol.md +1 -0
- package/systems/5e/world/items/Vorpal Sword.md +1 -0
- package/systems/5e/world/items/Wagon.md +1 -0
- package/systems/5e/world/items/Wand of Binding.md +2 -0
- package/systems/5e/world/items/Wand of Enemy Detection.md +2 -0
- package/systems/5e/world/items/Wand of Fear.md +2 -0
- package/systems/5e/world/items/Wand of Fireballs.md +2 -0
- package/systems/5e/world/items/Wand of Lightning Bolts.md +2 -0
- package/systems/5e/world/items/Wand of Magic Detection.md +2 -0
- package/systems/5e/world/items/Wand of Magic Missiles.md +2 -0
- package/systems/5e/world/items/Wand of Paralysis.md +2 -0
- package/systems/5e/world/items/Wand of Polymorph.md +2 -0
- package/systems/5e/world/items/Wand of Secrets.md +2 -0
- package/systems/5e/world/items/Wand of Web.md +2 -0
- package/systems/5e/world/items/Wand of Wonder.md +2 -0
- package/systems/5e/world/items/Wand of the War Mage, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Wand.md +1 -0
- package/systems/5e/world/items/War Pick.md +1 -0
- package/systems/5e/world/items/Warhammer.md +1 -0
- package/systems/5e/world/items/Warship.md +1 -0
- package/systems/5e/world/items/Waterskin.md +1 -0
- package/systems/5e/world/items/Weapon, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Weaver's Tools.md +1 -0
- package/systems/5e/world/items/Well of Many Worlds.md +1 -0
- package/systems/5e/world/items/Whetstone.md +1 -0
- package/systems/5e/world/items/Whip.md +1 -0
- package/systems/5e/world/items/Wind Fan.md +1 -0
- package/systems/5e/world/items/Winged Boots.md +1 -0
- package/systems/5e/world/items/Wings of Flying.md +1 -0
- package/systems/5e/world/items/Woodcarver's Tools.md +1 -0
- package/systems/5e/world/items/Wooden Staff.md +1 -0
- package/systems/5e/world/items/Yew Wand.md +1 -0
- package/systems/free/instructions/play.md +5 -0
- package/systems/free/instructions/session-zero.md +1 -0
- package/systems/free/system.yaml +12 -0
- package/dist/dashboard/combat.js +0 -72
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
import { basename, extname, join, relative, resolve, sep } from "node:path";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { adventureFolderName } from "../adventures/index.js";
|
|
4
|
+
import { changeSetting, readSettings, requireCampaign, storyWays } from "../campaign/index.js";
|
|
5
|
+
import { appendLogEntry } from "../core/log.js";
|
|
6
|
+
import { defineCommand } from "../core/registry.js";
|
|
7
|
+
import { documentAt, readDocument } from "../documents/index.js";
|
|
8
|
+
import { beginOpening, clearOpening, doneImports, dropDocumentText, dropImport, hasImport, importAge, importDate, importedPages, importFile, importFolder, importPiece, importStarts, importStyle, isOwnOpening, markOpening, openImport, openingImport, prepareImport, readImportState, runElsewhere, writeImportState, } from "../importer/index.js";
|
|
9
|
+
import { stopProcess } from "../pictures/index.js";
|
|
10
|
+
import { installedAdventures } from "./game-adventures.js";
|
|
11
|
+
import { isImportRunning, runImport, stopImport, writingState } from "./game-import.js";
|
|
12
|
+
import { campaignMode } from "./game-mode.js";
|
|
13
|
+
import { newDatedLogEntry } from "./game-time.js";
|
|
14
|
+
import { campaignSystem, campaignWorld } from "./game-world.js";
|
|
15
|
+
import { situationPart } from "./parts.js";
|
|
16
|
+
export const importCommand = defineCommand({
|
|
17
|
+
name: "import",
|
|
18
|
+
description: "Make an adventure from the player's own document: a book, a game module or notes, as a PDF, Word, OpenDocument, EPUB, HTML, RTF, text or markdown file, "
|
|
19
|
+
+ "or a folder of them; text, or a PDF whose text can be selected, reads best: a scan is read from its pictures, on Windows only, slowly and with mistakes. "
|
|
20
|
+
+ "A helper on this computer reads it outside the chat, piece after piece, and writes the pages; it takes minutes, and goes on by itself. "
|
|
21
|
+
+ "From a book it proposes three or four starting points: ask the player whether they have read it, let them choose, then give start; the world is then written "
|
|
22
|
+
+ "as it stands there. When it is done, install it with package install. Where no helper is on this computer, it gives you the document a piece at each call, to write its pages with write. Call import alone to see how far it is. Example: document C:\\Users\\me\\Books\\novel.pdf.",
|
|
23
|
+
group: "game",
|
|
24
|
+
positionals: ["document"],
|
|
25
|
+
input: z.object({
|
|
26
|
+
document: z.string().optional().describe("the document's file or folder: its full path, or one from the folder the command runs in"),
|
|
27
|
+
title: z.string().optional().describe("the adventure's title; the document's name when left out"),
|
|
28
|
+
character: z.string().optional().describe("with start, the character of the document the player chose to play, by the name of their page"),
|
|
29
|
+
start: z.preprocess((value) => (typeof value === "string" && /^\d+$/.test(value.trim()) ? Number(value) : value), z.number().int().positive()).optional().describe("the starting point the player chose, by its number"),
|
|
30
|
+
cancel: z.boolean().optional().describe("drop the import under way, and what it wrote; the player's document stays as it is"),
|
|
31
|
+
}),
|
|
32
|
+
async run(input, context) {
|
|
33
|
+
const root = requireCampaign(context.folder);
|
|
34
|
+
const open = openImport(root);
|
|
35
|
+
const opening = openingImport(root);
|
|
36
|
+
if (input.cancel === true) {
|
|
37
|
+
// A document still being opened: its mark goes, and the call that opens it stops there, never making the import (D-491 (11)).
|
|
38
|
+
if (open === undefined && opening !== undefined) {
|
|
39
|
+
clearOpening(root, false);
|
|
40
|
+
const state = { title: opening.title, document: "", pieces: 0, phase: "reading", done: 0 };
|
|
41
|
+
return { title: opening.title, state, adventure: "", running: false, starts: [], pages: {}, cancelled: true };
|
|
42
|
+
}
|
|
43
|
+
if (open === undefined) {
|
|
44
|
+
throw new Error("No import is under way. Nothing changed.");
|
|
45
|
+
}
|
|
46
|
+
await stopRunner(open.folder);
|
|
47
|
+
await stopImport(open.folder);
|
|
48
|
+
dropImport(open.folder);
|
|
49
|
+
appendLogEntry(root, newDatedLogEntry(root, context, "import-cancelled", "hidden", { title: open.state.title }));
|
|
50
|
+
return { ...resultOf(root, open.folder, open.state), cancelled: true };
|
|
51
|
+
}
|
|
52
|
+
if (input.document !== undefined && input.document.trim() !== "") {
|
|
53
|
+
if (open !== undefined || opening !== undefined) {
|
|
54
|
+
const under = open?.state.title ?? opening?.title ?? "";
|
|
55
|
+
throw new Error(`The import of ${under} is under way: finish it, or drop it with cancel, before another. Nothing changed.`);
|
|
56
|
+
}
|
|
57
|
+
return startImport(root, context, resolve(context.folder, input.document.trim()), input.title?.trim());
|
|
58
|
+
}
|
|
59
|
+
if (open === undefined) {
|
|
60
|
+
const installed = new Set(installedAdventures(root).map((adventure) => adventure.title));
|
|
61
|
+
const ready = doneImports(root).find((title) => !installed.has(title));
|
|
62
|
+
if (ready === undefined || input.start !== undefined) {
|
|
63
|
+
throw new Error("No import is under way: give the player's document with document. Nothing changed.");
|
|
64
|
+
}
|
|
65
|
+
const folder = importFolder(root, adventureFolderName(ready));
|
|
66
|
+
return resultOf(root, folder, readImportState(folder));
|
|
67
|
+
}
|
|
68
|
+
if (open.state.inChat === true) {
|
|
69
|
+
return nextPiece(root, context, open.folder, open.state);
|
|
70
|
+
}
|
|
71
|
+
if (input.start !== undefined) {
|
|
72
|
+
chooseStart(root, context, open.folder, open.state, input.start, input.character?.trim() || undefined);
|
|
73
|
+
}
|
|
74
|
+
// A run stopped by a failure, or by a server that was restarted, goes on from where it stopped; the command line waits for it.
|
|
75
|
+
const going = goOn(root, context, open.folder);
|
|
76
|
+
if (context.files === undefined) {
|
|
77
|
+
await going;
|
|
78
|
+
}
|
|
79
|
+
return resultOf(root, open.folder, readImportState(open.folder) ?? open.state);
|
|
80
|
+
},
|
|
81
|
+
// A document read from its pictures is told first, for the master to tell the player before anything else (LIB-4).
|
|
82
|
+
format: (result) => [recognizedText(result.recognized), helperText(result.helper), importText(result)].filter((part) => part !== "").join("\n\n"),
|
|
83
|
+
});
|
|
84
|
+
async function startImport(root, context, document, title) {
|
|
85
|
+
const found = documentAt(document);
|
|
86
|
+
if (found === undefined) {
|
|
87
|
+
throw new Error(`There is no ${document}: give the full path of the player's document. Nothing changed.`);
|
|
88
|
+
}
|
|
89
|
+
const name = title === undefined || title === "" ? basename(document, found === "folder" ? "" : extname(document)) : title;
|
|
90
|
+
const folder = importFolder(root, adventureFolderName(name));
|
|
91
|
+
if (hasImport(folder)) {
|
|
92
|
+
throw new Error(`An import called ${name} is already in the campaign: give another title. Nothing changed.`);
|
|
93
|
+
}
|
|
94
|
+
// The dashboard tells the player the document is being opened, and how far its pages are read from their pictures, while the master waits (D-491 (11)).
|
|
95
|
+
if (!beginOpening(root, name)) {
|
|
96
|
+
throw new Error(`Another document is being opened for an import: wait for it, or drop it with cancel. Nothing changed.`);
|
|
97
|
+
}
|
|
98
|
+
const progress = (done, of) => {
|
|
99
|
+
try {
|
|
100
|
+
markOpening(root, { title: name, pid: process.pid, ocr: { done, of } });
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
// The dashboard misses a step; the reading goes on.
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
const text = await readDocument(document, { ocr: context.ocr, signal: context.signal, progress }).catch((error) => {
|
|
107
|
+
clearOpening(root);
|
|
108
|
+
throw error;
|
|
109
|
+
});
|
|
110
|
+
// Stopped by the player, or dropped with cancel while it was being opened: nothing is made of it.
|
|
111
|
+
if (context.signal?.aborted === true || !isOwnOpening(root)) {
|
|
112
|
+
clearOpening(root);
|
|
113
|
+
throw new Error(`The import of ${name} was stopped before it began. Nothing changed.`);
|
|
114
|
+
}
|
|
115
|
+
clearOpening(root);
|
|
116
|
+
if (text.parts.every((part) => part.text.trim() === "")) {
|
|
117
|
+
const why = context.ocr === undefined ? "a scan is pictures of pages, which it reads only on Windows" : "not even in the pictures of its pages";
|
|
118
|
+
throw new Error(`${basename(document)} has no text the engine can read: ${why}. Nothing changed.`);
|
|
119
|
+
}
|
|
120
|
+
const state = prepareImport(folder, name, document, text);
|
|
121
|
+
// Without a helper, the master reads it here, a piece at each call (D-489 (1)).
|
|
122
|
+
const inChat = context.reader?.ready() !== true;
|
|
123
|
+
appendLogEntry(root, newDatedLogEntry(root, context, "import-started", "hidden", { title: name, document, pieces: state.pieces, ...(inChat ? { inChat } : {}) }));
|
|
124
|
+
const recognized = text.recognized.length === 0 ? {} : { recognized: text.recognized.length };
|
|
125
|
+
if (inChat) {
|
|
126
|
+
writeImportState(folder, { ...state, inChat });
|
|
127
|
+
return { ...nextPiece(root, context, folder, { ...state, inChat }), ...recognized };
|
|
128
|
+
}
|
|
129
|
+
// Asked before the reading, which a program that stops being ready would change.
|
|
130
|
+
const program = context.reader?.program?.() ?? "a helper";
|
|
131
|
+
const going = goOn(root, context, folder);
|
|
132
|
+
if (context.files === undefined) {
|
|
133
|
+
await going;
|
|
134
|
+
}
|
|
135
|
+
return { ...resultOf(root, folder, readImportState(folder) ?? state), pictures: text.pictures.length, ...recognized, helper: program };
|
|
136
|
+
}
|
|
137
|
+
/** The next piece for the master to read in the chat, with the importer's instructions once in a chat; the last one ends the import. */
|
|
138
|
+
function nextPiece(root, context, folder, state) {
|
|
139
|
+
const text = importPiece(folder, state.done);
|
|
140
|
+
const done = state.done + 1;
|
|
141
|
+
const next = { ...state, done, ...(done >= state.pieces ? { phase: "done" } : {}) };
|
|
142
|
+
writeImportState(folder, next);
|
|
143
|
+
// The last piece given, the document's text leaves the campaign (LIB-8).
|
|
144
|
+
if (next.phase === "done") {
|
|
145
|
+
dropDocumentText(folder);
|
|
146
|
+
}
|
|
147
|
+
const instructions = situationPart("import", context, campaignSystem(root, context)).replaceAll("{title}", state.title).replaceAll("{language}", readSettings(root).language ?? "en");
|
|
148
|
+
return { ...resultOf(root, folder, next), piece: { number: done, text, instructions, pictures: join(folder, "document", "pictures") } };
|
|
149
|
+
}
|
|
150
|
+
function chooseStart(root, context, folder, state, start, character) {
|
|
151
|
+
const starts = importStarts(folder);
|
|
152
|
+
if (state.phase !== "choosing") {
|
|
153
|
+
throw new Error(`The import of ${state.title} is ${state.phase}, not waiting for a start. Nothing changed.`);
|
|
154
|
+
}
|
|
155
|
+
if (!starts.some((one) => one.number === start)) {
|
|
156
|
+
throw new Error(`There is no starting point ${start}: choose one of ${starts.map((one) => one.number).join(", ")}. Nothing changed.`);
|
|
157
|
+
}
|
|
158
|
+
writeImportState(folder, writingState(folder, state, start, character));
|
|
159
|
+
appendLogEntry(root, newDatedLogEntry(root, context, "import-start-chosen", "hidden", { title: state.title, start, ...(character === undefined ? {} : { character }) }));
|
|
160
|
+
}
|
|
161
|
+
// The helper's runs, in the background while the MCP server lives on; the command line waits for them.
|
|
162
|
+
function goOn(root, context, folder) {
|
|
163
|
+
const state = readImportState(folder);
|
|
164
|
+
if (context.reader === undefined || state === undefined || state.phase === "choosing" || state.phase === "done") {
|
|
165
|
+
return Promise.resolve();
|
|
166
|
+
}
|
|
167
|
+
// An import.yaml changed by hand has nothing to go on from: only cancel drops it.
|
|
168
|
+
if (state.pieces === 0) {
|
|
169
|
+
return Promise.resolve();
|
|
170
|
+
}
|
|
171
|
+
const elsewhere = runElsewhere(folder) !== undefined;
|
|
172
|
+
if (state.failed !== undefined && !isImportRunning(folder) && !elsewhere) {
|
|
173
|
+
const { failed: _, ...kept } = state;
|
|
174
|
+
writeImportState(folder, kept);
|
|
175
|
+
}
|
|
176
|
+
// In the MCP server the runs go on in a process of their own, which outlives the chat (playtest 18); one at a time.
|
|
177
|
+
if (context.files !== undefined && context.importRunner !== undefined) {
|
|
178
|
+
if (!elsewhere) {
|
|
179
|
+
context.importRunner(root);
|
|
180
|
+
}
|
|
181
|
+
return Promise.resolve();
|
|
182
|
+
}
|
|
183
|
+
const language = readSettings(root).language ?? "en";
|
|
184
|
+
const going = runImport(folder, context.reader, campaignSystem(root, context), language).then(() => {
|
|
185
|
+
const done = readImportState(folder);
|
|
186
|
+
if (done?.phase === "done") {
|
|
187
|
+
appendLogEntry(root, newDatedLogEntry(root, context, "import-done", "hidden", { title: state.title }));
|
|
188
|
+
writeImportState(folder, { ...done, ...followBook(root, context, folder), ...followDate(root, context, folder) });
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
going.catch(() => undefined);
|
|
192
|
+
return going;
|
|
193
|
+
}
|
|
194
|
+
/** Stops the process that runs the import apart, if one does, and waits for it to end, so that its folder can go. */
|
|
195
|
+
async function stopRunner(folder) {
|
|
196
|
+
const pid = runElsewhere(folder);
|
|
197
|
+
if (pid === undefined) {
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
stopProcess(pid);
|
|
201
|
+
for (let waited = 0; waited < 15_000 && runElsewhere(folder) !== undefined; waited += 200) {
|
|
202
|
+
await new Promise((done) => setTimeout(done, 200));
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
function resultOf(root, folder, state) {
|
|
206
|
+
const invented = state.phase === "done" ? importFile(folder, "notes/invented.md") : undefined;
|
|
207
|
+
return {
|
|
208
|
+
title: state.title,
|
|
209
|
+
state,
|
|
210
|
+
adventure: relative(root, join(folder, "adventure")),
|
|
211
|
+
running: isImportRunning(folder) || runElsewhere(folder) !== undefined,
|
|
212
|
+
starts: state.phase === "choosing" ? importStarts(folder) : [],
|
|
213
|
+
pages: Object.fromEntries(Object.entries(importedPages(folder)).map(([type, names]) => [type, names.length])),
|
|
214
|
+
...(invented === undefined || invented === "" ? {} : { invented }),
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* The narration as the book is told (Stefano, 21 October; D-395): its author and how it is built, set when the player has chosen nothing of how the master
|
|
219
|
+
* writes, else left for the master to ask; of the author only their way, never their sentences, as the author setting says.
|
|
220
|
+
*/
|
|
221
|
+
function followBook(root, context, folder) {
|
|
222
|
+
const { author, story } = importStyle(folder);
|
|
223
|
+
if (author === undefined) {
|
|
224
|
+
return {};
|
|
225
|
+
}
|
|
226
|
+
const settings = readSettings(root);
|
|
227
|
+
const built = story !== undefined && storyWays.includes(story) ? story : undefined;
|
|
228
|
+
const chosen = settings.author !== undefined || settings.style !== undefined || (settings.prose !== undefined && settings.prose !== "plain") || settings.story !== undefined;
|
|
229
|
+
if (chosen) {
|
|
230
|
+
return { followed: { author, ...(built === undefined ? {} : { story: built }), set: false } };
|
|
231
|
+
}
|
|
232
|
+
for (const [setting, value] of [["author", author], ["story", built]]) {
|
|
233
|
+
if (value !== undefined && changeSetting(root, setting, value)) {
|
|
234
|
+
appendLogEntry(root, newDatedLogEntry(root, context, "config-changed", "public", { setting, value }));
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return { followed: { author, ...(built === undefined ? {} : { story: built }), set: true } };
|
|
238
|
+
}
|
|
239
|
+
/** The day the book starts on, as the campaign's first day (Stefano, 21 October): set while the campaign has none and is in its setup, else asked. */
|
|
240
|
+
function followDate(root, context, folder) {
|
|
241
|
+
const date = importDate(folder);
|
|
242
|
+
if (date === undefined) {
|
|
243
|
+
return {};
|
|
244
|
+
}
|
|
245
|
+
const settings = readSettings(root);
|
|
246
|
+
if (settings["calendar-start"] !== undefined || campaignMode(root, campaignWorld(root, context)) !== "setup") {
|
|
247
|
+
return settings["calendar-start"] === date ? {} : { dated: { date, set: false } };
|
|
248
|
+
}
|
|
249
|
+
if (changeSetting(root, "calendar-start", date)) {
|
|
250
|
+
appendLogEntry(root, newDatedLogEntry(root, context, "config-changed", "public", { setting: "calendar-start", value: date }));
|
|
251
|
+
}
|
|
252
|
+
return { dated: { date, set: true } };
|
|
253
|
+
}
|
|
254
|
+
/** The import as the master reads it: how far it is, what to tell the player, and what comes next. */
|
|
255
|
+
export function importText(result) {
|
|
256
|
+
const { state } = result;
|
|
257
|
+
const pages = Object.entries(result.pages).map(([type, count]) => `${count} ${type}`).join(", ");
|
|
258
|
+
if (result.cancelled === true) {
|
|
259
|
+
return `The import of ${state.title} is dropped, with what it wrote.`;
|
|
260
|
+
}
|
|
261
|
+
if (result.piece !== undefined) {
|
|
262
|
+
return chatPieceText(state, result.piece);
|
|
263
|
+
}
|
|
264
|
+
if (state.failed !== undefined && !result.running) {
|
|
265
|
+
const said = state.failed.replace(/\.$/, "");
|
|
266
|
+
return `The import of ${state.title} stopped: ${said}.${/call import|cancel/i.test(said) ? "" : " Call import to try again from there."}`;
|
|
267
|
+
}
|
|
268
|
+
if (state.phase === "reading") {
|
|
269
|
+
const minutes = Math.max(1, (state.pieces - state.done) * 4);
|
|
270
|
+
return `Importing ${state.title}: piece ${Math.min(state.done + 1, state.pieces)} of ${state.pieces} being read${result.pictures === undefined ? "" : `, ${result.pictures} pictures found`}; `
|
|
271
|
+
+ `about ${minutes} minutes more, by itself${pages === "" ? "" : `; pages so far: ${pages}`}. Tell the player, then end your turn and go on with them, the setup or the character: never wait for it in your turn; status says when it is ready.`;
|
|
272
|
+
}
|
|
273
|
+
if (state.phase === "choosing") {
|
|
274
|
+
const starts = result.starts.map((start) => `${start.number}. ${start.title}\n${start.text}`).join("\n\n");
|
|
275
|
+
return `${state.title} is read (${pages}). Ask the player whether they have read it; give each start its Back cover lines if not, its Reader line if so, `
|
|
276
|
+
+ `and the character they would play. Then call import with the start they choose and the character they play.\n\n${starts}`;
|
|
277
|
+
}
|
|
278
|
+
if (state.phase === "writing") {
|
|
279
|
+
return `Setting ${state.title} at start ${state.start}: step ${Math.min(state.done + 1, state.steps?.length ?? 1)} of ${state.steps?.length ?? 1}, by itself; `
|
|
280
|
+
+ "status says when it is ready.";
|
|
281
|
+
}
|
|
282
|
+
return `${state.title} is ready: ${pages}, in ${result.adventure}. Install it with package install "${result.adventure}" when the story reaches it, at the setup if it is the start. `
|
|
283
|
+
+ "What its pages say of the world stays so: find before you invent, and invent only where they are silent."
|
|
284
|
+
+ (result.invented === undefined ? "" : `\nTell the player what was invented to fill the gaps:\n${result.invented}`)
|
|
285
|
+
+ followedText(state.followed)
|
|
286
|
+
+ (state.dated === undefined
|
|
287
|
+
? ""
|
|
288
|
+
: state.dated.set
|
|
289
|
+
? `\nThe story starts on ${state.dated.date}, as the book's: calendar-start is set to it.`
|
|
290
|
+
: `\nThe book starts on ${state.dated.date}: ask the player whether the story should, then config calendar-start ${state.dated.date}.`);
|
|
291
|
+
}
|
|
292
|
+
/** What a document read from the pictures of its pages means to the player (LIB-4): slower and with mistakes, so text reads better. */
|
|
293
|
+
function recognizedText(recognized) {
|
|
294
|
+
return recognized === undefined
|
|
295
|
+
? ""
|
|
296
|
+
: `${recognized} of its pages were read from their pictures, slowly and with a few mistakes: tell the player that a text file, or a PDF whose text can be `
|
|
297
|
+
+ "selected, reads better.";
|
|
298
|
+
}
|
|
299
|
+
/** Whose plan reads the document, and under whose terms it goes out (D-493): said once, as a helper begins it. */
|
|
300
|
+
function helperText(helper) {
|
|
301
|
+
if (helper === undefined) {
|
|
302
|
+
return "";
|
|
303
|
+
}
|
|
304
|
+
const [program, company] = helper === "Codex" ? ["Codex", "OpenAI"] : helper === "Claude Code" ? ["Claude Code", "Anthropic"] : ["Claude Code or Codex", "Anthropic or OpenAI"];
|
|
305
|
+
return `Tell the player in a few words that their own ${program} reads it, on their plan and its limits, and that the whole document goes to ${company} `
|
|
306
|
+
+ "under the terms of their account, its choice on training included.";
|
|
307
|
+
}
|
|
308
|
+
// What the narration became, or what to ask, as the book is told.
|
|
309
|
+
function followedText(followed) {
|
|
310
|
+
if (followed === undefined) {
|
|
311
|
+
return "";
|
|
312
|
+
}
|
|
313
|
+
const way = `like ${followed.author}${followed.story === undefined ? "" : `, story ${followed.story}`}`;
|
|
314
|
+
return followed.set
|
|
315
|
+
? `\nYou now write ${way}, as the book is told: tell the player, who changes it in Settings.`
|
|
316
|
+
: `\nThe player chose how you write: ask whether to write ${way}, as the book is told; if so, config author ${followed.author}`
|
|
317
|
+
+ `${followed.story === undefined ? "" : ` and story ${followed.story}`}.`;
|
|
318
|
+
}
|
|
319
|
+
// A piece for the master to read in the chat, and what to do with it.
|
|
320
|
+
function chatPieceText(state, piece) {
|
|
321
|
+
const last = piece.number >= state.pieces;
|
|
322
|
+
const then = last
|
|
323
|
+
? "This is the last piece. For a book, ask the player whether they have read it, then propose three or four starting points spread over the story, each just "
|
|
324
|
+
+ "before a choice of it, never its end, with who could be played there: as its back cover would to one who has not read it. Once they choose, set the "
|
|
325
|
+
+ "world as it stands there with write: day 1 is that moment; an event before it is happened, one after stays planned with its date moved; whoever is "
|
|
326
|
+
+ "dead by then is dead; knows is what each knew there; what comes after is secret; nothing written decides what the character they play will do, "
|
|
327
|
+
+ "choose or suffer, their death included. A module keeps its own start. Then write the opening, a topic tagged "
|
|
328
|
+
+ "opening, all secret: the situation, the hooks, what happens if no one acts, the pages to read first; and tell the player the gaps you filled. "
|
|
329
|
+
+ "A novel or a story is told as its author tells it: unless the player chose how you write, config author with the author's name and story with how "
|
|
330
|
+
+ "it is built (arcs, episodes, mystery or situations), and tell them; if they chose, ask whether to switch."
|
|
331
|
+
: "Then call import for the next piece.";
|
|
332
|
+
return [
|
|
333
|
+
`Importing ${state.title} here in the chat, piece ${piece.number} of ${state.pieces}: write its pages with write, and add what it adds to the pages you `
|
|
334
|
+
+ `wrote before, which find shows. A picture marked [picture: name] is the file "${piece.pictures}${sep}name": give it to its page with image. ${then}`,
|
|
335
|
+
piece.instructions,
|
|
336
|
+
piece.text,
|
|
337
|
+
].filter((part) => part !== "").join("\n\n");
|
|
338
|
+
}
|
|
339
|
+
// How long an import that nothing runs may stay still before the dashboard says it waits: a runner just started takes a moment to claim it.
|
|
340
|
+
const pausedAfter = 60_000;
|
|
341
|
+
/** The import under way as the dashboard tells it, if one is: from the document being opened to the world being written. */
|
|
342
|
+
export function importShown(root) {
|
|
343
|
+
const opening = openingImport(root);
|
|
344
|
+
if (opening !== undefined) {
|
|
345
|
+
return opening.ocr === undefined ? { title: opening.title, step: "opening" } : { title: opening.title, step: "pictures", done: opening.ocr.done, of: opening.ocr.of };
|
|
346
|
+
}
|
|
347
|
+
const open = openImport(root);
|
|
348
|
+
if (open === undefined) {
|
|
349
|
+
return undefined;
|
|
350
|
+
}
|
|
351
|
+
const { state } = open;
|
|
352
|
+
const running = isImportRunning(open.folder) || runElsewhere(open.folder) !== undefined;
|
|
353
|
+
if (state.failed !== undefined && !running) {
|
|
354
|
+
return { title: state.title, step: "stopped" };
|
|
355
|
+
}
|
|
356
|
+
if (state.phase === "choosing") {
|
|
357
|
+
return { title: state.title, step: "choosing" };
|
|
358
|
+
}
|
|
359
|
+
// Nothing runs it, as after the computer started again, and it has not moved for a while: it waits for the master to call import (a runner about to start
|
|
360
|
+
// is given that while).
|
|
361
|
+
if (!running && state.inChat !== true && (importAge(open.folder) ?? 0) > pausedAfter) {
|
|
362
|
+
return { title: state.title, step: "waiting" };
|
|
363
|
+
}
|
|
364
|
+
return state.phase === "writing"
|
|
365
|
+
? { title: state.title, step: "writing", done: state.done, of: state.steps?.length ?? 1 }
|
|
366
|
+
: { title: state.title, step: state.inChat === true ? "chat" : "reading", done: state.done, of: state.pieces };
|
|
367
|
+
}
|
|
368
|
+
/** The line status gives while an import is under way, waits for the player, or is ready and not installed yet. */
|
|
369
|
+
export function importLine(root) {
|
|
370
|
+
const open = openImport(root);
|
|
371
|
+
if (open === undefined) {
|
|
372
|
+
const installed = new Set(installedAdventures(root).map((adventure) => adventure.title));
|
|
373
|
+
const ready = doneImports(root).filter((title) => !installed.has(title));
|
|
374
|
+
return ready.length === 0 ? "" : `Imported and not installed: ${ready.join(", ")}; import says where, package install adds one.`;
|
|
375
|
+
}
|
|
376
|
+
const { state } = open;
|
|
377
|
+
if (state.inChat === true) {
|
|
378
|
+
return `Import of ${state.title} in the chat: ${state.done} of ${state.pieces} pieces read; call import for the next.`;
|
|
379
|
+
}
|
|
380
|
+
const running = isImportRunning(open.folder) || runElsewhere(open.folder) !== undefined;
|
|
381
|
+
if (state.failed !== undefined && !running) {
|
|
382
|
+
return `Import of ${state.title} stopped: call import to try again.`;
|
|
383
|
+
}
|
|
384
|
+
if (state.phase === "choosing") {
|
|
385
|
+
return `Import of ${state.title}: its starting points are ready, call import to see them.`;
|
|
386
|
+
}
|
|
387
|
+
// After the MCP server started again, nothing runs it until import is called.
|
|
388
|
+
const told = `Import of ${state.title}: ${state.phase}, ${state.done} of ${state.phase === "reading" ? state.pieces : (state.steps?.length ?? 1)} done`;
|
|
389
|
+
return running ? `${told}.` : `${told}; call import to go on.`;
|
|
390
|
+
}
|
package/dist/commands/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import { config } from "./config.js";
|
|
|
5
5
|
import { effect } from "./effect.js";
|
|
6
6
|
import { find } from "./find.js";
|
|
7
7
|
import { image } from "./image.js";
|
|
8
|
+
import { importCommand } from "./import.js";
|
|
8
9
|
import { init } from "./init.js";
|
|
9
10
|
import { install } from "./install.js";
|
|
10
11
|
import { instructions } from "./instructions.js";
|
|
@@ -21,6 +22,8 @@ import { save } from "./save.js";
|
|
|
21
22
|
import { scene } from "./scene.js";
|
|
22
23
|
import { show } from "./show.js";
|
|
23
24
|
import { status } from "./status.js";
|
|
25
|
+
import { thoughts } from "./thoughts.js";
|
|
26
|
+
import { trade } from "./trade.js";
|
|
24
27
|
import { translate } from "./translate.js";
|
|
25
28
|
import { travel } from "./travel.js";
|
|
26
29
|
import { validate } from "./validate.js";
|
|
@@ -37,8 +40,10 @@ export const commands = [
|
|
|
37
40
|
write,
|
|
38
41
|
rename,
|
|
39
42
|
move,
|
|
43
|
+
trade,
|
|
40
44
|
reveal,
|
|
41
45
|
image,
|
|
46
|
+
importCommand,
|
|
42
47
|
show,
|
|
43
48
|
view,
|
|
44
49
|
find,
|
|
@@ -48,6 +53,7 @@ export const commands = [
|
|
|
48
53
|
change,
|
|
49
54
|
effect,
|
|
50
55
|
mood,
|
|
56
|
+
thoughts,
|
|
51
57
|
advance,
|
|
52
58
|
travel,
|
|
53
59
|
route,
|
package/dist/commands/init.js
CHANGED
|
@@ -3,7 +3,7 @@ import { z } from "zod";
|
|
|
3
3
|
import { createCampaign, difficulties, lethalities } from "../campaign/index.js";
|
|
4
4
|
import { appendLogEntry, newLogEntry } from "../core/log.js";
|
|
5
5
|
import { defineCommand } from "../core/registry.js";
|
|
6
|
-
import {
|
|
6
|
+
import { hostInstructions } from "../instructions/index.js";
|
|
7
7
|
import { createWorld } from "../pages/index.js";
|
|
8
8
|
import { campaignNote } from "./game-mode.js";
|
|
9
9
|
import { installedSystemName } from "./game-world.js";
|
|
@@ -28,7 +28,7 @@ export const init = defineCommand({
|
|
|
28
28
|
// Only an installed system (D-167), as it is installed.
|
|
29
29
|
const system = input.system === undefined ? undefined : installedSystemName(input.system, context, "init");
|
|
30
30
|
const settings = { name: input.name ?? basename(folder), language: input.language, system, difficulty: input.difficulty, lethality: input.lethality };
|
|
31
|
-
const root = createCampaign(folder, settings, context.platform,
|
|
31
|
+
const root = createCampaign(folder, settings, context.platform, hostInstructions());
|
|
32
32
|
createWorld(root);
|
|
33
33
|
appendLogEntry(root, newLogEntry(context, "campaign-created", "public", settings));
|
|
34
34
|
return { root, name: settings.name, note: campaignNote(root, context) };
|
package/dist/commands/install.js
CHANGED
|
@@ -57,7 +57,8 @@ export const install = defineCommand({
|
|
|
57
57
|
format(result) {
|
|
58
58
|
const { name, account, gives } = programs[result.program];
|
|
59
59
|
if (result.kind === "ready") {
|
|
60
|
-
return `${name} is ready on this computer with the player's ${account}: ${gives}. Tell the player in a few words, and
|
|
60
|
+
return `${name} is ready on this computer with the player's ${account}: ${gives}. Tell the player in a few words, and that it runs on their own plan and its limits, `
|
|
61
|
+
+ "imports of their documents too; then go on.";
|
|
61
62
|
}
|
|
62
63
|
if (result.kind === "waiting") {
|
|
63
64
|
return `${result.installed ? `${name} is installed. Its` : `${name}'s`} sign-in is open in the player's browser: tell them to sign in with their ${account} and to tell you when they are done, `
|
|
@@ -4,8 +4,9 @@ import { defineCommand } from "../core/registry.js";
|
|
|
4
4
|
import { buttonsInstructions, dashboardInstructions, masterInstructions } from "../instructions/index.js";
|
|
5
5
|
import { campaignMode, modePart } from "./game-mode.js";
|
|
6
6
|
import { readOpenScene } from "./game-scene.js";
|
|
7
|
+
import { voicesPart } from "./game-voices.js";
|
|
7
8
|
import { campaignSystem, campaignWorld } from "./game-world.js";
|
|
8
|
-
import { mentorPart, situationPart, stylePart } from "./parts.js";
|
|
9
|
+
import { mentorPart, partyPart, situationPart, stylePart } from "./parts.js";
|
|
9
10
|
export const instructions = defineCommand({
|
|
10
11
|
name: "instructions",
|
|
11
12
|
description: "Your instructions as game master, in full: how to run this campaign and use these tools. They end with the part of the mode the campaign is in. "
|
|
@@ -22,12 +23,16 @@ export const instructions = defineCommand({
|
|
|
22
23
|
const parts = [
|
|
23
24
|
masterInstructions(),
|
|
24
25
|
modeText(context.folder, context),
|
|
26
|
+
voicesText(context.folder, context),
|
|
27
|
+
partyText(context.folder, context),
|
|
25
28
|
mentorText(context.folder, context),
|
|
26
29
|
styleText(context.folder, context),
|
|
27
30
|
sceneText(context.folder, context),
|
|
28
31
|
buttons ? buttonsInstructions(physicalDice(context.folder)) : "",
|
|
29
32
|
// The dashboard, where the MCP server serves one, so that the master can tell the player how to use it (D-404).
|
|
30
33
|
context.dashboard === undefined ? "" : dashboardInstructions(context.dashboard),
|
|
34
|
+
// The opening of an evening, said to the player while the master read the game, reached them (playtest 15).
|
|
35
|
+
"Now read where the game stands, writing nothing: your first words to the player are the opening itself.",
|
|
31
36
|
];
|
|
32
37
|
return { text: parts.filter((part) => part !== "").join("\n\n") };
|
|
33
38
|
},
|
|
@@ -52,6 +57,26 @@ function sceneText(folder, context) {
|
|
|
52
57
|
return "";
|
|
53
58
|
}
|
|
54
59
|
}
|
|
60
|
+
/** How to run the table for more than one living player character (D-480), where the campaign has them. */
|
|
61
|
+
function partyText(folder, context) {
|
|
62
|
+
const root = findCampaign(folder);
|
|
63
|
+
try {
|
|
64
|
+
return root === undefined ? "" : partyPart(context, campaignSystem(root, context), campaignWorld(root, context));
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
return "";
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/** When and how to call the character agent (D-490): in play, in Claude Code, when the chat has it as an agent of the campaign; none elsewhere. */
|
|
71
|
+
function voicesText(folder, context) {
|
|
72
|
+
const root = findCampaign(folder);
|
|
73
|
+
try {
|
|
74
|
+
return root === undefined || campaignMode(root, campaignWorld(root, context)) !== "play" ? "" : voicesPart(root, context);
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
return "";
|
|
78
|
+
}
|
|
79
|
+
}
|
|
55
80
|
/** The mentor's part, for the way the player wants the game taught (D-347); none when off, outside a campaign, or in one that does not read. */
|
|
56
81
|
function mentorText(folder, context) {
|
|
57
82
|
const root = findCampaign(folder);
|
package/dist/commands/mode.js
CHANGED
|
@@ -5,6 +5,7 @@ import { defineCommand } from "../core/registry.js";
|
|
|
5
5
|
import { blockingMode, campaignMode, missingText, modePart, modes } from "./game-mode.js";
|
|
6
6
|
import { campaignSaves, makeSave, savesWhy, saveText } from "./game-saves.js";
|
|
7
7
|
import { newDatedLogEntry, readPresent } from "./game-time.js";
|
|
8
|
+
import { voicesPart } from "./game-voices.js";
|
|
8
9
|
import { campaignSystem, campaignWorld } from "./game-world.js";
|
|
9
10
|
export const mode = defineCommand({
|
|
10
11
|
name: "mode",
|
|
@@ -36,7 +37,8 @@ export const mode = defineCommand({
|
|
|
36
37
|
to: input.to,
|
|
37
38
|
changed: true,
|
|
38
39
|
dateless: readPresent(root).date === undefined,
|
|
39
|
-
part
|
|
40
|
+
// Play's part with Voices, as instructions gives it, for a campaign that reaches play in the chat that made it (playtest 01).
|
|
41
|
+
part: [modePart(input.to, campaignSystem(root, context)) ?? "", input.to === "play" ? voicesPart(root, context) : ""].filter((part) => part !== "").join("\n\n"),
|
|
40
42
|
...(start === undefined ? {} : { start }),
|
|
41
43
|
};
|
|
42
44
|
},
|
package/dist/commands/move.d.ts
CHANGED
|
@@ -28,6 +28,8 @@ export declare const move: import("../core/registry.ts").Command<z.ZodObject<{
|
|
|
28
28
|
page: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
29
29
|
to: z.ZodOptional<z.ZodString>;
|
|
30
30
|
at: z.ZodOptional<z.ZodString>;
|
|
31
|
+
from: z.ZodOptional<z.ZodString>;
|
|
32
|
+
count: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
31
33
|
}, z.core.$strip>, MoveResult>;
|
|
32
34
|
/** Puts one on a square of the map of the place it is right in, as move with at, and what move says of it (ASK-11). */
|
|
33
35
|
export declare function placeOnMap(root: string, context: Context, name: string, square: string): string;
|