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
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { comparableText } from "../../core/text.js";
|
|
2
|
+
import { coinSides, notationParts } from "../../dice/index.js";
|
|
3
|
+
import { readEffect } from "../../effects/index.js";
|
|
4
|
+
import { pagesWithName, parsePageReference, systemPageNamed, textsIn } from "../../pages/index.js";
|
|
5
|
+
import { effectShown } from "../shared/scene/effects.js";
|
|
6
|
+
// How many lines of the diary the view gives when no number is asked.
|
|
7
|
+
export const diaryLines = 10;
|
|
8
|
+
// How many rolls the view gives, the last ones.
|
|
9
|
+
export const rollsShown = 20;
|
|
10
|
+
/**
|
|
11
|
+
* A public roll of the log as the player sees it: who rolled, for whom as the character knows them, else as the scene it was rolled in named them (`seen`, D-421),
|
|
12
|
+
* the check, the dice; never the master's why (VIEW-4).
|
|
13
|
+
*/
|
|
14
|
+
export function shownRoll(world, entry, named, picture, seen) {
|
|
15
|
+
const data = entry.data;
|
|
16
|
+
const known = data.who === undefined ? undefined : named(data.who);
|
|
17
|
+
const who = data.who === undefined ? undefined : known ?? strangerOfRoll(world, data.who, named, seen);
|
|
18
|
+
// A stranger the scene of the roll never named shows no face: it would tell who acted out of sight (D-421).
|
|
19
|
+
const image = data.who === undefined || who === "someone" ? undefined : picture(data.who);
|
|
20
|
+
const words = notationParts(String(data.notation ?? ""));
|
|
21
|
+
const toss = Array.isArray(data.toss) ? data.toss.filter((side) => coinSides.includes(side)) : undefined;
|
|
22
|
+
return {
|
|
23
|
+
id: entry.id,
|
|
24
|
+
...(entry.date === undefined ? {} : { date: entry.date }),
|
|
25
|
+
at: entry.at,
|
|
26
|
+
// Physical dice are the player's, though the master writes their values.
|
|
27
|
+
by: entry.by === "player" || data.physical === true ? "player" : "master",
|
|
28
|
+
...(who === undefined ? {} : { who }),
|
|
29
|
+
...(image === undefined ? {} : { image }),
|
|
30
|
+
...(who !== undefined && known === undefined ? { stranger: true } : {}),
|
|
31
|
+
...(typeof data.check === "string" ? { check: data.check } : {}),
|
|
32
|
+
notation: String(data.notation ?? ""),
|
|
33
|
+
...(words === undefined ? {} : { words }),
|
|
34
|
+
total: Number(data.total ?? 0),
|
|
35
|
+
...(typeof data.says === "string" && data.says.trim() !== "" ? { says: data.says } : {}),
|
|
36
|
+
...(Array.isArray(data.tones) ? { tones: data.tones.map((tone) => (tone === "good" || tone === "bad" ? tone : null)) } : {}),
|
|
37
|
+
...(toss === undefined ? {} : { toss }),
|
|
38
|
+
...(typeof data.tray === "boolean" ? { tray: data.tray } : {}),
|
|
39
|
+
text: String(data.result ?? ""),
|
|
40
|
+
dice: toss === undefined && Array.isArray(data.dice) ? data.dice : [],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/** How many rolls the dashboard asks for: a whole number from 1. */
|
|
44
|
+
export function rollCount(asked) {
|
|
45
|
+
const count = asked === undefined ? rollsShown : Number(asked.trim());
|
|
46
|
+
if (!Number.isInteger(count) || count < 1) {
|
|
47
|
+
throw new Error(`"${asked}" is not how many rolls: give a whole number from 1.`);
|
|
48
|
+
}
|
|
49
|
+
return count;
|
|
50
|
+
}
|
|
51
|
+
/** How many lines of the diary are asked: a whole number from 1. */
|
|
52
|
+
export function diaryCount(asked) {
|
|
53
|
+
if (asked === undefined) {
|
|
54
|
+
return diaryLines;
|
|
55
|
+
}
|
|
56
|
+
const count = Number(asked.trim());
|
|
57
|
+
if (!Number.isInteger(count) || count < 1) {
|
|
58
|
+
throw new Error(`"${asked}" is not how many lines of the diary: give a whole number from 1, or all.`);
|
|
59
|
+
}
|
|
60
|
+
return count;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* A public line of the log as the diary tells it (VIEW-4): the facts, with the game date, never the master's why; who and where the character does not know as
|
|
64
|
+
* someone and somewhere (D-254). Lines of no story, as a setting changed, are left out.
|
|
65
|
+
*/
|
|
66
|
+
export function diaryLine(world, entry, named) {
|
|
67
|
+
const fact = storyFact(world, entry, named);
|
|
68
|
+
return fact === undefined ? [] : [fact.date === undefined ? factText(fact) : `${fact.date} · ${factText(fact)}`];
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* A public line of the log as a fact of the story (VIEW-4, VIEW-9), as data the dashboard writes in its language: who and where as the character knows them,
|
|
72
|
+
* someone, creature and somewhere for those it does not (D-254); undefined for a line of no story.
|
|
73
|
+
*/
|
|
74
|
+
export function storyFact(world, entry, named) {
|
|
75
|
+
const data = entry.data;
|
|
76
|
+
const text = (value) => (Array.isArray(value) ? value.map(String).join(", ") : String(value ?? ""));
|
|
77
|
+
const who = (name) => named(name) ?? (isCopyName(world, name) ? "creature" : "someone");
|
|
78
|
+
const pages = Array.isArray(data.pages) ? data.pages.map((name) => named(name) ?? "someone") : [];
|
|
79
|
+
const fact = (() => {
|
|
80
|
+
switch (entry.type) {
|
|
81
|
+
case "scene-opened":
|
|
82
|
+
return { kind: "scene-opened", title: text(data.title), type: text(data.type) };
|
|
83
|
+
case "scene-closed":
|
|
84
|
+
return { kind: "scene-closed", title: text(data.title), type: text(data.type), summary: text(data.summary) };
|
|
85
|
+
case "roll":
|
|
86
|
+
return { kind: "roll", ...(data.who === undefined ? {} : { who: who(data.who) }), result: text(data.result) };
|
|
87
|
+
case "roll-revealed":
|
|
88
|
+
return { kind: "roll-revealed" };
|
|
89
|
+
case "counter-changed":
|
|
90
|
+
return {
|
|
91
|
+
kind: "counter",
|
|
92
|
+
who: who(data.page),
|
|
93
|
+
field: text(data.field),
|
|
94
|
+
before: text(data.before),
|
|
95
|
+
after: text(data.after),
|
|
96
|
+
...(data.stack === true ? { stack: true } : {}),
|
|
97
|
+
...(data.upkeep === true ? { upkeep: true } : {}),
|
|
98
|
+
};
|
|
99
|
+
case "time-advanced":
|
|
100
|
+
return { kind: "time", ...(data.from === undefined ? {} : { from: text(data.from) }), to: text(data.to) };
|
|
101
|
+
case "moved":
|
|
102
|
+
return pages.every((name) => name === "someone") && named(data.to) === undefined ? undefined : { kind: "moved", who: pages, ...(data.to === null ? {} : { to: named(data.to) ?? "somewhere" }) };
|
|
103
|
+
case "learned":
|
|
104
|
+
return { kind: "learned", who: text(data.page), what: textsIn(data.knows).map(learnedText) };
|
|
105
|
+
case "effect-added":
|
|
106
|
+
return { kind: "effect", who: who(data.page), ...seenEffectOf(world, text(data.effect), named) };
|
|
107
|
+
case "effect-ended":
|
|
108
|
+
return { kind: "effect-ended", who: who(data.page), effect: text(data.effect) };
|
|
109
|
+
case "saved":
|
|
110
|
+
return { kind: "saved", save: text(data.save), ...(data.label === undefined ? {} : { label: text(data.label) }) };
|
|
111
|
+
case "save-loaded":
|
|
112
|
+
return { kind: "back", save: text(data.save) };
|
|
113
|
+
case "mode-changed":
|
|
114
|
+
return { kind: "mode", to: text(data.to) };
|
|
115
|
+
case "quest-changed":
|
|
116
|
+
return { kind: "quest", status: data.status === "open" ? "open" : data.status === "done" ? "done" : "failed", quest: named(data.quest) ?? text(data.quest) };
|
|
117
|
+
default:
|
|
118
|
+
return undefined;
|
|
119
|
+
}
|
|
120
|
+
})();
|
|
121
|
+
return fact === undefined || entry.date === undefined ? fact : { ...fact, date: entry.date };
|
|
122
|
+
}
|
|
123
|
+
/** "Ettore: hp 14 → 12": a fact of the story in the chat's words. */
|
|
124
|
+
function factText(fact) {
|
|
125
|
+
const told = (() => {
|
|
126
|
+
switch (fact.kind) {
|
|
127
|
+
case "scene-opened":
|
|
128
|
+
return `Scene opened: ${fact.title} (${fact.type})`;
|
|
129
|
+
case "scene-closed":
|
|
130
|
+
return `Scene: ${fact.title} (${fact.type}): ${fact.summary}`;
|
|
131
|
+
case "roll":
|
|
132
|
+
return `${fact.who === undefined ? "Roll" : nameText(fact.who, true)}: ${fact.result}`;
|
|
133
|
+
case "roll-revealed":
|
|
134
|
+
return "A hidden roll was shown";
|
|
135
|
+
case "counter":
|
|
136
|
+
return `${nameText(fact.who, true)}: ${fact.field} ${fact.before} → ${fact.after}`;
|
|
137
|
+
case "time":
|
|
138
|
+
return fact.from === undefined ? `The story starts on ${fact.to}` : `Time passes: ${fact.from} → ${fact.to}`;
|
|
139
|
+
case "moved":
|
|
140
|
+
return `${fact.who.join(", ")} to ${fact.to ?? "the open"}`;
|
|
141
|
+
case "learned":
|
|
142
|
+
return `${fact.who} learned: ${fact.what.join(", ")}`;
|
|
143
|
+
case "effect":
|
|
144
|
+
return `${nameText(fact.who, true)}: ${fact.text}`;
|
|
145
|
+
case "effect-ended":
|
|
146
|
+
return `${nameText(fact.who, true)}: ${fact.effect} ended`;
|
|
147
|
+
case "saved":
|
|
148
|
+
return `Saved: ${fact.save}${fact.label === undefined ? "" : ` - ${fact.label}`}`;
|
|
149
|
+
case "back":
|
|
150
|
+
return `Back to save ${fact.save}: what came after it is gone`;
|
|
151
|
+
case "mode":
|
|
152
|
+
return `The campaign is now in ${fact.to}`;
|
|
153
|
+
case "quest":
|
|
154
|
+
return `${fact.status === "open" ? "Quest taken" : fact.status === "done" ? "Quest completed" : "Quest failed"}: ${fact.quest}`;
|
|
155
|
+
}
|
|
156
|
+
})();
|
|
157
|
+
return told;
|
|
158
|
+
}
|
|
159
|
+
/** A name of the story in the chat's words: a creature for creature, as the copies of one it does not know; Someone and A creature opening a line. */
|
|
160
|
+
function nameText(name, first = false) {
|
|
161
|
+
const said = name === "creature" ? "a creature" : name;
|
|
162
|
+
return first && (name === "creature" || name === "someone") ? `${said[0].toUpperCase()}${said.slice(1)}` : said;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* What the character saw of those it did not know, in the scene each roll was rolled in, by the roll's id: the seen words the log kept since that scene opened,
|
|
166
|
+
* and for the scene still open its own, which a scene opened before the log kept them has alone.
|
|
167
|
+
*/
|
|
168
|
+
export function seenByRoll(log, open) {
|
|
169
|
+
const byRoll = new Map();
|
|
170
|
+
let seen = {};
|
|
171
|
+
let inScene = [];
|
|
172
|
+
for (const entry of log) {
|
|
173
|
+
if (entry.type === "scene-opened" || entry.type === "scene-closed") {
|
|
174
|
+
seen = {};
|
|
175
|
+
inScene = [];
|
|
176
|
+
}
|
|
177
|
+
else if (entry.type === "scene-changed" && entry.data.seen !== null && typeof entry.data.seen === "object") {
|
|
178
|
+
seen = { ...seen, ...entry.data.seen };
|
|
179
|
+
}
|
|
180
|
+
else if (entry.type === "roll") {
|
|
181
|
+
byRoll.set(entry.id, seen);
|
|
182
|
+
inScene.push(entry.id);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
for (const id of open === undefined ? [] : inScene) {
|
|
186
|
+
byRoll.set(id, { ...byRoll.get(id), ...open });
|
|
187
|
+
}
|
|
188
|
+
return byRoll;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Whom a roll is for when the character does not know them by name, as its scene named them (D-416, D-421): a copy by its name when the character knows its
|
|
192
|
+
* creature, else by what it saw of its kind and its number, else creature; anyone else by what it saw, else someone.
|
|
193
|
+
*/
|
|
194
|
+
function strangerOfRoll(world, who, named, seen) {
|
|
195
|
+
const name = String(who).trim();
|
|
196
|
+
const said = (key) => Object.entries(seen ?? {}).find(([seenName]) => comparableText(seenName) === comparableText(key))?.[1];
|
|
197
|
+
if (!isCopyName(world, name)) {
|
|
198
|
+
return said(name) ?? "someone";
|
|
199
|
+
}
|
|
200
|
+
const [, kind = "", number = ""] = /^(.+) (\d+)$/.exec(name) ?? [];
|
|
201
|
+
const kindSeen = said(kind);
|
|
202
|
+
return named(kind) !== undefined ? name : kindSeen === undefined ? "creature" : `${kindSeen} ${number}`;
|
|
203
|
+
}
|
|
204
|
+
/** Whether a name is a copy's in a scene, such as Lupo mannaro 1: a creature's name and a number, with no page of its own. */
|
|
205
|
+
export function isCopyName(world, name) {
|
|
206
|
+
const match = typeof name === "string" ? /^(.+) \d+$/.exec(name.trim()) : null;
|
|
207
|
+
return match !== null && pagesWithName(world, match[0]).length === 0 && [...pagesWithName(world, match[1]), systemPageNamed(world, match[1])].some((page) => page?.type === "creature");
|
|
208
|
+
}
|
|
209
|
+
/** "Coppa#Veleno": what was learned, as a link names it. */
|
|
210
|
+
function learnedText(link) {
|
|
211
|
+
const reference = parsePageReference(link);
|
|
212
|
+
return reference.section === undefined ? reference.name : `${reference.name}#${reference.section}`;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* An effect as the player sees it, as a line of the log writes it: its name and its end, without who keeps it, which may be a secret; an end at someone's turn
|
|
216
|
+
* names them as the diary does.
|
|
217
|
+
*/
|
|
218
|
+
function seenEffectOf(world, line, named) {
|
|
219
|
+
const read = readEffect(line);
|
|
220
|
+
if (!("effect" in read)) {
|
|
221
|
+
return { name: line, text: line };
|
|
222
|
+
}
|
|
223
|
+
const end = read.effect.end;
|
|
224
|
+
const seen = end !== undefined && "turn" in end ? { ...end, turn: named(end.turn) ?? (isCopyName(world, end.turn) ? "creature" : "someone") } : end;
|
|
225
|
+
const told = seen !== undefined && "turn" in seen ? { ...seen, turn: nameText(seen.turn) } : seen;
|
|
226
|
+
return { name: read.effect.name, ...(seen === undefined ? {} : { end: seen }), text: effectShown(world, { ...read.effect, values: [], end: told }) };
|
|
227
|
+
}
|
|
@@ -1,228 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import type {
|
|
3
|
-
import { type
|
|
4
|
-
import type {
|
|
5
|
-
import { type CalendarDay } from "../../time/index.ts";
|
|
6
|
-
import { type PlayerSetting } from "../config.ts";
|
|
7
|
-
import { type ShownImport } from "../import/import.ts";
|
|
8
|
-
import { type SeenEffect } from "../shared/effects.ts";
|
|
9
|
-
import { type Mode } from "../shared/mode.ts";
|
|
10
|
-
import { type MoodMoment } from "../shared/moods.ts";
|
|
11
|
-
import { type ResetPoint, type SaveMode } from "../shared/saves.ts";
|
|
12
|
-
import { type SheetGroupData, type SheetValue } from "../shared/sheet.ts";
|
|
13
|
-
import { type ShownChapter, type ShownQuest, type ShownThought } from "./journal.ts";
|
|
14
|
-
import { type ShownMap } from "./map.ts";
|
|
15
|
-
import { type ShownPlace, type ShownScene } from "./place.ts";
|
|
16
|
-
import { type KnownEntry, type ShownCalendar, type ShownDocument } from "./world.ts";
|
|
17
|
-
/** A roll the player may see (D-279): theirs, or one the master showed; never a hidden one. */
|
|
18
|
-
export interface ShownRoll {
|
|
19
|
-
id: string;
|
|
20
|
-
/** The game date, when there is one. */
|
|
21
|
-
date?: string;
|
|
22
|
-
/** When it was rolled, in real time: ISO 8601 (D-299). */
|
|
23
|
-
at: string;
|
|
24
|
-
/** Who rolled it: the player, or the master. */
|
|
25
|
-
by: "player" | "master";
|
|
26
|
-
/** For whom, as the player character knows them: Ettore, Lupa; creature or someone for one it does not know. */
|
|
27
|
-
who?: string;
|
|
28
|
-
/** What the roll is, as the player sees it: the check the master asked, or what the master names a roll of theirs, such as Bite (D-292). */
|
|
29
|
-
check?: string;
|
|
30
|
-
/** The picture of whom it is for, when the player character knows them and they have one (D-286). */
|
|
31
|
-
image?: {
|
|
32
|
-
file: string;
|
|
33
|
-
version: number;
|
|
34
|
-
};
|
|
35
|
-
/** Whom it is for is someone the player character does not know by name: a creature, someone (D-286). */
|
|
36
|
-
stranger?: true;
|
|
37
|
-
/** The notation in parts, for the dashboard to say in words when it does more than add its dice, as 2d20 keeping the highest, +5 (D-292). */
|
|
38
|
-
words?: NotationPart[];
|
|
39
|
-
notation: string;
|
|
40
|
-
total: number;
|
|
41
|
-
/** What the faces mean, in place of the total, when an extension's roll says it: 4 pins, no 1 (D-505). */
|
|
42
|
-
says?: string;
|
|
43
|
-
/** How each die turned out, by its face in order, when an extension's roll says it: good, bad or none (D-507). */
|
|
44
|
-
tones?: ("good" | "bad" | null)[];
|
|
45
|
-
/** The coins of a toss, each face in order, which the page says in its language in place of the total; a toss shows no dice (COIN-3). */
|
|
46
|
-
toss?: CoinSide[];
|
|
47
|
-
/** Whether the page throws it in its tray too, or keeps it in the list alone, when the master says so (VIEW-13). */
|
|
48
|
-
tray?: boolean;
|
|
49
|
-
text: string;
|
|
50
|
-
dice: ThrownDie[];
|
|
51
|
-
}
|
|
52
|
-
/** Someone of the party as the player sees them (VIEW-1): the dashboard draws them (D-272), the chat reads them as a line. */
|
|
53
|
-
export interface PartyMember {
|
|
54
|
-
name: string;
|
|
55
|
-
role: "pc" | "companion";
|
|
56
|
-
dead: boolean;
|
|
57
|
-
/** Their picture, their own or from a base the player character knows (D-267, D-277): its file, and when it last changed. */
|
|
58
|
-
image?: {
|
|
59
|
-
file: string;
|
|
60
|
-
version: number;
|
|
61
|
-
};
|
|
62
|
-
/** The icon on their token, as their class, when the system gives one (D-414). */
|
|
63
|
-
icon?: string;
|
|
64
|
-
/** Where they are, as far as the player character knows the places: the places that hold them, the nearest first; elsewhere, or in the open (D-254, TRV-13). */
|
|
65
|
-
place?: string[] | "elsewhere" | "open";
|
|
66
|
-
/** The numbers of their line, in its order (DAT-2). */
|
|
67
|
-
counters: SheetValue[];
|
|
68
|
-
/** Their effects, each with its end when it has one, and as the line writes it. */
|
|
69
|
-
effects: SeenEffect[];
|
|
70
|
-
/** Their mood (MOOD-6); none when neutral, or dead. */
|
|
71
|
-
mood?: Mood;
|
|
72
|
-
/** What they are, as the line under a sheet's name says it in the campaign's language: Level 3 Cleric (D-288, D-409). */
|
|
73
|
-
headline?: string;
|
|
74
|
-
/** At the system's down point, as hp 0 (D-516). */
|
|
75
|
-
down?: true;
|
|
76
|
-
}
|
|
77
|
-
/** What the player may see: the party, the open quests and scene and the diary; a page as the player character knows it, whole or one section; or nothing. */
|
|
78
|
-
export type ViewResult = {
|
|
79
|
-
kind: "none";
|
|
80
|
-
language?: string;
|
|
81
|
-
importing?: ShownImport;
|
|
82
|
-
} | {
|
|
83
|
-
kind: "overview";
|
|
84
|
-
campaign: string;
|
|
85
|
-
/** The campaign's language, in which the dashboard writes its own words (D-394). */
|
|
86
|
-
language?: string;
|
|
87
|
-
/** The game system's words in the campaign's language, when it has them (D-403). */
|
|
88
|
-
words?: SystemWords;
|
|
89
|
-
/** The game system's own verbs of the sheet, beside the engine's, which its words translate (D-514). */
|
|
90
|
-
verbs?: Record<string, SheetVerb>;
|
|
91
|
-
/** The game system the campaign plays, for the dashboard: its name, what it is, and what its source asks a work that uses it to say (D-284). */
|
|
92
|
-
system?: {
|
|
93
|
-
name: string;
|
|
94
|
-
title: string;
|
|
95
|
-
attribution?: string;
|
|
96
|
-
};
|
|
97
|
-
now?: string;
|
|
98
|
-
/** The day of the calendar it is now, when the campaign has one (TIM-8). */
|
|
99
|
-
calendar?: CalendarDay;
|
|
100
|
-
/** The master's mood, which the robot shows, and their last moment, which the dashboard shows for a few seconds when it is new (MOOD-4, MOOD-6). */
|
|
101
|
-
master: {
|
|
102
|
-
mood: Mood;
|
|
103
|
-
moment?: MoodMoment;
|
|
104
|
-
};
|
|
105
|
-
party: PartyMember[];
|
|
106
|
-
/** With more than one living player character, the one in the foreground, whose place the view gives (VIEW-12). */
|
|
107
|
-
foreground?: string;
|
|
108
|
-
/** Where the player character is, and the open scene, as data for the dashboard (VIEW-6). */
|
|
109
|
-
place?: ShownPlace;
|
|
110
|
-
openScene?: ShownScene;
|
|
111
|
-
quests: string[];
|
|
112
|
-
scene?: string;
|
|
113
|
-
diary: string[];
|
|
114
|
-
total: number;
|
|
115
|
-
rolls: ShownRoll[];
|
|
116
|
-
/** How many public rolls the log has, for the dashboard to offer more (D-302). */
|
|
117
|
-
rollsTotal: number;
|
|
118
|
-
/** How many problems the campaign's files have, which the dashboard tells the player the master fixes (validate). */
|
|
119
|
-
problems: number;
|
|
120
|
-
/** An import under way, which the dashboard tells the player (D-491 (11)). */
|
|
121
|
-
importing?: ShownImport;
|
|
122
|
-
/** The campaign's language, when this computer is translating the game system's pages into it, which the dashboard tells the player (D-539). */
|
|
123
|
-
textsTranslating?: string;
|
|
124
|
-
} | {
|
|
125
|
-
kind: "page";
|
|
126
|
-
title: string;
|
|
127
|
-
/** The line under the character's name on the dashboard (D-288). */
|
|
128
|
-
headline?: string;
|
|
129
|
-
sheet: SheetGroupData[];
|
|
130
|
-
/** Where the dashboard puts the groups of the sheet, as the system says (D-295), and those at hand in a fight (D-315). */
|
|
131
|
-
cards?: {
|
|
132
|
-
rail: string[];
|
|
133
|
-
order: string[];
|
|
134
|
-
atHand: string[];
|
|
135
|
-
};
|
|
136
|
-
/** The fields whose items the player acts with, each with its verbs, as the system says (D-495). */
|
|
137
|
-
actions?: Record<string, ActVerb[]>;
|
|
138
|
-
text: string;
|
|
139
|
-
/** With more than one player character, the secrets the text shows that only some of them discovered, by the name the text gives them, and who (VIEW-12). */
|
|
140
|
-
knownBy?: {
|
|
141
|
-
secret: string;
|
|
142
|
-
who: string[];
|
|
143
|
-
}[];
|
|
144
|
-
/** With more than one player character, who knows the page, when not all of them do (VIEW-12). */
|
|
145
|
-
whoKnows?: string[];
|
|
146
|
-
/** With who knows, the living player characters who do not, played as not knowing it. */
|
|
147
|
-
unaware?: string[];
|
|
148
|
-
/** The player character's opening text, which the player may propose on the dashboard (D-373, D-386); left out on other pages. */
|
|
149
|
-
story?: string;
|
|
150
|
-
} | {
|
|
151
|
-
kind: "section";
|
|
152
|
-
title: string;
|
|
153
|
-
lines: string[];
|
|
154
|
-
text: string;
|
|
155
|
-
/** With more than one player character, who knows it, when not all of them do (VIEW-12). */
|
|
156
|
-
knownBy?: string[];
|
|
157
|
-
}
|
|
158
|
-
/** What another character knows and lived, for the character agent voicing them (VIEW-10): their own page as they know it, now, the pages they know, the secrets, the scenes. */
|
|
159
|
-
| {
|
|
160
|
-
kind: "memory";
|
|
161
|
-
title: string;
|
|
162
|
-
sheet: SheetGroupData[];
|
|
163
|
-
text: string;
|
|
164
|
-
now?: string;
|
|
165
|
-
/** The places that hold them, the nearest first, those they know. */
|
|
166
|
-
place: string[];
|
|
167
|
-
/** The open scene, when they are in it, as they see it. */
|
|
168
|
-
scene?: string;
|
|
169
|
-
/** "Marta (character): A shepherd's widow of Whitecrag.": each page they know, in a line. */
|
|
170
|
-
known: string[];
|
|
171
|
-
/** "Piet#Fate: Killed by orcs.": the secrets of other pages they discovered. */
|
|
172
|
-
discovered: string[];
|
|
173
|
-
/** "day 3, 19:05 · Ambush at Mill Ford: Four orcs ambushed the party.": the scenes they were in. */
|
|
174
|
-
lived: string[];
|
|
175
|
-
/** A companion's last lines of their diary, with their dates (DIA-3); none for anyone else. */
|
|
176
|
-
thoughts?: string[];
|
|
177
|
-
/** For a living player character played while their player is away (D-480 (4)), the prudence it is played with. */
|
|
178
|
-
away?: string;
|
|
179
|
-
}
|
|
180
|
-
/** The world map as the player character knows it (VIEW-7). */
|
|
181
|
-
| ({
|
|
182
|
-
kind: "map";
|
|
183
|
-
} & ShownMap)
|
|
184
|
-
/** The player's settings, which the dashboard changes (D-341). */
|
|
185
|
-
| {
|
|
186
|
-
kind: "settings";
|
|
187
|
-
settings: PlayerSetting[];
|
|
188
|
-
}
|
|
189
|
-
/** The setup (D-370): the mode, the campaign's name and whether it is still its folder's, what the next mode still needs, and the setup's questions. */
|
|
190
|
-
| {
|
|
191
|
-
kind: "setup";
|
|
192
|
-
mode: Mode;
|
|
193
|
-
name: string;
|
|
194
|
-
folderName: boolean;
|
|
195
|
-
missing: string[];
|
|
196
|
-
questions: PlayerSetting[];
|
|
197
|
-
}
|
|
198
|
-
/** The journal (D-367): the quests the player character knows, and the story by scenes. */
|
|
199
|
-
| {
|
|
200
|
-
kind: "journal";
|
|
201
|
-
now?: string;
|
|
202
|
-
quests: ShownQuest[];
|
|
203
|
-
chapters: ShownChapter[];
|
|
204
|
-
thoughts: ShownThought[];
|
|
205
|
-
}
|
|
206
|
-
/** The World section but the map (VIEW-11): the pages the character knows, each as it knows it, the documents it has or read, and the calendar. */
|
|
207
|
-
| {
|
|
208
|
-
kind: "world";
|
|
209
|
-
known: KnownEntry[];
|
|
210
|
-
documents: ShownDocument[];
|
|
211
|
-
calendar: ShownCalendar;
|
|
212
|
-
}
|
|
213
|
-
/** The saves and what the mode allows (D-359): make one, go back to some, start over from the first. */
|
|
214
|
-
| {
|
|
215
|
-
kind: "saves";
|
|
216
|
-
mode: SaveMode;
|
|
217
|
-
rule: string;
|
|
218
|
-
saves: ShownSave[];
|
|
219
|
-
make: boolean;
|
|
220
|
-
reset: ResetPoint[];
|
|
221
|
-
wentBack?: string;
|
|
222
|
-
} | {
|
|
223
|
-
kind: "unknown";
|
|
224
|
-
text: string;
|
|
225
|
-
};
|
|
2
|
+
import type { SystemWords } from "../../systems/index.ts";
|
|
3
|
+
import { type PlayerSetting } from "../config/dashboard.ts";
|
|
4
|
+
import type { PartyMember, ShownRoll } from "./result.ts";
|
|
226
5
|
export declare const view: import("../../core/registry.ts").Command<z.ZodObject<{
|
|
227
6
|
page: z.ZodOptional<z.ZodString>;
|
|
228
7
|
diary: z.ZodOptional<z.ZodString>;
|
|
@@ -238,110 +17,87 @@ export declare const view: import("../../core/registry.ts").Command<z.ZodObject<
|
|
|
238
17
|
}, z.core.$strip>, {
|
|
239
18
|
kind: "none";
|
|
240
19
|
language?: string;
|
|
241
|
-
importing?: ShownImport;
|
|
20
|
+
importing?: import("../import/import.ts").ShownImport;
|
|
242
21
|
} | {
|
|
243
22
|
kind: "overview";
|
|
244
23
|
campaign: string;
|
|
245
|
-
/** The campaign's language, in which the dashboard writes its own words (D-394). */
|
|
246
24
|
language?: string;
|
|
247
|
-
/** The game system's words in the campaign's language, when it has them (D-403). */
|
|
248
25
|
words?: SystemWords;
|
|
249
|
-
|
|
250
|
-
verbs?: Record<string, SheetVerb>;
|
|
251
|
-
/** The game system the campaign plays, for the dashboard: its name, what it is, and what its source asks a work that uses it to say (D-284). */
|
|
26
|
+
verbs?: Record<string, import("../../systems/game-system.ts").SheetVerb>;
|
|
252
27
|
system?: {
|
|
253
28
|
name: string;
|
|
254
29
|
title: string;
|
|
255
30
|
attribution?: string;
|
|
256
31
|
};
|
|
257
32
|
now?: string;
|
|
258
|
-
|
|
259
|
-
calendar?: CalendarDay;
|
|
260
|
-
/** The master's mood, which the robot shows, and their last moment, which the dashboard shows for a few seconds when it is new (MOOD-4, MOOD-6). */
|
|
33
|
+
calendar?: import("../../time/calendar.ts").CalendarDay;
|
|
261
34
|
master: {
|
|
262
|
-
mood: Mood;
|
|
263
|
-
moment?: MoodMoment;
|
|
35
|
+
mood: import("../../core/mood.ts").Mood;
|
|
36
|
+
moment?: import("../shared/characters/moods.ts").MoodMoment;
|
|
264
37
|
};
|
|
265
38
|
party: PartyMember[];
|
|
266
|
-
/** With more than one living player character, the one in the foreground, whose place the view gives (VIEW-12). */
|
|
267
39
|
foreground?: string;
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
openScene?: ShownScene;
|
|
40
|
+
place?: import("./place.ts").ShownPlace;
|
|
41
|
+
openScene?: import("./place.ts").ShownScene;
|
|
271
42
|
quests: string[];
|
|
272
43
|
scene?: string;
|
|
273
44
|
diary: string[];
|
|
274
45
|
total: number;
|
|
275
46
|
rolls: ShownRoll[];
|
|
276
|
-
/** How many public rolls the log has, for the dashboard to offer more (D-302). */
|
|
277
47
|
rollsTotal: number;
|
|
278
|
-
/** How many problems the campaign's files have, which the dashboard tells the player the master fixes (validate). */
|
|
279
48
|
problems: number;
|
|
280
|
-
|
|
281
|
-
importing?: ShownImport;
|
|
282
|
-
/** The campaign's language, when this computer is translating the game system's pages into it, which the dashboard tells the player (D-539). */
|
|
49
|
+
importing?: import("../import/import.ts").ShownImport;
|
|
283
50
|
textsTranslating?: string;
|
|
51
|
+
layers?: import("./layers.ts").ShownLayer[];
|
|
284
52
|
} | {
|
|
285
53
|
kind: "page";
|
|
286
54
|
title: string;
|
|
287
|
-
|
|
55
|
+
layered?: true;
|
|
288
56
|
headline?: string;
|
|
289
|
-
sheet: SheetGroupData[];
|
|
290
|
-
/** Where the dashboard puts the groups of the sheet, as the system says (D-295), and those at hand in a fight (D-315). */
|
|
57
|
+
sheet: import("../shared/sheet/sheet.ts").SheetGroupData[];
|
|
291
58
|
cards?: {
|
|
292
59
|
rail: string[];
|
|
293
60
|
order: string[];
|
|
294
61
|
atHand: string[];
|
|
295
62
|
};
|
|
296
|
-
|
|
297
|
-
actions?: Record<string, ActVerb[]>;
|
|
63
|
+
actions?: Record<string, import("../../systems/game-system.ts").ActVerb[]>;
|
|
298
64
|
text: string;
|
|
299
|
-
/** With more than one player character, the secrets the text shows that only some of them discovered, by the name the text gives them, and who (VIEW-12). */
|
|
300
65
|
knownBy?: {
|
|
301
66
|
secret: string;
|
|
302
67
|
who: string[];
|
|
303
68
|
}[];
|
|
304
|
-
/** With more than one player character, who knows the page, when not all of them do (VIEW-12). */
|
|
305
69
|
whoKnows?: string[];
|
|
306
|
-
/** With who knows, the living player characters who do not, played as not knowing it. */
|
|
307
70
|
unaware?: string[];
|
|
308
|
-
/** The player character's opening text, which the player may propose on the dashboard (D-373, D-386); left out on other pages. */
|
|
309
71
|
story?: string;
|
|
310
72
|
} | {
|
|
311
73
|
kind: "section";
|
|
312
74
|
title: string;
|
|
313
75
|
lines: string[];
|
|
314
76
|
text: string;
|
|
315
|
-
/** With more than one player character, who knows it, when not all of them do (VIEW-12). */
|
|
316
77
|
knownBy?: string[];
|
|
317
78
|
} | {
|
|
318
79
|
kind: "memory";
|
|
319
80
|
title: string;
|
|
320
|
-
sheet: SheetGroupData[];
|
|
81
|
+
sheet: import("../shared/sheet/sheet.ts").SheetGroupData[];
|
|
321
82
|
text: string;
|
|
322
83
|
now?: string;
|
|
323
|
-
/** The places that hold them, the nearest first, those they know. */
|
|
324
84
|
place: string[];
|
|
325
|
-
/** The open scene, when they are in it, as they see it. */
|
|
326
85
|
scene?: string;
|
|
327
|
-
/** "Marta (character): A shepherd's widow of Whitecrag.": each page they know, in a line. */
|
|
328
86
|
known: string[];
|
|
329
|
-
/** "Piet#Fate: Killed by orcs.": the secrets of other pages they discovered. */
|
|
330
87
|
discovered: string[];
|
|
331
|
-
/** "day 3, 19:05 · Ambush at Mill Ford: Four orcs ambushed the party.": the scenes they were in. */
|
|
332
88
|
lived: string[];
|
|
333
|
-
/** A companion's last lines of their diary, with their dates (DIA-3); none for anyone else. */
|
|
334
89
|
thoughts?: string[];
|
|
335
|
-
|
|
90
|
+
thoughtsRule?: string;
|
|
336
91
|
away?: string;
|
|
92
|
+
orders?: string[];
|
|
337
93
|
} | ({
|
|
338
94
|
kind: "map";
|
|
339
|
-
} & ShownMap) | {
|
|
95
|
+
} & import("./map.ts").ShownMap) | {
|
|
340
96
|
kind: "settings";
|
|
341
97
|
settings: PlayerSetting[];
|
|
342
98
|
} | {
|
|
343
99
|
kind: "setup";
|
|
344
|
-
mode: Mode;
|
|
100
|
+
mode: import("../shared/campaign/mode.ts").Mode;
|
|
345
101
|
name: string;
|
|
346
102
|
folderName: boolean;
|
|
347
103
|
missing: string[];
|
|
@@ -349,42 +105,23 @@ export declare const view: import("../../core/registry.ts").Command<z.ZodObject<
|
|
|
349
105
|
} | {
|
|
350
106
|
kind: "journal";
|
|
351
107
|
now?: string;
|
|
352
|
-
quests: ShownQuest[];
|
|
353
|
-
chapters: ShownChapter[];
|
|
354
|
-
thoughts: ShownThought[];
|
|
108
|
+
quests: import("./journal.ts").ShownQuest[];
|
|
109
|
+
chapters: import("./journal.ts").ShownChapter[];
|
|
110
|
+
thoughts: import("./journal.ts").ShownThought[];
|
|
355
111
|
} | {
|
|
356
112
|
kind: "world";
|
|
357
|
-
known: KnownEntry[];
|
|
358
|
-
documents: ShownDocument[];
|
|
359
|
-
calendar: ShownCalendar;
|
|
113
|
+
known: import("./world.ts").KnownEntry[];
|
|
114
|
+
documents: import("./world.ts").ShownDocument[];
|
|
115
|
+
calendar: import("./world.ts").ShownCalendar;
|
|
360
116
|
} | {
|
|
361
117
|
kind: "saves";
|
|
362
|
-
mode: SaveMode;
|
|
118
|
+
mode: import("../shared/campaign/saves.ts").SaveMode;
|
|
363
119
|
rule: string;
|
|
364
|
-
saves: ShownSave[];
|
|
120
|
+
saves: import("./result.ts").ShownSave[];
|
|
365
121
|
make: boolean;
|
|
366
|
-
reset: ResetPoint[];
|
|
122
|
+
reset: import("../shared/campaign/saves.ts").ResetPoint[];
|
|
367
123
|
wentBack?: string;
|
|
368
124
|
} | {
|
|
369
125
|
kind: "unknown";
|
|
370
126
|
text: string;
|
|
371
127
|
}>;
|
|
372
|
-
/**
|
|
373
|
-
* A save as the dashboard shows it (D-359): its number and label, the words that name it and the game date, when it was made in real time, the place the party
|
|
374
|
-
* was in with its kind and picture, the point of a reset it is, and whether the player may go back to it, never to such a point, which is a reset's (D-361).
|
|
375
|
-
*/
|
|
376
|
-
export interface ShownSave {
|
|
377
|
-
number: number;
|
|
378
|
-
label: string;
|
|
379
|
-
name?: string;
|
|
380
|
-
date?: string;
|
|
381
|
-
at?: string;
|
|
382
|
-
place?: string;
|
|
383
|
-
kind?: string;
|
|
384
|
-
picture?: {
|
|
385
|
-
file: string;
|
|
386
|
-
version: number;
|
|
387
|
-
};
|
|
388
|
-
point?: ResetPoint;
|
|
389
|
-
load: boolean;
|
|
390
|
-
}
|