rpg-engine 0.15.0 → 0.17.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/dist/adventures/source.d.ts +3 -1
- package/dist/adventures/source.js +31 -1
- package/dist/campaign/find-campaign.js +8 -4
- package/dist/campaign/index.d.ts +1 -1
- package/dist/campaign/index.js +1 -1
- package/dist/campaign/settings.d.ts +6 -0
- package/dist/campaign/settings.js +22 -1
- package/dist/cli/cli.js +1 -1
- package/dist/cli/command-line.js +1 -1
- package/dist/commands/advance.d.ts +1 -1
- package/dist/commands/advance.js +6 -6
- package/dist/commands/ask.js +7 -7
- package/dist/commands/change/amounts.d.ts +32 -0
- package/dist/commands/change/amounts.js +150 -0
- package/dist/commands/change/change.d.ts +4 -54
- package/dist/commands/change/change.js +19 -749
- package/dist/commands/change/damage.d.ts +30 -0
- package/dist/commands/change/damage.js +73 -2
- package/dist/commands/change/dice.d.ts +34 -0
- package/dist/commands/change/dice.js +59 -0
- package/dist/commands/change/fields.d.ts +37 -0
- package/dist/commands/change/fields.js +156 -0
- package/dist/commands/change/holder.d.ts +48 -0
- package/dist/commands/change/holder.js +162 -0
- package/dist/commands/change/recipe-pace.js +1 -1
- package/dist/commands/change/recipe.d.ts +58 -0
- package/dist/commands/change/recipe.js +179 -0
- package/dist/commands/choices.js +3 -3
- package/dist/commands/config/config.d.ts +15 -0
- package/dist/commands/config/config.js +355 -0
- package/dist/commands/config/custom-levels.d.ts +7 -0
- package/dist/commands/config/custom-levels.js +32 -0
- package/dist/commands/{config.d.ts → config/dashboard.d.ts} +2 -24
- package/dist/commands/config/dashboard.js +171 -0
- package/dist/commands/config/entries.d.ts +17 -0
- package/dist/commands/config/entries.js +76 -0
- package/dist/commands/config/news.d.ts +7 -0
- package/dist/commands/config/news.js +88 -0
- package/dist/commands/config/shown.d.ts +9 -0
- package/dist/commands/config/shown.js +80 -0
- package/dist/commands/config/words.d.ts +27 -0
- package/dist/commands/config/words.js +204 -0
- package/dist/commands/effect.js +9 -9
- package/dist/commands/find.js +1 -1
- package/dist/commands/image.js +6 -6
- package/dist/commands/import/import.d.ts +0 -2
- package/dist/commands/import/import.js +68 -45
- package/dist/commands/import/run.js +1 -1
- package/dist/commands/index.js +3 -3
- package/dist/commands/init.js +2 -2
- package/dist/commands/install.js +1 -1
- package/dist/commands/instructions.js +6 -6
- package/dist/commands/mode.d.ts +2 -2
- package/dist/commands/mode.js +8 -8
- package/dist/commands/mood.js +4 -4
- package/dist/commands/move.js +10 -10
- package/dist/commands/package/consent.d.ts +11 -0
- package/dist/commands/package/consent.js +52 -0
- package/dist/commands/package/here.d.ts +51 -0
- package/dist/commands/package/here.js +128 -0
- package/dist/commands/package/install.d.ts +10 -0
- package/dist/commands/package/install.js +337 -0
- package/dist/commands/package/package.d.ts +18 -0
- package/dist/commands/package/package.js +270 -0
- package/dist/commands/package/result.d.ts +89 -0
- package/dist/commands/package/result.js +1 -0
- package/dist/commands/package/uninstall.d.ts +6 -0
- package/dist/commands/package/uninstall.js +70 -0
- package/dist/commands/rename.js +3 -3
- package/dist/commands/reveal.js +5 -5
- package/dist/commands/roll/roll.js +11 -9
- package/dist/commands/roll/tables.js +1 -1
- package/dist/commands/rules.d.ts +2 -2
- package/dist/commands/rules.js +3 -3
- package/dist/commands/save.d.ts +2 -2
- package/dist/commands/save.js +2 -2
- package/dist/commands/scene/close.d.ts +18 -0
- package/dist/commands/scene/close.js +179 -0
- package/dist/commands/scene/members.d.ts +14 -0
- package/dist/commands/scene/members.js +32 -0
- package/dist/commands/scene/open.d.ts +6 -0
- package/dist/commands/scene/open.js +298 -0
- package/dist/commands/scene/result.d.ts +98 -0
- package/dist/commands/scene/result.js +2 -0
- package/dist/commands/{scene.d.ts → scene/scene.d.ts} +10 -36
- package/dist/commands/scene/scene.js +210 -0
- package/dist/commands/scene/turns.d.ts +18 -0
- package/dist/commands/scene/turns.js +229 -0
- package/dist/commands/shared/books/adventure-layers.d.ts +89 -0
- package/dist/commands/shared/books/adventure-layers.js +201 -0
- package/dist/commands/shared/{adventures.d.ts → books/adventures.d.ts} +28 -9
- package/dist/commands/shared/{adventures.js → books/adventures.js} +77 -35
- package/dist/commands/shared/{library-reader.js → books/library-reader.js} +3 -3
- package/dist/commands/shared/{library.d.ts → books/library.d.ts} +2 -2
- package/dist/commands/shared/{library.js → books/library.js} +9 -9
- package/dist/commands/shared/{rules.d.ts → books/rules.d.ts} +2 -2
- package/dist/commands/shared/{rules.js → books/rules.js} +5 -5
- package/dist/commands/shared/{system-texts.d.ts → books/system-texts.d.ts} +2 -2
- package/dist/commands/shared/{system-texts.js → books/system-texts.js} +9 -8
- package/dist/commands/shared/{page-words.d.ts → books/words.d.ts} +2 -2
- package/dist/commands/shared/{page-words.js → books/words.js} +4 -4
- package/dist/commands/shared/{checks.d.ts → campaign/checks.d.ts} +3 -3
- package/dist/commands/shared/{checks.js → campaign/checks.js} +7 -7
- package/dist/commands/shared/{images.d.ts → campaign/images.d.ts} +3 -3
- package/dist/commands/shared/{images.js → campaign/images.js} +5 -5
- package/dist/commands/shared/{mode.d.ts → campaign/mode.d.ts} +4 -4
- package/dist/commands/shared/{mode.js → campaign/mode.js} +24 -13
- package/dist/commands/shared/{money.d.ts → campaign/money.d.ts} +3 -3
- package/dist/commands/shared/{money.js → campaign/money.js} +2 -2
- package/dist/commands/shared/{offers.d.ts → campaign/offers.d.ts} +3 -3
- package/dist/commands/shared/{offers.js → campaign/offers.js} +3 -3
- package/dist/commands/shared/{outside.d.ts → campaign/outside.d.ts} +3 -3
- package/dist/commands/shared/{outside.js → campaign/outside.js} +7 -7
- package/dist/commands/shared/{parts.d.ts → campaign/parts.d.ts} +3 -3
- package/dist/commands/shared/{parts.js → campaign/parts.js} +3 -3
- package/dist/commands/shared/{problems.d.ts → campaign/problems.d.ts} +3 -3
- package/dist/commands/shared/{problems.js → campaign/problems.js} +17 -17
- package/dist/commands/shared/{quests.d.ts → campaign/quests.d.ts} +4 -4
- package/dist/commands/shared/{quests.js → campaign/quests.js} +6 -6
- package/dist/commands/shared/{saves.d.ts → campaign/saves.d.ts} +4 -4
- package/dist/commands/shared/{saves.js → campaign/saves.js} +10 -10
- package/dist/commands/shared/{theme.d.ts → campaign/theme.d.ts} +3 -3
- package/dist/commands/shared/{theme.js → campaign/theme.js} +1 -1
- package/dist/commands/shared/{world.d.ts → campaign/world.d.ts} +5 -5
- package/dist/commands/shared/{world.js → campaign/world.js} +17 -14
- package/dist/commands/shared/{knowledge.d.ts → characters/knowledge.d.ts} +3 -3
- package/dist/commands/shared/{knowledge.js → characters/knowledge.js} +4 -4
- package/dist/commands/shared/{moods.d.ts → characters/moods.d.ts} +3 -3
- package/dist/commands/shared/{moods.js → characters/moods.js} +3 -3
- package/dist/commands/shared/characters/orders.d.ts +4 -0
- package/dist/commands/shared/characters/orders.js +10 -0
- package/dist/commands/shared/{thoughts.d.ts → characters/thoughts.d.ts} +9 -6
- package/dist/commands/shared/{thoughts.js → characters/thoughts.js} +17 -7
- package/dist/commands/shared/{voices.d.ts → characters/voices.d.ts} +1 -1
- package/dist/commands/shared/{voices.js → characters/voices.js} +2 -2
- package/dist/commands/shared/examples.js +2 -2
- package/dist/commands/shared/packages/catalog.js +2 -2
- package/dist/commands/shared/packages/code.d.ts +1 -1
- package/dist/commands/shared/packages/code.js +8 -8
- package/dist/commands/shared/packages/extensions.d.ts +1 -1
- package/dist/commands/shared/packages/extensions.js +1 -1
- package/dist/commands/shared/packages/hooks.d.ts +1 -1
- package/dist/commands/shared/packages/hooks.js +1 -1
- package/dist/commands/shared/packages/widgets.d.ts +3 -3
- package/dist/commands/shared/packages/widgets.js +3 -3
- package/dist/commands/shared/{environment.d.ts → places/environment.d.ts} +1 -1
- package/dist/commands/shared/{environment.js → places/environment.js} +4 -4
- package/dist/commands/shared/{grid-moves.d.ts → places/grid-moves.d.ts} +4 -4
- package/dist/commands/shared/{grid-moves.js → places/grid-moves.js} +8 -7
- package/dist/commands/shared/{grids.d.ts → places/grids.d.ts} +4 -4
- package/dist/commands/shared/{grids.js → places/grids.js} +6 -6
- package/dist/commands/shared/{journey.d.ts → places/journey.d.ts} +3 -3
- package/dist/commands/shared/{journey.js → places/journey.js} +6 -6
- package/dist/commands/shared/{moves.d.ts → places/moves.d.ts} +2 -2
- package/dist/commands/shared/{moves.js → places/moves.js} +4 -4
- package/dist/commands/shared/{positions.d.ts → places/positions.d.ts} +2 -2
- package/dist/commands/shared/{positions.js → places/positions.js} +4 -4
- package/dist/commands/shared/{roads.d.ts → places/roads.d.ts} +5 -5
- package/dist/commands/shared/{roads.js → places/roads.js} +6 -6
- package/dist/commands/shared/{effects.d.ts → scene/effects.d.ts} +7 -7
- package/dist/commands/shared/{effects.js → scene/effects.js} +10 -10
- package/dist/commands/shared/{loot.d.ts → scene/loot.d.ts} +2 -2
- package/dist/commands/shared/{loot.js → scene/loot.js} +3 -3
- package/dist/commands/shared/{master-rolls.d.ts → scene/master-rolls.d.ts} +2 -2
- package/dist/commands/shared/{master-rolls.js → scene/master-rolls.js} +5 -5
- package/dist/commands/shared/{reminders.d.ts → scene/reminders.d.ts} +4 -4
- package/dist/commands/shared/{reminders.js → scene/reminders.js} +4 -4
- package/dist/commands/shared/{scene.d.ts → scene/scene.d.ts} +3 -3
- package/dist/commands/shared/{scene.js → scene/scene.js} +10 -8
- package/dist/commands/shared/{bonds.d.ts → sheet/bonds.d.ts} +3 -3
- package/dist/commands/shared/{bonds.js → sheet/bonds.js} +2 -2
- package/dist/commands/shared/{page-counters.d.ts → sheet/counters.d.ts} +3 -3
- package/dist/commands/shared/{page-counters.js → sheet/counters.js} +5 -5
- package/dist/commands/shared/{effect-layer.d.ts → sheet/effect-layer.d.ts} +2 -2
- package/dist/commands/shared/{effect-layer.js → sheet/effect-layer.js} +9 -6
- package/dist/commands/shared/sheet/effect-values.d.ts +9 -0
- package/dist/commands/shared/sheet/effect-values.js +69 -0
- package/dist/commands/shared/{experience.d.ts → sheet/experience.d.ts} +3 -3
- package/dist/commands/shared/{experience.js → sheet/experience.js} +5 -5
- package/dist/commands/shared/sheet/formula-problems.d.ts +8 -0
- package/dist/commands/shared/sheet/formula-problems.js +140 -0
- package/dist/commands/shared/sheet/formula-scope.d.ts +32 -0
- package/dist/commands/shared/sheet/formula-scope.js +235 -0
- package/dist/commands/shared/{limits.d.ts → sheet/limits.d.ts} +3 -3
- package/dist/commands/shared/{limits.js → sheet/limits.js} +5 -4
- package/dist/commands/shared/{progression.d.ts → sheet/progression.d.ts} +2 -2
- package/dist/commands/shared/{progression.js → sheet/progression.js} +4 -4
- package/dist/commands/shared/{sheet.d.ts → sheet/sheet.d.ts} +7 -5
- package/dist/commands/shared/{sheet.js → sheet/sheet.js} +11 -7
- package/dist/commands/shared/{stacks.d.ts → sheet/stacks.d.ts} +2 -2
- package/dist/commands/shared/{stacks.js → sheet/stacks.js} +4 -4
- package/dist/commands/shared/sheet/system-fields.d.ts +21 -0
- package/dist/commands/shared/sheet/system-fields.js +45 -0
- package/dist/commands/shared/{thresholds.d.ts → sheet/thresholds.d.ts} +1 -1
- package/dist/commands/shared/{thresholds.js → sheet/thresholds.js} +4 -4
- package/dist/commands/shared/{turn-uses.d.ts → sheet/turn-uses.d.ts} +3 -3
- package/dist/commands/shared/{turn-uses.js → sheet/turn-uses.js} +4 -3
- package/dist/commands/shared/{worked-out.d.ts → sheet/worked-out.d.ts} +11 -46
- package/dist/commands/shared/sheet/worked-out.js +291 -0
- package/dist/commands/shared/sheet/worked-text.d.ts +14 -0
- package/dist/commands/shared/sheet/worked-text.js +55 -0
- package/dist/commands/shared/{advance.d.ts → time/advance.d.ts} +3 -3
- package/dist/commands/shared/{advance.js → time/advance.js} +11 -11
- package/dist/commands/shared/{dice-pool.d.ts → time/dice-pool.d.ts} +3 -3
- package/dist/commands/shared/{dice-pool.js → time/dice-pool.js} +11 -11
- package/dist/commands/shared/{events.d.ts → time/events.d.ts} +5 -5
- package/dist/commands/shared/{events.js → time/events.js} +10 -13
- package/dist/commands/shared/{recipes.d.ts → time/recipes.d.ts} +3 -3
- package/dist/commands/shared/{recipes.js → time/recipes.js} +6 -5
- package/dist/commands/shared/{time.d.ts → time/time.d.ts} +4 -4
- package/dist/commands/shared/{time.js → time/time.js} +6 -6
- package/dist/commands/shared/{upkeep.d.ts → time/upkeep.d.ts} +3 -3
- package/dist/commands/shared/{upkeep.js → time/upkeep.js} +14 -13
- package/dist/commands/show.d.ts +9 -0
- package/dist/commands/show.js +43 -10
- package/dist/commands/status.d.ts +2 -1
- package/dist/commands/status.js +28 -22
- package/dist/commands/thoughts.d.ts +1 -0
- package/dist/commands/thoughts.js +26 -18
- package/dist/commands/trade.js +8 -8
- package/dist/commands/translate.d.ts +1 -1
- package/dist/commands/translate.js +3 -3
- package/dist/commands/travel/open.d.ts +1 -1
- package/dist/commands/travel/open.js +2 -2
- package/dist/commands/travel/route.js +7 -6
- package/dist/commands/travel/travel.d.ts +1 -1
- package/dist/commands/travel/travel.js +8 -8
- package/dist/commands/validate.js +3 -3
- package/dist/commands/view/journal.d.ts +2 -2
- package/dist/commands/view/journal.js +2 -2
- package/dist/commands/view/layers.d.ts +34 -0
- package/dist/commands/view/layers.js +44 -0
- package/dist/commands/view/map.d.ts +1 -1
- package/dist/commands/view/map.js +6 -6
- package/dist/commands/view/memory.d.ts +16 -0
- package/dist/commands/view/memory.js +96 -0
- package/dist/commands/view/page.d.ts +32 -0
- package/dist/commands/view/page.js +166 -0
- package/dist/commands/view/place.d.ts +7 -2
- package/dist/commands/view/place.js +30 -12
- package/dist/commands/view/result.d.ts +252 -0
- package/dist/commands/view/result.js +1 -0
- package/dist/commands/view/saves.d.ts +6 -0
- package/dist/commands/view/saves.js +53 -0
- package/dist/commands/view/story.d.ts +32 -0
- package/dist/commands/view/story.js +227 -0
- package/dist/commands/view/view.d.ts +29 -292
- package/dist/commands/view/view.js +31 -536
- package/dist/commands/view/world.d.ts +1 -1
- package/dist/commands/view/world.js +3 -3
- package/dist/commands/write/checks.d.ts +42 -0
- package/dist/commands/write/checks.js +291 -0
- package/dist/commands/write/here.d.ts +1 -1
- package/dist/commands/write/here.js +5 -5
- package/dist/commands/write/inheritance.d.ts +40 -0
- package/dist/commands/write/inheritance.js +185 -0
- package/dist/commands/write/input.d.ts +29 -0
- package/dist/commands/write/input.js +124 -0
- package/dist/commands/write/layer.d.ts +44 -0
- package/dist/commands/write/layer.js +68 -0
- package/dist/commands/write/notes.d.ts +22 -0
- package/dist/commands/write/notes.js +76 -0
- package/dist/commands/write/progression.d.ts +27 -0
- package/dist/commands/write/progression.js +175 -0
- package/dist/commands/write/write.d.ts +2 -0
- package/dist/commands/write/write.js +36 -816
- package/dist/core/files.d.ts +2 -0
- package/dist/core/files.js +7 -0
- package/dist/core/{package-declarations.d.ts → packages/declarations.d.ts} +1 -1
- package/dist/core/{package-declarations.js → packages/declarations.js} +1 -1
- package/dist/core/session-store.js +3 -3
- package/dist/core/store.d.ts +2 -2
- package/dist/core/store.js +18 -4
- package/dist/core/text.d.ts +2 -0
- package/dist/core/text.js +4 -0
- package/dist/dashboard/acts/acts.js +1 -1
- package/dist/dashboard/acts/sending.js +110 -0
- package/dist/dashboard/acts/sheet.js +2 -2
- package/dist/dashboard/acts/strip.js +1 -1
- package/dist/dashboard/address.js +6 -0
- package/dist/dashboard/api.js +19 -1
- package/dist/dashboard/app.js +51 -171
- package/dist/dashboard/dice/roller.js +1 -1
- package/dist/dashboard/dice/sets.js +2 -2
- package/dist/dashboard/dice/stage.js +1 -1
- package/dist/dashboard/dice/tray.js +6 -6
- package/dist/dashboard/guide/ar.md +7 -3
- package/dist/dashboard/guide/cs.md +9 -5
- package/dist/dashboard/guide/da.md +9 -5
- package/dist/dashboard/guide/de.md +7 -3
- package/dist/dashboard/guide/el.md +9 -5
- package/dist/dashboard/guide/en.md +4 -0
- package/dist/dashboard/guide/es.md +8 -4
- package/dist/dashboard/guide/fi.md +9 -5
- package/dist/dashboard/guide/fr.md +8 -4
- package/dist/dashboard/guide/he.md +7 -3
- package/dist/dashboard/guide/hi.md +10 -6
- package/dist/dashboard/guide/hu.md +8 -4
- package/dist/dashboard/guide/is.md +9 -5
- package/dist/dashboard/guide/it.md +5 -1
- package/dist/dashboard/guide/ja.md +9 -5
- package/dist/dashboard/guide/ko.md +8 -4
- package/dist/dashboard/guide/nb.md +8 -4
- package/dist/dashboard/guide/nl.md +8 -4
- package/dist/dashboard/guide/pl.md +8 -4
- package/dist/dashboard/guide/pt.md +7 -3
- package/dist/dashboard/guide/ro.md +9 -5
- package/dist/dashboard/guide/ru.md +8 -4
- package/dist/dashboard/guide/sv.md +9 -5
- package/dist/dashboard/guide/tr.md +9 -5
- package/dist/dashboard/guide/uk.md +8 -4
- package/dist/dashboard/guide/zh.md +8 -4
- package/dist/dashboard/help/help.js +3 -3
- package/dist/dashboard/i18n/ar.json +29 -0
- package/dist/dashboard/i18n/cs.json +29 -0
- package/dist/dashboard/i18n/da.json +29 -0
- package/dist/dashboard/i18n/de.json +29 -0
- package/dist/dashboard/i18n/el.json +29 -0
- package/dist/dashboard/i18n/es.json +29 -0
- package/dist/dashboard/i18n/fi.json +29 -0
- package/dist/dashboard/i18n/fr.json +29 -0
- package/dist/dashboard/i18n/he.json +29 -0
- package/dist/dashboard/i18n/hi.json +29 -0
- package/dist/dashboard/i18n/hu.json +29 -0
- package/dist/dashboard/i18n/is.json +29 -0
- package/dist/dashboard/i18n/it.json +29 -0
- package/dist/dashboard/i18n/ja.json +30 -1
- package/dist/dashboard/i18n/ko.json +29 -0
- package/dist/dashboard/i18n/nb.json +29 -0
- package/dist/dashboard/i18n/nl.json +29 -0
- package/dist/dashboard/i18n/pl.json +29 -0
- package/dist/dashboard/i18n/pt.json +29 -0
- package/dist/dashboard/i18n/ro.json +29 -0
- package/dist/dashboard/i18n/ru.json +29 -0
- package/dist/dashboard/i18n/sv.json +29 -0
- package/dist/dashboard/i18n/tr.json +29 -0
- package/dist/dashboard/i18n/uk.json +29 -0
- package/dist/dashboard/i18n/zh.json +29 -0
- package/dist/dashboard/{journal.js → journal/journal.js} +16 -16
- package/dist/dashboard/{notes.js → journal/notes.js} +4 -4
- package/dist/dashboard/kit.js +3 -3
- package/dist/dashboard/packages/ask-card.js +3 -3
- package/dist/dashboard/packages/catalog.js +196 -0
- package/dist/dashboard/packages/changes.js +111 -0
- package/dist/dashboard/packages/engine.js +87 -0
- package/dist/dashboard/packages/installed.js +53 -0
- package/dist/dashboard/packages/library.js +97 -0
- package/dist/dashboard/packages/outcomes.js +45 -0
- package/dist/dashboard/packages/packages.js +27 -578
- package/dist/dashboard/packages/page-code.js +15 -2
- package/dist/dashboard/packages/{package-page.js → page.js} +12 -5
- package/dist/dashboard/packages/rows.js +84 -0
- package/dist/dashboard/packages/share.js +44 -0
- package/dist/dashboard/packages/widgets.js +3 -3
- package/dist/dashboard/{card.js → parts/card.js} +1 -1
- package/dist/dashboard/parts/changed.js +37 -0
- package/dist/dashboard/{faces.js → parts/faces.js} +5 -5
- package/dist/dashboard/{game-words.js → parts/game-words.js} +1 -1
- package/dist/dashboard/{icons.js → parts/icons.js} +1 -1
- package/dist/dashboard/{labels.js → parts/labels.js} +2 -1
- package/dist/dashboard/{map-symbols.js → parts/map-symbols.js} +1 -1
- package/dist/dashboard/{markdown.js → parts/markdown.js} +2 -2
- package/dist/dashboard/{mood.js → parts/mood.js} +1 -1
- package/dist/dashboard/{refusals.js → parts/refusals.js} +5 -1
- package/dist/dashboard/{status.js → parts/status.js} +4 -4
- package/dist/dashboard/{widgets.js → parts/widgets.js} +5 -3
- package/dist/dashboard/place/key.js +24 -0
- package/dist/dashboard/place/paper.js +67 -0
- package/dist/dashboard/place/{map-sheet.js → sheet.js} +2 -2
- package/dist/dashboard/place/things.js +129 -0
- package/dist/dashboard/place/tokens.js +93 -0
- package/dist/dashboard/place/view.js +124 -0
- package/dist/dashboard/{asked-dice.js → play/asked-dice.js} +3 -3
- package/dist/dashboard/{asked.js → play/asked.js} +10 -10
- package/dist/dashboard/{choices.js → play/choices.js} +11 -10
- package/dist/dashboard/{requested.js → play/requested.js} +1 -1
- package/dist/dashboard/{rolls.js → play/rolls.js} +9 -9
- package/dist/dashboard/{scene.js → play/scene.js} +14 -14
- package/dist/dashboard/{turns.js → play/turns.js} +12 -12
- package/dist/dashboard/{language-choice.js → settings/language-choice.js} +1 -1
- package/dist/dashboard/{languages.js → settings/languages.js} +1 -1
- package/dist/dashboard/{saves.js → settings/saves.js} +8 -8
- package/dist/dashboard/{settings.js → settings/settings.js} +17 -15
- package/dist/dashboard/{setup.js → settings/setup.js} +5 -5
- package/dist/dashboard/{party.js → sheet/party.js} +8 -8
- package/dist/dashboard/{person-panel.js → sheet/person-panel.js} +4 -4
- package/dist/dashboard/{sheet.js → sheet/sheet.js} +27 -24
- package/dist/dashboard/{story.js → sheet/story.js} +3 -3
- package/dist/dashboard/{columns.js → shell/columns.js} +1 -1
- package/dist/dashboard/{footer.js → shell/footer.js} +3 -3
- package/dist/dashboard/{master.js → shell/master.js} +2 -2
- package/dist/dashboard/{notices.js → shell/notices.js} +3 -3
- package/dist/dashboard/{pages.js → shell/pages.js} +5 -5
- package/dist/dashboard/shell/shown.js +38 -0
- package/dist/dashboard/{table.js → shell/table.js} +2 -2
- package/dist/dashboard/{tabs.js → shell/tabs.js} +2 -2
- package/dist/dashboard/{top.js → shell/top.js} +7 -7
- package/dist/dashboard/style.css +288 -4
- package/dist/dashboard/world/calendar.js +4 -4
- package/dist/dashboard/world/drawing.js +92 -0
- package/dist/dashboard/world/key.js +21 -0
- package/dist/dashboard/world/lore.js +10 -6
- package/dist/dashboard/world/map-card.js +186 -0
- package/dist/dashboard/world/place-card.js +39 -0
- package/dist/dashboard/world/places.js +29 -0
- package/dist/dashboard/world/world.js +9 -341
- package/dist/extensions/extension.d.ts +1 -1
- package/dist/extensions/extension.js +1 -1
- package/dist/images/images.js +12 -9
- package/dist/index.d.ts +1 -1
- package/dist/languages/index.d.ts +1 -1
- package/dist/languages/index.js +1 -1
- package/dist/packages/npm.js +1 -1
- package/dist/page.d.ts +2 -2
- package/dist/page.js +1 -1
- package/dist/pages/check.js +23 -1
- package/dist/pages/containers.d.ts +1 -1
- package/dist/pages/containers.js +1 -1
- package/dist/pages/index.d.ts +4 -2
- package/dist/pages/index.js +4 -2
- package/dist/pages/inheritance.d.ts +2 -2
- package/dist/pages/layers.d.ts +52 -0
- package/dist/pages/layers.js +105 -0
- package/dist/pages/markdown.d.ts +5 -1
- package/dist/pages/markdown.js +13 -1
- package/dist/pages/rename-page.js +1 -1
- package/dist/pages/stacks/writes.js +48 -22
- package/dist/pages/standard-fields.d.ts +1 -1
- package/dist/pages/system-pages.d.ts +5 -3
- package/dist/pages/system-pages.js +16 -7
- package/dist/pages/world.d.ts +8 -1
- package/dist/pages/world.js +16 -4
- package/dist/pages/write-layer.d.ts +23 -0
- package/dist/pages/write-layer.js +162 -0
- package/dist/pages/write-page.d.ts +2 -2
- package/dist/pages/write-page.js +2 -2
- package/dist/rules/index.d.ts +1 -1
- package/dist/rules/index.js +1 -1
- package/dist/rules/search.d.ts +1 -1
- package/dist/rules/shown.d.ts +1 -1
- package/dist/server/dashboard/choices.d.ts +2 -0
- package/dist/server/dashboard/choices.js +6 -4
- package/dist/server/dashboard/files.js +5 -5
- package/dist/server/dashboard/index.d.ts +2 -2
- package/dist/server/dashboard/index.js +7 -3
- package/dist/server/dashboard/news.js +4 -3
- package/dist/server/dashboard/player.js +1 -1
- package/dist/server/dashboard/writes.d.ts +7 -0
- package/dist/server/dashboard/writes.js +48 -7
- package/dist/server/mcp.js +28 -13
- package/dist/systems/campaign-data.d.ts +15 -0
- package/dist/systems/campaign-data.js +85 -0
- package/dist/systems/{system-code.d.ts → code.d.ts} +1 -1
- package/dist/systems/{system-code.js → code.js} +2 -2
- package/dist/systems/game-system.d.ts +7 -61
- package/dist/systems/game-system.js +1 -984
- package/dist/systems/index.d.ts +6 -3
- package/dist/systems/index.js +6 -3
- package/dist/systems/installed.d.ts +31 -0
- package/dist/systems/installed.js +89 -0
- package/dist/systems/maps.d.ts +3 -0
- package/dist/systems/maps.js +9 -0
- package/dist/systems/read.d.ts +3 -0
- package/dist/systems/read.js +471 -0
- package/dist/systems/schema.d.ts +289 -0
- package/dist/systems/schema.js +243 -0
- package/dist/systems/settings.d.ts +19 -0
- package/dist/systems/settings.js +78 -0
- package/dist/systems/versions.d.ts +12 -0
- package/dist/systems/versions.js +52 -0
- package/dist/testing/index.js +1 -1
- package/instructions/import.md +1 -1
- package/instructions/play.md +1 -1
- package/instructions/voices.md +1 -1
- package/package.json +1 -1
- package/dist/commands/config.js +0 -948
- package/dist/commands/package.d.ts +0 -143
- package/dist/commands/package.js +0 -785
- package/dist/commands/scene.js +0 -894
- package/dist/commands/shared/worked-out.js +0 -805
- package/dist/dashboard/place/map-view.js +0 -417
- /package/dist/commands/shared/{library-reader.d.ts → books/library-reader.d.ts} +0 -0
- /package/dist/core/{package-api.d.ts → packages/api.d.ts} +0 -0
- /package/dist/core/{package-api.js → packages/api.js} +0 -0
- /package/dist/dashboard/{coins.js → parts/coins.js} +0 -0
- /package/dist/dashboard/{glass.js → parts/glass.js} +0 -0
- /package/dist/dashboard/{layout.js → parts/layout.js} +0 -0
- /package/dist/dashboard/{mood-faces.js → parts/mood-faces.js} +0 -0
- /package/dist/dashboard/{free-rolls.js → play/free-rolls.js} +0 -0
- /package/dist/dashboard/{reactions.js → play/reactions.js} +0 -0
- /package/dist/dashboard/{prefs.js → shell/prefs.js} +0 -0
- /package/dist/dashboard/{system-style.js → shell/system-style.js} +0 -0
- /package/dist/dashboard/{theme.js → shell/theme.js} +0 -0
- /package/dist/languages/{language-pack.d.ts → pack.d.ts} +0 -0
- /package/dist/languages/{language-pack.js → pack.js} +0 -0
- /package/dist/pages/{page-file.d.ts → file.d.ts} +0 -0
- /package/dist/pages/{page-file.js → file.js} +0 -0
- /package/dist/pages/{page-types.d.ts → types.d.ts} +0 -0
- /package/dist/pages/{page-types.js → types.js} +0 -0
- /package/dist/rules/{rule-book.d.ts → book.d.ts} +0 -0
- /package/dist/rules/{rule-book.js → book.js} +0 -0
- /package/dist/systems/{system-folders.d.ts → folders.d.ts} +0 -0
- /package/dist/systems/{system-folders.js → folders.js} +0 -0
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { type AdventureManifest } from "./manifest.ts";
|
|
2
2
|
/** The folders an adventure has, as a campaign has them (D-372). */
|
|
3
3
|
export declare const adventureFolders: readonly ["world", "images", "rules"];
|
|
4
|
-
/** An adventure as a package gives it (ADV-1): its manifest, its files by their path, and what was left out at its top. */
|
|
4
|
+
/** An adventure as a package gives it (ADV-1): its manifest, its files by their path, its layers, and what was left out at its top. */
|
|
5
5
|
export interface AdventureFiles {
|
|
6
6
|
manifest: AdventureManifest;
|
|
7
7
|
/** By their path in the package, with forward slashes, such as world/places/Pozzo.md. */
|
|
8
8
|
files: Record<string, Uint8Array>;
|
|
9
|
+
/** Its layers over the pages of the game system it needs (ADV-8), by their path under layers/<system>/, the page's own in the system, such as world/creatures/Goblin.md. */
|
|
10
|
+
layers: Record<string, Uint8Array>;
|
|
9
11
|
/** The files and folders at its top that are no part of it, such as a README. */
|
|
10
12
|
ignored: string[];
|
|
11
13
|
}
|
|
@@ -4,9 +4,12 @@ import { archivePathParts, refuseTwice } from "../core/archive-paths.js";
|
|
|
4
4
|
import { filesIn } from "../core/files.js";
|
|
5
5
|
import { Refusal } from "../core/refusal.js";
|
|
6
6
|
import { files } from "../core/store.js";
|
|
7
|
+
import { comparableText } from "../core/text.js";
|
|
7
8
|
import { manifestFileName, readManifest, writeManifest } from "./manifest.js";
|
|
8
9
|
/** The folders an adventure has, as a campaign has them (D-372). */
|
|
9
10
|
export const adventureFolders = ["world", "images", "rules"];
|
|
11
|
+
// The folder of its layers over the pages of the game system it needs, as a campaign has it (ADV-8).
|
|
12
|
+
const layersFolder = "layers";
|
|
10
13
|
/** The most an adventure may unpack to, as a package's .tgz (D-452). */
|
|
11
14
|
export const largestAdventure = 512 * 1024 * 1024;
|
|
12
15
|
// What each folder may hold: pages and rules are markdown, pictures as the engine shows them.
|
|
@@ -83,7 +86,10 @@ function adventureOf(label, entries) {
|
|
|
83
86
|
if (manifest === undefined) {
|
|
84
87
|
throw new Refusal(`${label} has no ${manifestFileName} at its top: it is not an adventure. A document or a folder of notes is imported by the master, who writes its pages. Nothing changed.`, "not-adventure", { name: label });
|
|
85
88
|
}
|
|
89
|
+
const read = readManifest(new TextDecoder().decode(manifest[1]), `${label}, ${manifestFileName}`);
|
|
86
90
|
const held = {};
|
|
91
|
+
const layers = {};
|
|
92
|
+
const layerPaths = [];
|
|
87
93
|
const ignored = new Set();
|
|
88
94
|
for (const [parts, data] of inner) {
|
|
89
95
|
const path = parts.join("/");
|
|
@@ -91,6 +97,13 @@ function adventureOf(label, entries) {
|
|
|
91
97
|
if (parts.length === 1 && parts[0].toLowerCase() === manifestFileName) {
|
|
92
98
|
continue;
|
|
93
99
|
}
|
|
100
|
+
if (parts.length > 1 && parts[0].toLowerCase() === layersFolder) {
|
|
101
|
+
const under = layerPath(label, parts, read.needs.system);
|
|
102
|
+
layers[under] = data;
|
|
103
|
+
// Kept one by one: the system's folder written in two cases gives the same layer twice.
|
|
104
|
+
layerPaths.push(`${layersFolder}/${read.needs.system ?? ""}/${under}`);
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
94
107
|
if (folder === undefined || parts.length === 1) {
|
|
95
108
|
// What a repository has beside an adventure, its readme and licence, goes unsaid.
|
|
96
109
|
if (!/^(readme|licen[cs]e|copying|changelog)(\..*)?$/i.test(parts[0])) {
|
|
@@ -105,5 +118,22 @@ function adventureOf(label, entries) {
|
|
|
105
118
|
held[[folder, ...parts.slice(1)].join("/")] = data;
|
|
106
119
|
}
|
|
107
120
|
refuseTwice(label, Object.keys(held));
|
|
108
|
-
|
|
121
|
+
refuseTwice(label, layerPaths);
|
|
122
|
+
return { manifest: read, files: held, layers, ignored: [...ignored].sort() };
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Where a file under layers/ lies over the pages of the game system (ADV-8): only in layers/<the system the adventure needs>/world/, in markdown. Another folder
|
|
126
|
+
* there, a file of another kind, or layers in an adventure that needs no system refuse it whole.
|
|
127
|
+
*/
|
|
128
|
+
function layerPath(label, parts, system) {
|
|
129
|
+
const path = parts.join("/");
|
|
130
|
+
if (system === undefined) {
|
|
131
|
+
throw new Refusal(`${label} holds ${path}, a layer over a page of a game system, and its ${manifestFileName} names none: write there the system its layers are for, as needs: {system: its name}, `
|
|
132
|
+
+ `or take ${layersFolder}/ out, and give it again. It is refused whole.`, "adventure-file", { name: label, file: path });
|
|
133
|
+
}
|
|
134
|
+
if (comparableText(parts[1]) !== comparableText(system) || parts.length < 4 || parts[2].toLowerCase() !== "world" || !/\.md$/i.test(path)) {
|
|
135
|
+
throw new Refusal(`${label} holds ${path}, and ${layersFolder}/ holds only ${system}/world/ with markdown files, its layers over the pages of the game system it needs: it is refused whole. `
|
|
136
|
+
+ "Take it out, or move it there, and give it again.", "adventure-file", { name: label, file: path });
|
|
137
|
+
}
|
|
138
|
+
return ["world", ...parts.slice(3)].join("/");
|
|
109
139
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { dirname, join, resolve } from "node:path";
|
|
2
|
-
import { files } from "../core/store.js";
|
|
2
|
+
import { files, isInside } from "../core/store.js";
|
|
3
3
|
/** The file that marks a folder as a campaign and holds its settings. */
|
|
4
4
|
export const campaignFileName = "campaign.yaml";
|
|
5
5
|
/** The folder of a campaign with its house rules, a markdown file for each (D-178). */
|
|
@@ -27,10 +27,12 @@ export function requireCampaign(folder) {
|
|
|
27
27
|
files().track(root);
|
|
28
28
|
return root;
|
|
29
29
|
}
|
|
30
|
+
// The campaign's layers over its game system, which lie a folder further down than its pages: layers/<system>/world/<type>.
|
|
31
|
+
const layersFolder = "layers";
|
|
30
32
|
// The folders the engine writes in: a link among them, a junction that came with a folder someone else made, would carry its writes outside the campaign. A file
|
|
31
33
|
// that is a link the store refuses as it writes it.
|
|
32
|
-
const writtenFolders = ["world", "images", "rules", "sessions", ".saves", "exports", ".player", ".imports", ".claude", ".codex"];
|
|
33
|
-
/** Throws when a folder the engine writes in, or one in it two levels deep, is a link: a symbolic link or a junction. */
|
|
34
|
+
const writtenFolders = ["world", "images", "rules", "sessions", ".saves", "exports", ".player", ".imports", ".claude", ".codex", layersFolder];
|
|
35
|
+
/** Throws when a folder the engine writes in, or one in it two levels deep, three for the layers, is a link: a symbolic link or a junction. */
|
|
34
36
|
function refuseLinksOut(root) {
|
|
35
37
|
const store = files();
|
|
36
38
|
const folders = writtenFolders.map((name) => join(root, name));
|
|
@@ -39,7 +41,9 @@ function refuseLinksOut(root) {
|
|
|
39
41
|
...store.entries(folder).filter((entry) => entry.isFolder).map((entry) => join(folder, entry.name)),
|
|
40
42
|
];
|
|
41
43
|
const types = folders.flatMap(inside);
|
|
42
|
-
const
|
|
44
|
+
const deeper = types.flatMap(inside);
|
|
45
|
+
const layerTypes = deeper.filter((path) => isInside(join(root, layersFolder), path)).flatMap(inside);
|
|
46
|
+
const linked = [...folders, ...types, ...deeper, ...layerTypes].find((path) => store.isLink(path));
|
|
43
47
|
if (linked !== undefined) {
|
|
44
48
|
throw new Error(`${linked} is a link to somewhere else, and what the engine writes there would leave the campaign: replace it with a real folder, with what it holds copied in.`);
|
|
45
49
|
}
|
package/dist/campaign/index.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ export { campaignFileName, findCampaign, houseRulesFolderName, requireCampaign }
|
|
|
4
4
|
export { hasCharacterAgent, hostFileNames, refreshHostFiles, writeEffortFiles } from "./host-files.ts";
|
|
5
5
|
export { lastChoices, rememberChoice, rememberedSettings } from "./last-choices.ts";
|
|
6
6
|
export { type CountedByGame, customLevel, customLevels, customSettings, difficulties, difficultyItems, itemMeaning, leveled, type LeveledSetting, rigorItems, rigors, startingLevels } from "./levels.ts";
|
|
7
|
-
export { type CampaignSettings, changeExtensions, changeListSetting, changeListSettingToNone, changeMapSetting, changeOtherSetting, changeSetting, characterWays, checkSettingName, checkSettings, clearSetting, closedSettings, companionWays, diceWays, efforts, entrySettingNames, lengths, lethalities, listSettingNames, mapSettingNames, masterRollWays, mentorWays, missingSettings, pictureWays, preparations, proseWays, readCampaignData, readListSetting, readOneSetting, readSettings, readTextSetting, saveModes, settingDescription, settingMeaning, type SettingName, settingNames, setupSettingNames, storyWays, styleTextLengths, unansweredSettings, unitSystems, voiceWays, } from "./settings.ts";
|
|
7
|
+
export { type CampaignSettings, changeExtensions, changeListSetting, changeListSettingToNone, changeMapSetting, changeOtherSetting, changeSetting, characterWays, checkSettingName, checkSettings, clearSetting, closedSettings, companionWays, diceWays, efforts, entrySettingNames, lengths, lethalities, listLimits, listSettingNames, mapSettingNames, masterRollWays, mentorWays, missingSettings, pictureWays, preparations, proseWays, readCampaignData, readListSetting, readOneSetting, readSettings, readTextSetting, saveModes, settingDescription, settingMeaning, type SettingName, settingNames, setupSettingNames, storyWays, styleTextLengths, unansweredSettings, unitSystems, voiceWays, } from "./settings.ts";
|
|
8
8
|
export { type CampaignState, changeState, changeStateAt, readState, readStateValues } from "./state.ts";
|
package/dist/campaign/index.js
CHANGED
|
@@ -5,5 +5,5 @@ export { campaignFileName, findCampaign, houseRulesFolderName, requireCampaign }
|
|
|
5
5
|
export { hasCharacterAgent, hostFileNames, refreshHostFiles, writeEffortFiles } from "./host-files.js";
|
|
6
6
|
export { lastChoices, rememberChoice, rememberedSettings } from "./last-choices.js";
|
|
7
7
|
export { customLevel, customLevels, customSettings, difficulties, difficultyItems, itemMeaning, leveled, rigorItems, rigors, startingLevels } from "./levels.js";
|
|
8
|
-
export { changeExtensions, changeListSetting, changeListSettingToNone, changeMapSetting, changeOtherSetting, changeSetting, characterWays, checkSettingName, checkSettings, clearSetting, closedSettings, companionWays, diceWays, efforts, entrySettingNames, lengths, lethalities, listSettingNames, mapSettingNames, masterRollWays, mentorWays, missingSettings, pictureWays, preparations, proseWays, readCampaignData, readListSetting, readOneSetting, readSettings, readTextSetting, saveModes, settingDescription, settingMeaning, settingNames, setupSettingNames, storyWays, styleTextLengths, unansweredSettings, unitSystems, voiceWays, } from "./settings.js";
|
|
8
|
+
export { changeExtensions, changeListSetting, changeListSettingToNone, changeMapSetting, changeOtherSetting, changeSetting, characterWays, checkSettingName, checkSettings, clearSetting, closedSettings, companionWays, diceWays, efforts, entrySettingNames, lengths, lethalities, listLimits, listSettingNames, mapSettingNames, masterRollWays, mentorWays, missingSettings, pictureWays, preparations, proseWays, readCampaignData, readListSetting, readOneSetting, readSettings, readTextSetting, saveModes, settingDescription, settingMeaning, settingNames, setupSettingNames, storyWays, styleTextLengths, unansweredSettings, unitSystems, voiceWays, } from "./settings.js";
|
|
9
9
|
export { changeState, changeStateAt, readState, readStateValues } from "./state.js";
|
|
@@ -229,6 +229,7 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
229
229
|
}>>;
|
|
230
230
|
lines: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodArray<z.ZodPreprocess<z.ZodString, unknown>>, unknown>>>;
|
|
231
231
|
veils: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodArray<z.ZodPreprocess<z.ZodString, unknown>>, unknown>>>;
|
|
232
|
+
orders: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodArray<z.ZodPreprocess<z.ZodString, unknown>>, unknown>>>;
|
|
232
233
|
table: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodArray<z.ZodPreprocess<z.ZodString, unknown>>, unknown>>>;
|
|
233
234
|
precedents: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodArray<z.ZodPreprocess<z.ZodString, unknown>>, unknown>>>;
|
|
234
235
|
learned: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodArray<z.ZodPreprocess<z.ZodString, unknown>>, unknown>>>;
|
|
@@ -250,6 +251,11 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
250
251
|
export declare const settingNames: SettingName[];
|
|
251
252
|
/** The settings that hold a list, changed one item at a time; none of them is ever missing in play. */
|
|
252
253
|
export declare const listSettingNames: SettingName[];
|
|
254
|
+
/** The most items a list setting takes, and the longest each may be, where it has a limit: the player's standing orders, always before the master (D-563). */
|
|
255
|
+
export declare const listLimits: Partial<Record<SettingName, {
|
|
256
|
+
items: number;
|
|
257
|
+
length: number;
|
|
258
|
+
}>>;
|
|
253
259
|
/** The settings that hold entries by name, what the campaign adds to its game system (CAM-1): given or removed one entry at a time. */
|
|
254
260
|
export declare const mapSettingNames: SettingName[];
|
|
255
261
|
/** The settings that hold entries by name: what the campaign adds to its game system, where the dashboard shows the extensions' widgets (D-502), and the items of a custom difficulty or rigor (T-132). */
|
|
@@ -134,6 +134,7 @@ export function changeListSetting(root, name, change) {
|
|
|
134
134
|
list.add(document.createNode(item.trim().normalize("NFC")));
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
+
checkListLimits(setting, change.add ?? [], held.length, list.items.length);
|
|
137
138
|
// A list emptied stays, as []: it still answers the setup (MOD-3).
|
|
138
139
|
if (JSON.stringify(list.toJSON()) === before) {
|
|
139
140
|
return false;
|
|
@@ -374,6 +375,7 @@ export const settingsSchema = z.object({
|
|
|
374
375
|
+ "unset, each app keeps its own"),
|
|
375
376
|
lines: listSetting.describe("what never appears in the game"),
|
|
376
377
|
veils: listSetting.describe("what happens only off screen, without details"),
|
|
378
|
+
orders: listSetting.describe("the player's standing orders to the companions, in their words, kept until they lift one"),
|
|
377
379
|
table: listSetting.describe("the table's agreements: what the master promised about how the game is played"),
|
|
378
380
|
precedents: listSetting.describe("the rulings made without the text, each starting with the name of the rule in the system's language: Poisoned: …"),
|
|
379
381
|
learned: listSetting.describe("the game's mechanics the master has explained, by their names in the system's language: explained again only when the player gets one wrong"),
|
|
@@ -399,7 +401,9 @@ export const settingsSchema = z.object({
|
|
|
399
401
|
/** The settings that the config command shows and changes. */
|
|
400
402
|
export const settingNames = Object.keys(settingsSchema.shape);
|
|
401
403
|
/** The settings that hold a list, changed one item at a time; none of them is ever missing in play. */
|
|
402
|
-
export const listSettingNames = ["lines", "veils", "table", "precedents", "learned", "library", "status-line"];
|
|
404
|
+
export const listSettingNames = ["lines", "veils", "orders", "table", "precedents", "learned", "library", "status-line"];
|
|
405
|
+
/** The most items a list setting takes, and the longest each may be, where it has a limit: the player's standing orders, always before the master (D-563). */
|
|
406
|
+
export const listLimits = { orders: { items: 6, length: 120 } };
|
|
403
407
|
/** The settings that hold entries by name, what the campaign adds to its game system (CAM-1): given or removed one entry at a time. */
|
|
404
408
|
export const mapSettingNames = ["fields", "tables", "computed", "counters", "recipes", "travel", "values", "condition-icons"];
|
|
405
409
|
/** The settings that hold entries by name: what the campaign adds to its game system, where the dashboard shows the extensions' widgets (D-502), and the items of a custom difficulty or rigor (T-132). */
|
|
@@ -433,6 +437,23 @@ function listNode(document, setting) {
|
|
|
433
437
|
}
|
|
434
438
|
return node;
|
|
435
439
|
}
|
|
440
|
+
/**
|
|
441
|
+
* Refuses an item longer than its list takes, or a list grown past its most items (D-563); one written longer by hand still reads, and still loses items.
|
|
442
|
+
* Characters are counted as a reader counts them.
|
|
443
|
+
*/
|
|
444
|
+
function checkListLimits(setting, added, before, after) {
|
|
445
|
+
const limits = listLimits[setting];
|
|
446
|
+
if (limits === undefined) {
|
|
447
|
+
return;
|
|
448
|
+
}
|
|
449
|
+
const long = added.map((item) => [...item.trim().normalize("NFC")].length).find((length) => length > limits.length);
|
|
450
|
+
if (long !== undefined) {
|
|
451
|
+
throw new Error(`"${setting}" takes items of at most ${limits.length} characters, and this one has ${long}: ask the player for a shorter one. Nothing changed.`);
|
|
452
|
+
}
|
|
453
|
+
if (after > limits.items && after > before) {
|
|
454
|
+
throw new Error(`"${setting}" holds at most ${limits.items} items, and has ${before}: remove one the player lifted first, or ask which to drop. Nothing changed.`);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
436
457
|
/** Writes campaign.yaml, if the settings are still valid; long values stay on one line. */
|
|
437
458
|
function saveSettings(root, document) {
|
|
438
459
|
validateSettings(document.toJS());
|
package/dist/cli/cli.js
CHANGED
|
@@ -9,7 +9,7 @@ if (args.length === 1 && args[0] === "mcp") {
|
|
|
9
9
|
await startMcpServer();
|
|
10
10
|
}
|
|
11
11
|
else if (args[0] === "--read-library") {
|
|
12
|
-
const { readLibraryHere } = await import("../commands/shared/library-reader.js");
|
|
12
|
+
const { readLibraryHere } = await import("../commands/shared/books/library-reader.js");
|
|
13
13
|
await readLibraryHere();
|
|
14
14
|
}
|
|
15
15
|
else if (args.length === 1 && args[0] === "--listen") {
|
package/dist/cli/command-line.js
CHANGED
|
@@ -2,7 +2,7 @@ import { parseArgs } from "node:util";
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { findCampaign } from "../campaign/index.js";
|
|
4
4
|
import { commands } from "../commands/index.js";
|
|
5
|
-
import { libraryRunner } from "../commands/shared/library-reader.js";
|
|
5
|
+
import { libraryRunner } from "../commands/shared/books/library-reader.js";
|
|
6
6
|
import { loadCampaignCode, packageCommands } from "../commands/shared/packages/code.js";
|
|
7
7
|
import { systemConfirm } from "../confirm/index.js";
|
|
8
8
|
import { defaultContext, packagesFolder } from "../core/context.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { type TimePassed } from "./shared/advance.ts";
|
|
2
|
+
import { type TimePassed } from "./shared/time/advance.ts";
|
|
3
3
|
export declare const advance: import("../core/registry.ts").Command<z.ZodObject<{
|
|
4
4
|
by: z.ZodOptional<z.ZodString>;
|
|
5
5
|
to: z.ZodOptional<z.ZodString>;
|
package/dist/commands/advance.js
CHANGED
|
@@ -3,13 +3,13 @@ import { changeState, requireCampaign } from "../campaign/index.js";
|
|
|
3
3
|
import { appendLogEntry } from "../core/log.js";
|
|
4
4
|
import { defineCommand } from "../core/registry.js";
|
|
5
5
|
import { addDuration, formatDuration, formatGameDate, lastGameDay, minutesBetween, readDuration, readGameDate } from "../time/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { newStateChecks } from "./shared/campaign/checks.js";
|
|
7
|
+
import { firstInChat } from "./shared/campaign/parts.js";
|
|
8
|
+
import { campaignWorld } from "./shared/campaign/world.js";
|
|
9
9
|
import { timePassedLines } from "./shared/packages/code.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
10
|
+
import { calendarText, nextAfter, passedLines, passTime, unreadNotes } from "./shared/time/advance.js";
|
|
11
|
+
import { dueEvents, dueText, isDated, plannedEvents } from "./shared/time/events.js";
|
|
12
|
+
import { newDatedLogEntry, presentDate } from "./shared/time/time.js";
|
|
13
13
|
export const advance = defineCommand({
|
|
14
14
|
name: "advance",
|
|
15
15
|
description: "Let time pass in the story: by a duration or to a later game date. "
|
package/dist/commands/ask.js
CHANGED
|
@@ -10,15 +10,15 @@ import { findPage, loadWorld, locate, playerCharacters } from "../pages/index.js
|
|
|
10
10
|
import { rollName } from "../systems/index.js";
|
|
11
11
|
import { placeOnMap } from "./move.js";
|
|
12
12
|
import { hasNames, namesAsZero, rollerOf, sheetDiceOf, withSheetValues } from "./roll/roll.js";
|
|
13
|
-
import {
|
|
14
|
-
import { effectiveFields } from "./shared/effect-layer.js";
|
|
15
|
-
import { placeGrid } from "./shared/grids.js";
|
|
13
|
+
import { campaignSystem, campaignWorld, systemWordsOf } from "./shared/campaign/world.js";
|
|
16
14
|
import { textList } from "./shared/inputs.js";
|
|
17
15
|
import { allSaid, packagesAsking, packagesRolled } from "./shared/packages/hooks.js";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
16
|
+
import { placeGrid } from "./shared/places/grids.js";
|
|
17
|
+
import { effectiveFields } from "./shared/sheet/effect-layer.js";
|
|
18
|
+
import { knowledgeNote } from "./shared/sheet/sheet.js";
|
|
19
|
+
import { restDice, spendDice } from "./shared/time/dice-pool.js";
|
|
20
|
+
import { recipeNamed } from "./shared/time/recipes.js";
|
|
21
|
+
import { newDatedLogEntry } from "./shared/time/time.js";
|
|
22
22
|
// The words of the buttons, in the campaign's language, as the dashboard's languages (playtest 15); English for the others (ASK-7). A toss's for one coin and for
|
|
23
23
|
// more (ASK-15).
|
|
24
24
|
const buttonWords = {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type Coin, type Purse } from "../../money/index.ts";
|
|
2
|
+
/** One change worked out on a counter or on money, before it is written (D-92, MON-4). */
|
|
3
|
+
export interface Step {
|
|
4
|
+
before: number | string;
|
|
5
|
+
after: number | string;
|
|
6
|
+
/** How it was asked, for the log: by, spend or to, and how far it went beyond a limit. */
|
|
7
|
+
amount: Record<string, unknown>;
|
|
8
|
+
note: string;
|
|
9
|
+
/** For money: what the purse is worth in the first coin, when it holds other coins. */
|
|
10
|
+
total?: string;
|
|
11
|
+
/** Whether a base's value is the one the change leads to (INH-9). */
|
|
12
|
+
same(value: unknown): boolean;
|
|
13
|
+
}
|
|
14
|
+
/** A change to a counter: by, spend or to, within its limits (D-92). */
|
|
15
|
+
export declare function counterStep(input: {
|
|
16
|
+
by?: number | string;
|
|
17
|
+
spend?: number | string;
|
|
18
|
+
to?: number | string;
|
|
19
|
+
}, value: unknown, page: string, field: string, coins: Coin[] | undefined, limits?: {
|
|
20
|
+
min?: number;
|
|
21
|
+
max?: number;
|
|
22
|
+
hint?: {
|
|
23
|
+
made: string;
|
|
24
|
+
raise?: string;
|
|
25
|
+
};
|
|
26
|
+
}): Step;
|
|
27
|
+
/** A change to money (MON-4, MON-5): coins received with by, paid with spend or a negative by, the purse set with to. */
|
|
28
|
+
export declare function moneyStep(input: {
|
|
29
|
+
by?: number | string;
|
|
30
|
+
spend?: number | string;
|
|
31
|
+
to?: number | string;
|
|
32
|
+
}, purse: Purse, coins: Coin[], page: string, field: string): Step;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
// Works out a change of a counter or money from by, spend or to, before anything is written
|
|
2
|
+
import { canSpend, changeCounter, counterLimit, formatCounter, isSafeCounter, readCounter, readCounterText } from "../../counters/index.js";
|
|
3
|
+
import { addCoins, formatAmount, formatTotal, isSafePurse, namesCoins, payCoins, readAmount, readSignedAmount, totalOf } from "../../money/index.js";
|
|
4
|
+
import { coinExamples } from "../shared/examples.js";
|
|
5
|
+
/** A change to a counter: by, spend or to, within its limits (D-92). */
|
|
6
|
+
export function counterStep(input, value, page, field, coins, limits = {}) {
|
|
7
|
+
const read = readCounter(value);
|
|
8
|
+
if (read === undefined) {
|
|
9
|
+
throw new Error(notCounterMessage(page, field, value, coins));
|
|
10
|
+
}
|
|
11
|
+
const before = limits.min === undefined ? read : { ...read, min: limits.min };
|
|
12
|
+
const counterChange = readChange(input, before, page, field, coins);
|
|
13
|
+
// How to change a maximum the game system works out, said when a value goes past it.
|
|
14
|
+
const raise = limits.hint?.raise === undefined ? "" : `; to raise the maximum, write ${limits.hint.raise}; to change it for a while, as a drain, give an effect that sets ${limits.hint.raise}`;
|
|
15
|
+
// A maximum the game system works out is given only as it works it out (FOR-7).
|
|
16
|
+
if ("to" in counterChange && limits.max !== undefined && counterChange.to.max !== undefined && counterChange.to.max !== limits.max) {
|
|
17
|
+
throw new Error(`The maximum of ${field} on ${page} is worked out by the game system: ${limits.hint?.made ?? limits.max}. Give the current value alone, such as to ${Math.min(counterChange.to.value, limits.max)}${raise}. Nothing changed.`);
|
|
18
|
+
}
|
|
19
|
+
// A value given with to keeps the minimum the system gives, for where it stands: 0 is no limit of a counter that goes below it.
|
|
20
|
+
const { counter: after, beyond } = changeCounter(before, counterChange);
|
|
21
|
+
// Above a maximum the game system works out, a value reads as the maximum (FOR-6): what change says it wrote would not be what is read.
|
|
22
|
+
if ("to" in counterChange && limits.max !== undefined && after.value > limits.max) {
|
|
23
|
+
throw new Error(`${field} on ${page} goes no higher than its maximum, which the game system works out: ${limits.hint?.made ?? limits.max}. Give to ${limits.max} or less${raise}. Nothing changed.`);
|
|
24
|
+
}
|
|
25
|
+
if (!isSafeCounter(after)) {
|
|
26
|
+
throw new Error(`${field} on ${page} would be too large to count exactly. Nothing changed.`);
|
|
27
|
+
}
|
|
28
|
+
const same = (base) => {
|
|
29
|
+
const counter = readCounter(base);
|
|
30
|
+
return counter !== undefined && formatCounter(counter) === formatCounter(after);
|
|
31
|
+
};
|
|
32
|
+
return { before: formatCounter(before), after: formatCounter(after), amount: { ...amountOf(counterChange), beyond: beyond === 0 ? undefined : beyond }, note: limitNote({ ...after, min: after.min ?? before.min }, beyond), same };
|
|
33
|
+
}
|
|
34
|
+
/** A change to money (MON-4, MON-5): coins received with by, paid with spend or a negative by, the purse set with to. */
|
|
35
|
+
export function moneyStep(input, purse, coins, page, field) {
|
|
36
|
+
const given = [input.by, input.spend, input.to].filter((part) => part !== undefined);
|
|
37
|
+
if (given.length !== 1) {
|
|
38
|
+
throw new Error(`Give one of by (coins received, or paid with a minus), spend (what is paid) or to (what the purse holds), such as spend "5 ${coinExamples(coins).smallCoin}".`);
|
|
39
|
+
}
|
|
40
|
+
// Coins in quotes, as a model may send "\"5 sp\"", are the coins.
|
|
41
|
+
const asked = typeof given[0] === "string" ? given[0].trim().replace(/^"(.*)"$/s, "$1") : given[0];
|
|
42
|
+
const parameter = input.by !== undefined ? "by" : input.spend !== undefined ? "spend" : "to";
|
|
43
|
+
const signed = typeof asked === "string" ? readSignedAmount(asked, coins) : undefined;
|
|
44
|
+
if (signed === undefined || (parameter !== "by" && String(asked).trim().startsWith("-"))) {
|
|
45
|
+
const example = `${parameter === "by" ? "+" : ""}${Math.abs(Number(String(asked).trim())) || 5} ${coins[0].name}`;
|
|
46
|
+
const what = parameter === "by" ? "coins to add or, with a minus, to pay" : "coins";
|
|
47
|
+
throw new Error(`"${String(asked)}" is not ${what} for ${field} on ${page}: give coins of the campaign (${coinNames(coins)}), such as ${parameter} "${example}".`);
|
|
48
|
+
}
|
|
49
|
+
const paying = parameter === "spend" || (parameter === "by" && signed.sign === -1);
|
|
50
|
+
if (paying && totalOf(signed.purse, coins) === 0) {
|
|
51
|
+
throw new Error(`Give ${parameter} the coins paid, such as ${parameter} "${parameter === "by" ? "-" : ""}5 ${coins[0].name}".`);
|
|
52
|
+
}
|
|
53
|
+
const payment = paying ? payCoins(purse, signed.purse, coins) : undefined;
|
|
54
|
+
if (paying && payment === undefined) {
|
|
55
|
+
throw new Error(`${page} has ${field} ${formatAmount(purse, coins)} (${formatTotal(purse, coins)}): cannot pay ${formatAmount(signed.purse, coins)} (${formatTotal(signed.purse, coins)}). Nothing changed.`);
|
|
56
|
+
}
|
|
57
|
+
const after = payment?.purse ?? (parameter === "to" ? signed.purse : addCoins(purse, signed.purse));
|
|
58
|
+
if (!isSafePurse(after, coins)) {
|
|
59
|
+
throw new Error(`${field} on ${page} would be too large to count exactly. Nothing changed.`);
|
|
60
|
+
}
|
|
61
|
+
const text = (coinsGiven) => (coinsGiven === undefined || Object.keys(coinsGiven).length === 0 ? undefined : formatAmount(coinsGiven, coins));
|
|
62
|
+
const handed = text(payment?.given);
|
|
63
|
+
const back = text(payment?.back);
|
|
64
|
+
const amount = formatAmount(signed.purse, coins);
|
|
65
|
+
const request = parameter === "to" ? { to: amount } : parameter === "spend" ? { spend: amount } : { by: `${signed.sign === -1 ? "-" : "+"}${amount}` };
|
|
66
|
+
const others = Object.keys(after).some((name) => name !== coins[0].name);
|
|
67
|
+
const same = (base) => {
|
|
68
|
+
const basePurse = readAmount(base, coins);
|
|
69
|
+
return basePurse !== undefined && formatAmount(basePurse, coins) === formatAmount(after, coins);
|
|
70
|
+
};
|
|
71
|
+
return {
|
|
72
|
+
before: formatAmount(purse, coins),
|
|
73
|
+
after: formatAmount(after, coins),
|
|
74
|
+
amount: { ...request, given: handed, back },
|
|
75
|
+
note: back !== undefined ? `${handed} given, ${back} back` : handed === undefined ? "" : `paid with ${handed}`,
|
|
76
|
+
total: others ? formatTotal(after, coins) : undefined,
|
|
77
|
+
same,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function readChange(input, counter, page, field, coins) {
|
|
81
|
+
const given = [input.by, input.spend, input.to].filter((part) => part !== undefined);
|
|
82
|
+
if (given.length !== 1) {
|
|
83
|
+
throw new Error("Give one of by (damage, healing), spend (what is paid or used up) or to (a value, max, or current/max).");
|
|
84
|
+
}
|
|
85
|
+
if (typeof input.by === "string" || typeof input.spend === "string") {
|
|
86
|
+
const parameter = typeof input.by === "string" ? "by" : "spend";
|
|
87
|
+
// A plain number given coins may be money written without them; a current/max counter is no purse.
|
|
88
|
+
const coinsAsked = counter.max === undefined && coins !== undefined && readSignedAmount(String(input.by ?? input.spend), coins) !== undefined;
|
|
89
|
+
const money = coinsAsked && coins !== undefined
|
|
90
|
+
? `${field} on ${page} is a number, not money: to count it in coins, set it with its coins, such as set ${field}=${counter.value} ${coins[0].name}; or give ${parameter} a whole number.`
|
|
91
|
+
: undefined;
|
|
92
|
+
throw new Error(money ?? `${field} on ${page} is a counter: give ${parameter} a whole number, such as ${parameter === "by" ? "by -7" : "spend 1"}.`);
|
|
93
|
+
}
|
|
94
|
+
if (input.by !== undefined) {
|
|
95
|
+
return { by: input.by };
|
|
96
|
+
}
|
|
97
|
+
if (input.spend !== undefined) {
|
|
98
|
+
if (!canSpend(counter, input.spend)) {
|
|
99
|
+
const floor = (counter.min ?? 0) > 0 ? `, which goes no lower than ${counter.min}` : "";
|
|
100
|
+
throw new Error(input.spend > 0 ? `${page} has ${field} ${formatCounter(counter)}${floor}: cannot spend ${input.spend}. Nothing changed.` : "Give spend a number above 0.");
|
|
101
|
+
}
|
|
102
|
+
return { spend: input.spend };
|
|
103
|
+
}
|
|
104
|
+
return { to: readTarget(String(input.to).trim(), counter, page, field) };
|
|
105
|
+
}
|
|
106
|
+
/** The value given to `to`: max, a whole number, or current/max. */
|
|
107
|
+
function readTarget(target, counter, page, field) {
|
|
108
|
+
if (target.toLowerCase() === "max") {
|
|
109
|
+
if (counter.max === undefined) {
|
|
110
|
+
throw new Error(`${field} on ${page} has no maximum: give to a number, or write the field as current/max with write.`);
|
|
111
|
+
}
|
|
112
|
+
return { ...counter, value: counter.max };
|
|
113
|
+
}
|
|
114
|
+
const given = readCounterText(target);
|
|
115
|
+
if (given === undefined) {
|
|
116
|
+
throw new Error(`"${target}" is not a value for to: give a whole number, max, or current/max such as 15/15.`);
|
|
117
|
+
}
|
|
118
|
+
return given.max === undefined ? { ...counter, value: given.value } : given;
|
|
119
|
+
}
|
|
120
|
+
function amountOf(change) {
|
|
121
|
+
return "to" in change ? { to: formatCounter(change.to) } : change;
|
|
122
|
+
}
|
|
123
|
+
/** Where the counter stands, when it matters: at 0 or at its maximum, how far a change went beyond, or outside the limits. */
|
|
124
|
+
function limitNote(counter, beyond) {
|
|
125
|
+
const limit = counterLimit(counter);
|
|
126
|
+
const lowest = counter.min ?? 0;
|
|
127
|
+
const where = limit === "outside" ? (counter.max === undefined ? `below ${lowest}` : `outside ${lowest}–${counter.max}`) : limit ?? "";
|
|
128
|
+
return [where, beyond === 0 ? "" : `${Math.abs(beyond)} beyond`].filter((part) => part !== "").join(", ");
|
|
129
|
+
}
|
|
130
|
+
function notCounterMessage(page, field, value, coins) {
|
|
131
|
+
if (typeof value === "string" && readCounterText(value) !== undefined) {
|
|
132
|
+
return `${field} on ${page} is the text "${value}": write it without quotes, such as ${field}: ${value}, to make it a counter.`;
|
|
133
|
+
}
|
|
134
|
+
// Coins of the campaign after a number, such as "34 mo e 4 ma", meant money that does not read as an amount (MON-2).
|
|
135
|
+
if (typeof value === "string" && coins !== undefined && namesCoins(value, coins)) {
|
|
136
|
+
return `${field} on ${page} is "${value}", not money: write the coins one after the other, such as set ${field}=12 ${coins[0].name}.`;
|
|
137
|
+
}
|
|
138
|
+
const notCounter = `${field} on ${page} is ${JSON.stringify(value)}, not a counter: write a counter as a number (20) or as current/max (12/12).`;
|
|
139
|
+
const word = typeof value === "string" ? /\d+\s*(\p{L}[\p{L}\p{M}]*)/u.exec(value)?.[1] : undefined;
|
|
140
|
+
if (word === undefined) {
|
|
141
|
+
return notCounter;
|
|
142
|
+
}
|
|
143
|
+
return coins === undefined
|
|
144
|
+
? `${notCounter} If it is money, the campaign needs its coins: set them with config, naming them as written here (${word}), each with its value in the smallest.`
|
|
145
|
+
: `${notCounter} If it is money, ${word} is not a coin of the campaign (${coinNames(coins)}): write it with those, or give a coin that name too with config, such as ${coins[0].name}/${word}.`;
|
|
146
|
+
}
|
|
147
|
+
/** "gp/mo, pp, sp, cp": the coins of the campaign, by all their names. */
|
|
148
|
+
function coinNames(coins) {
|
|
149
|
+
return coins.map((coin) => coin.names.join("/")).join(", ");
|
|
150
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { fireEvents } from "../shared/events.ts";
|
|
3
2
|
export declare const change: import("../../core/registry.ts").Command<z.ZodObject<{
|
|
4
3
|
page: z.ZodOptional<z.ZodString>;
|
|
5
4
|
field: z.ZodOptional<z.ZodString>;
|
|
@@ -13,7 +12,7 @@ export declare const change: import("../../core/registry.ts").Command<z.ZodObjec
|
|
|
13
12
|
}, z.core.$strip>, {
|
|
14
13
|
recipe: string;
|
|
15
14
|
system: string;
|
|
16
|
-
outcomes: RecipeOutcome[];
|
|
15
|
+
outcomes: import("./recipe.ts").RecipeOutcome[];
|
|
17
16
|
rules: string[];
|
|
18
17
|
lasts?: string;
|
|
19
18
|
buttons?: boolean;
|
|
@@ -26,19 +25,17 @@ export declare const change: import("../../core/registry.ts").Command<z.ZodObjec
|
|
|
26
25
|
before: string;
|
|
27
26
|
after: string;
|
|
28
27
|
total?: string;
|
|
29
|
-
/** "in Forma d'orso; at max; again as Lupo": the effect it changed on, the limit it reached, the base whose value the page reads again. */
|
|
30
28
|
note: string;
|
|
31
29
|
effect?: string;
|
|
32
30
|
again?: string;
|
|
33
31
|
changed: boolean;
|
|
34
|
-
due: ReturnType<typeof fireEvents>["due"];
|
|
32
|
+
due: ReturnType<typeof import("../shared/time/events.ts").fireEvents>["due"];
|
|
35
33
|
followers: string[];
|
|
36
34
|
keepers: string[];
|
|
37
35
|
thresholds: string[];
|
|
38
|
-
/** What the change may break that someone keeps alive, and what shields the counter it lowered (EFF-14, DAT-14). */
|
|
39
36
|
reminders: string[];
|
|
40
37
|
} | {
|
|
41
|
-
hiddenRoll?: HiddenDice | undefined;
|
|
38
|
+
hiddenRoll?: import("./dice.ts").HiddenDice | undefined;
|
|
42
39
|
rolled: string;
|
|
43
40
|
problems: string[];
|
|
44
41
|
page: string;
|
|
@@ -46,60 +43,13 @@ export declare const change: import("../../core/registry.ts").Command<z.ZodObjec
|
|
|
46
43
|
before: string;
|
|
47
44
|
after: string;
|
|
48
45
|
total?: string;
|
|
49
|
-
/** "in Forma d'orso; at max; again as Lupo": the effect it changed on, the limit it reached, the base whose value the page reads again. */
|
|
50
46
|
note: string;
|
|
51
47
|
effect?: string;
|
|
52
48
|
again?: string;
|
|
53
49
|
changed: boolean;
|
|
54
|
-
due: ReturnType<typeof fireEvents>["due"];
|
|
50
|
+
due: ReturnType<typeof import("../shared/time/events.ts").fireEvents>["due"];
|
|
55
51
|
followers: string[];
|
|
56
52
|
keepers: string[];
|
|
57
53
|
thresholds: string[];
|
|
58
|
-
/** What the change may break that someone keeps alive, and what shields the counter it lowered (EFF-14, DAT-14). */
|
|
59
54
|
reminders: string[];
|
|
60
55
|
}>;
|
|
61
|
-
/** The dice in by, hidden: the roll's id, the fingerprint the player may ask for, and whether master-rolls hid them. */
|
|
62
|
-
interface HiddenDice {
|
|
63
|
-
id: string;
|
|
64
|
-
fingerprint: string;
|
|
65
|
-
screened: boolean;
|
|
66
|
-
}
|
|
67
|
-
/** What a step did to a counter or to money. */
|
|
68
|
-
interface StepOutcome {
|
|
69
|
-
page: string;
|
|
70
|
-
field: string;
|
|
71
|
-
before: string;
|
|
72
|
-
after: string;
|
|
73
|
-
total?: string;
|
|
74
|
-
/** "in Forma d'orso; at max; again as Lupo": the effect it changed on, the limit it reached, the base whose value the page reads again. */
|
|
75
|
-
note: string;
|
|
76
|
-
effect?: string;
|
|
77
|
-
again?: string;
|
|
78
|
-
changed: boolean;
|
|
79
|
-
due: ReturnType<typeof fireEvents>["due"];
|
|
80
|
-
followers: string[];
|
|
81
|
-
keepers: string[];
|
|
82
|
-
thresholds: string[];
|
|
83
|
-
/** What the change may break that someone keeps alive, and what shields the counter it lowered (EFF-14, DAT-14). */
|
|
84
|
-
reminders: string[];
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* What a recipe did to a page: the effects it ended, the steps it wrote, what it leaves to the player or, for a companion, to the master (D-206), and the
|
|
88
|
-
* counters it leaves to the master.
|
|
89
|
-
*/
|
|
90
|
-
interface RecipeOutcome {
|
|
91
|
-
page: string;
|
|
92
|
-
pc: boolean;
|
|
93
|
-
ended: string[];
|
|
94
|
-
steps: StepOutcome[];
|
|
95
|
-
choices: string[];
|
|
96
|
-
/** The dice the recipe lets the page spend that would give something, as hit-dice-d8 2/3, which the player chooses for the player character (ASK-14). */
|
|
97
|
-
spendable: string[];
|
|
98
|
-
notBroughtBack: string[];
|
|
99
|
-
kept: string[];
|
|
100
|
-
/** The effects without an end still on the page, which a rest may ask something of (EFF-15). */
|
|
101
|
-
resting: string;
|
|
102
|
-
/** Whether the recipe gave the page nothing, at 0 of what it needs or too soon after the last (RST-1). */
|
|
103
|
-
barred: boolean;
|
|
104
|
-
}
|
|
105
|
-
export {};
|