rpg-engine 0.14.1 → 0.16.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.
Files changed (493) hide show
  1. package/dist/campaign/index.d.ts +1 -1
  2. package/dist/campaign/index.js +1 -1
  3. package/dist/campaign/last-choices.js +1 -1
  4. package/dist/campaign/settings.d.ts +25 -5
  5. package/dist/campaign/settings.js +38 -9
  6. package/dist/cli/cli.js +1 -1
  7. package/dist/cli/command-line.js +1 -1
  8. package/dist/commands/advance.d.ts +1 -1
  9. package/dist/commands/advance.js +6 -6
  10. package/dist/commands/ask.js +7 -7
  11. package/dist/commands/change/amounts.d.ts +32 -0
  12. package/dist/commands/change/amounts.js +150 -0
  13. package/dist/commands/change/change.d.ts +4 -54
  14. package/dist/commands/change/change.js +19 -749
  15. package/dist/commands/change/damage.d.ts +30 -0
  16. package/dist/commands/change/damage.js +73 -2
  17. package/dist/commands/change/dice.d.ts +34 -0
  18. package/dist/commands/change/dice.js +59 -0
  19. package/dist/commands/change/fields.d.ts +37 -0
  20. package/dist/commands/change/fields.js +156 -0
  21. package/dist/commands/change/holder.d.ts +48 -0
  22. package/dist/commands/change/holder.js +162 -0
  23. package/dist/commands/change/recipe-pace.js +1 -1
  24. package/dist/commands/change/recipe.d.ts +58 -0
  25. package/dist/commands/change/recipe.js +179 -0
  26. package/dist/commands/choices.js +3 -3
  27. package/dist/commands/config/config.d.ts +15 -0
  28. package/dist/commands/config/config.js +355 -0
  29. package/dist/commands/config/custom-levels.d.ts +7 -0
  30. package/dist/commands/config/custom-levels.js +32 -0
  31. package/dist/commands/{config.d.ts → config/dashboard.d.ts} +4 -26
  32. package/dist/commands/config/dashboard.js +171 -0
  33. package/dist/commands/config/entries.d.ts +17 -0
  34. package/dist/commands/config/entries.js +76 -0
  35. package/dist/commands/config/news.d.ts +7 -0
  36. package/dist/commands/config/news.js +88 -0
  37. package/dist/commands/config/shown.d.ts +9 -0
  38. package/dist/commands/config/shown.js +80 -0
  39. package/dist/commands/config/words.d.ts +27 -0
  40. package/dist/commands/config/words.js +204 -0
  41. package/dist/commands/effect.js +9 -9
  42. package/dist/commands/find.d.ts +4 -4
  43. package/dist/commands/find.js +1 -1
  44. package/dist/commands/image.js +6 -6
  45. package/dist/commands/import/import.d.ts +0 -2
  46. package/dist/commands/import/import.js +45 -44
  47. package/dist/commands/import/run.js +1 -1
  48. package/dist/commands/index.js +3 -3
  49. package/dist/commands/init.js +2 -2
  50. package/dist/commands/install.js +1 -1
  51. package/dist/commands/instructions.js +17 -6
  52. package/dist/commands/mode.d.ts +2 -2
  53. package/dist/commands/mode.js +17 -9
  54. package/dist/commands/mood.js +4 -4
  55. package/dist/commands/move.js +10 -10
  56. package/dist/commands/package/consent.d.ts +11 -0
  57. package/dist/commands/package/consent.js +52 -0
  58. package/dist/commands/package/here.d.ts +51 -0
  59. package/dist/commands/package/here.js +128 -0
  60. package/dist/commands/package/install.d.ts +10 -0
  61. package/dist/commands/package/install.js +337 -0
  62. package/dist/commands/package/package.d.ts +18 -0
  63. package/dist/commands/package/package.js +236 -0
  64. package/dist/commands/package/result.d.ts +90 -0
  65. package/dist/commands/package/result.js +1 -0
  66. package/dist/commands/package/uninstall.d.ts +6 -0
  67. package/dist/commands/package/uninstall.js +70 -0
  68. package/dist/commands/rename.js +3 -3
  69. package/dist/commands/reveal.js +5 -5
  70. package/dist/commands/roll/roll.js +11 -9
  71. package/dist/commands/roll/tables.js +1 -1
  72. package/dist/commands/rules.d.ts +2 -2
  73. package/dist/commands/rules.js +3 -3
  74. package/dist/commands/save.d.ts +1 -1
  75. package/dist/commands/save.js +2 -2
  76. package/dist/commands/scene/close.d.ts +18 -0
  77. package/dist/commands/scene/close.js +179 -0
  78. package/dist/commands/scene/members.d.ts +14 -0
  79. package/dist/commands/scene/members.js +32 -0
  80. package/dist/commands/scene/open.d.ts +6 -0
  81. package/dist/commands/scene/open.js +298 -0
  82. package/dist/commands/scene/result.d.ts +98 -0
  83. package/dist/commands/scene/result.js +2 -0
  84. package/dist/commands/{scene.d.ts → scene/scene.d.ts} +10 -36
  85. package/dist/commands/scene/scene.js +210 -0
  86. package/dist/commands/scene/turns.d.ts +18 -0
  87. package/dist/commands/scene/turns.js +229 -0
  88. package/dist/commands/shared/{adventures.d.ts → books/adventures.d.ts} +5 -3
  89. package/dist/commands/shared/{adventures.js → books/adventures.js} +23 -19
  90. package/dist/commands/shared/{library-reader.js → books/library-reader.js} +3 -3
  91. package/dist/commands/shared/{library.d.ts → books/library.d.ts} +2 -2
  92. package/dist/commands/shared/{library.js → books/library.js} +9 -9
  93. package/dist/commands/shared/{rules.d.ts → books/rules.d.ts} +2 -2
  94. package/dist/commands/shared/{rules.js → books/rules.js} +5 -5
  95. package/dist/commands/shared/{system-texts.d.ts → books/system-texts.d.ts} +2 -2
  96. package/dist/commands/shared/{system-texts.js → books/system-texts.js} +9 -8
  97. package/dist/commands/shared/{page-words.d.ts → books/words.d.ts} +2 -2
  98. package/dist/commands/shared/{page-words.js → books/words.js} +4 -4
  99. package/dist/commands/shared/{checks.d.ts → campaign/checks.d.ts} +3 -3
  100. package/dist/commands/shared/{checks.js → campaign/checks.js} +7 -7
  101. package/dist/commands/shared/{images.d.ts → campaign/images.d.ts} +3 -3
  102. package/dist/commands/shared/{images.js → campaign/images.js} +5 -5
  103. package/dist/commands/shared/{mode.d.ts → campaign/mode.d.ts} +4 -4
  104. package/dist/commands/shared/{mode.js → campaign/mode.js} +28 -13
  105. package/dist/commands/shared/{money.d.ts → campaign/money.d.ts} +3 -3
  106. package/dist/commands/shared/{money.js → campaign/money.js} +2 -2
  107. package/dist/commands/shared/{offers.d.ts → campaign/offers.d.ts} +3 -3
  108. package/dist/commands/shared/{offers.js → campaign/offers.js} +3 -3
  109. package/dist/commands/shared/{outside.d.ts → campaign/outside.d.ts} +3 -3
  110. package/dist/commands/shared/{outside.js → campaign/outside.js} +7 -7
  111. package/dist/commands/shared/{parts.d.ts → campaign/parts.d.ts} +10 -3
  112. package/dist/commands/shared/{parts.js → campaign/parts.js} +26 -3
  113. package/dist/commands/shared/{problems.d.ts → campaign/problems.d.ts} +3 -3
  114. package/dist/commands/shared/{problems.js → campaign/problems.js} +17 -17
  115. package/dist/commands/shared/{quests.d.ts → campaign/quests.d.ts} +4 -4
  116. package/dist/commands/shared/{quests.js → campaign/quests.js} +6 -6
  117. package/dist/commands/shared/{saves.d.ts → campaign/saves.d.ts} +4 -4
  118. package/dist/commands/shared/{saves.js → campaign/saves.js} +10 -10
  119. package/dist/commands/shared/{theme.d.ts → campaign/theme.d.ts} +3 -3
  120. package/dist/commands/shared/{theme.js → campaign/theme.js} +1 -1
  121. package/dist/commands/shared/{world.d.ts → campaign/world.d.ts} +5 -5
  122. package/dist/commands/shared/{world.js → campaign/world.js} +17 -14
  123. package/dist/commands/shared/{knowledge.d.ts → characters/knowledge.d.ts} +3 -3
  124. package/dist/commands/shared/{knowledge.js → characters/knowledge.js} +4 -4
  125. package/dist/commands/shared/{moods.d.ts → characters/moods.d.ts} +3 -3
  126. package/dist/commands/shared/{moods.js → characters/moods.js} +3 -3
  127. package/dist/commands/shared/characters/orders.d.ts +4 -0
  128. package/dist/commands/shared/characters/orders.js +10 -0
  129. package/dist/commands/shared/{thoughts.d.ts → characters/thoughts.d.ts} +2 -2
  130. package/dist/commands/shared/{thoughts.js → characters/thoughts.js} +3 -3
  131. package/dist/commands/shared/{voices.d.ts → characters/voices.d.ts} +1 -1
  132. package/dist/commands/shared/{voices.js → characters/voices.js} +2 -2
  133. package/dist/commands/shared/examples.js +2 -2
  134. package/dist/commands/shared/packages/catalog.js +2 -2
  135. package/dist/commands/shared/packages/code.d.ts +1 -1
  136. package/dist/commands/shared/packages/code.js +8 -8
  137. package/dist/commands/shared/packages/extensions.d.ts +1 -1
  138. package/dist/commands/shared/packages/extensions.js +1 -1
  139. package/dist/commands/shared/packages/hooks.d.ts +1 -1
  140. package/dist/commands/shared/packages/hooks.js +1 -1
  141. package/dist/commands/shared/packages/widgets.d.ts +3 -3
  142. package/dist/commands/shared/packages/widgets.js +3 -3
  143. package/dist/commands/shared/{environment.d.ts → places/environment.d.ts} +1 -1
  144. package/dist/commands/shared/{environment.js → places/environment.js} +4 -4
  145. package/dist/commands/shared/{grid-moves.d.ts → places/grid-moves.d.ts} +4 -4
  146. package/dist/commands/shared/{grid-moves.js → places/grid-moves.js} +8 -7
  147. package/dist/commands/shared/{grids.d.ts → places/grids.d.ts} +4 -4
  148. package/dist/commands/shared/{grids.js → places/grids.js} +6 -6
  149. package/dist/commands/shared/{journey.d.ts → places/journey.d.ts} +3 -3
  150. package/dist/commands/shared/{journey.js → places/journey.js} +6 -6
  151. package/dist/commands/shared/{moves.d.ts → places/moves.d.ts} +2 -2
  152. package/dist/commands/shared/{moves.js → places/moves.js} +4 -4
  153. package/dist/commands/shared/{positions.d.ts → places/positions.d.ts} +2 -2
  154. package/dist/commands/shared/{positions.js → places/positions.js} +4 -4
  155. package/dist/commands/shared/{roads.d.ts → places/roads.d.ts} +5 -5
  156. package/dist/commands/shared/{roads.js → places/roads.js} +6 -6
  157. package/dist/commands/shared/{effects.d.ts → scene/effects.d.ts} +7 -7
  158. package/dist/commands/shared/{effects.js → scene/effects.js} +10 -10
  159. package/dist/commands/shared/{loot.d.ts → scene/loot.d.ts} +2 -2
  160. package/dist/commands/shared/{loot.js → scene/loot.js} +3 -3
  161. package/dist/commands/shared/{master-rolls.d.ts → scene/master-rolls.d.ts} +2 -2
  162. package/dist/commands/shared/{master-rolls.js → scene/master-rolls.js} +5 -5
  163. package/dist/commands/shared/{reminders.d.ts → scene/reminders.d.ts} +4 -4
  164. package/dist/commands/shared/{reminders.js → scene/reminders.js} +4 -4
  165. package/dist/commands/shared/{scene.d.ts → scene/scene.d.ts} +3 -3
  166. package/dist/commands/shared/{scene.js → scene/scene.js} +7 -7
  167. package/dist/commands/shared/{bonds.d.ts → sheet/bonds.d.ts} +3 -3
  168. package/dist/commands/shared/{bonds.js → sheet/bonds.js} +2 -2
  169. package/dist/commands/shared/{page-counters.d.ts → sheet/counters.d.ts} +3 -3
  170. package/dist/commands/shared/{page-counters.js → sheet/counters.js} +5 -5
  171. package/dist/commands/shared/{effect-layer.d.ts → sheet/effect-layer.d.ts} +2 -2
  172. package/dist/commands/shared/{effect-layer.js → sheet/effect-layer.js} +9 -6
  173. package/dist/commands/shared/sheet/effect-values.d.ts +9 -0
  174. package/dist/commands/shared/sheet/effect-values.js +69 -0
  175. package/dist/commands/shared/{experience.d.ts → sheet/experience.d.ts} +3 -3
  176. package/dist/commands/shared/{experience.js → sheet/experience.js} +5 -5
  177. package/dist/commands/shared/sheet/formula-problems.d.ts +8 -0
  178. package/dist/commands/shared/sheet/formula-problems.js +140 -0
  179. package/dist/commands/shared/sheet/formula-scope.d.ts +32 -0
  180. package/dist/commands/shared/sheet/formula-scope.js +235 -0
  181. package/dist/commands/shared/{limits.d.ts → sheet/limits.d.ts} +3 -3
  182. package/dist/commands/shared/{limits.js → sheet/limits.js} +5 -4
  183. package/dist/commands/shared/{progression.d.ts → sheet/progression.d.ts} +2 -2
  184. package/dist/commands/shared/{progression.js → sheet/progression.js} +4 -4
  185. package/dist/commands/shared/{sheet.d.ts → sheet/sheet.d.ts} +5 -5
  186. package/dist/commands/shared/{sheet.js → sheet/sheet.js} +11 -7
  187. package/dist/commands/shared/{stacks.d.ts → sheet/stacks.d.ts} +2 -2
  188. package/dist/commands/shared/{stacks.js → sheet/stacks.js} +4 -4
  189. package/dist/commands/shared/sheet/system-fields.d.ts +21 -0
  190. package/dist/commands/shared/sheet/system-fields.js +45 -0
  191. package/dist/commands/shared/{thresholds.d.ts → sheet/thresholds.d.ts} +1 -1
  192. package/dist/commands/shared/{thresholds.js → sheet/thresholds.js} +4 -4
  193. package/dist/commands/shared/{turn-uses.d.ts → sheet/turn-uses.d.ts} +3 -3
  194. package/dist/commands/shared/{turn-uses.js → sheet/turn-uses.js} +4 -3
  195. package/dist/commands/shared/{worked-out.d.ts → sheet/worked-out.d.ts} +11 -46
  196. package/dist/commands/shared/sheet/worked-out.js +291 -0
  197. package/dist/commands/shared/sheet/worked-text.d.ts +14 -0
  198. package/dist/commands/shared/sheet/worked-text.js +55 -0
  199. package/dist/commands/shared/{advance.d.ts → time/advance.d.ts} +3 -3
  200. package/dist/commands/shared/{advance.js → time/advance.js} +11 -11
  201. package/dist/commands/shared/{dice-pool.d.ts → time/dice-pool.d.ts} +3 -3
  202. package/dist/commands/shared/{dice-pool.js → time/dice-pool.js} +11 -11
  203. package/dist/commands/shared/{events.d.ts → time/events.d.ts} +5 -5
  204. package/dist/commands/shared/{events.js → time/events.js} +10 -13
  205. package/dist/commands/shared/{recipes.d.ts → time/recipes.d.ts} +3 -3
  206. package/dist/commands/shared/{recipes.js → time/recipes.js} +6 -5
  207. package/dist/commands/shared/{time.d.ts → time/time.d.ts} +4 -4
  208. package/dist/commands/shared/{time.js → time/time.js} +6 -6
  209. package/dist/commands/shared/{upkeep.d.ts → time/upkeep.d.ts} +3 -3
  210. package/dist/commands/shared/{upkeep.js → time/upkeep.js} +14 -13
  211. package/dist/commands/show.d.ts +4 -1
  212. package/dist/commands/show.js +28 -9
  213. package/dist/commands/status.d.ts +2 -1
  214. package/dist/commands/status.js +34 -23
  215. package/dist/commands/thoughts.js +3 -3
  216. package/dist/commands/trade.js +8 -8
  217. package/dist/commands/translate.d.ts +1 -1
  218. package/dist/commands/translate.js +3 -3
  219. package/dist/commands/travel/open.d.ts +1 -1
  220. package/dist/commands/travel/open.js +2 -2
  221. package/dist/commands/travel/route.js +7 -6
  222. package/dist/commands/travel/travel.d.ts +1 -1
  223. package/dist/commands/travel/travel.js +8 -8
  224. package/dist/commands/validate.js +3 -3
  225. package/dist/commands/view/journal.d.ts +2 -2
  226. package/dist/commands/view/journal.js +2 -2
  227. package/dist/commands/view/map.d.ts +1 -1
  228. package/dist/commands/view/map.js +6 -6
  229. package/dist/commands/view/memory.d.ts +16 -0
  230. package/dist/commands/view/memory.js +90 -0
  231. package/dist/commands/view/page.d.ts +32 -0
  232. package/dist/commands/view/page.js +163 -0
  233. package/dist/commands/view/place.d.ts +7 -2
  234. package/dist/commands/view/place.js +30 -12
  235. package/dist/commands/view/result.d.ts +245 -0
  236. package/dist/commands/view/result.js +1 -0
  237. package/dist/commands/view/saves.d.ts +6 -0
  238. package/dist/commands/view/saves.js +53 -0
  239. package/dist/commands/view/story.d.ts +32 -0
  240. package/dist/commands/view/story.js +227 -0
  241. package/dist/commands/view/view.d.ts +26 -292
  242. package/dist/commands/view/view.js +26 -534
  243. package/dist/commands/view/world.d.ts +1 -1
  244. package/dist/commands/view/world.js +3 -3
  245. package/dist/commands/write/checks.d.ts +42 -0
  246. package/dist/commands/write/checks.js +291 -0
  247. package/dist/commands/write/here.d.ts +1 -1
  248. package/dist/commands/write/here.js +5 -5
  249. package/dist/commands/write/inheritance.d.ts +40 -0
  250. package/dist/commands/write/inheritance.js +189 -0
  251. package/dist/commands/write/input.d.ts +29 -0
  252. package/dist/commands/write/input.js +124 -0
  253. package/dist/commands/write/layer.d.ts +36 -0
  254. package/dist/commands/write/layer.js +48 -0
  255. package/dist/commands/write/notes.d.ts +22 -0
  256. package/dist/commands/write/notes.js +76 -0
  257. package/dist/commands/write/progression.d.ts +27 -0
  258. package/dist/commands/write/progression.js +175 -0
  259. package/dist/commands/write/write.d.ts +2 -1
  260. package/dist/commands/write/write.js +33 -817
  261. package/dist/core/files.d.ts +2 -0
  262. package/dist/core/files.js +7 -0
  263. package/dist/core/{package-declarations.d.ts → packages/declarations.d.ts} +1 -1
  264. package/dist/core/{package-declarations.js → packages/declarations.js} +1 -1
  265. package/dist/core/session-store.js +3 -3
  266. package/dist/core/store.d.ts +2 -2
  267. package/dist/core/store.js +18 -4
  268. package/dist/dashboard/acts/acts.js +1 -1
  269. package/dist/dashboard/acts/sending.js +110 -0
  270. package/dist/dashboard/acts/sheet.js +2 -2
  271. package/dist/dashboard/acts/strip.js +1 -1
  272. package/dist/dashboard/address.js +6 -0
  273. package/dist/dashboard/api.js +1 -1
  274. package/dist/dashboard/app.js +47 -171
  275. package/dist/dashboard/dice/roller.js +1 -1
  276. package/dist/dashboard/dice/sets.js +2 -2
  277. package/dist/dashboard/dice/stage.js +1 -1
  278. package/dist/dashboard/dice/tray.js +6 -6
  279. package/dist/dashboard/guide/ar.md +9 -4
  280. package/dist/dashboard/guide/cs.md +10 -5
  281. package/dist/dashboard/guide/da.md +9 -4
  282. package/dist/dashboard/guide/de.md +9 -4
  283. package/dist/dashboard/guide/el.md +10 -5
  284. package/dist/dashboard/guide/en.md +7 -2
  285. package/dist/dashboard/guide/es.md +9 -4
  286. package/dist/dashboard/guide/fi.md +9 -4
  287. package/dist/dashboard/guide/fr.md +9 -4
  288. package/dist/dashboard/guide/he.md +9 -4
  289. package/dist/dashboard/guide/hi.md +10 -5
  290. package/dist/dashboard/guide/hu.md +10 -5
  291. package/dist/dashboard/guide/is.md +9 -4
  292. package/dist/dashboard/guide/it.md +9 -4
  293. package/dist/dashboard/guide/ja.md +12 -7
  294. package/dist/dashboard/guide/ko.md +11 -6
  295. package/dist/dashboard/guide/nb.md +9 -4
  296. package/dist/dashboard/guide/nl.md +10 -5
  297. package/dist/dashboard/guide/pl.md +9 -4
  298. package/dist/dashboard/guide/pt.md +9 -4
  299. package/dist/dashboard/guide/ro.md +9 -4
  300. package/dist/dashboard/guide/ru.md +9 -4
  301. package/dist/dashboard/guide/sv.md +9 -4
  302. package/dist/dashboard/guide/tr.md +11 -6
  303. package/dist/dashboard/guide/uk.md +9 -4
  304. package/dist/dashboard/guide/zh.md +9 -4
  305. package/dist/dashboard/help/help.js +3 -3
  306. package/dist/dashboard/i18n/ar.json +20 -0
  307. package/dist/dashboard/i18n/cs.json +20 -0
  308. package/dist/dashboard/i18n/da.json +20 -0
  309. package/dist/dashboard/i18n/de.json +20 -0
  310. package/dist/dashboard/i18n/el.json +20 -0
  311. package/dist/dashboard/i18n/es.json +20 -0
  312. package/dist/dashboard/i18n/fi.json +20 -0
  313. package/dist/dashboard/i18n/fr.json +20 -0
  314. package/dist/dashboard/i18n/he.json +20 -0
  315. package/dist/dashboard/i18n/hi.json +20 -0
  316. package/dist/dashboard/i18n/hu.json +20 -0
  317. package/dist/dashboard/i18n/is.json +20 -0
  318. package/dist/dashboard/i18n/it.json +20 -0
  319. package/dist/dashboard/i18n/ja.json +21 -1
  320. package/dist/dashboard/i18n/ko.json +20 -0
  321. package/dist/dashboard/i18n/nb.json +20 -0
  322. package/dist/dashboard/i18n/nl.json +20 -0
  323. package/dist/dashboard/i18n/pl.json +20 -0
  324. package/dist/dashboard/i18n/pt.json +20 -0
  325. package/dist/dashboard/i18n/ro.json +20 -0
  326. package/dist/dashboard/i18n/ru.json +20 -0
  327. package/dist/dashboard/i18n/sv.json +20 -0
  328. package/dist/dashboard/i18n/tr.json +20 -0
  329. package/dist/dashboard/i18n/uk.json +20 -0
  330. package/dist/dashboard/i18n/zh.json +20 -0
  331. package/dist/dashboard/{journal.js → journal/journal.js} +16 -16
  332. package/dist/dashboard/{notes.js → journal/notes.js} +4 -4
  333. package/dist/dashboard/kit.js +3 -3
  334. package/dist/dashboard/packages/ask-card.js +3 -3
  335. package/dist/dashboard/packages/catalog.js +196 -0
  336. package/dist/dashboard/packages/engine.js +87 -0
  337. package/dist/dashboard/packages/installed.js +53 -0
  338. package/dist/dashboard/packages/library.js +97 -0
  339. package/dist/dashboard/packages/outcomes.js +45 -0
  340. package/dist/dashboard/packages/packages.js +20 -576
  341. package/dist/dashboard/packages/page-code.js +15 -2
  342. package/dist/dashboard/packages/{package-page.js → page.js} +12 -5
  343. package/dist/dashboard/packages/rows.js +84 -0
  344. package/dist/dashboard/packages/share.js +44 -0
  345. package/dist/dashboard/packages/widgets.js +3 -3
  346. package/dist/dashboard/{card.js → parts/card.js} +1 -1
  347. package/dist/dashboard/{faces.js → parts/faces.js} +5 -5
  348. package/dist/dashboard/{game-words.js → parts/game-words.js} +1 -1
  349. package/dist/dashboard/{icons.js → parts/icons.js} +1 -1
  350. package/dist/dashboard/{labels.js → parts/labels.js} +8 -1
  351. package/dist/dashboard/{map-symbols.js → parts/map-symbols.js} +1 -1
  352. package/dist/dashboard/{markdown.js → parts/markdown.js} +2 -2
  353. package/dist/dashboard/{mood.js → parts/mood.js} +1 -1
  354. package/dist/dashboard/{refusals.js → parts/refusals.js} +1 -1
  355. package/dist/dashboard/{status.js → parts/status.js} +4 -4
  356. package/dist/dashboard/{widgets.js → parts/widgets.js} +2 -2
  357. package/dist/dashboard/place/key.js +24 -0
  358. package/dist/dashboard/place/paper.js +67 -0
  359. package/dist/dashboard/place/{map-sheet.js → sheet.js} +2 -2
  360. package/dist/dashboard/place/things.js +129 -0
  361. package/dist/dashboard/place/tokens.js +93 -0
  362. package/dist/dashboard/place/view.js +124 -0
  363. package/dist/dashboard/{asked-dice.js → play/asked-dice.js} +3 -3
  364. package/dist/dashboard/{asked.js → play/asked.js} +10 -10
  365. package/dist/dashboard/{choices.js → play/choices.js} +9 -9
  366. package/dist/dashboard/{requested.js → play/requested.js} +1 -1
  367. package/dist/dashboard/{rolls.js → play/rolls.js} +9 -9
  368. package/dist/dashboard/{scene.js → play/scene.js} +14 -14
  369. package/dist/dashboard/{turns.js → play/turns.js} +12 -12
  370. package/dist/dashboard/{language-choice.js → settings/language-choice.js} +1 -1
  371. package/dist/dashboard/{languages.js → settings/languages.js} +1 -1
  372. package/dist/dashboard/{saves.js → settings/saves.js} +8 -8
  373. package/dist/dashboard/{settings.js → settings/settings.js} +17 -15
  374. package/dist/dashboard/{setup.js → settings/setup.js} +6 -6
  375. package/dist/dashboard/{party.js → sheet/party.js} +8 -8
  376. package/dist/dashboard/{person-panel.js → sheet/person-panel.js} +4 -4
  377. package/dist/dashboard/{sheet.js → sheet/sheet.js} +17 -17
  378. package/dist/dashboard/{story.js → sheet/story.js} +3 -3
  379. package/dist/dashboard/{columns.js → shell/columns.js} +1 -1
  380. package/dist/dashboard/{footer.js → shell/footer.js} +3 -3
  381. package/dist/dashboard/{master.js → shell/master.js} +2 -2
  382. package/dist/dashboard/{notices.js → shell/notices.js} +3 -3
  383. package/dist/dashboard/{pages.js → shell/pages.js} +5 -5
  384. package/dist/dashboard/shell/shown.js +37 -0
  385. package/dist/dashboard/{table.js → shell/table.js} +2 -2
  386. package/dist/dashboard/{tabs.js → shell/tabs.js} +2 -2
  387. package/dist/dashboard/{top.js → shell/top.js} +7 -7
  388. package/dist/dashboard/style.css +90 -9
  389. package/dist/dashboard/world/calendar.js +4 -4
  390. package/dist/dashboard/world/drawing.js +92 -0
  391. package/dist/dashboard/world/key.js +21 -0
  392. package/dist/dashboard/world/lore.js +5 -5
  393. package/dist/dashboard/world/map-card.js +186 -0
  394. package/dist/dashboard/world/place-card.js +39 -0
  395. package/dist/dashboard/world/places.js +29 -0
  396. package/dist/dashboard/world/world.js +9 -341
  397. package/dist/extensions/extension.d.ts +1 -1
  398. package/dist/extensions/extension.js +1 -1
  399. package/dist/images/images.js +12 -9
  400. package/dist/index.d.ts +1 -1
  401. package/dist/languages/index.d.ts +1 -1
  402. package/dist/languages/index.js +1 -1
  403. package/dist/library/books.js +2 -0
  404. package/dist/packages/npm.js +1 -1
  405. package/dist/page.d.ts +2 -2
  406. package/dist/page.js +1 -1
  407. package/dist/pages/check.js +23 -1
  408. package/dist/pages/containers.d.ts +1 -1
  409. package/dist/pages/containers.js +1 -1
  410. package/dist/pages/index.d.ts +4 -2
  411. package/dist/pages/index.js +4 -2
  412. package/dist/pages/inheritance.d.ts +2 -2
  413. package/dist/pages/layers.d.ts +50 -0
  414. package/dist/pages/layers.js +97 -0
  415. package/dist/pages/rename-page.js +1 -1
  416. package/dist/pages/stacks/writes.js +48 -22
  417. package/dist/pages/standard-fields.d.ts +1 -1
  418. package/dist/pages/system-pages.d.ts +5 -3
  419. package/dist/pages/system-pages.js +16 -7
  420. package/dist/pages/world.d.ts +8 -1
  421. package/dist/pages/world.js +16 -4
  422. package/dist/pages/write-layer.d.ts +18 -0
  423. package/dist/pages/write-layer.js +108 -0
  424. package/dist/pages/write-page.d.ts +2 -2
  425. package/dist/pages/write-page.js +2 -2
  426. package/dist/rules/index.d.ts +1 -1
  427. package/dist/rules/index.js +1 -1
  428. package/dist/rules/search.d.ts +1 -1
  429. package/dist/rules/shown.d.ts +1 -1
  430. package/dist/server/dashboard/choices.js +3 -3
  431. package/dist/server/dashboard/files.js +5 -5
  432. package/dist/server/dashboard/index.d.ts +2 -2
  433. package/dist/server/dashboard/index.js +2 -2
  434. package/dist/server/dashboard/news.js +4 -3
  435. package/dist/server/dashboard/player.js +1 -1
  436. package/dist/server/dashboard/writes.js +10 -8
  437. package/dist/server/mcp.js +28 -13
  438. package/dist/systems/campaign-data.d.ts +15 -0
  439. package/dist/systems/campaign-data.js +85 -0
  440. package/dist/systems/{system-code.d.ts → code.d.ts} +1 -1
  441. package/dist/systems/{system-code.js → code.js} +2 -2
  442. package/dist/systems/game-system.d.ts +7 -61
  443. package/dist/systems/game-system.js +1 -984
  444. package/dist/systems/index.d.ts +6 -3
  445. package/dist/systems/index.js +6 -3
  446. package/dist/systems/installed.d.ts +31 -0
  447. package/dist/systems/installed.js +89 -0
  448. package/dist/systems/maps.d.ts +3 -0
  449. package/dist/systems/maps.js +9 -0
  450. package/dist/systems/read.d.ts +3 -0
  451. package/dist/systems/read.js +471 -0
  452. package/dist/systems/schema.d.ts +289 -0
  453. package/dist/systems/schema.js +243 -0
  454. package/dist/systems/settings.d.ts +19 -0
  455. package/dist/systems/settings.js +78 -0
  456. package/dist/systems/versions.d.ts +12 -0
  457. package/dist/systems/versions.js +52 -0
  458. package/dist/testing/index.js +1 -1
  459. package/instructions/import.md +1 -1
  460. package/instructions/length-a-few-sessions.md +1 -0
  461. package/instructions/length-one-evening.md +1 -0
  462. package/instructions/play.md +1 -1
  463. package/instructions/session-zero.md +1 -1
  464. package/instructions/setup.md +1 -1
  465. package/package.json +1 -1
  466. package/dist/commands/config.js +0 -917
  467. package/dist/commands/package.d.ts +0 -143
  468. package/dist/commands/package.js +0 -785
  469. package/dist/commands/scene.js +0 -894
  470. package/dist/commands/shared/worked-out.js +0 -805
  471. package/dist/dashboard/place/map-view.js +0 -417
  472. /package/dist/commands/shared/{library-reader.d.ts → books/library-reader.d.ts} +0 -0
  473. /package/dist/core/{package-api.d.ts → packages/api.d.ts} +0 -0
  474. /package/dist/core/{package-api.js → packages/api.js} +0 -0
  475. /package/dist/dashboard/{coins.js → parts/coins.js} +0 -0
  476. /package/dist/dashboard/{glass.js → parts/glass.js} +0 -0
  477. /package/dist/dashboard/{layout.js → parts/layout.js} +0 -0
  478. /package/dist/dashboard/{mood-faces.js → parts/mood-faces.js} +0 -0
  479. /package/dist/dashboard/{free-rolls.js → play/free-rolls.js} +0 -0
  480. /package/dist/dashboard/{reactions.js → play/reactions.js} +0 -0
  481. /package/dist/dashboard/{prefs.js → shell/prefs.js} +0 -0
  482. /package/dist/dashboard/{system-style.js → shell/system-style.js} +0 -0
  483. /package/dist/dashboard/{theme.js → shell/theme.js} +0 -0
  484. /package/dist/languages/{language-pack.d.ts → pack.d.ts} +0 -0
  485. /package/dist/languages/{language-pack.js → pack.js} +0 -0
  486. /package/dist/pages/{page-file.d.ts → file.d.ts} +0 -0
  487. /package/dist/pages/{page-file.js → file.js} +0 -0
  488. /package/dist/pages/{page-types.d.ts → types.d.ts} +0 -0
  489. /package/dist/pages/{page-types.js → types.js} +0 -0
  490. /package/dist/rules/{rule-book.d.ts → book.d.ts} +0 -0
  491. /package/dist/rules/{rule-book.js → book.js} +0 -0
  492. /package/dist/systems/{system-folders.d.ts → folders.d.ts} +0 -0
  493. /package/dist/systems/{system-folders.js → folders.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  // The theme of the dashboard the campaign's game system names (D-528): read and checked as the system is, for validate and for the dashboard.
2
2
  import { relative } from "node:path";
3
- import { readTheme, themeFileName } from "../../themes/index.js";
3
+ import { readTheme, themeFileName } from "../../../themes/index.js";
4
4
  import { campaignSystem } from "./world.js";
5
5
  /** The theme of the campaign's game system, read and checked, with the system's name; undefined when it names none. */
6
6
  export function campaignTheme(root, context) {
@@ -1,8 +1,8 @@
1
- import { type CountedByGame } from "../../campaign/index.ts";
2
- import type { Context } from "../../core/context.ts";
3
- import type { Problem } from "../../core/problem.ts";
4
- import { type PageType, type World } from "../../pages/index.ts";
5
- import { type CampaignData, type GameSystem, type SystemLayer, type SystemSetting, type SystemWords } from "../../systems/index.ts";
1
+ import { type CountedByGame } from "../../../campaign/index.ts";
2
+ import type { Context } from "../../../core/context.ts";
3
+ import type { Problem } from "../../../core/problem.ts";
4
+ import { type PageType, type World } from "../../../pages/index.ts";
5
+ import { type CampaignData, type GameSystem, type SystemLayer, type SystemSetting, type SystemWords } from "../../../systems/index.ts";
6
6
  /** The world of the campaign in `root`, with the pages of its game system when campaign.yaml names one that is installed (SYS-1, SYS-3). */
7
7
  export declare function campaignWorld(root: string, context: Context): World;
8
8
  /** The folder of a game system's pages translated on this computer into a language (D-539), in the player's data folder; none without one. */
@@ -1,21 +1,22 @@
1
1
  // The campaign's world and game system as the commands read them: the system with the layers over it, the settings it plays with, and the world built from both.
2
2
  import { join, resolve } from "node:path";
3
- import { campaignFileName, customLevel, customLevels, customSettings, readCampaignData, readOneSetting, readTextSetting } from "../../campaign/index.js";
4
- import { ourSystems } from "../../core/package-declarations.js";
5
- import { files, isInside } from "../../core/store.js";
6
- import { comparableText } from "../../core/text.js";
7
- import { extensionWords } from "../../extensions/index.js";
8
- import { languagePackFor, packSystemFolder } from "../../languages/index.js";
9
- import { loadWorld, playerCharacters, searchSystemPages, worldFolderName } from "../../pages/index.js";
10
- import { engineSettingValue, findCampaignSystem, findSystem, layeredSystemWords, readableSystems, rulesetSetting, systemContentFolders, systemWords, withSettings, } from "../../systems/index.js";
11
- import { campaignExtensions, extensionSources, layeredParts } from "./packages/extensions.js";
12
- import { homeSystemWords } from "./page-words.js";
3
+ import { campaignFileName, customLevel, customLevels, customSettings, readCampaignData, readOneSetting, readTextSetting } from "../../../campaign/index.js";
4
+ import { ourSystems } from "../../../core/packages/declarations.js";
5
+ import { files, isInside } from "../../../core/store.js";
6
+ import { comparableText } from "../../../core/text.js";
7
+ import { extensionWords } from "../../../extensions/index.js";
8
+ import { languagePackFor, packSystemFolder } from "../../../languages/index.js";
9
+ import { layerFolder, layersFolderName, loadWorld, playerCharacters, searchSystemPages, worldFolderName } from "../../../pages/index.js";
10
+ import { engineSettingValue, findCampaignSystem, findSystem, layeredSystemWords, readableSystems, rulesetSetting, systemContentFolders, systemWords, withSettings, } from "../../../systems/index.js";
11
+ import { homeSystemWords } from "../books/words.js";
12
+ import { campaignExtensions, extensionSources, layeredParts } from "../packages/extensions.js";
13
13
  /** The world of the campaign in `root`, with the pages of its game system when campaign.yaml names one that is installed (SYS-1, SYS-3). */
14
14
  export function campaignWorld(root, context) {
15
- // The same world until one of its pages, campaign.yaml or the system's pages translated on this computer change: in a session, across calls (D-137). A
16
- // game system does not change while the server runs.
17
- const from = [join(root, worldFolderName), join(root, campaignFileName), ...(context.home === undefined ? [] : [join(context.home, "systems")])].map((path) => resolve(path));
18
- const dependsOn = (path) => from.some((source) => source === path || isInside(source, path) || isInside(path, source));
15
+ // The same world until one of its pages, campaign.yaml or the system's pages translated on this computer change, or a folder of the packages is read again
16
+ // whole, as after npm installed the system in the chat: in a session, across calls (D-137).
17
+ const from = [join(root, worldFolderName), join(root, layersFolderName), join(root, campaignFileName), ...(context.home === undefined ? [] : [join(context.home, "systems")])].map((path) => resolve(path));
18
+ const packages = [...context.systemFolders, ...(context.extensionFolders ?? [])].map((path) => resolve(path));
19
+ const dependsOn = (path) => from.some((source) => source === path || isInside(source, path) || isInside(path, source)) || packages.some((folder) => folder === path || isInside(path, folder));
19
20
  return files().remember(`world ${resolve(root)}`, dependsOn, () => {
20
21
  const named = readTextSetting(root, "system");
21
22
  const system = campaignSystem(root, context);
@@ -25,6 +26,8 @@ export function campaignWorld(root, context) {
25
26
  system,
26
27
  language,
27
28
  ...(own === undefined ? {} : { ownTranslations: own }),
29
+ // The campaign's layers over the pages of its system (SYS-11).
30
+ ...(system === undefined ? {} : { layers: layerFolder(root, system.name) }),
28
31
  words: campaignSystemWords(root, context),
29
32
  missingSystem: system === undefined ? named : undefined,
30
33
  noSystem: named === undefined,
@@ -1,6 +1,6 @@
1
- import { type LogEntry } from "../../core/log.ts";
2
- import { type Link, type Page, type World } from "../../pages/index.ts";
3
- import type { Scene } from "../../scene/index.ts";
1
+ import { type LogEntry } from "../../../core/log.ts";
2
+ import { type Link, type Page, type World } from "../../../pages/index.ts";
3
+ import type { Scene } from "../../../scene/index.ts";
4
4
  /** What a character knows: the pages, and the secrets by the page that writes them. */
5
5
  export interface Knowledge {
6
6
  /** Whose knowledge it is: the player character, the one in the foreground when there are more (VIEW-12), or another character for the character agent voicing them (VIEW-10). */
@@ -1,9 +1,9 @@
1
1
  // What a character knows, as the player's view and a character agent's read it (D-250, VIEW-2, VIEW-3, VIEW-10): the pages it knows and the text of each as it knows it;
2
2
  // with more than one player character, what any of them knows, and who (VIEW-12).
3
- import { readLog } from "../../core/log.js";
4
- import { comparableText } from "../../core/text.js";
5
- import { baseChain, inheritedByBase, introductionText, isPartyMember, isPlayerCharacter, links, locate, pagesWithNameOrAlias, parsePageReference, partContent, playerCharacters, readSection, secretNames, stacksOf, systemPageNamed, textParts, textsIn, withLinksAsWords, withoutComments, withoutUnreadSecrets, } from "../../pages/index.js";
6
- import { readOpenScene } from "./scene.js";
3
+ import { readLog } from "../../../core/log.js";
4
+ import { comparableText } from "../../../core/text.js";
5
+ import { baseChain, inheritedByBase, introductionText, isPartyMember, isPlayerCharacter, links, locate, pagesWithNameOrAlias, parsePageReference, partContent, playerCharacters, readSection, secretNames, stacksOf, systemPageNamed, textParts, textsIn, withLinksAsWords, withoutComments, withoutUnreadSecrets, } from "../../../pages/index.js";
6
+ import { readOpenScene } from "../scene/scene.js";
7
7
  /** The player character: the first living character with role pc, else the first dead one; undefined before there is one. */
8
8
  export function playerCharacter(world) {
9
9
  const players = playerCharacters(world);
@@ -1,6 +1,6 @@
1
- import type { LogEntry } from "../../core/log.ts";
2
- import { type Mood } from "../../core/mood.ts";
3
- import { type Page } from "../../pages/index.ts";
1
+ import type { LogEntry } from "../../../core/log.ts";
2
+ import { type Mood } from "../../../core/mood.ts";
3
+ import { type Page } from "../../../pages/index.ts";
4
4
  /** The key of state.yaml that keeps the master's mood. */
5
5
  export declare const masterMoodKey = "master-mood";
6
6
  /** The log's types: a mood that stays, and a moment of the master's, which the dashboard shows for a few seconds. */
@@ -1,7 +1,7 @@
1
1
  // Where the moods are kept (MOOD-3, MOOD-4): the master's in state.yaml, a character's on its page, a moment of the master's only in the log.
2
- import { readStateValues } from "../../campaign/index.js";
3
- import { readMood } from "../../core/mood.js";
4
- import { ownField } from "../../pages/index.js";
2
+ import { readStateValues } from "../../../campaign/index.js";
3
+ import { readMood } from "../../../core/mood.js";
4
+ import { ownField } from "../../../pages/index.js";
5
5
  /** The key of state.yaml that keeps the master's mood. */
6
6
  export const masterMoodKey = "master-mood";
7
7
  /** The log's types: a mood that stays, and a moment of the master's, which the dashboard shows for a few seconds. */
@@ -0,0 +1,4 @@
1
+ /** The standing orders the player gave the companions, in their words; none when there are none or the settings cannot be read. */
2
+ export declare function standingOrders(root: string): string[];
3
+ /** The orders as the master reads them: the player's words in quotes, so that they are never taken for the engine's: "Leave one alive"; "…". */
4
+ export declare function quotedOrders(orders: string[]): string;
@@ -0,0 +1,10 @@
1
+ // The player's standing orders to the companions (D-38, D-563): kept in the campaign's settings, said to the master and to who voices a companion
2
+ import { readListSetting } from "../../../campaign/index.js";
3
+ /** The standing orders the player gave the companions, in their words; none when there are none or the settings cannot be read. */
4
+ export function standingOrders(root) {
5
+ return readListSetting(root, "orders");
6
+ }
7
+ /** The orders as the master reads them: the player's words in quotes, so that they are never taken for the engine's: "Leave one alive"; "…". */
8
+ export function quotedOrders(orders) {
9
+ return orders.map((order) => `"${order}"`).join("; ");
10
+ }
@@ -1,5 +1,5 @@
1
- import type { Context } from "../../core/context.ts";
2
- import { type Page, type World } from "../../pages/index.ts";
1
+ import type { Context } from "../../../core/context.ts";
2
+ import { type Page, type World } from "../../../pages/index.ts";
3
3
  /** The type of a diary's line in the log (DIA-1). */
4
4
  export declare const thoughtsType = "thoughts";
5
5
  /** How long a line of a diary may be, in characters (DIA-1). */
@@ -1,7 +1,7 @@
1
- import { readLog } from "../../core/log.js";
2
- import { isInParty, pagesWithNameOrAlias, parsePageReference } from "../../pages/index.js";
1
+ import { readLog } from "../../../core/log.js";
2
+ import { isInParty, pagesWithNameOrAlias, parsePageReference } from "../../../pages/index.js";
3
+ import { readOpenScene } from "../scene/scene.js";
3
4
  import { textList } from "./knowledge.js";
4
- import { readOpenScene } from "./scene.js";
5
5
  import { agentVoices } from "./voices.js";
6
6
  /** The type of a diary's line in the log (DIA-1). */
7
7
  export const thoughtsType = "thoughts";
@@ -1,4 +1,4 @@
1
- import type { Context } from "../../core/context.ts";
1
+ import type { Context } from "../../../core/context.ts";
2
2
  /** Whether the character agent voices the characters (D-490): in Claude Code, in a chat that has it, unless the master voices every character. */
3
3
  export declare function agentVoices(root: string, context: Context): boolean;
4
4
  /** The part Voices, when and how to call the character agent, for a campaign in play; none where the agent does not voice the characters. */
@@ -1,6 +1,6 @@
1
1
  // Who voices the characters (D-490): the character agent, where the chat has it, or the master.
2
- import { readSettings } from "../../campaign/index.js";
3
- import { voicesInstructions } from "../../instructions/index.js";
2
+ import { readSettings } from "../../../campaign/index.js";
3
+ import { voicesInstructions } from "../../../instructions/index.js";
4
4
  // The name Claude Code gives itself to the MCP server: the host whose campaign has the character agent as an agent (D-490).
5
5
  const claudeCode = "claude-code";
6
6
  /** Whether the character agent voices the characters (D-490): in Claude Code, in a chat that has it, unless the master voices every character. */
@@ -3,8 +3,8 @@
3
3
  import { readTextSetting } from "../../campaign/index.js";
4
4
  import { neutralExamples } from "../../core/examples.js";
5
5
  import { comparableText } from "../../core/text.js";
6
- import { campaignCoins } from "./money.js";
7
- import { campaignSystem, systemWordsOf } from "./world.js";
6
+ import { campaignCoins } from "./campaign/money.js";
7
+ import { campaignSystem, systemWordsOf } from "./campaign/world.js";
8
8
  /** The examples for a campaign: its system's names, in its language where the system has words for them; neutral without a campaign or a system. */
9
9
  export function campaignExamples(root, context) {
10
10
  const system = root === undefined ? undefined : campaignSystem(root, context);
@@ -2,7 +2,7 @@
2
2
  // GitHub has by their topic, each with what the player needs to trust it and whether it is here already.
3
3
  import { join } from "node:path";
4
4
  import { readManifest } from "../../../adventures/index.js";
5
- import { ourSystems, readsApi } from "../../../core/package-declarations.js";
5
+ import { ourSystems, readsApi } from "../../../core/packages/declarations.js";
6
6
  import { files } from "../../../core/store.js";
7
7
  import { comparableText } from "../../../core/text.js";
8
8
  import { isNewerVersion } from "../../../core/version.js";
@@ -10,7 +10,7 @@ import { installedExtensions, readExtension, shortName } from "../../../extensio
10
10
  import { installedLanguages } from "../../../languages/index.js";
11
11
  import { isVerified } from "../../../packages/index.js";
12
12
  import { systemFolders } from "../../../systems/index.js";
13
- import { installedAdventures } from "../adventures.js";
13
+ import { installedAdventures } from "../books/adventures.js";
14
14
  // How long the setup waits for npm before it offers ours alone.
15
15
  const systemsWait = 5000;
16
16
  /** The game systems npm has that this computer has not, ours first, with ours from the engine's list beside them, npm answering in time or not (D-513 (1)). */
@@ -1,5 +1,5 @@
1
1
  import type { CardAsked, Context } from "../../../core/context.ts";
2
- import type { Asking, Game, GameView, PackageCode } from "../../../core/package-api.ts";
2
+ import type { Asking, Game, GameView, PackageCode } from "../../../core/packages/api.ts";
3
3
  import type { Problem } from "../../../core/problem.ts";
4
4
  import { type Command } from "../../../core/registry.ts";
5
5
  import { type CodePackage } from "../../../extensions/index.ts";
@@ -30,14 +30,14 @@ import { formatGameDate } from "../../../time/index.js";
30
30
  import { askedRoll, isCheckDice, tonesOf } from "../../ask.js";
31
31
  import { change } from "../../change/change.js";
32
32
  import { writePackageFields } from "../../write/write.js";
33
- import { effectiveFields, effectsOf } from "../effect-layer.js";
34
- import { checkEffectsReadable, saveEffects } from "../effects.js";
35
- import { behindTheScreen, sealHiddenRoll } from "../master-rolls.js";
36
- import { keepingConditionNote } from "../reminders.js";
37
- import { copyName, copyPage, readOpenScene } from "../scene.js";
38
- import { calendarDayOf, newDatedLogEntry, presentDate } from "../time.js";
39
- import { formulaValue } from "../worked-out.js";
40
- import { campaignSystem, campaignSystemWords, campaignWorld } from "../world.js";
33
+ import { campaignSystem, campaignSystemWords, campaignWorld } from "../campaign/world.js";
34
+ import { checkEffectsReadable, saveEffects } from "../scene/effects.js";
35
+ import { behindTheScreen, sealHiddenRoll } from "../scene/master-rolls.js";
36
+ import { keepingConditionNote } from "../scene/reminders.js";
37
+ import { copyName, copyPage, readOpenScene } from "../scene/scene.js";
38
+ import { effectiveFields, effectsOf } from "../sheet/effect-layer.js";
39
+ import { formulaValue } from "../sheet/formula-scope.js";
40
+ import { calendarDayOf, newDatedLogEntry, presentDate } from "../time/time.js";
41
41
  import { campaignExtensions, packageWords, runsCode } from "./extensions.js";
42
42
  import { widgetCard } from "./widgets.js";
43
43
  /** The folder of the campaign where a package keeps its own files, its state among them (D-433, D-436): an extension's, or its game system's. */
@@ -1,6 +1,6 @@
1
1
  import type { Context } from "../../../core/context.ts";
2
2
  import type { InstructionPart } from "../../../core/instruction-parts.ts";
3
- import type { FigureSize } from "../../../core/package-api.ts";
3
+ import type { FigureSize } from "../../../core/packages/api.ts";
4
4
  import type { Problem } from "../../../core/problem.ts";
5
5
  import { type CodePackage, type Extension, type ExtensionWords } from "../../../extensions/index.ts";
6
6
  import { type GameSystem } from "../../../systems/index.ts";
@@ -3,7 +3,7 @@ import { basename, join, resolve } from "node:path";
3
3
  import { z } from "zod";
4
4
  import { campaignFileName, readOneSetting, readTextSetting } from "../../../campaign/index.js";
5
5
  import { packageCodeMayRun } from "../../../core/consents.js";
6
- import { updateEngine } from "../../../core/package-declarations.js";
6
+ import { updateEngine } from "../../../core/packages/declarations.js";
7
7
  import { files, isInside } from "../../../core/store.js";
8
8
  import { comparableText } from "../../../core/text.js";
9
9
  import { extensionWords, findExtension, hasConsent } from "../../../extensions/index.js";
@@ -1,5 +1,5 @@
1
1
  import type { Context } from "../../../core/context.ts";
2
- import type { CounterChange, Rolled } from "../../../core/package-api.ts";
2
+ import type { CounterChange, Rolled } from "../../../core/packages/api.ts";
3
3
  import type { Told } from "../../ask.ts";
4
4
  /**
5
5
  * What the packages' code said after a command's change: the system's lines, which may take the place of the engine's own note, as a death save does; the
@@ -1,4 +1,4 @@
1
- import { campaignSystem } from "../world.js";
1
+ import { campaignSystem } from "../campaign/world.js";
2
2
  import { campaignSystemPackage, cappedLines, codeRefused, firstLine, gameOf, gameViewOf, loadedCode, packageLabel, toldOf } from "./code.js";
3
3
  import { campaignExtensions } from "./extensions.js";
4
4
  /** All the packages' code said, its problems last. */
@@ -1,7 +1,7 @@
1
1
  import type { Context } from "../../../core/context.ts";
2
- import type { CardTint, Widget, WidgetText, WidgetValue } from "../../../core/package-api.ts";
3
- import { type CardPage, type FigureSize } from "../../../core/package-api.ts";
4
- import { type WidgetPlace } from "../../../core/package-declarations.ts";
2
+ import type { CardTint, Widget, WidgetText, WidgetValue } from "../../../core/packages/api.ts";
3
+ import { type CardPage, type FigureSize } from "../../../core/packages/api.ts";
4
+ import { type WidgetPlace } from "../../../core/packages/declarations.ts";
5
5
  import type { Problem } from "../../../core/problem.ts";
6
6
  import { type CodePackage } from "../../../extensions/index.ts";
7
7
  /** Where a widget stands: a place of the dashboard, with its page for a card in one, and its order among the cards there; or off. */
@@ -4,14 +4,14 @@
4
4
  import { basename } from "node:path";
5
5
  import { z } from "zod";
6
6
  import { campaignFileName, readOneSetting, readTextSetting } from "../../../campaign/index.js";
7
- import { cardPages } from "../../../core/package-api.js";
8
- import { widgetPlaces } from "../../../core/package-declarations.js";
7
+ import { cardPages } from "../../../core/packages/api.js";
8
+ import { widgetPlaces } from "../../../core/packages/declarations.js";
9
9
  import { files } from "../../../core/store.js";
10
10
  import { comparableText } from "../../../core/text.js";
11
11
  import { wordIn } from "../../../extensions/index.js";
12
12
  import { findImage } from "../../../images/index.js";
13
13
  import { isInParty } from "../../../pages/index.js";
14
- import { campaignWorld } from "../world.js";
14
+ import { campaignWorld } from "../campaign/world.js";
15
15
  import { campaignPackages, gameViewOf, packageCode } from "./code.js";
16
16
  import { campaignExtensions, packageWords, pageAddress, runsCode } from "./extensions.js";
17
17
  /** The places a campaign may put a widget in, in campaign.yaml: top, side, a page, which is a card in that page, or off. */
@@ -1,4 +1,4 @@
1
- import { type Page, type World } from "../../pages/index.ts";
1
+ import { type Page, type World } from "../../../pages/index.ts";
2
2
  /** One thing that holds around a page, as outputs name it: "light: dark (Cripta)", "Pioggia battente until day 3, 18:00 (Palude)". */
3
3
  export interface Surrounding {
4
4
  /** What tells it apart from the others: an entry's name, or an effect and its place. */
@@ -1,8 +1,8 @@
1
1
  // What holds around a page (D-153, ENV-2, ENV-3, ENV-5): the environment of the places it is in, with their effects, as outputs tell it.
2
- import { comparableText } from "../../core/text.js";
3
- import { environmentAt, formatEnvironmentEntry, placesAround } from "../../pages/index.js";
4
- import { effectsOf } from "./effect-layer.js";
5
- import { effectText } from "./effects.js";
2
+ import { comparableText } from "../../../core/text.js";
3
+ import { environmentAt, formatEnvironmentEntry, placesAround } from "../../../pages/index.js";
4
+ import { effectText } from "../scene/effects.js";
5
+ import { effectsOf } from "../sheet/effect-layer.js";
6
6
  /** What holds at a page, nearest first: its places' environment, each entry with its place, then their effects, each with its end and place. Nothing for no page. */
7
7
  export function surroundings(world, page) {
8
8
  if (page === undefined) {
@@ -1,7 +1,7 @@
1
- import { type Grid, type Square } from "../../grid/index.ts";
2
- import { type World } from "../../pages/index.ts";
3
- import type { Scene } from "../../scene/index.ts";
4
- import type { GameSystem, GridRules } from "../../systems/index.ts";
1
+ import { type Grid, type Square } from "../../../grid/index.ts";
2
+ import { type World } from "../../../pages/index.ts";
3
+ import type { Scene } from "../../../scene/index.ts";
4
+ import type { GameSystem, GridRules } from "../../../systems/index.ts";
5
5
  import type { Standing } from "./grids.ts";
6
6
  import type { Measures } from "./roads.ts";
7
7
  /** A move on a place's map: who moves, as the place's `at` names them, from where to where, and the others on it as they stood before. */
@@ -1,12 +1,13 @@
1
1
  // What a move on the map of a place tells the master (GRD-4, GRD-5): how far it went by the shortest way, whose side it left on the way and who stands next to
2
2
  // it now; in a fight, on its turn, how far it has moved and what is left of its speed, which the open scene keeps for the turn.
3
- import { formatStep, readFirstLength } from "../../core/length.js";
4
- import { comparableText, valueNamed } from "../../core/text.js";
5
- import { closedSquare, coveredSquares, isNextTo, shortestWay, squareName } from "../../grid/index.js";
6
- import { isEmptyField, isPartyMember } from "../../pages/index.js";
7
- import { effectiveFields } from "./effect-layer.js";
8
- import { copyPage } from "./scene.js";
9
- import { signedText, workedFields } from "./worked-out.js";
3
+ import { formatStep, readFirstLength } from "../../../core/length.js";
4
+ import { comparableText, valueNamed } from "../../../core/text.js";
5
+ import { closedSquare, coveredSquares, isNextTo, shortestWay, squareName } from "../../../grid/index.js";
6
+ import { isEmptyField, isPartyMember } from "../../../pages/index.js";
7
+ import { copyPage } from "../scene/scene.js";
8
+ import { effectiveFields } from "../sheet/effect-layer.js";
9
+ import { workedFields } from "../sheet/worked-out.js";
10
+ import { signedText } from "../sheet/worked-text.js";
10
11
  /** The facts of a move on a place's map (GRD-5), as the game's grid counts them; nothing to tell when the game has no grid. */
11
12
  export function moveFacts(world, system, measures, scene, move) {
12
13
  const rules = system?.grid;
@@ -1,7 +1,7 @@
1
- import type { Problem } from "../../core/problem.ts";
2
- import { type Grid, type Square } from "../../grid/index.ts";
3
- import { type MovePlan, type Page, type World } from "../../pages/index.ts";
4
- import type { Scene } from "../../scene/index.ts";
1
+ import type { Problem } from "../../../core/problem.ts";
2
+ import { type Grid, type Square } from "../../../grid/index.ts";
3
+ import { type MovePlan, type Page, type World } from "../../../pages/index.ts";
4
+ import type { Scene } from "../../../scene/index.ts";
5
5
  /** Someone or something on a place's map (GRD-3): the entry of `at` as written, the page or the copy of the open scene it names, and its square. */
6
6
  export interface Standing {
7
7
  entry: string;
@@ -1,11 +1,11 @@
1
1
  // The map of a place in play (GRD-1–GRD-3, D-324): its grid from the page's text, who stands where on it as the place's `at` lists them, what of them is
2
2
  // wrong, and the squares a move leaves and takes.
3
- import { rememberedByText } from "../../core/memo.js";
4
- import { comparableText } from "../../core/text.js";
5
- import { builtIn, closedSquare, firstOpenSquare, mapBlock, readGrid, readSquare, squareName } from "../../grid/index.js";
6
- import { squareKinds } from "../../map/index.js";
7
- import { environmentAt, links, locate, pagesWithName, parsePageReference, writePage } from "../../pages/index.js";
8
- import { scenePlace } from "./scene.js";
3
+ import { rememberedByText } from "../../../core/memo.js";
4
+ import { comparableText } from "../../../core/text.js";
5
+ import { builtIn, closedSquare, firstOpenSquare, mapBlock, readGrid, readSquare, squareName } from "../../../grid/index.js";
6
+ import { squareKinds } from "../../../map/index.js";
7
+ import { environmentAt, links, locate, pagesWithName, parsePageReference, writePage } from "../../../pages/index.js";
8
+ import { scenePlace } from "../scene/scene.js";
9
9
  /** The map of a place (GRD-1): its grid, and what of it cannot be read; none for a page that is no place or has no map block. */
10
10
  export function placeGrid(page) {
11
11
  return page.type === "place" ? readMap(page.body) : undefined;
@@ -1,6 +1,6 @@
1
- import { type Start } from "../../map/index.ts";
2
- import { type Page, type Position, type World } from "../../pages/index.ts";
3
- import { type GameDate } from "../../time/index.ts";
1
+ import { type Start } from "../../../map/index.ts";
2
+ import { type Page, type Position, type World } from "../../../pages/index.ts";
3
+ import { type GameDate } from "../../../time/index.ts";
4
4
  import { type Measures, type Roads } from "./roads.ts";
5
5
  /** Where on a road a journey stopped (TRV-7): the road, its stretch by its place in the road, the ends of the stretch in the way it went, the metres done after `from`. */
6
6
  export interface OnRoad {
@@ -1,11 +1,11 @@
1
1
  // A journey under way (D-258, TRV-8, TRV-9, TRV-12), kept in state.yaml under journey: what travels, where to or which way, where it stopped (on a road, or at
2
2
  // a point in the open), the pace, the hours travelled since the last rest.
3
- import { changeStateAt, readStateValues } from "../../campaign/index.js";
4
- import { readLength } from "../../core/length.js";
5
- import { comparableText } from "../../core/text.js";
6
- import { pointAlong } from "../../map/index.js";
7
- import { formatPosition, isEmptyField, locate, mapOf, pagesWithName, parsePageReference, readPosition } from "../../pages/index.js";
8
- import { formatDuration, formatGameDate, minutesBetween, readDuration, readGameDate } from "../../time/index.js";
3
+ import { changeStateAt, readStateValues } from "../../../campaign/index.js";
4
+ import { readLength } from "../../../core/length.js";
5
+ import { comparableText } from "../../../core/text.js";
6
+ import { pointAlong } from "../../../map/index.js";
7
+ import { formatPosition, isEmptyField, locate, mapOf, pagesWithName, parsePageReference, readPosition } from "../../../pages/index.js";
8
+ import { formatDuration, formatGameDate, minutesBetween, readDuration, readGameDate } from "../../../time/index.js";
9
9
  import { pointText, positionOf, regionAt } from "./positions.js";
10
10
  import { hoursText, lengthText } from "./roads.js";
11
11
  /** How long a stop must last for the hours of travel to start again (TRV-8): a night's rest. */
@@ -1,5 +1,5 @@
1
- import type { Context } from "../../core/context.ts";
2
- import { type MovePlan, type Page, type World } from "../../pages/index.ts";
1
+ import type { Context } from "../../../core/context.ts";
2
+ import { type MovePlan, type Page, type World } from "../../../pages/index.ts";
3
3
  /** What a move did: the pages that changed place, the world after it and after the events it set off, the events it made due, and what the master should know. */
4
4
  export interface MoveDone {
5
5
  moved: Page[];
@@ -1,8 +1,8 @@
1
- import { appendLogEntry } from "../../core/log.js";
2
- import { applyMove, concernsPlayer, isInParty, links, locate, planLeave, planMove } from "../../pages/index.js";
3
- import { fireEvents, heldNote, linkedStoryNotes, nowDueNote } from "./events.js";
1
+ import { appendLogEntry } from "../../../core/log.js";
2
+ import { applyMove, concernsPlayer, isInParty, links, locate, planLeave, planMove } from "../../../pages/index.js";
3
+ import { fireEvents, heldNote, linkedStoryNotes, nowDueNote } from "../time/events.js";
4
+ import { newDatedLogEntry, readPresent } from "../time/time.js";
4
5
  import { withSquares } from "./grids.js";
5
- import { newDatedLogEntry, readPresent } from "./time.js";
6
6
  /**
7
7
  * Moves pages into a container (CON-4), or out of every one, and does what follows: a line in the log for the pages that concern the player, public, and one for the others, hidden (CON-9);
8
8
  * the events it sets off, judged once on the world before and after it; what links to the pages that moved, but the living members of the party (CON-5).
@@ -1,5 +1,5 @@
1
- import type { Problem } from "../../core/problem.ts";
2
- import { type Page, type Position, type World } from "../../pages/index.ts";
1
+ import type { Problem } from "../../../core/problem.ts";
2
+ import { type Page, type Position, type World } from "../../../pages/index.ts";
3
3
  import { type Measures } from "./roads.ts";
4
4
  /** A region (POS-6): a place with a position and a radius, which covers the circle. */
5
5
  export interface Region {
@@ -1,9 +1,9 @@
1
1
  // Positions in play (D-259, POS-1–POS-8): where a place is, its own position or one worked out; relations turned into a position; regions; what is near a point;
2
2
  // each on its map, with the coordinates its map uses (D-320).
3
- import { lengthHelp, readLength } from "../../core/length.js";
4
- import { comparableText } from "../../core/text.js";
5
- import { biomes, directionHelp, directionName, directionTo, distanceBetween, meanPoint, placeKinds, pointAlong, pointFrom, readDirection } from "../../map/index.js";
6
- import { environmentAt, formatPosition, isEmptyField, locate, mapKey, mapOf, pageNamed, pagesWithName, parsePageReference, readPosition, readStops, sameFrame } from "../../pages/index.js";
3
+ import { lengthHelp, readLength } from "../../../core/length.js";
4
+ import { comparableText } from "../../../core/text.js";
5
+ import { biomes, directionHelp, directionName, directionTo, distanceBetween, meanPoint, placeKinds, pointAlong, pointFrom, readDirection } from "../../../map/index.js";
6
+ import { environmentAt, formatPosition, isEmptyField, locate, mapKey, mapOf, pageNamed, pagesWithName, parsePageReference, readPosition, readStops, sameFrame } from "../../../pages/index.js";
7
7
  import { lengthText, roadsOf } from "./roads.js";
8
8
  /** How to write a relation, for messages. */
9
9
  const relationHelp = "a distance, a direction and a place with a position, such as 12 km NE of [[Guadoscuro]]";
@@ -1,8 +1,8 @@
1
- import { type ImperialUnits, type UnitSystem } from "../../core/length.ts";
2
- import type { Problem } from "../../core/problem.ts";
3
- import { type Speed, type Start, type Step, type Stretch, type Way } from "../../map/index.ts";
4
- import { type Page, type World } from "../../pages/index.ts";
5
- import type { GameSystem, TravelKind } from "../../systems/index.ts";
1
+ import { type ImperialUnits, type UnitSystem } from "../../../core/length.ts";
2
+ import type { Problem } from "../../../core/problem.ts";
3
+ import { type Speed, type Start, type Step, type Stretch, type Way } from "../../../map/index.ts";
4
+ import { type Page, type World } from "../../../pages/index.ts";
5
+ import type { GameSystem, TravelKind } from "../../../systems/index.ts";
6
6
  /** The roads of the world (ROA-4): their stretches, in the order of the pages and of their stops; the page of each road by its name; the names of the stops. */
7
7
  export interface Roads {
8
8
  stretches: Stretch[];
@@ -1,11 +1,11 @@
1
1
  // Roads in play (D-256, D-260, D-262): the roads of the world as stretches, the stop a journey starts or ends at, how fast one goes on each stretch, the quickest
2
2
  // way, and the measures in the player's units.
3
- import { readTextSetting, unitSystems } from "../../campaign/index.js";
4
- import { formatLength, formatSpeed, readSpeed, speedHelp, trueImperialUnits } from "../../core/length.js";
5
- import { comparableText, sameName } from "../../core/text.js";
6
- import { quickestWay, stretchesOf } from "../../map/index.js";
7
- import { environmentAt, isEmptyField, isInParty, locate, mapKey, pagesWithName, playerCharacters, readStops } from "../../pages/index.js";
8
- import { effectiveFields } from "./effect-layer.js";
3
+ import { readTextSetting, unitSystems } from "../../../campaign/index.js";
4
+ import { formatLength, formatSpeed, readSpeed, speedHelp, trueImperialUnits } from "../../../core/length.js";
5
+ import { comparableText, sameName } from "../../../core/text.js";
6
+ import { quickestWay, stretchesOf } from "../../../map/index.js";
7
+ import { environmentAt, isEmptyField, isInParty, locate, mapKey, pagesWithName, playerCharacters, readStops } from "../../../pages/index.js";
8
+ import { effectiveFields } from "../sheet/effect-layer.js";
9
9
  /** The roads of the world (ROA-1, ROA-4): every place of the campaign with stops that read; a stretch counts only between two places of the campaign. */
10
10
  export function roadsOf(world) {
11
11
  let roads = known.get(world);
@@ -1,10 +1,10 @@
1
- import type { Context } from "../../core/context.ts";
2
- import type { Problem } from "../../core/problem.ts";
3
- import { type Effect, type EffectEnd } from "../../effects/index.ts";
4
- import { type Page, type World } from "../../pages/index.ts";
5
- import type { Scene } from "../../scene/index.ts";
6
- import type { GameSystem } from "../../systems/index.ts";
7
- import { type GameDate } from "../../time/index.ts";
1
+ import type { Context } from "../../../core/context.ts";
2
+ import type { Problem } from "../../../core/problem.ts";
3
+ import { type Effect, type EffectEnd } from "../../../effects/index.ts";
4
+ import { type Page, type World } from "../../../pages/index.ts";
5
+ import type { Scene } from "../../../scene/index.ts";
6
+ import type { GameSystem } from "../../../systems/index.ts";
7
+ import { type GameDate } from "../../../time/index.ts";
8
8
  /** Who holds effects: a page, or a copy in the open scene seen as a page (INH-14). */
9
9
  export interface EffectHolder {
10
10
  page: Page;
@@ -1,14 +1,14 @@
1
- import { appendLogEntry } from "../../core/log.js";
2
- import { comparableText, sameName, sameWord } from "../../core/text.js";
3
- import { formatCounter, readCounter } from "../../counters/index.js";
4
- import { endsAtTurn, formatEffect, formatEnd, keeperOf, readEffects } from "../../effects/index.js";
5
- import { concernsPlayer, isDeclaredUncounted, isEmptyField, systemFirstFix, writePage } from "../../pages/index.js";
6
- import { minutesBetween, readGameDate } from "../../time/index.js";
7
- import { effectiveFields, effectsField, effectsOf, valuesChanged, withEffects } from "./effect-layer.js";
8
- import { shortList } from "./notes.js";
1
+ import { appendLogEntry } from "../../../core/log.js";
2
+ import { comparableText, sameName, sameWord } from "../../../core/text.js";
3
+ import { formatCounter, readCounter } from "../../../counters/index.js";
4
+ import { endsAtTurn, formatEffect, formatEnd, keeperOf, readEffects } from "../../../effects/index.js";
5
+ import { concernsPlayer, isDeclaredUncounted, isEmptyField, systemFirstFix, writePage } from "../../../pages/index.js";
6
+ import { minutesBetween, readGameDate } from "../../../time/index.js";
7
+ import { shortList } from "../notes.js";
8
+ import { effectiveFields, effectsField, effectsOf, valuesChanged, withEffects } from "../sheet/effect-layer.js";
9
+ import { computedField, directBonuses } from "../sheet/worked-out.js";
10
+ import { newDatedLogEntry } from "../time/time.js";
9
11
  import { copyPage, updateScene } from "./scene.js";
10
- import { newDatedLogEntry } from "./time.js";
11
- import { computedField, directBonuses } from "./worked-out.js";
12
12
  /**
13
13
  * Writes a holder's effects; the field goes when none is left. What a current has above its written maximum that the maximum, as these effects leave it, no
14
14
  * longer allows goes, as when Aid ends, with a line in the log (FOR-6). Returns the page as written, or undefined for a copy.
@@ -1,5 +1,5 @@
1
- import { type Page, type World } from "../../pages/index.ts";
2
- import type { GameSystem } from "../../systems/index.ts";
1
+ import { type Page, type World } from "../../../pages/index.ts";
2
+ import type { GameSystem } from "../../../systems/index.ts";
3
3
  /** What the master is told of what the fallen carry: there, for the player to take. */
4
4
  export declare const lootAdvice = "tell what the party sees, and let the player say what is taken, and by whom.";
5
5
  /** Whether a character or creature outside the party, a copy too, is dead or at the system's down value or below. */