rpg-engine 0.2.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/adventures/index.d.ts +3 -0
- package/dist/adventures/index.js +5 -0
- package/dist/adventures/manifest.d.ts +39 -0
- package/dist/adventures/manifest.js +89 -0
- package/dist/adventures/placement.d.ts +4 -0
- package/dist/adventures/placement.js +14 -0
- package/dist/adventures/source.d.ts +21 -0
- package/dist/adventures/source.js +108 -0
- package/dist/bell-listener.d.ts +9 -0
- package/dist/bell-listener.js +83 -0
- package/dist/campaign/create-campaign.d.ts +3 -2
- package/dist/campaign/create-campaign.js +5 -5
- package/dist/campaign/host-files.d.ts +23 -6
- package/dist/campaign/host-files.js +130 -40
- package/dist/campaign/index.d.ts +2 -2
- package/dist/campaign/index.js +2 -2
- package/dist/campaign/settings.d.ts +43 -3
- package/dist/campaign/settings.js +58 -14
- package/dist/cli.js +10 -1
- package/dist/command-line.js +26 -3
- package/dist/commands/advance.js +6 -2
- package/dist/commands/ask.d.ts +11 -4
- package/dist/commands/ask.js +249 -23
- package/dist/commands/change.d.ts +29 -0
- package/dist/commands/change.js +260 -41
- package/dist/commands/config.d.ts +6 -3
- package/dist/commands/config.js +217 -83
- package/dist/commands/effect.js +38 -9
- package/dist/commands/game-advance.d.ts +11 -2
- package/dist/commands/game-advance.js +22 -7
- package/dist/commands/game-adventures.d.ts +70 -0
- package/dist/commands/game-adventures.js +418 -0
- package/dist/commands/game-bonds.d.ts +9 -0
- package/dist/commands/game-bonds.js +84 -0
- package/dist/commands/game-catalog.d.ts +36 -0
- package/dist/commands/game-catalog.js +122 -0
- package/dist/commands/game-checks.d.ts +17 -0
- package/dist/commands/game-checks.js +128 -0
- package/dist/commands/game-damage.d.ts +18 -0
- package/dist/commands/game-damage.js +74 -0
- package/dist/commands/game-effects.d.ts +5 -0
- package/dist/commands/game-effects.js +2 -2
- package/dist/commands/game-events.js +8 -4
- package/dist/commands/game-experience.js +2 -2
- package/dist/commands/game-extensions.d.ts +8 -1
- package/dist/commands/game-extensions.js +8 -3
- package/dist/commands/game-grid-moves.d.ts +4 -1
- package/dist/commands/game-grid-moves.js +8 -2
- package/dist/commands/game-hit-dice.d.ts +39 -0
- package/dist/commands/game-hit-dice.js +120 -0
- package/dist/commands/game-import.d.ts +11 -0
- package/dist/commands/game-import.js +154 -0
- package/dist/commands/game-journey.d.ts +6 -2
- package/dist/commands/game-journey.js +17 -6
- package/dist/commands/game-knowledge.d.ts +56 -6
- package/dist/commands/game-knowledge.js +152 -23
- package/dist/commands/game-library.d.ts +112 -0
- package/dist/commands/game-library.js +388 -0
- package/dist/commands/game-limits.d.ts +7 -0
- package/dist/commands/game-limits.js +67 -0
- package/dist/commands/game-master-rolls.d.ts +15 -0
- package/dist/commands/game-master-rolls.js +34 -0
- package/dist/commands/game-mode.js +5 -4
- package/dist/commands/game-moves.d.ts +14 -1
- package/dist/commands/game-moves.js +24 -9
- package/dist/commands/game-recipe-pace.d.ts +6 -0
- package/dist/commands/game-recipe-pace.js +25 -0
- package/dist/commands/game-recipes.js +10 -3
- package/dist/commands/game-reminders.d.ts +3 -3
- package/dist/commands/game-reminders.js +10 -5
- package/dist/commands/game-roads.d.ts +11 -4
- package/dist/commands/game-roads.js +89 -26
- package/dist/commands/game-saves.d.ts +12 -0
- package/dist/commands/game-saves.js +44 -5
- package/dist/commands/game-scene.js +3 -1
- package/dist/commands/game-stacks.d.ts +78 -0
- package/dist/commands/game-stacks.js +198 -0
- package/dist/commands/game-system-code.d.ts +25 -0
- package/dist/commands/game-system-code.js +172 -0
- package/dist/commands/game-tables.d.ts +7 -0
- package/dist/commands/game-tables.js +40 -0
- package/dist/commands/game-thoughts.d.ts +25 -0
- package/dist/commands/game-thoughts.js +57 -0
- package/dist/commands/game-turn-uses.d.ts +33 -0
- package/dist/commands/game-turn-uses.js +137 -0
- package/dist/commands/game-upkeep.d.ts +20 -0
- package/dist/commands/game-upkeep.js +190 -0
- package/dist/commands/game-view-journal.d.ts +14 -1
- package/dist/commands/game-view-journal.js +5 -2
- package/dist/commands/game-view-map.d.ts +3 -0
- package/dist/commands/game-view-map.js +5 -1
- package/dist/commands/game-view-place.d.ts +22 -3
- package/dist/commands/game-view-place.js +61 -24
- package/dist/commands/game-view-world.d.ts +98 -0
- package/dist/commands/game-view-world.js +98 -0
- package/dist/commands/game-voices.d.ts +5 -0
- package/dist/commands/game-voices.js +13 -0
- package/dist/commands/game-widgets.d.ts +66 -0
- package/dist/commands/game-widgets.js +274 -0
- package/dist/commands/game-world.d.ts +8 -1
- package/dist/commands/game-world.js +23 -3
- package/dist/commands/image.js +2 -3
- package/dist/commands/import.d.ts +47 -0
- package/dist/commands/import.js +390 -0
- package/dist/commands/index.js +6 -0
- package/dist/commands/init.js +2 -2
- package/dist/commands/install.js +2 -1
- package/dist/commands/instructions.js +26 -1
- package/dist/commands/mode.js +3 -1
- package/dist/commands/move.d.ts +2 -0
- package/dist/commands/move.js +86 -12
- package/dist/commands/package.d.ts +57 -3
- package/dist/commands/package.js +308 -51
- package/dist/commands/parts.d.ts +3 -0
- package/dist/commands/parts.js +5 -0
- package/dist/commands/problems.js +6 -0
- package/dist/commands/rename.js +3 -0
- package/dist/commands/reveal.js +12 -7
- package/dist/commands/roll.d.ts +6 -0
- package/dist/commands/roll.js +95 -24
- package/dist/commands/route.js +4 -5
- package/dist/commands/rules.d.ts +3 -0
- package/dist/commands/rules.js +38 -6
- package/dist/commands/save.d.ts +1 -1
- package/dist/commands/save.js +2 -2
- package/dist/commands/scene.d.ts +10 -1
- package/dist/commands/scene.js +146 -29
- package/dist/commands/sheet.d.ts +47 -6
- package/dist/commands/sheet.js +179 -33
- package/dist/commands/show.d.ts +33 -0
- package/dist/commands/show.js +19 -2
- package/dist/commands/status.d.ts +9 -3
- package/dist/commands/status.js +59 -17
- package/dist/commands/thoughts.d.ts +11 -0
- package/dist/commands/thoughts.js +54 -0
- package/dist/commands/trade.d.ts +17 -0
- package/dist/commands/trade.js +273 -0
- package/dist/commands/travel.d.ts +2 -0
- package/dist/commands/travel.js +40 -14
- package/dist/commands/validate.js +2 -1
- package/dist/commands/view.d.ts +99 -2
- package/dist/commands/view.js +273 -57
- package/dist/commands/worked-out.d.ts +16 -0
- package/dist/commands/worked-out.js +108 -13
- package/dist/commands/write.d.ts +1 -0
- package/dist/commands/write.js +93 -21
- package/dist/confirm/confirm.d.ts +35 -0
- package/dist/confirm/confirm.js +94 -0
- package/dist/confirm/index.d.ts +1 -0
- package/dist/confirm/index.js +3 -0
- package/dist/core/archive-paths.d.ts +8 -0
- package/dist/core/archive-paths.js +39 -0
- package/dist/core/context.d.ts +127 -5
- package/dist/core/context.js +4 -3
- package/dist/core/download.d.ts +2 -0
- package/dist/core/download.js +31 -0
- package/dist/core/field-kind.d.ts +4 -3
- package/dist/core/field-kind.js +4 -3
- package/dist/core/files.d.ts +10 -0
- package/dist/core/files.js +58 -2
- package/dist/core/formula.d.ts +3 -1
- package/dist/core/formula.js +13 -2
- package/dist/core/progression-rule.d.ts +2 -0
- package/dist/core/version.d.ts +2 -0
- package/dist/core/version.js +7 -0
- package/dist/dashboard/act-names.js +27 -0
- package/dist/dashboard/act-sheet.js +100 -0
- package/dist/dashboard/act-strip.js +49 -0
- package/dist/dashboard/acts.js +140 -0
- package/dist/dashboard/address.js +16 -12
- package/dist/dashboard/api.js +140 -10
- package/dist/dashboard/app.js +370 -41
- package/dist/dashboard/asked.js +297 -19
- package/dist/dashboard/calendar.js +56 -0
- package/dist/dashboard/card.js +13 -12
- package/dist/dashboard/coins.js +13 -0
- package/dist/dashboard/death-save.js +67 -0
- package/dist/dashboard/dice/pool.js +22 -0
- package/dist/dashboard/dice/roller.js +1 -1
- package/dist/dashboard/dice/stage.js +12 -4
- package/dist/dashboard/dice/tray.js +28 -15
- package/dist/dashboard/dying.js +46 -0
- package/dist/dashboard/extension-widgets.js +160 -0
- package/dist/dashboard/game-words.js +33 -4
- package/dist/dashboard/guide/ar.md +105 -100
- package/dist/dashboard/guide/cs.md +111 -106
- package/dist/dashboard/guide/da.md +95 -90
- package/dist/dashboard/guide/de.md +93 -88
- package/dist/dashboard/guide/el.md +110 -105
- package/dist/dashboard/guide/en.md +21 -16
- package/dist/dashboard/guide/es.md +79 -74
- package/dist/dashboard/guide/fi.md +99 -94
- package/dist/dashboard/guide/fr.md +83 -78
- package/dist/dashboard/guide/he.md +109 -104
- package/dist/dashboard/guide/hi.md +103 -98
- package/dist/dashboard/guide/hu.md +113 -108
- package/dist/dashboard/guide/is.md +102 -97
- package/dist/dashboard/guide/it.md +22 -17
- package/dist/dashboard/guide/ja.md +108 -103
- package/dist/dashboard/guide/ko.md +113 -108
- package/dist/dashboard/guide/nb.md +95 -90
- package/dist/dashboard/guide/nl.md +89 -84
- package/dist/dashboard/guide/pl.md +104 -99
- package/dist/dashboard/guide/pt.md +82 -77
- package/dist/dashboard/guide/ro.md +113 -108
- package/dist/dashboard/guide/ru.md +109 -104
- package/dist/dashboard/guide/sv.md +96 -91
- package/dist/dashboard/guide/tr.md +102 -97
- package/dist/dashboard/guide/uk.md +113 -108
- package/dist/dashboard/guide/zh.md +110 -105
- package/dist/dashboard/guide-markdown.js +4 -0
- package/dist/dashboard/help.js +4 -5
- package/dist/dashboard/i18n/ar.json +367 -16
- package/dist/dashboard/i18n/cs.json +367 -16
- package/dist/dashboard/i18n/da.json +367 -16
- package/dist/dashboard/i18n/de.json +367 -16
- package/dist/dashboard/i18n/el.json +367 -16
- package/dist/dashboard/i18n/es.json +367 -16
- package/dist/dashboard/i18n/fi.json +367 -16
- package/dist/dashboard/i18n/fr.json +367 -16
- package/dist/dashboard/i18n/he.json +367 -16
- package/dist/dashboard/i18n/hi.json +367 -16
- package/dist/dashboard/i18n/hu.json +367 -16
- package/dist/dashboard/i18n/is.json +367 -16
- package/dist/dashboard/i18n/it.json +369 -18
- package/dist/dashboard/i18n/ja.json +367 -16
- package/dist/dashboard/i18n/ko.json +367 -16
- package/dist/dashboard/i18n/nb.json +367 -16
- package/dist/dashboard/i18n/nl.json +367 -16
- package/dist/dashboard/i18n/pl.json +367 -16
- package/dist/dashboard/i18n/pt.json +367 -16
- package/dist/dashboard/i18n/ro.json +367 -16
- package/dist/dashboard/i18n/ru.json +367 -16
- package/dist/dashboard/i18n/sv.json +367 -16
- package/dist/dashboard/i18n/tr.json +367 -16
- package/dist/dashboard/i18n/uk.json +367 -16
- package/dist/dashboard/i18n/zh.json +367 -16
- package/dist/dashboard/icons.js +38 -4
- package/dist/dashboard/journal.js +203 -49
- package/dist/dashboard/labels.js +45 -4
- package/dist/dashboard/languages.js +2 -2
- package/dist/dashboard/layout.js +35 -0
- package/dist/dashboard/lore.js +44 -0
- package/dist/dashboard/markdown.js +136 -30
- package/dist/dashboard/master.js +2 -2
- package/dist/dashboard/notes.js +5 -5
- package/dist/dashboard/notices.js +24 -4
- package/dist/dashboard/packages.js +678 -0
- package/dist/dashboard/pages.js +0 -8
- package/dist/dashboard/party.js +17 -4
- package/dist/dashboard/place-map-view.js +47 -9
- package/dist/dashboard/rolls.js +35 -93
- package/dist/dashboard/save-outcome.js +42 -0
- package/dist/dashboard/saves.js +14 -11
- package/dist/dashboard/scene.js +114 -20
- package/dist/dashboard/settings.js +71 -13
- package/dist/dashboard/setup.js +4 -4
- package/dist/dashboard/sheet.js +123 -19
- package/dist/dashboard/spend.js +115 -0
- package/dist/dashboard/status.js +22 -10
- package/dist/dashboard/story.js +6 -6
- package/dist/dashboard/style.css +8047 -3468
- package/dist/dashboard/table.js +145 -0
- package/dist/dashboard/tabs.js +34 -0
- package/dist/dashboard/text.js +19 -1
- package/dist/dashboard/top.js +91 -31
- package/dist/dashboard/turns.js +150 -0
- package/dist/dashboard/widgets.js +21 -14
- package/dist/dashboard/world-calendar.js +101 -0
- package/dist/dashboard/world-lore.js +231 -0
- package/dist/dashboard/world.js +87 -29
- package/dist/dashboard-server.d.ts +10 -1
- package/dist/dashboard-server.js +738 -26
- package/dist/dice/index.d.ts +2 -0
- package/dist/dice/index.js +3 -1
- package/dist/dice/oracle.d.ts +19 -0
- package/dist/dice/oracle.js +22 -0
- package/dist/dice/tables.d.ts +29 -0
- package/dist/dice/tables.js +123 -0
- package/dist/documents/index.d.ts +2 -0
- package/dist/documents/index.js +5 -0
- package/dist/documents/markup.d.ts +10 -0
- package/dist/documents/markup.js +124 -0
- package/dist/documents/ocr.d.ts +9 -0
- package/dist/documents/ocr.js +101 -0
- package/dist/documents/png.d.ts +9 -0
- package/dist/documents/png.js +75 -0
- package/dist/documents/read.d.ts +54 -0
- package/dist/documents/read.js +375 -0
- package/dist/extensions/api.d.ts +91 -9
- package/dist/extensions/extension.d.ts +28 -2
- package/dist/extensions/extension.js +49 -11
- package/dist/extensions/index.d.ts +5 -3
- package/dist/extensions/index.js +4 -2
- package/dist/extensions/packages.d.ts +13 -4
- package/dist/extensions/packages.js +114 -16
- package/dist/extensions/tarball.d.ts +6 -0
- package/dist/extensions/tarball.js +87 -0
- package/dist/extensions/words.d.ts +13 -0
- package/dist/extensions/words.js +42 -0
- package/dist/importer/index.d.ts +1 -0
- package/dist/importer/index.js +3 -0
- package/dist/importer/work.d.ts +132 -0
- package/dist/importer/work.js +306 -0
- package/dist/index.d.ts +3 -1
- package/dist/instructions/index.d.ts +7 -0
- package/dist/instructions/index.js +10 -0
- package/dist/languages/index.d.ts +1 -0
- package/dist/languages/index.js +3 -0
- package/dist/languages/language-pack.d.ts +32 -0
- package/dist/languages/language-pack.js +86 -0
- package/dist/library/books.d.ts +76 -0
- package/dist/library/books.js +378 -0
- package/dist/library/folders.d.ts +11 -0
- package/dist/library/folders.js +70 -0
- package/dist/library/index.d.ts +3 -0
- package/dist/library/index.js +5 -0
- package/dist/library/language.d.ts +2 -0
- package/dist/library/language.js +40 -0
- package/dist/library-reader.d.ts +7 -0
- package/dist/library-reader.js +36 -0
- package/dist/mcp-server.js +90 -7
- package/dist/money/index.d.ts +1 -1
- package/dist/money/index.js +1 -1
- package/dist/money/money.d.ts +6 -0
- package/dist/money/money.js +11 -0
- package/dist/page-words.js +4 -1
- package/dist/pages/check.d.ts +5 -0
- package/dist/pages/check.js +111 -5
- package/dist/pages/containers.d.ts +19 -1
- package/dist/pages/containers.js +50 -7
- package/dist/pages/index.d.ts +8 -5
- package/dist/pages/index.js +8 -5
- package/dist/pages/load.d.ts +11 -0
- package/dist/pages/load.js +69 -0
- package/dist/pages/markdown.d.ts +15 -0
- package/dist/pages/markdown.js +54 -3
- package/dist/pages/page-file.d.ts +2 -0
- package/dist/pages/page-file.js +28 -5
- package/dist/pages/rename-page.js +3 -2
- package/dist/pages/stack-entry.d.ts +47 -0
- package/dist/pages/stack-entry.js +83 -0
- package/dist/pages/stack-writes.d.ts +22 -0
- package/dist/pages/stack-writes.js +128 -0
- package/dist/pages/stacks.d.ts +52 -0
- package/dist/pages/stacks.js +168 -0
- package/dist/pages/standard-fields.js +1 -1
- package/dist/pages/system-pages.d.ts +5 -2
- package/dist/pages/system-pages.js +11 -5
- package/dist/pages/world.d.ts +29 -3
- package/dist/pages/world.js +66 -12
- package/dist/pages/write-page.js +15 -6
- package/dist/pictures/chosen.d.ts +5 -1
- package/dist/pictures/chosen.js +12 -3
- package/dist/pictures/claude.d.ts +3 -1
- package/dist/pictures/claude.js +38 -0
- package/dist/pictures/codex.d.ts +3 -1
- package/dist/pictures/codex.js +32 -0
- package/dist/pictures/helpers.d.ts +10 -0
- package/dist/pictures/helpers.js +53 -6
- package/dist/pictures/index.d.ts +5 -4
- package/dist/pictures/index.js +5 -4
- package/dist/pictures/stop.d.ts +2 -0
- package/dist/pictures/stop.js +18 -0
- package/dist/player-acts.d.ts +27 -0
- package/dist/player-acts.js +56 -0
- package/dist/rules/index.d.ts +1 -0
- package/dist/rules/index.js +3 -1
- package/dist/rules/page-search.d.ts +36 -0
- package/dist/rules/page-search.js +216 -0
- package/dist/rules/search.d.ts +7 -0
- package/dist/rules/search.js +2 -2
- package/dist/scene/scene.d.ts +2 -0
- package/dist/scene/scene.js +1 -0
- package/dist/systems/game-system.d.ts +161 -4
- package/dist/systems/game-system.js +237 -34
- package/dist/systems/index.d.ts +3 -1
- package/dist/systems/index.js +3 -1
- package/dist/systems/system-code.d.ts +97 -0
- package/dist/systems/system-code.js +62 -0
- package/dist/systems/system-folders.d.ts +11 -0
- package/dist/systems/system-folders.js +11 -0
- package/dist/systems/words.d.ts +2 -0
- package/dist/systems/words.js +3 -3
- package/instructions/author.md +1 -1
- package/instructions/buttons-physical-dice.md +1 -1
- package/instructions/buttons.md +1 -1
- package/instructions/character.md +15 -0
- package/instructions/combat.md +3 -1
- package/instructions/core.md +5 -5
- package/instructions/dashboard.md +4 -4
- package/instructions/import.md +14 -0
- package/instructions/mentor-hints.md +1 -1
- package/instructions/party.md +11 -0
- package/instructions/play.md +6 -6
- package/instructions/session-zero.md +1 -1
- package/instructions/setup.md +1 -1
- package/instructions/voices-always.md +1 -0
- package/instructions/voices-important.md +1 -0
- package/instructions/voices.md +14 -0
- package/package.json +7 -3
- package/systems/5e/LICENSE.md +1 -1
- package/systems/5e/dist/dying.js +193 -0
- package/systems/5e/dist/index.js +3 -0
- package/systems/5e/images/abacus.svg +1 -0
- package/systems/5e/images/acid-tube.svg +1 -0
- package/systems/5e/images/animal-hide.svg +1 -0
- package/systems/5e/images/anvil.svg +1 -0
- package/systems/5e/images/arrow-cluster.svg +1 -0
- package/systems/5e/images/backpack.svg +1 -0
- package/systems/5e/images/bagpipes.svg +1 -0
- package/systems/5e/images/barbed-spear.svg +1 -0
- package/systems/5e/images/barrel.svg +1 -0
- package/systems/5e/images/basket.svg +1 -0
- package/systems/5e/images/battle-axe.svg +1 -0
- package/systems/5e/images/beer-horn.svg +1 -0
- package/systems/5e/images/belt-buckles.svg +1 -0
- package/systems/5e/images/bird-scepter.svg +1 -0
- package/systems/5e/images/blanket.svg +1 -0
- package/systems/5e/images/book-cover.svg +1 -0
- package/systems/5e/images/boots.svg +1 -0
- package/systems/5e/images/bottle-vapors.svg +1 -0
- package/systems/5e/images/bow-arrow.svg +1 -0
- package/systems/5e/images/bowl-spiral.svg +1 -0
- package/systems/5e/images/bracer.svg +1 -0
- package/systems/5e/images/broadsword.svg +1 -0
- package/systems/5e/images/broom.svg +1 -0
- package/systems/5e/images/bullets.svg +1 -0
- package/systems/5e/images/caltrops.svg +1 -0
- package/systems/5e/images/camp-cooking-pot.svg +1 -0
- package/systems/5e/images/campfire.svg +1 -0
- package/systems/5e/images/camping-tent.svg +1 -0
- package/systems/5e/images/candle-flame.svg +1 -0
- package/systems/5e/images/candle-light.svg +1 -0
- package/systems/5e/images/canoe.svg +1 -0
- package/systems/5e/images/cape.svg +1 -0
- package/systems/5e/images/caravel.svg +1 -0
- package/systems/5e/images/card-pick.svg +1 -0
- package/systems/5e/images/chain-mail.svg +1 -0
- package/systems/5e/images/chained-arrow-heads.svg +1 -0
- package/systems/5e/images/chariot.svg +1 -0
- package/systems/5e/images/chest.svg +1 -0
- package/systems/5e/images/chisel.svg +1 -0
- package/systems/5e/images/claw-hammer.svg +1 -0
- package/systems/5e/images/colombian-statue.svg +1 -0
- package/systems/5e/images/cooking-pot.svg +1 -0
- package/systems/5e/images/crescent-staff.svg +1 -0
- package/systems/5e/images/crossbow.svg +1 -0
- package/systems/5e/images/crossed-chains.svg +1 -0
- package/systems/5e/images/crowbar.svg +1 -0
- package/systems/5e/images/crystal-ball.svg +1 -0
- package/systems/5e/images/crystal-cluster.svg +1 -0
- package/systems/5e/images/crystal-eye.svg +1 -0
- package/systems/5e/images/cubes.svg +1 -0
- package/systems/5e/images/dart.svg +1 -0
- package/systems/5e/images/dice-six-faces-five.svg +1 -0
- package/systems/5e/images/dragon-orb.svg +1 -0
- package/systems/5e/images/drakkar.svg +1 -0
- package/systems/5e/images/drum.svg +1 -0
- package/systems/5e/images/empty-wood-bucket-handle.svg +1 -0
- package/systems/5e/images/eye-shield.svg +1 -0
- package/systems/5e/images/fairy-wand.svg +1 -0
- package/systems/5e/images/feather.svg +1 -0
- package/systems/5e/images/feathered-wing.svg +1 -0
- package/systems/5e/images/fire-bottle.svg +1 -0
- package/systems/5e/images/fire-gem.svg +1 -0
- package/systems/5e/images/first-aid-kit.svg +1 -0
- package/systems/5e/images/fishing-hook.svg +1 -0
- package/systems/5e/images/fishing-net.svg +1 -0
- package/systems/5e/images/fishing-pole.svg +1 -0
- package/systems/5e/images/fist.svg +1 -0
- package/systems/5e/images/flail.svg +1 -0
- package/systems/5e/images/flanged-mace.svg +1 -0
- package/systems/5e/images/flat-hammer.svg +1 -0
- package/systems/5e/images/flint-spark.svg +1 -0
- package/systems/5e/images/floating-crystal.svg +1 -0
- package/systems/5e/images/flute.svg +1 -0
- package/systems/5e/images/galleon.svg +1 -0
- package/systems/5e/images/gauntlet.svg +1 -0
- package/systems/5e/images/gem-necklace.svg +1 -0
- package/systems/5e/images/gem-pendant.svg +1 -0
- package/systems/5e/images/gems.svg +1 -0
- package/systems/5e/images/gladius.svg +1 -0
- package/systems/5e/images/glaive.svg +1 -0
- package/systems/5e/images/glass-ball.svg +1 -0
- package/systems/5e/images/gloves.svg +1 -0
- package/systems/5e/images/gold-scarab.svg +1 -0
- package/systems/5e/images/grain-bundle.svg +1 -0
- package/systems/5e/images/halberd.svg +1 -0
- package/systems/5e/images/hand-saw.svg +1 -0
- package/systems/5e/images/handheld-fan.svg +1 -0
- package/systems/5e/images/harp.svg +1 -0
- package/systems/5e/images/hatchet.svg +1 -0
- package/systems/5e/images/headband-knot.svg +1 -0
- package/systems/5e/images/health-potion.svg +1 -0
- package/systems/5e/images/heart-bottle.svg +1 -0
- package/systems/5e/images/herbs-bundle.svg +1 -0
- package/systems/5e/images/hole-ladder.svg +1 -0
- package/systems/5e/images/holy-symbol.svg +1 -0
- package/systems/5e/images/holy-water.svg +1 -0
- package/systems/5e/images/honey-jar.svg +1 -0
- package/systems/5e/images/hood.svg +1 -0
- package/systems/5e/images/horseshoe.svg +1 -0
- package/systems/5e/images/hourglass.svg +1 -0
- package/systems/5e/images/hunting-horn.svg +1 -0
- package/systems/5e/images/jester-hat.svg +1 -0
- package/systems/5e/images/jug.svg +1 -0
- package/systems/5e/images/katana.svg +1 -0
- package/systems/5e/images/key-lock.svg +1 -0
- package/systems/5e/images/kitchen-scale.svg +1 -0
- package/systems/5e/images/knapsack.svg +1 -0
- package/systems/5e/images/ladder.svg +1 -0
- package/systems/5e/images/lantern.svg +1 -0
- package/systems/5e/images/leather-armor.svg +1 -0
- package/systems/5e/images/leather-boot.svg +1 -0
- package/systems/5e/images/leather-vest.svg +1 -0
- package/systems/5e/images/light-backpack.svg +1 -0
- package/systems/5e/images/light-helm.svg +1 -0
- package/systems/5e/images/locked-box.svg +1 -0
- package/systems/5e/images/locked-fortress.svg +1 -0
- package/systems/5e/images/lockpicks.svg +1 -0
- package/systems/5e/images/lunar-wand.svg +1 -0
- package/systems/5e/images/lyre.svg +1 -0
- package/systems/5e/images/magic-lamp.svg +1 -0
- package/systems/5e/images/magnifying-glass.svg +1 -0
- package/systems/5e/images/mail-shirt.svg +1 -0
- package/systems/5e/images/manacles.svg +1 -0
- package/systems/5e/images/marbles.svg +1 -0
- package/systems/5e/images/meat.svg +1 -0
- package/systems/5e/images/medal.svg +1 -0
- package/systems/5e/images/mirror-mirror.svg +1 -0
- package/systems/5e/images/mountain-climbing.svg +1 -0
- package/systems/5e/images/oil-can.svg +1 -0
- package/systems/5e/images/old-lantern.svg +1 -0
- package/systems/5e/images/old-wagon.svg +1 -0
- package/systems/5e/images/orb-wand.svg +1 -0
- package/systems/5e/images/oyster-pearl.svg +1 -0
- package/systems/5e/images/paint-brush.svg +1 -0
- package/systems/5e/images/painted-pottery.svg +1 -0
- package/systems/5e/images/palette.svg +1 -0
- package/systems/5e/images/paper.svg +1 -0
- package/systems/5e/images/pencil.svg +1 -0
- package/systems/5e/images/perfume-bottle.svg +1 -0
- package/systems/5e/images/pilgrim-hat.svg +1 -0
- package/systems/5e/images/pipes.svg +1 -0
- package/systems/5e/images/plain-arrow.svg +1 -0
- package/systems/5e/images/plain-dagger.svg +1 -0
- package/systems/5e/images/poison-bottle.svg +1 -0
- package/systems/5e/images/powder-bag.svg +1 -0
- package/systems/5e/images/prayer-beads.svg +1 -0
- package/systems/5e/images/pulley-hook.svg +1 -0
- package/systems/5e/images/quill-ink.svg +1 -0
- package/systems/5e/images/quill.svg +1 -0
- package/systems/5e/images/quiver.svg +1 -0
- package/systems/5e/images/red-carpet.svg +1 -0
- package/systems/5e/images/ring.svg +1 -0
- package/systems/5e/images/ringing-bell.svg +1 -0
- package/systems/5e/images/robe.svg +1 -0
- package/systems/5e/images/rope-coil.svg +1 -0
- package/systems/5e/images/round-bottom-flask.svg +1 -0
- package/systems/5e/images/round-potion.svg +1 -0
- package/systems/5e/images/rune-stone.svg +1 -0
- package/systems/5e/images/saddle.svg +1 -0
- package/systems/5e/images/scale-mail.svg +1 -0
- package/systems/5e/images/scroll-unfurled.svg +1 -0
- package/systems/5e/images/secret-book.svg +1 -0
- package/systems/5e/images/sewing-needle.svg +1 -0
- package/systems/5e/images/shield.svg +1 -0
- package/systems/5e/images/shirt-button.svg +1 -0
- package/systems/5e/images/sickle.svg +1 -0
- package/systems/5e/images/siege-ram.svg +1 -0
- package/systems/5e/images/skull-staff.svg +1 -0
- package/systems/5e/images/sleeping-bag.svg +1 -0
- package/systems/5e/images/sling.svg +1 -0
- package/systems/5e/images/slippers.svg +1 -0
- package/systems/5e/images/small-fishing-sailboat.svg +1 -0
- package/systems/5e/images/smoking-orb.svg +1 -0
- package/systems/5e/images/soap.svg +1 -0
- package/systems/5e/images/spade.svg +1 -0
- package/systems/5e/images/sparkling-sabre.svg +1 -0
- package/systems/5e/images/spell-book.svg +1 -0
- package/systems/5e/images/spiked-armor.svg +1 -0
- package/systems/5e/images/spiked-mace.svg +1 -0
- package/systems/5e/images/spikes.svg +1 -0
- package/systems/5e/images/spinning-wheel.svg +1 -0
- package/systems/5e/images/spyglass.svg +1 -0
- package/systems/5e/images/steampunk-goggles.svg +1 -0
- package/systems/5e/images/stone-block.svg +1 -0
- package/systems/5e/images/stone-pile.svg +1 -0
- package/systems/5e/images/stone-sphere.svg +1 -0
- package/systems/5e/images/straight-pipe.svg +1 -0
- package/systems/5e/images/swap-bag.svg +1 -0
- package/systems/5e/images/thor-hammer.svg +1 -0
- package/systems/5e/images/thrown-spear.svg +1 -0
- package/systems/5e/images/tiara.svg +1 -0
- package/systems/5e/images/tied-scroll.svg +1 -0
- package/systems/5e/images/tinker.svg +1 -0
- package/systems/5e/images/torch.svg +1 -0
- package/systems/5e/images/totem.svg +1 -0
- package/systems/5e/images/trap-mask.svg +1 -0
- package/systems/5e/images/treasure-map.svg +1 -0
- package/systems/5e/images/tribal-pendant.svg +1 -0
- package/systems/5e/images/trident.svg +1 -0
- package/systems/5e/images/two-handed-sword.svg +1 -0
- package/systems/5e/images/vial.svg +1 -0
- package/systems/5e/images/violin.svg +1 -0
- package/systems/5e/images/war-axe.svg +1 -0
- package/systems/5e/images/war-pick.svg +1 -0
- package/systems/5e/images/warhammer.svg +1 -0
- package/systems/5e/images/water-bottle.svg +1 -0
- package/systems/5e/images/waterskin.svg +1 -0
- package/systems/5e/images/wavy-chains.svg +1 -0
- package/systems/5e/images/wax-seal.svg +1 -0
- package/systems/5e/images/wheelbarrow.svg +1 -0
- package/systems/5e/images/whip.svg +1 -0
- package/systems/5e/images/whistle.svg +1 -0
- package/systems/5e/images/wing-cloak.svg +1 -0
- package/systems/5e/images/winged-scepter.svg +1 -0
- package/systems/5e/images/wizard-staff.svg +1 -0
- package/systems/5e/images/wolf-trap.svg +1 -0
- package/systems/5e/images/wood-canoe.svg +1 -0
- package/systems/5e/images/wood-club.svg +1 -0
- package/systems/5e/instructions/import.md +1 -0
- package/systems/5e/instructions/play.md +6 -0
- package/systems/5e/instructions/session-zero.md +1 -1
- package/systems/5e/package.json +11 -0
- package/systems/5e/system.yaml +231 -31
- package/systems/5e/words/ar.yaml +74 -0
- package/systems/5e/words/cs.yaml +74 -0
- package/systems/5e/words/da.yaml +74 -0
- package/systems/5e/words/de.yaml +74 -0
- package/systems/5e/words/el.yaml +74 -0
- package/systems/5e/words/en.yaml +20 -0
- package/systems/5e/words/es.yaml +74 -0
- package/systems/5e/words/fi.yaml +74 -0
- package/systems/5e/words/fr.yaml +74 -0
- package/systems/5e/words/he.yaml +74 -0
- package/systems/5e/words/hi.yaml +74 -0
- package/systems/5e/words/hu.yaml +74 -0
- package/systems/5e/words/is.yaml +74 -0
- package/systems/5e/words/it.yaml +84 -1
- package/systems/5e/words/ja.yaml +74 -0
- package/systems/5e/words/ko.yaml +74 -0
- package/systems/5e/words/nb.yaml +74 -0
- package/systems/5e/words/nl.yaml +74 -0
- package/systems/5e/words/pl.yaml +74 -0
- package/systems/5e/words/pt.yaml +74 -0
- package/systems/5e/words/ro.yaml +74 -0
- package/systems/5e/words/ru.yaml +74 -0
- package/systems/5e/words/sv.yaml +74 -0
- package/systems/5e/words/tr.yaml +74 -0
- package/systems/5e/words/uk.yaml +74 -0
- package/systems/5e/words/zh.yaml +74 -0
- package/systems/5e/world/creatures/Aboleth.md +1 -0
- package/systems/5e/world/creatures/Adult Black Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Blue Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Brass Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Bronze Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Copper Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Gold Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Green Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Red Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult Silver Dragon.md +2 -0
- package/systems/5e/world/creatures/Adult White Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Black Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Blue Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Brass Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Bronze Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Copper Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Gold Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Green Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Red Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient Silver Dragon.md +2 -0
- package/systems/5e/world/creatures/Ancient White Dragon.md +2 -0
- package/systems/5e/world/creatures/Androsphinx.md +1 -0
- package/systems/5e/world/creatures/Dwarf.md +1 -0
- package/systems/5e/world/creatures/Gynosphinx.md +1 -0
- package/systems/5e/world/creatures/Kraken.md +1 -0
- package/systems/5e/world/creatures/Lich.md +2 -0
- package/systems/5e/world/creatures/Mummy Lord.md +1 -0
- package/systems/5e/world/creatures/Solar.md +1 -0
- package/systems/5e/world/creatures/Tarrasque.md +2 -0
- package/systems/5e/world/creatures/Unicorn.md +1 -0
- package/systems/5e/world/creatures/Vampire.md +2 -0
- package/systems/5e/world/items/Abacus.md +1 -0
- package/systems/5e/world/items/Acid.md +1 -0
- package/systems/5e/world/items/Adamantine Armor.md +1 -0
- package/systems/5e/world/items/Alchemist's Fire.md +1 -0
- package/systems/5e/world/items/Alchemist's Supplies.md +1 -0
- package/systems/5e/world/items/Ammunition, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Amulet of Health.md +2 -0
- package/systems/5e/world/items/Amulet of Proof against Detection and Location.md +1 -0
- package/systems/5e/world/items/Amulet of the Planes.md +1 -0
- package/systems/5e/world/items/Amulet.md +1 -0
- package/systems/5e/world/items/Animated Shield.md +1 -0
- package/systems/5e/world/items/Antitoxin.md +1 -0
- package/systems/5e/world/items/Apparatus of the Crab.md +1 -0
- package/systems/5e/world/items/Armor of Invulnerability.md +2 -0
- package/systems/5e/world/items/Armor of Resistance.md +1 -0
- package/systems/5e/world/items/Armor of Vulnerability.md +1 -0
- package/systems/5e/world/items/Armor, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Arrow of Slaying.md +1 -0
- package/systems/5e/world/items/Arrow-Catching Shield.md +1 -0
- package/systems/5e/world/items/Arrows.md +2 -0
- package/systems/5e/world/items/Backpack.md +1 -0
- package/systems/5e/world/items/Bag of Beans.md +1 -0
- package/systems/5e/world/items/Bag of Devouring.md +1 -0
- package/systems/5e/world/items/Bag of Holding.md +3 -0
- package/systems/5e/world/items/Bag of Tricks.md +1 -0
- package/systems/5e/world/items/Bagpipes.md +1 -0
- package/systems/5e/world/items/Ball Bearings.md +1 -0
- package/systems/5e/world/items/Barding.md +1 -0
- package/systems/5e/world/items/Barrel.md +1 -0
- package/systems/5e/world/items/Basic Poison.md +1 -0
- package/systems/5e/world/items/Basket.md +1 -0
- package/systems/5e/world/items/Battleaxe.md +1 -0
- package/systems/5e/world/items/Bead of Force.md +1 -0
- package/systems/5e/world/items/Bedroll.md +1 -0
- package/systems/5e/world/items/Bell.md +1 -0
- package/systems/5e/world/items/Belt of Dwarvenkind.md +1 -0
- package/systems/5e/world/items/Belt of Giant Strength.md +1 -0
- package/systems/5e/world/items/Berserker Axe.md +1 -0
- package/systems/5e/world/items/Bit and Bridle.md +1 -0
- package/systems/5e/world/items/Blanket.md +1 -0
- package/systems/5e/world/items/Block and Tackle.md +1 -0
- package/systems/5e/world/items/Blowgun Needles.md +2 -0
- package/systems/5e/world/items/Blowgun.md +1 -0
- package/systems/5e/world/items/Book.md +1 -0
- package/systems/5e/world/items/Boots of Elvenkind.md +1 -0
- package/systems/5e/world/items/Boots of Levitation.md +1 -0
- package/systems/5e/world/items/Boots of Speed.md +1 -0
- package/systems/5e/world/items/Boots of Striding and Springing.md +1 -0
- package/systems/5e/world/items/Boots of the Winterlands.md +2 -0
- package/systems/5e/world/items/Bowl of Commanding Water Elementals.md +1 -0
- package/systems/5e/world/items/Bracers of Archery.md +1 -0
- package/systems/5e/world/items/Bracers of Defense.md +1 -0
- package/systems/5e/world/items/Brazier of Commanding Fire Elementals.md +1 -0
- package/systems/5e/world/items/Breastplate.md +1 -0
- package/systems/5e/world/items/Brewer's Supplies.md +1 -0
- package/systems/5e/world/items/Brooch of Shielding.md +2 -0
- package/systems/5e/world/items/Broom of Flying.md +1 -0
- package/systems/5e/world/items/Bucket.md +1 -0
- package/systems/5e/world/items/Bullseye Lantern.md +1 -0
- package/systems/5e/world/items/Burglar's Pack.md +3 -0
- package/systems/5e/world/items/Calligrapher's Supplies.md +1 -0
- package/systems/5e/world/items/Caltrops.md +1 -0
- package/systems/5e/world/items/Candle of Invocation.md +1 -0
- package/systems/5e/world/items/Candle.md +1 -0
- package/systems/5e/world/items/Cape of the Mountebank.md +1 -0
- package/systems/5e/world/items/Carpenter's Tools.md +1 -0
- package/systems/5e/world/items/Carpet of Flying.md +1 -0
- package/systems/5e/world/items/Carriage.md +1 -0
- package/systems/5e/world/items/Cart.md +1 -0
- package/systems/5e/world/items/Cartographer's Tools.md +1 -0
- package/systems/5e/world/items/Censer of Controlling Air Elementals.md +1 -0
- package/systems/5e/world/items/Chain Mail.md +2 -0
- package/systems/5e/world/items/Chain Shirt.md +1 -0
- package/systems/5e/world/items/Chain.md +1 -0
- package/systems/5e/world/items/Chalk.md +1 -0
- package/systems/5e/world/items/Chariot.md +1 -0
- package/systems/5e/world/items/Chest.md +1 -0
- package/systems/5e/world/items/Chime of Opening.md +1 -0
- package/systems/5e/world/items/Circlet of Blasting.md +1 -0
- package/systems/5e/world/items/Climber's Kit.md +1 -0
- package/systems/5e/world/items/Cloak of Arachnida.md +2 -0
- package/systems/5e/world/items/Cloak of Displacement.md +1 -0
- package/systems/5e/world/items/Cloak of Elvenkind.md +1 -0
- package/systems/5e/world/items/Cloak of Protection.md +3 -0
- package/systems/5e/world/items/Cloak of the Bat.md +1 -0
- package/systems/5e/world/items/Cloak of the Manta Ray.md +1 -0
- package/systems/5e/world/items/Club.md +1 -0
- package/systems/5e/world/items/Cobbler's Tools.md +1 -0
- package/systems/5e/world/items/Common Clothes.md +1 -0
- package/systems/5e/world/items/Component Pouch.md +1 -0
- package/systems/5e/world/items/Cook's Utensils.md +1 -0
- package/systems/5e/world/items/Costume Clothes.md +1 -0
- package/systems/5e/world/items/Crossbow Bolt Case.md +1 -0
- package/systems/5e/world/items/Crossbow Bolts.md +2 -0
- package/systems/5e/world/items/Crowbar.md +1 -0
- package/systems/5e/world/items/Crystal Ball.md +1 -0
- package/systems/5e/world/items/Crystal.md +1 -0
- package/systems/5e/world/items/Cube of Force.md +2 -0
- package/systems/5e/world/items/Cubic Gate.md +2 -0
- package/systems/5e/world/items/Dagger of Venom.md +1 -0
- package/systems/5e/world/items/Dagger.md +1 -0
- package/systems/5e/world/items/Dancing Sword.md +1 -0
- package/systems/5e/world/items/Dart.md +1 -0
- package/systems/5e/world/items/Decanter of Endless Water.md +1 -0
- package/systems/5e/world/items/Deck of Illusions.md +1 -0
- package/systems/5e/world/items/Deck of Many Things.md +1 -0
- package/systems/5e/world/items/Defender.md +1 -0
- package/systems/5e/world/items/Demon Armor.md +1 -0
- package/systems/5e/world/items/Dice Set.md +1 -0
- package/systems/5e/world/items/Dimensional Shackles.md +1 -0
- package/systems/5e/world/items/Diplomat's Pack.md +3 -0
- package/systems/5e/world/items/Disguise Kit.md +1 -0
- package/systems/5e/world/items/Dragon Scale Mail.md +1 -0
- package/systems/5e/world/items/Dragon Slayer.md +1 -0
- package/systems/5e/world/items/Drum.md +1 -0
- package/systems/5e/world/items/Dulcimer.md +1 -0
- package/systems/5e/world/items/Dungeoneer's Pack.md +3 -0
- package/systems/5e/world/items/Dust of Disappearance.md +1 -0
- package/systems/5e/world/items/Dust of Dryness.md +1 -0
- package/systems/5e/world/items/Dust of Sneezing and Choking.md +1 -0
- package/systems/5e/world/items/Dwarven Plate.md +1 -0
- package/systems/5e/world/items/Dwarven Thrower.md +1 -0
- package/systems/5e/world/items/Efficient Quiver.md +1 -0
- package/systems/5e/world/items/Efreeti Bottle.md +1 -0
- package/systems/5e/world/items/Elemental Gem.md +1 -0
- package/systems/5e/world/items/Elven Chain.md +1 -0
- package/systems/5e/world/items/Emblem.md +1 -0
- package/systems/5e/world/items/Entertainer's Pack.md +3 -0
- package/systems/5e/world/items/Eversmoking Bottle.md +1 -0
- package/systems/5e/world/items/Exotic Saddle.md +1 -0
- package/systems/5e/world/items/Explorer's Pack.md +3 -0
- package/systems/5e/world/items/Eyes of Charming.md +1 -0
- package/systems/5e/world/items/Eyes of Minute Seeing.md +1 -0
- package/systems/5e/world/items/Eyes of the Eagle.md +1 -0
- package/systems/5e/world/items/Feather Token.md +1 -0
- package/systems/5e/world/items/Feed.md +1 -0
- package/systems/5e/world/items/Figurine of Wondrous Power.md +1 -0
- package/systems/5e/world/items/Fine Clothes.md +1 -0
- package/systems/5e/world/items/Fishing Tackle.md +1 -0
- package/systems/5e/world/items/Flail.md +1 -0
- package/systems/5e/world/items/Flame Tongue.md +1 -0
- package/systems/5e/world/items/Flask or Tankard.md +1 -0
- package/systems/5e/world/items/Flute.md +1 -0
- package/systems/5e/world/items/Folding Boat.md +1 -0
- package/systems/5e/world/items/Forgery Kit.md +1 -0
- package/systems/5e/world/items/Frost Brand.md +2 -0
- package/systems/5e/world/items/Galley.md +1 -0
- package/systems/5e/world/items/Gauntlets of Ogre Power.md +2 -0
- package/systems/5e/world/items/Gem of Brightness.md +2 -0
- package/systems/5e/world/items/Gem of Seeing.md +2 -0
- package/systems/5e/world/items/Giant Slayer.md +1 -0
- package/systems/5e/world/items/Glaive.md +1 -0
- package/systems/5e/world/items/Glamoured Studded Leather.md +1 -0
- package/systems/5e/world/items/Glass Bottle.md +1 -0
- package/systems/5e/world/items/Glassblower's Tools.md +1 -0
- package/systems/5e/world/items/Gloves of Missile Snaring.md +1 -0
- package/systems/5e/world/items/Gloves of Swimming and Climbing.md +1 -0
- package/systems/5e/world/items/Goggles of Night.md +1 -0
- package/systems/5e/world/items/Grappling Hook.md +1 -0
- package/systems/5e/world/items/Greataxe.md +1 -0
- package/systems/5e/world/items/Greatclub.md +1 -0
- package/systems/5e/world/items/Greatsword.md +1 -0
- package/systems/5e/world/items/Halberd.md +1 -0
- package/systems/5e/world/items/Half Plate Armor.md +1 -0
- package/systems/5e/world/items/Hammer of Thunderbolts.md +2 -0
- package/systems/5e/world/items/Hammer.md +1 -0
- package/systems/5e/world/items/Hand Crossbow.md +1 -0
- package/systems/5e/world/items/Handaxe.md +1 -0
- package/systems/5e/world/items/Handy Haversack.md +3 -0
- package/systems/5e/world/items/Hat of Disguise.md +1 -0
- package/systems/5e/world/items/Headband of Intellect.md +2 -0
- package/systems/5e/world/items/Healer's Kit.md +1 -0
- package/systems/5e/world/items/Heavy Crossbow.md +1 -0
- package/systems/5e/world/items/Helm of Brilliance.md +1 -0
- package/systems/5e/world/items/Helm of Comprehending Languages.md +1 -0
- package/systems/5e/world/items/Helm of Telepathy.md +1 -0
- package/systems/5e/world/items/Helm of Teleportation.md +2 -0
- package/systems/5e/world/items/Hempen Rope.md +1 -0
- package/systems/5e/world/items/Herbalism Kit.md +1 -0
- package/systems/5e/world/items/Hide Armor.md +1 -0
- package/systems/5e/world/items/Holy Avenger.md +1 -0
- package/systems/5e/world/items/Holy Water.md +1 -0
- package/systems/5e/world/items/Hooded Lantern.md +1 -0
- package/systems/5e/world/items/Horn of Blasting.md +1 -0
- package/systems/5e/world/items/Horn of Valhalla.md +1 -0
- package/systems/5e/world/items/Horn.md +1 -0
- package/systems/5e/world/items/Horseshoes of Speed.md +1 -0
- package/systems/5e/world/items/Horseshoes of a Zephyr.md +1 -0
- package/systems/5e/world/items/Hourglass.md +1 -0
- package/systems/5e/world/items/Hunting Trap.md +1 -0
- package/systems/5e/world/items/Immovable Rod.md +1 -0
- package/systems/5e/world/items/Ink Pen.md +1 -0
- package/systems/5e/world/items/Ink.md +1 -0
- package/systems/5e/world/items/Instant Fortress.md +1 -0
- package/systems/5e/world/items/Ioun Stone.md +1 -0
- package/systems/5e/world/items/Iron Bands of Binding.md +1 -0
- package/systems/5e/world/items/Iron Flask.md +1 -0
- package/systems/5e/world/items/Iron Pot.md +1 -0
- package/systems/5e/world/items/Iron Spikes.md +2 -0
- package/systems/5e/world/items/Javelin of Lightning.md +1 -0
- package/systems/5e/world/items/Javelin.md +1 -0
- package/systems/5e/world/items/Jeweler's Tools.md +1 -0
- package/systems/5e/world/items/Jug or Pitcher.md +1 -0
- package/systems/5e/world/items/Keelboat.md +1 -0
- package/systems/5e/world/items/Ladder.md +1 -0
- package/systems/5e/world/items/Lamp.md +1 -0
- package/systems/5e/world/items/Lance.md +1 -0
- package/systems/5e/world/items/Lantern of Revealing.md +1 -0
- package/systems/5e/world/items/Leather Armor.md +1 -0
- package/systems/5e/world/items/Leatherworker's Tools.md +1 -0
- package/systems/5e/world/items/Light Crossbow.md +1 -0
- package/systems/5e/world/items/Light Hammer.md +1 -0
- package/systems/5e/world/items/Lock.md +1 -0
- package/systems/5e/world/items/Longbow.md +1 -0
- package/systems/5e/world/items/Longship.md +1 -0
- package/systems/5e/world/items/Longsword.md +1 -0
- package/systems/5e/world/items/Luck Blade.md +1 -0
- package/systems/5e/world/items/Lute.md +1 -0
- package/systems/5e/world/items/Lyre.md +1 -0
- package/systems/5e/world/items/Mace of Disruption.md +1 -0
- package/systems/5e/world/items/Mace of Smiting.md +1 -0
- package/systems/5e/world/items/Mace of Terror.md +2 -0
- package/systems/5e/world/items/Mace.md +1 -0
- package/systems/5e/world/items/Magnifying Glass.md +1 -0
- package/systems/5e/world/items/Manacles.md +1 -0
- package/systems/5e/world/items/Mantle of Spell Resistance.md +1 -0
- package/systems/5e/world/items/Manual of Bodily Health.md +1 -0
- package/systems/5e/world/items/Manual of Gainful Exercise.md +1 -0
- package/systems/5e/world/items/Manual of Golems.md +1 -0
- package/systems/5e/world/items/Manual of Quickness of Action.md +1 -0
- package/systems/5e/world/items/Map or Scroll Case.md +1 -0
- package/systems/5e/world/items/Marvelous Pigments.md +1 -0
- package/systems/5e/world/items/Mason's Tools.md +1 -0
- package/systems/5e/world/items/Maul.md +1 -0
- package/systems/5e/world/items/Medallion of Thoughts.md +2 -0
- package/systems/5e/world/items/Merchant's Scale.md +1 -0
- package/systems/5e/world/items/Mess Kit.md +1 -0
- package/systems/5e/world/items/Military Saddle.md +1 -0
- package/systems/5e/world/items/Miner's Pick.md +1 -0
- package/systems/5e/world/items/Mirror of Life Trapping.md +1 -0
- package/systems/5e/world/items/Mithral Armor.md +1 -0
- package/systems/5e/world/items/Morningstar.md +1 -0
- package/systems/5e/world/items/Navigator's Tools.md +1 -0
- package/systems/5e/world/items/Necklace of Adaptation.md +1 -0
- package/systems/5e/world/items/Necklace of Fireballs.md +1 -0
- package/systems/5e/world/items/Necklace of Prayer Beads.md +1 -0
- package/systems/5e/world/items/Net.md +1 -0
- package/systems/5e/world/items/Nine Lives Stealer.md +1 -0
- package/systems/5e/world/items/Oathbow.md +1 -0
- package/systems/5e/world/items/Oil of Etherealness.md +1 -0
- package/systems/5e/world/items/Oil of Sharpness.md +1 -0
- package/systems/5e/world/items/Oil of Slipperiness.md +1 -0
- package/systems/5e/world/items/Oil.md +1 -0
- package/systems/5e/world/items/Orb of Dragonkind.md +2 -0
- package/systems/5e/world/items/Orb.md +1 -0
- package/systems/5e/world/items/Pack Saddle.md +1 -0
- package/systems/5e/world/items/Padded Armor.md +1 -0
- package/systems/5e/world/items/Painter's Supplies.md +1 -0
- package/systems/5e/world/items/Pan Flute.md +1 -0
- package/systems/5e/world/items/Paper.md +1 -0
- package/systems/5e/world/items/Parchment.md +1 -0
- package/systems/5e/world/items/Pearl of Power.md +1 -0
- package/systems/5e/world/items/Perfume.md +1 -0
- package/systems/5e/world/items/Periapt of Health.md +1 -0
- package/systems/5e/world/items/Periapt of Proof against Poison.md +1 -0
- package/systems/5e/world/items/Periapt of Wound Closure.md +1 -0
- package/systems/5e/world/items/Philter of Love.md +1 -0
- package/systems/5e/world/items/Pike.md +1 -0
- package/systems/5e/world/items/Pipes of Haunting.md +1 -0
- package/systems/5e/world/items/Pipes of the Sewers.md +1 -0
- package/systems/5e/world/items/Piton.md +1 -0
- package/systems/5e/world/items/Plate Armor of Etherealness.md +1 -0
- package/systems/5e/world/items/Plate Armor.md +2 -0
- package/systems/5e/world/items/Playing Card Set.md +1 -0
- package/systems/5e/world/items/Poisoner's Kit.md +1 -0
- package/systems/5e/world/items/Pole.md +1 -0
- package/systems/5e/world/items/Portable Hole.md +2 -0
- package/systems/5e/world/items/Portable Ram.md +1 -0
- package/systems/5e/world/items/Potion of Animal Friendship.md +1 -0
- package/systems/5e/world/items/Potion of Clairvoyance.md +1 -0
- package/systems/5e/world/items/Potion of Climbing.md +1 -0
- package/systems/5e/world/items/Potion of Diminution.md +1 -0
- package/systems/5e/world/items/Potion of Flying.md +1 -0
- package/systems/5e/world/items/Potion of Gaseous Form.md +1 -0
- package/systems/5e/world/items/Potion of Giant Strength.md +1 -0
- package/systems/5e/world/items/Potion of Growth.md +1 -0
- package/systems/5e/world/items/Potion of Healing.md +1 -0
- package/systems/5e/world/items/Potion of Heroism.md +1 -0
- package/systems/5e/world/items/Potion of Invisibility.md +1 -0
- package/systems/5e/world/items/Potion of Mind Reading.md +1 -0
- package/systems/5e/world/items/Potion of Poison.md +1 -0
- package/systems/5e/world/items/Potion of Resistance.md +1 -0
- package/systems/5e/world/items/Potion of Speed.md +1 -0
- package/systems/5e/world/items/Potion of Water Breathing.md +1 -0
- package/systems/5e/world/items/Potter's Tools.md +1 -0
- package/systems/5e/world/items/Pouch.md +1 -0
- package/systems/5e/world/items/Priest's Pack.md +3 -0
- package/systems/5e/world/items/Quarterstaff.md +1 -0
- package/systems/5e/world/items/Quiver.md +1 -0
- package/systems/5e/world/items/Rapier.md +1 -0
- package/systems/5e/world/items/Rations.md +1 -0
- package/systems/5e/world/items/Reliquary.md +1 -0
- package/systems/5e/world/items/Restorative Ointment.md +1 -0
- package/systems/5e/world/items/Riding Saddle.md +1 -0
- package/systems/5e/world/items/Ring Mail.md +1 -0
- package/systems/5e/world/items/Ring of Animal Influence.md +2 -0
- package/systems/5e/world/items/Ring of Djinni Summoning.md +1 -0
- package/systems/5e/world/items/Ring of Elemental Command.md +2 -0
- package/systems/5e/world/items/Ring of Evasion.md +2 -0
- package/systems/5e/world/items/Ring of Feather Falling.md +1 -0
- package/systems/5e/world/items/Ring of Free Action.md +1 -0
- package/systems/5e/world/items/Ring of Invisibility.md +1 -0
- package/systems/5e/world/items/Ring of Jumping.md +1 -0
- package/systems/5e/world/items/Ring of Mind Shielding.md +1 -0
- package/systems/5e/world/items/Ring of Protection.md +3 -0
- package/systems/5e/world/items/Ring of Regeneration.md +1 -0
- package/systems/5e/world/items/Ring of Resistance.md +1 -0
- package/systems/5e/world/items/Ring of Shooting Stars.md +2 -0
- package/systems/5e/world/items/Ring of Spell Storing.md +1 -0
- package/systems/5e/world/items/Ring of Spell Turning.md +1 -0
- package/systems/5e/world/items/Ring of Swimming.md +1 -0
- package/systems/5e/world/items/Ring of Telekinesis.md +1 -0
- package/systems/5e/world/items/Ring of Three Wishes.md +1 -0
- package/systems/5e/world/items/Ring of Warmth.md +2 -0
- package/systems/5e/world/items/Ring of Water Walking.md +1 -0
- package/systems/5e/world/items/Ring of X-ray Vision.md +1 -0
- package/systems/5e/world/items/Ring of the Ram.md +2 -0
- package/systems/5e/world/items/Robe of Eyes.md +1 -0
- package/systems/5e/world/items/Robe of Scintillating Colors.md +2 -0
- package/systems/5e/world/items/Robe of Stars.md +1 -0
- package/systems/5e/world/items/Robe of Useful Items.md +1 -0
- package/systems/5e/world/items/Robe of the Archmagi.md +3 -0
- package/systems/5e/world/items/Robes.md +1 -0
- package/systems/5e/world/items/Rod of Absorption.md +1 -0
- package/systems/5e/world/items/Rod of Alertness.md +1 -0
- package/systems/5e/world/items/Rod of Lordly Might.md +1 -0
- package/systems/5e/world/items/Rod of Rulership.md +1 -0
- package/systems/5e/world/items/Rod of Security.md +1 -0
- package/systems/5e/world/items/Rod.md +1 -0
- package/systems/5e/world/items/Rope of Climbing.md +1 -0
- package/systems/5e/world/items/Rope of Entanglement.md +1 -0
- package/systems/5e/world/items/Rowboat.md +1 -0
- package/systems/5e/world/items/Sack.md +1 -0
- package/systems/5e/world/items/Saddlebags.md +1 -0
- package/systems/5e/world/items/Sailing Ship.md +1 -0
- package/systems/5e/world/items/Scale Mail.md +1 -0
- package/systems/5e/world/items/Scarab of Protection.md +2 -0
- package/systems/5e/world/items/Scholar's Pack.md +3 -0
- package/systems/5e/world/items/Scimitar of Speed.md +1 -0
- package/systems/5e/world/items/Scimitar.md +1 -0
- package/systems/5e/world/items/Sealing Wax.md +1 -0
- package/systems/5e/world/items/Shawm.md +1 -0
- package/systems/5e/world/items/Shield of Missile Attraction.md +2 -0
- package/systems/5e/world/items/Shield, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Shield.md +1 -0
- package/systems/5e/world/items/Shortbow.md +1 -0
- package/systems/5e/world/items/Shortsword.md +1 -0
- package/systems/5e/world/items/Shovel.md +1 -0
- package/systems/5e/world/items/Sickle.md +1 -0
- package/systems/5e/world/items/Signal Whistle.md +1 -0
- package/systems/5e/world/items/Signet Ring.md +1 -0
- package/systems/5e/world/items/Silk Rope.md +1 -0
- package/systems/5e/world/items/Sled.md +1 -0
- package/systems/5e/world/items/Sledgehammer.md +1 -0
- package/systems/5e/world/items/Sling Bullets.md +2 -0
- package/systems/5e/world/items/Sling.md +1 -0
- package/systems/5e/world/items/Slippers of Spider Climbing.md +1 -0
- package/systems/5e/world/items/Smith's Tools.md +1 -0
- package/systems/5e/world/items/Soap.md +1 -0
- package/systems/5e/world/items/Sovereign Glue.md +1 -0
- package/systems/5e/world/items/Spear.md +1 -0
- package/systems/5e/world/items/Spell Scroll.md +1 -0
- package/systems/5e/world/items/Spellbook.md +1 -0
- package/systems/5e/world/items/Spellguard Shield.md +1 -0
- package/systems/5e/world/items/Sphere of Annihilation.md +1 -0
- package/systems/5e/world/items/Splint Armor.md +2 -0
- package/systems/5e/world/items/Sprig of Mistletoe.md +1 -0
- package/systems/5e/world/items/Spyglass.md +1 -0
- package/systems/5e/world/items/Staff of Charming.md +1 -0
- package/systems/5e/world/items/Staff of Fire.md +3 -0
- package/systems/5e/world/items/Staff of Frost.md +3 -0
- package/systems/5e/world/items/Staff of Healing.md +2 -0
- package/systems/5e/world/items/Staff of Power.md +5 -0
- package/systems/5e/world/items/Staff of Striking.md +2 -0
- package/systems/5e/world/items/Staff of Swarming Insects.md +2 -0
- package/systems/5e/world/items/Staff of Thunder and Lightning.md +1 -0
- package/systems/5e/world/items/Staff of Withering.md +2 -0
- package/systems/5e/world/items/Staff of the Magi.md +3 -0
- package/systems/5e/world/items/Staff of the Python.md +1 -0
- package/systems/5e/world/items/Staff of the Woodlands.md +2 -0
- package/systems/5e/world/items/Staff.md +1 -0
- package/systems/5e/world/items/Steel Mirror.md +1 -0
- package/systems/5e/world/items/Stone of Controlling Earth Elementals.md +1 -0
- package/systems/5e/world/items/Stone of Good Luck.md +4 -0
- package/systems/5e/world/items/Studded Leather Armor.md +1 -0
- package/systems/5e/world/items/Sun Blade.md +1 -0
- package/systems/5e/world/items/Sword of Life Stealing.md +1 -0
- package/systems/5e/world/items/Sword of Sharpness.md +1 -0
- package/systems/5e/world/items/Sword of Wounding.md +1 -0
- package/systems/5e/world/items/Talisman of Pure Good.md +2 -0
- package/systems/5e/world/items/Talisman of Ultimate Evil.md +2 -0
- package/systems/5e/world/items/Talisman of the Sphere.md +1 -0
- package/systems/5e/world/items/Thieves' Tools.md +1 -0
- package/systems/5e/world/items/Tinderbox.md +1 -0
- package/systems/5e/world/items/Tinker's Tools.md +1 -0
- package/systems/5e/world/items/Tome of Clear Thought.md +1 -0
- package/systems/5e/world/items/Tome of Leadership and Influence.md +1 -0
- package/systems/5e/world/items/Tome of Understanding.md +1 -0
- package/systems/5e/world/items/Torch.md +1 -0
- package/systems/5e/world/items/Totem.md +1 -0
- package/systems/5e/world/items/Traveler's Clothes.md +1 -0
- package/systems/5e/world/items/Trident of Fish Command.md +2 -0
- package/systems/5e/world/items/Trident.md +1 -0
- package/systems/5e/world/items/Two-Person Tent.md +1 -0
- package/systems/5e/world/items/Unarmed Strike.md +1 -0
- package/systems/5e/world/items/Universal Solvent.md +1 -0
- package/systems/5e/world/items/Vial.md +1 -0
- package/systems/5e/world/items/Vicious Weapon.md +1 -0
- package/systems/5e/world/items/Viol.md +1 -0
- package/systems/5e/world/items/Vorpal Sword.md +1 -0
- package/systems/5e/world/items/Wagon.md +1 -0
- package/systems/5e/world/items/Wand of Binding.md +2 -0
- package/systems/5e/world/items/Wand of Enemy Detection.md +2 -0
- package/systems/5e/world/items/Wand of Fear.md +2 -0
- package/systems/5e/world/items/Wand of Fireballs.md +2 -0
- package/systems/5e/world/items/Wand of Lightning Bolts.md +2 -0
- package/systems/5e/world/items/Wand of Magic Detection.md +2 -0
- package/systems/5e/world/items/Wand of Magic Missiles.md +2 -0
- package/systems/5e/world/items/Wand of Paralysis.md +2 -0
- package/systems/5e/world/items/Wand of Polymorph.md +2 -0
- package/systems/5e/world/items/Wand of Secrets.md +2 -0
- package/systems/5e/world/items/Wand of Web.md +2 -0
- package/systems/5e/world/items/Wand of Wonder.md +2 -0
- package/systems/5e/world/items/Wand of the War Mage, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Wand.md +1 -0
- package/systems/5e/world/items/War Pick.md +1 -0
- package/systems/5e/world/items/Warhammer.md +1 -0
- package/systems/5e/world/items/Warship.md +1 -0
- package/systems/5e/world/items/Waterskin.md +1 -0
- package/systems/5e/world/items/Weapon, +1, +2, or +3.md +1 -0
- package/systems/5e/world/items/Weaver's Tools.md +1 -0
- package/systems/5e/world/items/Well of Many Worlds.md +1 -0
- package/systems/5e/world/items/Whetstone.md +1 -0
- package/systems/5e/world/items/Whip.md +1 -0
- package/systems/5e/world/items/Wind Fan.md +1 -0
- package/systems/5e/world/items/Winged Boots.md +1 -0
- package/systems/5e/world/items/Wings of Flying.md +1 -0
- package/systems/5e/world/items/Woodcarver's Tools.md +1 -0
- package/systems/5e/world/items/Wooden Staff.md +1 -0
- package/systems/5e/world/items/Yew Wand.md +1 -0
- package/systems/free/instructions/play.md +5 -0
- package/systems/free/instructions/session-zero.md +1 -0
- package/systems/free/system.yaml +12 -0
- package/dist/dashboard/combat.js +0 -72
package/dist/mcp-server.js
CHANGED
|
@@ -1,19 +1,26 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
|
-
import {
|
|
3
|
+
import { spawn } from "node:child_process";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { findCampaign, hasCharacterAgent, refreshHostFiles } from "./campaign/index.js";
|
|
4
6
|
import { extensionCommands } from "./commands/game-extensions.js";
|
|
5
7
|
import { outsideNews, whileClosedNews } from "./commands/game-outside.js";
|
|
6
8
|
import { newChatText, wentBackTo } from "./commands/game-saves.js";
|
|
7
9
|
import { campaignWorld } from "./commands/game-world.js";
|
|
8
10
|
import { commands } from "./commands/index.js";
|
|
11
|
+
import { systemConfirm } from "./confirm/index.js";
|
|
9
12
|
import { defaultContext, packagesFolder } from "./core/context.js";
|
|
13
|
+
import { downloadBytes } from "./core/download.js";
|
|
10
14
|
import { SessionStore } from "./core/session-store.js";
|
|
11
15
|
import { FileStore, withFiles } from "./core/store.js";
|
|
12
16
|
import { getVersion } from "./core/version.js";
|
|
13
17
|
import { startDashboard } from "./dashboard-server.js";
|
|
18
|
+
import { systemPageReader } from "./documents/index.js";
|
|
14
19
|
import { npmPackages } from "./extensions/index.js";
|
|
15
|
-
import { startInstructions } from "./instructions/index.js";
|
|
16
|
-
import {
|
|
20
|
+
import { hostInstructions, startInstructions } from "./instructions/index.js";
|
|
21
|
+
import { libraryRunner } from "./library-reader.js";
|
|
22
|
+
import { computerHelpers, hostPictures, hostReader, hostWriter } from "./pictures/index.js";
|
|
23
|
+
import { loadSystemCode } from "./systems/index.js";
|
|
17
24
|
// How long the player may take to click: as long as a host waits for a tool call that keeps reporting progress.
|
|
18
25
|
const playerWait = 30 * 60 * 1000;
|
|
19
26
|
// While the player decides, the call reports progress this often, so that a host does not take it for a call that hangs.
|
|
@@ -36,6 +43,7 @@ export function createMcpServer(context = defaultContext(), environment = proces
|
|
|
36
43
|
const askingTools = [];
|
|
37
44
|
// A server lives as long as its chat: it gives each part of the instructions once (D-97).
|
|
38
45
|
context.told ??= new Set();
|
|
46
|
+
context.chat ??= { calls: 0 };
|
|
39
47
|
// What changed outside the chat's commands, at the head of each call (OUT-1–OUT-4).
|
|
40
48
|
const outside = context.files instanceof SessionStore ? watchOutside(context, context.files) : { take: () => [], giveBack: () => undefined };
|
|
41
49
|
// Before each call, once the files are read again: the dashboard opens, and its page asks the player too, so the asking tools are there, forms or not (ASK-1, D-279).
|
|
@@ -84,7 +92,24 @@ export async function startMcpServer() {
|
|
|
84
92
|
// The pictures, by the chat in use, which names itself as the session starts (D-308, D-390).
|
|
85
93
|
let server;
|
|
86
94
|
const host = () => server?.server.getClientVersion()?.name;
|
|
87
|
-
const context = {
|
|
95
|
+
const context = {
|
|
96
|
+
...defaultContext(),
|
|
97
|
+
pictures: hostPictures(host),
|
|
98
|
+
writer: hostWriter(host),
|
|
99
|
+
reader: hostReader(host),
|
|
100
|
+
// The command line that started this server runs the import apart, `rpg import` in the campaign's folder, with the chat's own helper.
|
|
101
|
+
importRunner: (root) => spawn(process.execPath, [process.argv[1] ?? "", "import"], { cwd: root, detached: true, stdio: "ignore", windowsHide: true, env: { ...process.env, RPG_HOST: host() ?? "" } }).unref(),
|
|
102
|
+
helpers: computerHelpers(),
|
|
103
|
+
packages: npmPackages(packagesFolder()),
|
|
104
|
+
confirm: systemConfirm(process.platform, process.env),
|
|
105
|
+
ocr: systemPageReader(process.platform, process.env),
|
|
106
|
+
readLibrary: libraryRunner(),
|
|
107
|
+
download: downloadBytes,
|
|
108
|
+
host,
|
|
109
|
+
chat: { calls: 0 },
|
|
110
|
+
};
|
|
111
|
+
// The systems' code, loaded once for the session, as the engine's own: a system changed since needs the server started again (D-448).
|
|
112
|
+
context.systemCode = await loadSystemCode(context.systemFolders);
|
|
88
113
|
const session = new SessionStore({ systemFolders: context.systemFolders });
|
|
89
114
|
const served = { ...context, files: session };
|
|
90
115
|
server = createMcpServer(served, process.env, dashboardOpener(served, session).open);
|
|
@@ -122,7 +147,9 @@ async function preload(context, session) {
|
|
|
122
147
|
const root = findCampaign(context.folder);
|
|
123
148
|
if (root !== undefined) {
|
|
124
149
|
session.track(root);
|
|
125
|
-
|
|
150
|
+
// An agent written now reaches only the chats after this one (D-490).
|
|
151
|
+
context.characterAgent = hasCharacterAgent(root);
|
|
152
|
+
refreshHostFiles(root, hostInstructions(), context.platform);
|
|
126
153
|
campaignWorld(root, context);
|
|
127
154
|
}
|
|
128
155
|
});
|
|
@@ -170,10 +197,50 @@ function extensionTools(server, context, handler) {
|
|
|
170
197
|
// One at a time, and never failing the call it follows.
|
|
171
198
|
return () => (running = running.then(sync).catch(() => undefined));
|
|
172
199
|
}
|
|
200
|
+
/**
|
|
201
|
+
* The host is shown each tool's parameters as they are, strict; the SDK lets any object through, so that runTool checks it and says how to call the tool:
|
|
202
|
+
* a master who calls one without loading its schema reads its parameters in the answer, not zod's words before our handler.
|
|
203
|
+
*/
|
|
173
204
|
function toolConfig(command) {
|
|
174
205
|
const annotations = command.readOnly ? { readOnlyHint: true } : undefined;
|
|
175
206
|
const meta = command.alwaysLoad ? { "anthropic/alwaysLoad": true } : undefined;
|
|
176
|
-
return { description: command.description, inputSchema:
|
|
207
|
+
return { description: command.description, inputSchema: z.looseObject({}).meta(shownInput(command)), annotations, _meta: meta };
|
|
208
|
+
}
|
|
209
|
+
// The JSON schema of each command's input, as the SDK would write it from the strict schema.
|
|
210
|
+
const shownInputs = new WeakMap();
|
|
211
|
+
function shownInput(command) {
|
|
212
|
+
let shown = shownInputs.get(command);
|
|
213
|
+
if (shown === undefined) {
|
|
214
|
+
shown = z.toJSONSchema(command.input.strict(), { target: "draft-7", io: "input" });
|
|
215
|
+
shownInputs.set(command, shown);
|
|
216
|
+
}
|
|
217
|
+
return shown;
|
|
218
|
+
}
|
|
219
|
+
/** The command's input, checked as its schema says; what is wrong comes with every parameter the tool takes, for a call made without the schema. */
|
|
220
|
+
function checkedInput(command, input) {
|
|
221
|
+
const parsed = command.input.strict().safeParse(input ?? {});
|
|
222
|
+
if (parsed.success) {
|
|
223
|
+
return parsed.data;
|
|
224
|
+
}
|
|
225
|
+
const given = typeof input === "object" && input !== null ? input : {};
|
|
226
|
+
const wrong = parsed.error.issues.map((issue) => inputIssue(command.name, issue, given));
|
|
227
|
+
const shown = shownInput(command);
|
|
228
|
+
const required = shown.required ?? [];
|
|
229
|
+
const parameters = Object.entries(shown.properties ?? {}).map(([name, field]) => `- ${name}${required.includes(name) ? "" : " (optional)"}${field.description === undefined ? "" : `: ${field.description}`}`);
|
|
230
|
+
const takes = parameters.length === 0 ? `${command.name} takes no parameters.` : `${command.name} takes:\n${parameters.join("\n")}`;
|
|
231
|
+
throw new Error(`${wrong.join(" ")} Nothing changed: call it again with its parameters.\n${takes}`);
|
|
232
|
+
}
|
|
233
|
+
function inputIssue(tool, issue, given) {
|
|
234
|
+
const path = issue.path.map(String).join(".");
|
|
235
|
+
if (issue.code === "unrecognized_keys") {
|
|
236
|
+
const keys = issue.keys.join(", ");
|
|
237
|
+
return path === "" ? `${tool} has no parameter ${keys}.` : `${path} has no ${keys}.`;
|
|
238
|
+
}
|
|
239
|
+
// A parameter left out, whatever zod calls it: a missing word of a list is an invalid option to it.
|
|
240
|
+
if (issue.path.length === 1 && given[path] === undefined) {
|
|
241
|
+
return `${tool} needs ${path}.`;
|
|
242
|
+
}
|
|
243
|
+
return path === "" ? `${issue.message}.` : `${path}: ${issue.message}.`;
|
|
177
244
|
}
|
|
178
245
|
async function runTool(command, input, context, extra, prepare, outside) {
|
|
179
246
|
const keepAlive = command.needsPlayer
|
|
@@ -185,6 +252,14 @@ async function runTool(command, input, context, extra, prepare, outside) {
|
|
|
185
252
|
let changedOutside = [];
|
|
186
253
|
// What the chat was told before the call: an answer that never goes tells nothing, so its parts are told again (D-97).
|
|
187
254
|
const told = new Set(context.told);
|
|
255
|
+
const chat = context.chat;
|
|
256
|
+
const offered = chat?.dashboardOffered;
|
|
257
|
+
// Codex names its thread at each call: the player's sentences go to it (D-495).
|
|
258
|
+
const thread = extra._meta?.threadId;
|
|
259
|
+
if (chat !== undefined) {
|
|
260
|
+
chat.calls++;
|
|
261
|
+
chat.thread = typeof thread === "string" && thread !== "" ? thread : chat.thread;
|
|
262
|
+
}
|
|
188
263
|
try {
|
|
189
264
|
// In a session, the files that changed since the last call are read again; instructions starts a chat, or follows a summary: everything is checked (D-193).
|
|
190
265
|
if (context.files instanceof SessionStore) {
|
|
@@ -197,10 +272,11 @@ async function runTool(command, input, context, extra, prepare, outside) {
|
|
|
197
272
|
news = context.news?.();
|
|
198
273
|
return { content: [{ type: "text", text: [...(news?.lines ?? []), back.refused].join("\n\n") }], isError: true };
|
|
199
274
|
}
|
|
275
|
+
const checked = checkedInput(command, input);
|
|
200
276
|
// What changed outside the chat comes before the command runs on it, its events fired (OUT-3).
|
|
201
277
|
changedOutside = outside.take();
|
|
202
278
|
// The call's own context, with its cancel, as the user stopping it (ASK-9).
|
|
203
|
-
const text = command.format(await command.run(
|
|
279
|
+
const text = command.format(await command.run(checked, { ...context, signal: extra.signal }));
|
|
204
280
|
// What the player changed on the dashboard comes first, once, what they changed while the call waited included (D-341).
|
|
205
281
|
news = context.news?.();
|
|
206
282
|
return { content: [{ type: "text", text: [...(news?.lines ?? []), ...changedOutside, ...back.begun, text].join("\n\n") }] };
|
|
@@ -217,6 +293,13 @@ async function runTool(command, input, context, extra, prepare, outside) {
|
|
|
217
293
|
outside.giveBack(changedOutside);
|
|
218
294
|
context.told?.clear();
|
|
219
295
|
told.forEach((name) => context.told?.add(name));
|
|
296
|
+
if (chat !== undefined) {
|
|
297
|
+
chat.dashboardOffered = offered;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
if (chat !== undefined) {
|
|
301
|
+
chat.calls--;
|
|
302
|
+
chat.afterCall?.();
|
|
220
303
|
}
|
|
221
304
|
}
|
|
222
305
|
}
|
package/dist/money/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { addCoins, type Coin, coinList, coinsProblem, coinsText, formatAmount, formatTotal, isSafePurse, namesCoins, payCoins, type Payment, type Purse, readAmount, readCoins, readSignedAmount, totalOf } from "./money.ts";
|
|
1
|
+
export { addCoins, changeFrom, type Coin, coinList, coinsProblem, coinsText, formatAmount, formatTotal, isSafePurse, namesCoins, payCoins, type Payment, type Purse, readAmount, readCoins, readSignedAmount, takeCoins, totalOf, } from "./money.ts";
|
package/dist/money/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Money: coins of a campaign, amounts on the pages, paying with change (D-67, D-126–D-129). It knows no game: the coins are data.
|
|
2
|
-
export { addCoins, coinList, coinsProblem, coinsText, formatAmount, formatTotal, isSafePurse, namesCoins, payCoins, readAmount, readCoins, readSignedAmount, totalOf } from "./money.js";
|
|
2
|
+
export { addCoins, changeFrom, coinList, coinsProblem, coinsText, formatAmount, formatTotal, isSafePurse, namesCoins, payCoins, readAmount, readCoins, readSignedAmount, takeCoins, totalOf, } from "./money.js";
|
package/dist/money/money.d.ts
CHANGED
|
@@ -38,6 +38,8 @@ export declare function totalOf(purse: Purse, coins: Coin[]): number;
|
|
|
38
38
|
export declare function formatTotal(purse: Purse, coins: Coin[]): string;
|
|
39
39
|
/** The purse with coins added: they stay as they are given (MON-3). */
|
|
40
40
|
export declare function addCoins(purse: Purse, added: Purse): Purse;
|
|
41
|
+
/** The purse with coins taken out of it, as a payment hands them over. */
|
|
42
|
+
export declare function takeCoins(purse: Purse, taken: Purse): Purse;
|
|
41
43
|
/** Whether every count of a purse is a whole number that can be counted exactly. */
|
|
42
44
|
export declare function isSafePurse(purse: Purse, coins: Coin[]): boolean;
|
|
43
45
|
/**
|
|
@@ -46,3 +48,7 @@ export declare function isSafePurse(purse: Purse, coins: Coin[]): boolean;
|
|
|
46
48
|
* Undefined when the purse is worth less than the price.
|
|
47
49
|
*/
|
|
48
50
|
export declare function payCoins(purse: Purse, price: Purse, coins: Coin[]): Payment | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* The change one gives from a purse of one's own (STK-8): `amount` in coins it holds, never rare ones, from the largest; undefined when they do not make it exactly.
|
|
53
|
+
*/
|
|
54
|
+
export declare function changeFrom(purse: Purse, amount: number, coins: Coin[]): Purse | undefined;
|
package/dist/money/money.js
CHANGED
|
@@ -111,6 +111,10 @@ export function addCoins(purse, added) {
|
|
|
111
111
|
}
|
|
112
112
|
return result;
|
|
113
113
|
}
|
|
114
|
+
/** The purse with coins taken out of it, as a payment hands them over. */
|
|
115
|
+
export function takeCoins(purse, taken) {
|
|
116
|
+
return withoutEmpty(addCoins(purse, negate(taken)));
|
|
117
|
+
}
|
|
114
118
|
/** Whether every count of a purse is a whole number that can be counted exactly. */
|
|
115
119
|
export function isSafePurse(purse, coins) {
|
|
116
120
|
return Object.values(purse).every((count) => Number.isSafeInteger(count)) && Number.isSafeInteger(totalOf(purse, coins));
|
|
@@ -145,6 +149,13 @@ export function payCoins(purse, price, coins) {
|
|
|
145
149
|
const back = change(handed - rest, ordered.filter((coin) => !coin.rare));
|
|
146
150
|
return { purse: withoutEmpty(addCoins(addCoins(result, negate(given)), back)), given: withoutEmpty(given), back: withoutEmpty(back) };
|
|
147
151
|
}
|
|
152
|
+
/**
|
|
153
|
+
* The change one gives from a purse of one's own (STK-8): `amount` in coins it holds, never rare ones, from the largest; undefined when they do not make it exactly.
|
|
154
|
+
*/
|
|
155
|
+
export function changeFrom(purse, amount, coins) {
|
|
156
|
+
const given = exactly(purse, byValue(coins).filter((coin) => !coin.rare), amount);
|
|
157
|
+
return given === undefined ? undefined : withoutEmpty(given);
|
|
158
|
+
}
|
|
148
159
|
/** The value and rarity of a coin as the list writes them: 100, or "1000 rare". */
|
|
149
160
|
function readWorth(worth) {
|
|
150
161
|
const match = typeof worth === "string" ? /^(\d+)\s+rare$/i.exec(worth.trim()) : null;
|
package/dist/page-words.js
CHANGED
|
@@ -5,6 +5,7 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
|
5
5
|
import { dirname, join } from "node:path";
|
|
6
6
|
import { stringify } from "yaml";
|
|
7
7
|
import { files } from "./core/store.js";
|
|
8
|
+
import { languagePackFor, packPhrases } from "./languages/index.js";
|
|
8
9
|
import { systemWords } from "./systems/index.js";
|
|
9
10
|
// How many phrases go in one request.
|
|
10
11
|
const batchSize = 130;
|
|
@@ -48,7 +49,9 @@ export function pageTranslator(context, page, notify) {
|
|
|
48
49
|
};
|
|
49
50
|
return {
|
|
50
51
|
read: (language, system) => {
|
|
51
|
-
|
|
52
|
+
// A translation made by hand, installed as a package, comes before the one made on the fly (D-485 (3)).
|
|
53
|
+
const pack = languagePackFor(context.extensionFolders ?? [], language);
|
|
54
|
+
const own = { ...(context.home === undefined ? {} : readJson(join(context.home, "i18n", `${language}.json`))), ...(pack === undefined ? {} : packPhrases(pack)) };
|
|
52
55
|
const missing = Object.keys(reference()).filter((phrase) => !(phrase in own)).length;
|
|
53
56
|
const can = context.writer?.ready() === true && context.home !== undefined;
|
|
54
57
|
const waiting = context.now().getTime() - (stopped.get(language) ?? -pause) < pause;
|
package/dist/pages/check.d.ts
CHANGED
|
@@ -5,5 +5,10 @@ import { type Page, type World } from "./world.ts";
|
|
|
5
5
|
* A world never changes: its problems are found once, and a session of the MCP server keeps the world while its files do not change (D-194).
|
|
6
6
|
*/
|
|
7
7
|
export declare function checkWorld(world: World): Problem[];
|
|
8
|
+
/**
|
|
9
|
+
* A number without a maximum named as goods in the plural, as torches: 7 or crossbow-bolts: 20: what a stack counts, written as a field nothing spends (STK-13); `names` are
|
|
10
|
+
* the fields to look at, all of them when left out. A name in the singular, as lock: 15, is some other number.
|
|
11
|
+
*/
|
|
12
|
+
export declare function goodsFieldProblems(world: World, page: Page, names?: string[]): Problem[];
|
|
8
13
|
/** What a character has equipped and does not hold (CON-12), as write says it after a change of its inventory or of what it has equipped. */
|
|
9
14
|
export declare function equippedNotes(world: World, character: Page): string[];
|
package/dist/pages/check.js
CHANGED
|
@@ -4,9 +4,12 @@ import { readEnvironment } from "./environment.js";
|
|
|
4
4
|
import { baseChain, baseFieldOf, baseProblem, derivedPages, shownPart } from "./inheritance.js";
|
|
5
5
|
import { links, readSection, repeatedNames, unreadSecretLines } from "./markdown.js";
|
|
6
6
|
import { readStops } from "./roads.js";
|
|
7
|
+
import { countedText, entryOfKind, readEntry } from "./stack-entry.js";
|
|
8
|
+
import { missingKindMessage } from "./stack-writes.js";
|
|
9
|
+
import { carriesKind, entryPage, goodsNamed, isKind, notKindReason, stacksOf } from "./stacks.js";
|
|
7
10
|
import { canHold, containerFieldOf, containerFields, heldTypesText, isEmptyField, isStandardField, misspelledStandardField, standardFieldProblem } from "./standard-fields.js";
|
|
8
|
-
import { alwaysInList, alwaysInMessage, systemKnowsReason, systemLabel } from "./system-pages.js";
|
|
9
|
-
import { linksIn, locate, systemFirstFix, systemPageNamed, textsIn, validHoldersOf } from "./world.js";
|
|
11
|
+
import { alwaysInList, alwaysInMessage, declaredKind, systemKnowsReason, systemLabel } from "./system-pages.js";
|
|
12
|
+
import { isCountedItem, linksIn, locate, pageNamed, systemFirstFix, systemPageNamed, textsIn, validHoldersOf } from "./world.js";
|
|
10
13
|
/**
|
|
11
14
|
* The exact checks on the world's pages (D-58, first level): files that cannot be read, repeated names, standard fields, links, containers, environments.
|
|
12
15
|
* A world never changes: its problems are found once, and a session of the MCP server keeps the world while its files do not change (D-194).
|
|
@@ -34,6 +37,7 @@ function worldProblems(world) {
|
|
|
34
37
|
...publicKnowsProblems(world, pagesByName, page),
|
|
35
38
|
...containerProblems(world, pagesByName, listingsByName, page),
|
|
36
39
|
...equippedProblems(world, pagesByName, page),
|
|
40
|
+
...stackProblems(world, page),
|
|
37
41
|
...stopProblems(world, pagesByName, page),
|
|
38
42
|
...pageAlone.environment(page),
|
|
39
43
|
...pageAlone.sections(page),
|
|
@@ -112,7 +116,9 @@ function repeatedFieldProblems(page) {
|
|
|
112
116
|
function linkProblems(world, pagesByName, page) {
|
|
113
117
|
const inFields = Object.entries(page.fields).flatMap(([field, value]) => textsIn(value).flatMap((entry) => links(entry).map((link) => ({ link, field, entry, inList: Array.isArray(value) }))));
|
|
114
118
|
const inText = links(page.body).map((link) => ({ link, field: undefined, entry: undefined, inList: false }));
|
|
115
|
-
|
|
119
|
+
const stackOfAlias = (entry, field) => entry !== undefined && field === containerFieldOf(page.type) && readEntry(entry).shape === "stack" && entryPage(world, links(entry)[0]?.page ?? "") === undefined
|
|
120
|
+
&& goodsNamed(world, links(entry)[0]?.page ?? "") !== undefined;
|
|
121
|
+
return [...inFields.filter((found) => !stackOfAlias(found.entry, found.field)), ...inText].flatMap((found) => {
|
|
116
122
|
const broken = brokenLink(world, pagesByName, found.link);
|
|
117
123
|
// While the campaign's system is missing, the link may be to one of its pages: removing it would break what derives from it.
|
|
118
124
|
const missing = broken === "which does not exist";
|
|
@@ -191,7 +197,8 @@ function containerProblems(world, pagesByName, listingsByName, page) {
|
|
|
191
197
|
const holders = listings.filter((listing) => listing.holder !== page && canHold(listing.holder.type, page.type));
|
|
192
198
|
const self = listings.find((listing) => listing.holder === page);
|
|
193
199
|
const problems = [];
|
|
194
|
-
|
|
200
|
+
// A kind counted in stacks is in no place, however many count it (STK-3).
|
|
201
|
+
if (holders.length > 1 && !isCountedItem(world, page)) {
|
|
195
202
|
const where = holders.map((listing) => listing.holder.name).join(" and in ");
|
|
196
203
|
problems.push({ path: page.path, message: `${page.name} is in ${where}; a thing is in one place only.`, fix: `move ${page.name}, to ${holders[0].holder.name} or wherever it is: it stays there only` });
|
|
197
204
|
}
|
|
@@ -231,8 +238,13 @@ function heldProblems(world, pagesByName, holder) {
|
|
|
231
238
|
fix: `write ${holder.name}, remove ${listing.field}=${listing.entry}`,
|
|
232
239
|
}];
|
|
233
240
|
}
|
|
241
|
+
// A kind of the system is counted in stacks, a link alone being 1 (STK-1).
|
|
242
|
+
if (system !== undefined && isKind(world, system)) {
|
|
243
|
+
return [];
|
|
244
|
+
}
|
|
234
245
|
if (system !== undefined) {
|
|
235
|
-
const
|
|
246
|
+
const reason = notKindReason(world, system);
|
|
247
|
+
const instead = system.type === "item" ? `; ${reason ?? "it is no kind to count"}: one that ${holder.name} has is an item of the campaign with item=[[${system.name}]]` : "";
|
|
236
248
|
return [{
|
|
237
249
|
path: holder.path,
|
|
238
250
|
message: `${holder.name} lists ${system.name} in ${listing.field}, but ${system.name} is ${systemLabel(system)}, a kind, which is nowhere${instead}.`,
|
|
@@ -247,6 +259,91 @@ function heldProblems(world, pagesByName, holder) {
|
|
|
247
259
|
return [{ path: holder.path, message, fix: `move ${page.name}, to a container that holds it, such as a place; or write ${holder.name}, remove ${listing.field}=${listing.entry}` }];
|
|
248
260
|
}));
|
|
249
261
|
}
|
|
262
|
+
/**
|
|
263
|
+
* The stacks a container lists, as validate checks them (STK-13): a count inside a text, an entry beside a kind that is no stack, a count beside what is no kind, a kind of the
|
|
264
|
+
* campaign without its count, a kind listed twice, and a number named as goods, as torches: 7, that should be a stack.
|
|
265
|
+
*/
|
|
266
|
+
function stackProblems(world, holder) {
|
|
267
|
+
const field = containerFieldOf(holder.type);
|
|
268
|
+
if (field === undefined) {
|
|
269
|
+
return [];
|
|
270
|
+
}
|
|
271
|
+
const entries = textsIn(holder.fields[field]);
|
|
272
|
+
const remove = (entry) => `write ${holder.name}, remove ${field}=${entry.includes(" ") ? `"${entry}"` : entry}`;
|
|
273
|
+
const problems = entries.flatMap((entry) => {
|
|
274
|
+
const read = readEntry(entry);
|
|
275
|
+
const page = read.shape === "text" ? undefined : entryPage(world, read.page);
|
|
276
|
+
if (read.shape === "text") {
|
|
277
|
+
const counted = countedText(entry);
|
|
278
|
+
const kind = counted === undefined ? undefined : pageNamedQuietly(world, counted.name);
|
|
279
|
+
const stack = counted !== undefined && kind !== undefined && isKind(world, kind) ? `"[[${kind.name}]] ${counted.count}"` : `"[[<kind>]] ${counted?.count ?? 1}"`;
|
|
280
|
+
return counted === undefined ? [] : [{
|
|
281
|
+
path: holder.path,
|
|
282
|
+
message: `${holder.name} lists "${entry}" in ${field}: a count inside a text, which nothing counts.`,
|
|
283
|
+
fix: `${remove(entry)}, add ${field}=${stack}, with a kind of the system or of the campaign`,
|
|
284
|
+
}];
|
|
285
|
+
}
|
|
286
|
+
if (read.shape === "other" && page !== undefined && isKind(world, page)) {
|
|
287
|
+
return [{ path: holder.path, message: `${holder.name} lists "${entry}" in ${field}: no stack, so it counts nothing.`, fix: `${remove(entry)}, add ${field}="[[${page.name}]] <how many>"` }];
|
|
288
|
+
}
|
|
289
|
+
if (read.shape === "stack" && page === undefined && goodsNamed(world, read.page) !== undefined) {
|
|
290
|
+
return [{ path: holder.path, message: `${holder.name} counts [[${read.page}]] in ${field}, which counts nothing: ${missingKindMessage(world, holder, field, read)}`, fix: remove(entry) + ", then the stack above" }];
|
|
291
|
+
}
|
|
292
|
+
if (read.shape === "stack" && page !== undefined && !isKind(world, page)) {
|
|
293
|
+
const reason = notKindReason(world, page) ?? `${page.name} is one thing with a story of its own`;
|
|
294
|
+
return [{ path: holder.path, message: `${holder.name} counts ${page.name} in ${field}, but it is no kind to count: ${reason}.`, fix: `${remove(entry)}, and give ${holder.name} the thing itself with move` }];
|
|
295
|
+
}
|
|
296
|
+
if (read.shape === "link" && read.section === undefined && page !== undefined && page.system === undefined && isKind(world, page)) {
|
|
297
|
+
return [{
|
|
298
|
+
path: holder.path,
|
|
299
|
+
message: `${holder.name} lists ${page.name} in ${field} without a count, while other entries count it, so it is a kind, read here as 1.`,
|
|
300
|
+
fix: `if ${page.name} is a kind, ${remove(entry)}, add ${field}="[[${page.name}]] 1"; if it is one thing with a story of its own, take its counts away where others count it`,
|
|
301
|
+
}];
|
|
302
|
+
}
|
|
303
|
+
return [];
|
|
304
|
+
});
|
|
305
|
+
const twice = stacksOf(world, holder).filter((stack) => entries.filter((entry) => entryOfKind(entry, stack.kind.name)).length > 1);
|
|
306
|
+
return [
|
|
307
|
+
...problems,
|
|
308
|
+
...twice.map((stack) => ({
|
|
309
|
+
path: holder.path,
|
|
310
|
+
message: `${holder.name} lists ${stack.kind.name} more than once in ${field}: a container has one stack of each kind, read as ${stack.count}.`,
|
|
311
|
+
fix: `${remove(`[[${stack.kind.name}]]`)}, add ${field}="[[${stack.kind.name}]] ${stack.count}"`,
|
|
312
|
+
})),
|
|
313
|
+
...goodsFieldProblems(world, holder),
|
|
314
|
+
];
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* A number without a maximum named as goods in the plural, as torches: 7 or crossbow-bolts: 20: what a stack counts, written as a field nothing spends (STK-13); `names` are
|
|
318
|
+
* the fields to look at, all of them when left out. A name in the singular, as lock: 15, is some other number.
|
|
319
|
+
*/
|
|
320
|
+
export function goodsFieldProblems(world, page, names) {
|
|
321
|
+
const field = containerFieldOf(page.type);
|
|
322
|
+
if (field === undefined) {
|
|
323
|
+
return [];
|
|
324
|
+
}
|
|
325
|
+
return Object.entries(page.fields).filter(([name]) => names === undefined || names.some((wanted) => comparableText(wanted) === comparableText(name))).flatMap(([name, value]) => {
|
|
326
|
+
const count = typeof value === "number" ? value : typeof value === "string" && /^\s*\d+\s*$/.test(value) ? Number(value) : undefined;
|
|
327
|
+
if (count === undefined || !Number.isSafeInteger(count) || !/s$/i.test(name) || isStandardField(page.type, name) || declaredKind(world, name) !== undefined) {
|
|
328
|
+
return [];
|
|
329
|
+
}
|
|
330
|
+
const kind = goodsNamed(world, name);
|
|
331
|
+
return kind === undefined ? [] : [{
|
|
332
|
+
path: page.path,
|
|
333
|
+
message: `${page.name} counts ${name}: ${count} as a number, which no command spends: goods are a stack of ${kind.name} in ${field}.`,
|
|
334
|
+
fix: `write ${page.name}, unset ${name}, add ${field}="[[${kind.name}]] ${count}"`,
|
|
335
|
+
}];
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
/** The page with a name or alias, or none, without stopping at a name two pages share. */
|
|
339
|
+
function pageNamedQuietly(world, name) {
|
|
340
|
+
try {
|
|
341
|
+
return pageNamed(world, name);
|
|
342
|
+
}
|
|
343
|
+
catch {
|
|
344
|
+
return undefined;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
250
347
|
/** What a character has equipped and does not hold (CON-12), as write says it after a change of its inventory or of what it has equipped. */
|
|
251
348
|
export function equippedNotes(world, character) {
|
|
252
349
|
return equippedProblems(world, groupBy(world.pages, (page) => [page.name]), character).map((problem) => `${problem.message} Fix: ${problem.fix}.`);
|
|
@@ -280,6 +377,15 @@ function equippedProblems(world, pagesByName, character) {
|
|
|
280
377
|
if (system !== undefined && alwaysInList(world, system) !== undefined) {
|
|
281
378
|
return [{ path: character.path, message: `${character.name} has ${system.name} in equipped: ${alwaysInMessage(system, alwaysInList(world, system) ?? "")}`, fix: `write ${character.name}, remove equipped=${entry}` }];
|
|
282
379
|
}
|
|
380
|
+
const counted = system ?? (held?.length === 1 ? held[0] : undefined);
|
|
381
|
+
// A kind is equipped while the character carries a stack of it (STK-11).
|
|
382
|
+
if (counted !== undefined && isKind(world, counted)) {
|
|
383
|
+
return carriesKind(world, character, counted) ? [] : [{
|
|
384
|
+
path: character.path,
|
|
385
|
+
message: `${character.name} has ${counted.name} in equipped, but carries none: a character wears or wields only what it holds.`,
|
|
386
|
+
fix: `move ${counted.name}, from where some is, to ${character.name}, count 1; or write ${character.name}, remove equipped=${entry}`,
|
|
387
|
+
}];
|
|
388
|
+
}
|
|
283
389
|
if (system !== undefined) {
|
|
284
390
|
return [{
|
|
285
391
|
path: character.path,
|
|
@@ -1,15 +1,28 @@
|
|
|
1
1
|
import type { PageType } from "./page-types.ts";
|
|
2
2
|
import { type Page, type World } from "./world.ts";
|
|
3
|
-
/** A
|
|
3
|
+
/** A stack to set in a container's list (STK-3): the kind's name, its new count, 0 to take it away, and its label. */
|
|
4
|
+
export interface StackCount {
|
|
5
|
+
kind: string;
|
|
6
|
+
count: number;
|
|
7
|
+
label?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A planned move: the containers to write, in order, each with the entries it loses, as written, those it gains, the stacks it sets (STK-6) and the fields it sets, as a
|
|
11
|
+
* purse paid from (STK-8); the destination comes last.
|
|
12
|
+
*/
|
|
4
13
|
export interface MovePlan {
|
|
5
14
|
edits: {
|
|
6
15
|
holder: Page;
|
|
7
16
|
field: string;
|
|
8
17
|
remove: string[];
|
|
9
18
|
add: string[];
|
|
19
|
+
stacks?: StackCount[];
|
|
20
|
+
set?: Record<string, string>;
|
|
10
21
|
}[];
|
|
11
22
|
/** The pages that change place; the others were already only in the destination. */
|
|
12
23
|
moving: Page[];
|
|
24
|
+
/** Whether doing it again would hand things over twice, as a trade (STK-9): stopped halfway, it says what is left call by call. */
|
|
25
|
+
once?: boolean;
|
|
13
26
|
}
|
|
14
27
|
/**
|
|
15
28
|
* Plans moving pages into a container (CON-4): after it, each is only there. Every entry that points to one of them goes, however it is written and from
|
|
@@ -24,6 +37,11 @@ export declare function planLeave(world: World, pages: Page[]): MovePlan;
|
|
|
24
37
|
* one that cannot be read stops the move before anything is written. Returns the world after it.
|
|
25
38
|
*/
|
|
26
39
|
export declare function applyMove(world: World, plan: MovePlan): World;
|
|
40
|
+
/** A move stopped by a file that could not be written: the paths of the pages written before it, whose lines in the log the caller still writes (STK-9). */
|
|
41
|
+
export declare class MoveStopped extends Error {
|
|
42
|
+
readonly written: string[];
|
|
43
|
+
constructor(message: string, written: string[]);
|
|
44
|
+
}
|
|
27
45
|
/** Why a container cannot hold a page (CON-1), with the way out: where the page goes instead. */
|
|
28
46
|
export declare function holdRefusal(holder: {
|
|
29
47
|
name: string;
|
package/dist/pages/containers.js
CHANGED
|
@@ -4,6 +4,8 @@ import { files } from "../core/store.js";
|
|
|
4
4
|
import { comparableText, withArticle } from "../core/text.js";
|
|
5
5
|
import { links } from "./markdown.js";
|
|
6
6
|
import { changeFields, joinPageFile, readFields, splitPageFile } from "./page-file.js";
|
|
7
|
+
import { countOf, doubledKinds, entryOfKind, stackEntry, withStackCount } from "./stack-entry.js";
|
|
8
|
+
import { notKindReason } from "./stacks.js";
|
|
7
9
|
import { canHold, containerFieldOf, isEmptyField } from "./standard-fields.js";
|
|
8
10
|
import { heldSystemPageMessage, systemLabel } from "./system-pages.js";
|
|
9
11
|
import { linksIn, locate, readPage, withPage } from "./world.js";
|
|
@@ -79,11 +81,13 @@ export function applyMove(world, plan) {
|
|
|
79
81
|
const changed = holders.map((holder) => {
|
|
80
82
|
const fullPath = join(world.root, holder.path);
|
|
81
83
|
const file = splitPageFile(files().fresh(fullPath) ?? "");
|
|
82
|
-
const frontmatter = plan.edits.filter((edit) => edit.holder === holder).reduce((text, { field, remove, add }) => {
|
|
84
|
+
const frontmatter = plan.edits.filter((edit) => edit.holder === holder).reduce((text, { field, remove, add, stacks, set }) => {
|
|
83
85
|
const removed = remove.length === 0 ? text : changeFields(text, { remove: { [field]: remove } }, holder.path);
|
|
86
|
+
const added = add.length === 0 ? removed : changeFields(removed, { add: { [field]: add } }, holder.path);
|
|
87
|
+
const stacked = stacks === undefined || stacks.length === 0 ? added : withStacks(added, field, stacks, holder.path);
|
|
88
|
+
const counted = set === undefined ? stacked : changeFields(stacked, { set }, holder.path);
|
|
84
89
|
// A container left with nothing loses the field, as if it had never held anything.
|
|
85
|
-
|
|
86
|
-
return add.length === 0 ? emptied : changeFields(emptied, { add: { [field]: add } }, holder.path);
|
|
90
|
+
return isEmptyList(readFields(counted, holder.path)[field]) ? changeFields(counted, { unset: [field] }, holder.path) : counted;
|
|
87
91
|
}, file.frontmatter);
|
|
88
92
|
return { holder, fullPath, text: joinPageFile({ frontmatter, body: file.body }) };
|
|
89
93
|
});
|
|
@@ -93,14 +97,53 @@ export function applyMove(world, plan) {
|
|
|
93
97
|
files().write(fullPath, text);
|
|
94
98
|
}
|
|
95
99
|
catch (error) {
|
|
96
|
-
const written = changed.slice(0, index).map((file) => file.holder
|
|
97
|
-
const done = written.length === 0 ? "Nothing moved" : `Written already: ${written.join(", ")}`;
|
|
98
|
-
|
|
100
|
+
const written = changed.slice(0, index).map((file) => file.holder);
|
|
101
|
+
const done = written.length === 0 ? "Nothing moved" : `Written already: ${written.map((page) => page.name).join(", ")}`;
|
|
102
|
+
const why = `${holder.path} could not be written (${error instanceof Error ? error.message : String(error)}). ${done}`;
|
|
103
|
+
const left = plan.edits.filter((edit) => changed.slice(index).some((file) => file.holder === edit.holder));
|
|
104
|
+
const paths = written.map((page) => page.path);
|
|
105
|
+
// Doing a move of stacks or a trade again would hand things over twice (STK-9): what is left to write is said call by call.
|
|
106
|
+
if (written.length > 0 && (plan.once === true || plan.edits.some((edit) => (edit.stacks ?? []).length > 0))) {
|
|
107
|
+
throw new MoveStopped(`${why}: fix it, then finish with ${finishingCalls(left).join("; ")}.`, paths);
|
|
108
|
+
}
|
|
109
|
+
throw new MoveStopped(`${why}: fix it, then run the same move again, which finishes it.`, paths);
|
|
99
110
|
}
|
|
100
111
|
after = withPage(after, after.pages.find((page) => page.path === holder.path), readPage(world.root, fullPath));
|
|
101
112
|
}
|
|
102
113
|
return after;
|
|
103
114
|
}
|
|
115
|
+
/** A move stopped by a file that could not be written: the paths of the pages written before it, whose lines in the log the caller still writes (STK-9). */
|
|
116
|
+
export class MoveStopped extends Error {
|
|
117
|
+
written;
|
|
118
|
+
constructor(message, written) {
|
|
119
|
+
super(message);
|
|
120
|
+
this.written = written;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
/** A frontmatter with stacks set in a container's list, each written once in the place of its first entry (STK-3). */
|
|
124
|
+
function withStacks(frontmatter, field, stacks, path) {
|
|
125
|
+
const value = readFields(frontmatter, path)[field];
|
|
126
|
+
const set = stacks.reduce((entries, stack) => withStackCount(entries, stack.kind, stack.count, stack.label), Array.isArray(value) ? value : []);
|
|
127
|
+
// A list the engine writes holds one stack of each kind: the doubles written by hand become one, with their sum (STK-3).
|
|
128
|
+
const list = doubledKinds(set).reduce((entries, kind) => withStackCount(entries, kind, entries.filter((entry) => entryOfKind(entry, kind)).reduce((sum, entry) => sum + countOf(entry), 0)), set);
|
|
129
|
+
return changeFields(frontmatter, list.length === 0 ? { unset: [field] } : { set: { [field]: list } }, path);
|
|
130
|
+
}
|
|
131
|
+
/** The calls that finish the edits of a move stopped halfway, without doing again what is written (STK-9). */
|
|
132
|
+
function finishingCalls(edits) {
|
|
133
|
+
return edits.flatMap((edit) => [
|
|
134
|
+
...(edit.stacks ?? []).map((stack) => {
|
|
135
|
+
const had = entriesOf(edit.holder, edit.field).some((entry) => entryOfKind(entry, stack.kind));
|
|
136
|
+
return stack.count === 0
|
|
137
|
+
? `write ${edit.holder.name}, remove ${edit.field}=[[${stack.kind}]]`
|
|
138
|
+
: had
|
|
139
|
+
? `change ${edit.holder.name}, ${stack.kind}, to ${stack.count}`
|
|
140
|
+
: `write ${edit.holder.name}, add ${edit.field}="${stackEntry(stack.kind, stack.count, stack.label)}"`;
|
|
141
|
+
}),
|
|
142
|
+
...edit.remove.map((entry) => `write ${edit.holder.name}, remove ${edit.field}=${entry}`),
|
|
143
|
+
...edit.add.map((entry) => `write ${edit.holder.name}, add ${edit.field}=${entry}`),
|
|
144
|
+
...Object.entries(edit.set ?? {}).map(([field, value]) => `change ${edit.holder.name}, ${field}, to "${value}"`),
|
|
145
|
+
]);
|
|
146
|
+
}
|
|
104
147
|
/** Why a container cannot hold a page (CON-1), with the way out: where the page goes instead. */
|
|
105
148
|
export function holdRefusal(holder, held) {
|
|
106
149
|
if (held.type === "creature") {
|
|
@@ -122,7 +165,7 @@ export function holdRefusal(holder, held) {
|
|
|
122
165
|
/** A page goes only into a container that can hold it (CON-1), never into itself or into what it holds (CON-3); the pages of the game system go nowhere (SYS-6). */
|
|
123
166
|
function checkMove(world, page, destination) {
|
|
124
167
|
if (page.system !== undefined) {
|
|
125
|
-
throw new Error(`${heldSystemPageMessage(page, destination, world)} Nothing moved.`);
|
|
168
|
+
throw new Error(`${heldSystemPageMessage(page, destination, world, notKindReason(world, page))} Nothing moved.`);
|
|
126
169
|
}
|
|
127
170
|
if (destination.system !== undefined) {
|
|
128
171
|
throw new Error(`${destination.name} is ${systemLabel(destination)}, a kind, which holds nothing: ${page.name} goes into a page of the campaign. Nothing moved.`);
|
package/dist/pages/index.d.ts
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
export { checkWorld, equippedNotes } from "./check.ts";
|
|
2
|
-
export { applyMove, type MovePlan, planLeave, planMove } from "./containers.ts";
|
|
1
|
+
export { checkWorld, equippedNotes, goodsFieldProblems } from "./check.ts";
|
|
2
|
+
export { applyMove, type MovePlan, MoveStopped, planLeave, planMove, type StackCount } from "./containers.ts";
|
|
3
3
|
export { changedEnvironment, environmentAt, type EnvironmentEntry, formatEnvironmentEntry, placesAround, readEnvironment } from "./environment.ts";
|
|
4
4
|
export { baseChain, baseFieldOf, baseValue, derivedPages, followersOf, holdsField, type Inherited, inheritedByBase, inheritedFields, introductionFollowersOf, isNeverInherited, keepersOf, newBaseProblem, ownField, ownFieldChange, removedFieldName, sameAsBase, sectionFollowersOf, shownPart, uniquePage, writtenFieldName, } from "./inheritance.ts";
|
|
5
|
+
export { carriedWeight, type LoadRule, weightUnit } from "./load.ts";
|
|
5
6
|
export { type MapField, mapHelp, readMapField } from "./maps.ts";
|
|
6
|
-
export { everyGoalTicked, goalsIn, introductionText, type Link, links, readSection, secretNames, sectionTitles, type TextMode, textParts, unreadSecretLines, withoutComments } from "./markdown.ts";
|
|
7
|
-
export { changedFields, type FieldChange, formatFields, readFields, readFieldValue, splitPageFile } from "./page-file.ts";
|
|
7
|
+
export { everyGoalTicked, firstTable, goalsIn, introductionText, type Link, links, partContent, readSection, secretNames, sectionTitles, type TextMode, textParts, unreadSecretLines, withLinksAsWords, withoutComments, withoutFencedBlocks, } from "./markdown.ts";
|
|
8
|
+
export { changedFields, type FieldChange, formatFields, linkListItems, readFields, readFieldValue, splitPageFile } from "./page-file.ts";
|
|
8
9
|
export { type PageType, pageTypeNames, worldFolderName } from "./page-types.ts";
|
|
9
10
|
export { formatPosition, type Position, positionHelp, readPosition } from "./positions.ts";
|
|
10
11
|
export { applyRename, planRename, type Renamed, renamedLinks, type RenamePlan } from "./rename-page.ts";
|
|
11
12
|
export { readStops, type Stops, stopsHelp } from "./roads.ts";
|
|
13
|
+
export { countedText, entryOfKind, type EntryReading, isStackEntry, readEntry, stackEntry, withStackCount } from "./stack-entry.ts";
|
|
14
|
+
export { canCount, carriesKind, entryKind, entryPage, goodsNamed, type HeldStack, heldStacks, heldStacksOfKind, isKind, kindNamed, notKindReason, ownStack, type Stack, stackName, stacksOf } from "./stacks.ts";
|
|
12
15
|
export { canHold, containerFieldOf, containerFields, heldTypesText, isCounterField, isEmptyField, isFieldName, isStandardField, listFieldNames, misspelledFieldProblem, misspelledStandardField, newPageFields, standardValues, } from "./standard-fields.ts";
|
|
13
16
|
export { alwaysInList, alwaysInMessage, declaredKind, heldSystemPageMessage, hidingMessage, isDeclaredUncounted, kindMessage, readOnlyMessage, systemKnowsReason, systemLabel } from "./system-pages.ts";
|
|
14
|
-
export { type Backlink, backlinks, concernsPlayer, createWorld, findPage, heldNames, isInParty, isPartyMember, linksIn, loadWorld, locate, namesakes, type Page, pageFileNamed, type PageMatch, pageNamed, pagesWithName, pagesWithNameOrAlias, pageWithPath, parsePageReference, searchPages, searchSystemPages, systemFirstFix, type SystemInfo, systemPageNamed, type SystemPages, textsIn, validHoldersOf, withPage, type World, } from "./world.ts";
|
|
17
|
+
export { type Backlink, backlinks, bonusPages, concernsPlayer, createWorld, findPage, heldNames, isCountedItem, isInParty, isPartyMember, isPlayerCharacter, linksIn, loadWorld, locate, namesakes, type Page, pageFileNamed, type PageMatch, pageNamed, pagesWithName, pagesWithNameOrAlias, pageWithPath, parsePageReference, playerCharacters, searchPages, searchSystemPages, systemFirstFix, type SystemInfo, systemPageNamed, type SystemPages, textsIn, validHoldersOf, withPage, type World, } from "./world.ts";
|
|
15
18
|
export { checkFieldChange, type PageChange, writePage } from "./write-page.ts";
|
package/dist/pages/index.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
// The pages of the world: one markdown file with a YAML frontmatter for each thing with a name.
|
|
2
|
-
export { checkWorld, equippedNotes } from "./check.js";
|
|
3
|
-
export { applyMove, planLeave, planMove } from "./containers.js";
|
|
2
|
+
export { checkWorld, equippedNotes, goodsFieldProblems } from "./check.js";
|
|
3
|
+
export { applyMove, MoveStopped, planLeave, planMove } from "./containers.js";
|
|
4
4
|
export { changedEnvironment, environmentAt, formatEnvironmentEntry, placesAround, readEnvironment } from "./environment.js";
|
|
5
5
|
export { baseChain, baseFieldOf, baseValue, derivedPages, followersOf, holdsField, inheritedByBase, inheritedFields, introductionFollowersOf, isNeverInherited, keepersOf, newBaseProblem, ownField, ownFieldChange, removedFieldName, sameAsBase, sectionFollowersOf, shownPart, uniquePage, writtenFieldName, } from "./inheritance.js";
|
|
6
|
+
export { carriedWeight, weightUnit } from "./load.js";
|
|
6
7
|
export { mapHelp, readMapField } from "./maps.js";
|
|
7
|
-
export { everyGoalTicked, goalsIn, introductionText, links, readSection, secretNames, sectionTitles, textParts, unreadSecretLines, withoutComments } from "./markdown.js";
|
|
8
|
-
export { changedFields, formatFields, readFields, readFieldValue, splitPageFile } from "./page-file.js";
|
|
8
|
+
export { everyGoalTicked, firstTable, goalsIn, introductionText, links, partContent, readSection, secretNames, sectionTitles, textParts, unreadSecretLines, withLinksAsWords, withoutComments, withoutFencedBlocks, } from "./markdown.js";
|
|
9
|
+
export { changedFields, formatFields, linkListItems, readFields, readFieldValue, splitPageFile } from "./page-file.js";
|
|
9
10
|
export { pageTypeNames, worldFolderName } from "./page-types.js";
|
|
10
11
|
export { formatPosition, positionHelp, readPosition } from "./positions.js";
|
|
11
12
|
export { applyRename, planRename, renamedLinks } from "./rename-page.js";
|
|
12
13
|
export { readStops, stopsHelp } from "./roads.js";
|
|
14
|
+
export { countedText, entryOfKind, isStackEntry, readEntry, stackEntry, withStackCount } from "./stack-entry.js";
|
|
15
|
+
export { canCount, carriesKind, entryKind, entryPage, goodsNamed, heldStacks, heldStacksOfKind, isKind, kindNamed, notKindReason, ownStack, stackName, stacksOf } from "./stacks.js";
|
|
13
16
|
export { canHold, containerFieldOf, containerFields, heldTypesText, isCounterField, isEmptyField, isFieldName, isStandardField, listFieldNames, misspelledFieldProblem, misspelledStandardField, newPageFields, standardValues, } from "./standard-fields.js";
|
|
14
17
|
export { alwaysInList, alwaysInMessage, declaredKind, heldSystemPageMessage, hidingMessage, isDeclaredUncounted, kindMessage, readOnlyMessage, systemKnowsReason, systemLabel } from "./system-pages.js";
|
|
15
|
-
export { backlinks, concernsPlayer, createWorld, findPage, heldNames, isInParty, isPartyMember, linksIn, loadWorld, locate, namesakes, pageFileNamed, pageNamed, pagesWithName, pagesWithNameOrAlias, pageWithPath, parsePageReference, searchPages, searchSystemPages, systemFirstFix, systemPageNamed, textsIn, validHoldersOf, withPage, } from "./world.js";
|
|
18
|
+
export { backlinks, bonusPages, concernsPlayer, createWorld, findPage, heldNames, isCountedItem, isInParty, isPartyMember, isPlayerCharacter, linksIn, loadWorld, locate, namesakes, pageFileNamed, pageNamed, pagesWithName, pagesWithNameOrAlias, pageWithPath, parsePageReference, playerCharacters, searchPages, searchSystemPages, systemFirstFix, systemPageNamed, textsIn, validHoldersOf, withPage, } from "./world.js";
|
|
16
19
|
export { checkFieldChange, writePage } from "./write-page.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Page, type World } from "./world.ts";
|
|
2
|
+
/** How a system weighs what one carries: the field of an item's weight, how many coins make one unit of weight, and the field of an item whose contents weigh nothing. */
|
|
3
|
+
export interface LoadRule {
|
|
4
|
+
field: string;
|
|
5
|
+
coins?: number;
|
|
6
|
+
weightless?: string;
|
|
7
|
+
}
|
|
8
|
+
/** The weight a holder carries, coins included (LOAD-1). */
|
|
9
|
+
export declare function carriedWeight(world: World, rule: LoadRule, holder: Page): number;
|
|
10
|
+
/** The unit the system's weights are written in, as lb; undefined when no page says. */
|
|
11
|
+
export declare function weightUnit(world: World, field: string): string | undefined;
|