@datamoc/mw_games 0.7.6 → 0.7.8
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/CHANGELOG.md +359 -0
- package/README.md +7 -7
- package/dist/actors/Inventory.d.ts +7 -1
- package/dist/actors/Inventory.d.ts.map +1 -1
- package/dist/actors/Inventory.js.map +1 -1
- package/dist/actors/Shop.d.ts.map +1 -1
- package/dist/actors/Shop.js +4 -1
- package/dist/actors/Shop.js.map +1 -1
- package/dist/actors/craft.d.ts +35 -14
- package/dist/actors/craft.d.ts.map +1 -1
- package/dist/actors/craft.js +56 -24
- package/dist/actors/craft.js.map +1 -1
- package/dist/actors/index.d.ts +1 -1
- package/dist/actors/index.d.ts.map +1 -1
- package/dist/ai/Heuristics.d.ts +240 -0
- package/dist/ai/Heuristics.d.ts.map +1 -0
- package/dist/ai/Heuristics.js +298 -0
- package/dist/ai/Heuristics.js.map +1 -0
- package/dist/ai/index.d.ts +4 -0
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +2 -0
- package/dist/ai/index.js.map +1 -1
- package/dist/ai/lua.d.ts +21 -0
- package/dist/ai/lua.d.ts.map +1 -1
- package/dist/ai/lua.js +21 -0
- package/dist/ai/lua.js.map +1 -1
- package/dist/ai/score.d.ts +162 -0
- package/dist/ai/score.d.ts.map +1 -0
- package/dist/ai/score.js +147 -0
- package/dist/ai/score.js.map +1 -0
- package/dist/assets/loader.d.ts +18 -4
- package/dist/assets/loader.d.ts.map +1 -1
- package/dist/assets/loader.js +40 -11
- package/dist/assets/loader.js.map +1 -1
- package/dist/audio/Positional.d.ts +125 -0
- package/dist/audio/Positional.d.ts.map +1 -0
- package/dist/audio/Positional.js +135 -0
- package/dist/audio/Positional.js.map +1 -0
- package/dist/audio/Sound.d.ts +7 -1
- package/dist/audio/Sound.d.ts.map +1 -1
- package/dist/audio/Sound.js +8 -2
- package/dist/audio/Sound.js.map +1 -1
- package/dist/audio/index.d.ts +2 -0
- package/dist/audio/index.d.ts.map +1 -1
- package/dist/audio/index.js +1 -0
- package/dist/audio/index.js.map +1 -1
- package/dist/battle/AttackDialog.d.ts +75 -0
- package/dist/battle/AttackDialog.d.ts.map +1 -0
- package/dist/battle/AttackDialog.js +115 -0
- package/dist/battle/AttackDialog.js.map +1 -0
- package/dist/battle/AttackPreview.d.ts +70 -0
- package/dist/battle/AttackPreview.d.ts.map +1 -0
- package/dist/battle/AttackPreview.js +78 -0
- package/dist/battle/AttackPreview.js.map +1 -0
- package/dist/battle/BattleStats.d.ts +45 -0
- package/dist/battle/BattleStats.d.ts.map +1 -0
- package/dist/battle/BattleStats.js +63 -0
- package/dist/battle/BattleStats.js.map +1 -0
- package/dist/battle/UnitSelector.d.ts +72 -0
- package/dist/battle/UnitSelector.d.ts.map +1 -0
- package/dist/battle/UnitSelector.js +117 -0
- package/dist/battle/UnitSelector.js.map +1 -0
- package/dist/battle/Whiteboard.d.ts +50 -0
- package/dist/battle/Whiteboard.d.ts.map +1 -0
- package/dist/battle/Whiteboard.js +94 -0
- package/dist/battle/Whiteboard.js.map +1 -0
- package/dist/battle/index.d.ts +10 -0
- package/dist/battle/index.d.ts.map +1 -1
- package/dist/battle/index.js +5 -0
- package/dist/battle/index.js.map +1 -1
- package/dist/board/Classics.d.ts.map +1 -1
- package/dist/board/Classics.js +51 -39
- package/dist/board/Classics.js.map +1 -1
- package/dist/board/FogOfWar.d.ts +32 -2
- package/dist/board/FogOfWar.d.ts.map +1 -1
- package/dist/board/FogOfWar.js +70 -6
- package/dist/board/FogOfWar.js.map +1 -1
- package/dist/board/HexSkirmish.d.ts.map +1 -1
- package/dist/board/HexSkirmish.js +69 -20
- package/dist/board/HexSkirmish.js.map +1 -1
- package/dist/board/Tactics.d.ts +7 -0
- package/dist/board/Tactics.d.ts.map +1 -1
- package/dist/board/Tactics.js +2 -2
- package/dist/board/Tactics.js.map +1 -1
- package/dist/core/Achievements.d.ts +40 -7
- package/dist/core/Achievements.d.ts.map +1 -1
- package/dist/core/Achievements.js +53 -7
- package/dist/core/Achievements.js.map +1 -1
- package/dist/core/Hex.d.ts +26 -6
- package/dist/core/Hex.d.ts.map +1 -1
- package/dist/core/Hex.js +40 -13
- package/dist/core/Hex.js.map +1 -1
- package/dist/core/Input.d.ts +36 -0
- package/dist/core/Input.d.ts.map +1 -1
- package/dist/core/Input.js +63 -1
- package/dist/core/Input.js.map +1 -1
- package/dist/core/Random.d.ts +93 -0
- package/dist/core/Random.d.ts.map +1 -1
- package/dist/core/Random.js +177 -0
- package/dist/core/Random.js.map +1 -1
- package/dist/core/SyncGuard.d.ts +57 -0
- package/dist/core/SyncGuard.d.ts.map +1 -0
- package/dist/core/SyncGuard.js +116 -0
- package/dist/core/SyncGuard.js.map +1 -0
- package/dist/core/index.d.ts +3 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -1
- package/dist/core/index.js.map +1 -1
- package/dist/i18n/Po.d.ts +51 -0
- package/dist/i18n/Po.d.ts.map +1 -0
- package/dist/i18n/Po.js +176 -0
- package/dist/i18n/Po.js.map +1 -0
- package/dist/i18n/index.d.ts +2 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/index.js +1 -0
- package/dist/i18n/index.js.map +1 -1
- package/dist/mw_games.global.js +104 -98
- package/dist/mwl/MapFile.d.ts +41 -0
- package/dist/mwl/MapFile.d.ts.map +1 -0
- package/dist/mwl/MapFile.js +43 -0
- package/dist/mwl/MapFile.js.map +1 -0
- package/dist/mwl/actors.d.ts +46 -2
- package/dist/mwl/actors.d.ts.map +1 -1
- package/dist/mwl/actors.js +46 -2
- package/dist/mwl/actors.js.map +1 -1
- package/dist/mwl/campaign.d.ts +51 -0
- package/dist/mwl/campaign.d.ts.map +1 -0
- package/dist/mwl/campaign.js +58 -0
- package/dist/mwl/campaign.js.map +1 -0
- package/dist/mwl/carryover.d.ts +86 -0
- package/dist/mwl/carryover.d.ts.map +1 -0
- package/dist/mwl/carryover.js +70 -0
- package/dist/mwl/carryover.js.map +1 -0
- package/dist/mwl/catalog.d.ts +10 -1
- package/dist/mwl/catalog.d.ts.map +1 -1
- package/dist/mwl/catalog.js +10 -1
- package/dist/mwl/catalog.js.map +1 -1
- package/dist/mwl/compiler.d.ts +70 -3
- package/dist/mwl/compiler.d.ts.map +1 -1
- package/dist/mwl/compiler.js +70 -3
- package/dist/mwl/compiler.js.map +1 -1
- package/dist/mwl/conditions.d.ts +10 -1
- package/dist/mwl/conditions.d.ts.map +1 -1
- package/dist/mwl/conditions.js +10 -1
- package/dist/mwl/conditions.js.map +1 -1
- package/dist/mwl/content.d.ts +21 -0
- package/dist/mwl/content.d.ts.map +1 -1
- package/dist/mwl/content.js +19 -0
- package/dist/mwl/content.js.map +1 -1
- package/dist/mwl/expression.d.ts +21 -0
- package/dist/mwl/expression.d.ts.map +1 -1
- package/dist/mwl/expression.js +21 -0
- package/dist/mwl/expression.js.map +1 -1
- package/dist/mwl/fengari.d.ts +12 -1
- package/dist/mwl/fengari.d.ts.map +1 -1
- package/dist/mwl/fengari.js +12 -1
- package/dist/mwl/fengari.js.map +1 -1
- package/dist/mwl/grammar.d.ts +45 -1
- package/dist/mwl/grammar.d.ts.map +1 -1
- package/dist/mwl/grammar.js +45 -1
- package/dist/mwl/grammar.js.map +1 -1
- package/dist/mwl/hooks.d.ts +51 -6
- package/dist/mwl/hooks.d.ts.map +1 -1
- package/dist/mwl/hooks.js +45 -1
- package/dist/mwl/hooks.js.map +1 -1
- package/dist/mwl/index.d.ts +9 -3
- package/dist/mwl/index.d.ts.map +1 -1
- package/dist/mwl/index.js +5 -2
- package/dist/mwl/index.js.map +1 -1
- package/dist/mwl/persistence.d.ts +32 -0
- package/dist/mwl/persistence.d.ts.map +1 -1
- package/dist/mwl/persistence.js +32 -0
- package/dist/mwl/persistence.js.map +1 -1
- package/dist/mwl/readers.d.ts +24 -2
- package/dist/mwl/readers.d.ts.map +1 -1
- package/dist/mwl/readers.js +27 -4
- package/dist/mwl/readers.js.map +1 -1
- package/dist/mwl/report.d.ts +21 -2
- package/dist/mwl/report.d.ts.map +1 -1
- package/dist/mwl/report.js +21 -2
- package/dist/mwl/report.js.map +1 -1
- package/dist/mwl/runtime.d.ts +212 -7
- package/dist/mwl/runtime.d.ts.map +1 -1
- package/dist/mwl/runtime.js +682 -90
- package/dist/mwl/runtime.js.map +1 -1
- package/dist/mwl/schema.d.ts +57 -1
- package/dist/mwl/schema.d.ts.map +1 -1
- package/dist/mwl/schema.js +181 -21
- package/dist/mwl/schema.js.map +1 -1
- package/dist/mwl/scripts.d.ts +12 -1
- package/dist/mwl/scripts.d.ts.map +1 -1
- package/dist/mwl/scripts.js +12 -1
- package/dist/mwl/scripts.js.map +1 -1
- package/dist/mwl/utils.d.ts +2 -0
- package/dist/mwl/utils.d.ts.map +1 -1
- package/dist/mwl/utils.js +4 -1
- package/dist/mwl/utils.js.map +1 -1
- package/dist/roguelike/MultiTurnBeam.d.ts +50 -12
- package/dist/roguelike/MultiTurnBeam.d.ts.map +1 -1
- package/dist/roguelike/MultiTurnBeam.js +100 -53
- package/dist/roguelike/MultiTurnBeam.js.map +1 -1
- package/dist/roguelike/Targeting.d.ts +94 -0
- package/dist/roguelike/Targeting.d.ts.map +1 -1
- package/dist/roguelike/Targeting.js +123 -0
- package/dist/roguelike/Targeting.js.map +1 -1
- package/dist/roguelike/index.d.ts +3 -1
- package/dist/roguelike/index.d.ts.map +1 -1
- package/dist/roguelike/index.js +1 -0
- package/dist/roguelike/index.js.map +1 -1
- package/dist/rpg/GameState.d.ts +2 -2
- package/dist/rpg/GameState.js +2 -2
- package/dist/simulation/CampaignSave.d.ts +68 -0
- package/dist/simulation/CampaignSave.d.ts.map +1 -0
- package/dist/simulation/CampaignSave.js +54 -0
- package/dist/simulation/CampaignSave.js.map +1 -0
- package/dist/simulation/EventPresentation.d.ts +111 -0
- package/dist/simulation/EventPresentation.d.ts.map +1 -0
- package/dist/simulation/EventPresentation.js +120 -0
- package/dist/simulation/EventPresentation.js.map +1 -0
- package/dist/simulation/index.d.ts +4 -0
- package/dist/simulation/index.d.ts.map +1 -1
- package/dist/simulation/index.js +2 -0
- package/dist/simulation/index.js.map +1 -1
- package/dist/two-d/pixi-interop.d.ts +18 -6
- package/dist/two-d/pixi-interop.d.ts.map +1 -1
- package/dist/two-d/pixi-interop.js +18 -6
- package/dist/two-d/pixi-interop.js.map +1 -1
- package/dist/two-d/render/AnimatedSprite.d.ts +74 -7
- package/dist/two-d/render/AnimatedSprite.d.ts.map +1 -1
- package/dist/two-d/render/AnimatedSprite.js +88 -26
- package/dist/two-d/render/AnimatedSprite.js.map +1 -1
- package/dist/two-d/render/Camera.d.ts +64 -4
- package/dist/two-d/render/Camera.d.ts.map +1 -1
- package/dist/two-d/render/Camera.js +132 -11
- package/dist/two-d/render/Camera.js.map +1 -1
- package/dist/two-d/render/ColorTransformBatcher.d.ts +7 -1
- package/dist/two-d/render/ColorTransformBatcher.d.ts.map +1 -1
- package/dist/two-d/render/ColorTransformBatcher.js +10 -1
- package/dist/two-d/render/ColorTransformBatcher.js.map +1 -1
- package/dist/two-d/render/Halo.d.ts +58 -0
- package/dist/two-d/render/Halo.d.ts.map +1 -0
- package/dist/two-d/render/Halo.js +48 -0
- package/dist/two-d/render/Halo.js.map +1 -0
- package/dist/two-d/render/ImageModifiers.d.ts +174 -0
- package/dist/two-d/render/ImageModifiers.d.ts.map +1 -1
- package/dist/two-d/render/ImageModifiers.js +454 -1
- package/dist/two-d/render/ImageModifiers.js.map +1 -1
- package/dist/two-d/render/LightningArc.d.ts +57 -0
- package/dist/two-d/render/LightningArc.d.ts.map +1 -0
- package/dist/two-d/render/LightningArc.js +91 -0
- package/dist/two-d/render/LightningArc.js.map +1 -0
- package/dist/two-d/render/PaletteRemap.d.ts +135 -0
- package/dist/two-d/render/PaletteRemap.d.ts.map +1 -0
- package/dist/two-d/render/PaletteRemap.js +181 -0
- package/dist/two-d/render/PaletteRemap.js.map +1 -0
- package/dist/two-d/render/Particles.d.ts +26 -0
- package/dist/two-d/render/Particles.d.ts.map +1 -1
- package/dist/two-d/render/Particles.js +23 -2
- package/dist/two-d/render/Particles.js.map +1 -1
- package/dist/two-d/render/SpriteAttachment.d.ts +55 -0
- package/dist/two-d/render/SpriteAttachment.d.ts.map +1 -0
- package/dist/two-d/render/SpriteAttachment.js +60 -0
- package/dist/two-d/render/SpriteAttachment.js.map +1 -0
- package/dist/two-d/render/TerrainGraphics.d.ts +142 -0
- package/dist/two-d/render/TerrainGraphics.d.ts.map +1 -0
- package/dist/two-d/render/TerrainGraphics.js +161 -0
- package/dist/two-d/render/TerrainGraphics.js.map +1 -0
- package/dist/two-d/render/TerrainGraphicsLayer.d.ts +55 -0
- package/dist/two-d/render/TerrainGraphicsLayer.d.ts.map +1 -0
- package/dist/two-d/render/TerrainGraphicsLayer.js +54 -0
- package/dist/two-d/render/TerrainGraphicsLayer.js.map +1 -0
- package/dist/two-d/render/TintedSprite.js +2 -2
- package/dist/two-d/render/TintedSprite.js.map +1 -1
- package/dist/two-d/render/index.d.ts +15 -3
- package/dist/two-d/render/index.d.ts.map +1 -1
- package/dist/two-d/render/index.js +7 -1
- package/dist/two-d/render/index.js.map +1 -1
- package/dist/two-d/stage/StoryScreen.d.ts +110 -0
- package/dist/two-d/stage/StoryScreen.d.ts.map +1 -0
- package/dist/two-d/stage/StoryScreen.js +178 -0
- package/dist/two-d/stage/StoryScreen.js.map +1 -0
- package/dist/two-d/stage/index.d.ts +2 -0
- package/dist/two-d/stage/index.d.ts.map +1 -1
- package/dist/two-d/stage/index.js +1 -0
- package/dist/two-d/stage/index.js.map +1 -1
- package/dist/two-d/ui/Checkbox.d.ts +44 -0
- package/dist/two-d/ui/Checkbox.d.ts.map +1 -0
- package/dist/two-d/ui/Checkbox.js +89 -0
- package/dist/two-d/ui/Checkbox.js.map +1 -0
- package/dist/two-d/ui/DataTable.d.ts +79 -0
- package/dist/two-d/ui/DataTable.d.ts.map +1 -0
- package/dist/two-d/ui/DataTable.js +164 -0
- package/dist/two-d/ui/DataTable.js.map +1 -0
- package/dist/two-d/ui/Dropdown.d.ts +72 -0
- package/dist/two-d/ui/Dropdown.d.ts.map +1 -0
- package/dist/two-d/ui/Dropdown.js +126 -0
- package/dist/two-d/ui/Dropdown.js.map +1 -0
- package/dist/two-d/ui/FloatingText.d.ts +43 -4
- package/dist/two-d/ui/FloatingText.d.ts.map +1 -1
- package/dist/two-d/ui/FloatingText.js +52 -5
- package/dist/two-d/ui/FloatingText.js.map +1 -1
- package/dist/two-d/ui/FloatingTextStack.d.ts +86 -13
- package/dist/two-d/ui/FloatingTextStack.d.ts.map +1 -1
- package/dist/two-d/ui/FloatingTextStack.js +89 -18
- package/dist/two-d/ui/FloatingTextStack.js.map +1 -1
- package/dist/two-d/ui/Layout.d.ts +105 -0
- package/dist/two-d/ui/Layout.d.ts.map +1 -0
- package/dist/two-d/ui/Layout.js +174 -0
- package/dist/two-d/ui/Layout.js.map +1 -0
- package/dist/two-d/ui/MarkupText.d.ts +53 -0
- package/dist/two-d/ui/MarkupText.d.ts.map +1 -0
- package/dist/two-d/ui/MarkupText.js +122 -0
- package/dist/two-d/ui/MarkupText.js.map +1 -0
- package/dist/two-d/ui/ScrollBox.d.ts +67 -0
- package/dist/two-d/ui/ScrollBox.d.ts.map +1 -0
- package/dist/two-d/ui/ScrollBox.js +127 -0
- package/dist/two-d/ui/ScrollBox.js.map +1 -0
- package/dist/two-d/ui/Skins.d.ts +59 -0
- package/dist/two-d/ui/Skins.d.ts.map +1 -0
- package/dist/two-d/ui/Skins.js +77 -0
- package/dist/two-d/ui/Skins.js.map +1 -0
- package/dist/two-d/ui/Slider.d.ts +91 -0
- package/dist/two-d/ui/Slider.d.ts.map +1 -0
- package/dist/two-d/ui/Slider.js +170 -0
- package/dist/two-d/ui/Slider.js.map +1 -0
- package/dist/two-d/ui/Spinner.d.ts +67 -0
- package/dist/two-d/ui/Spinner.d.ts.map +1 -0
- package/dist/two-d/ui/Spinner.js +137 -0
- package/dist/two-d/ui/Spinner.js.map +1 -0
- package/dist/two-d/ui/TabbedList.d.ts +118 -0
- package/dist/two-d/ui/TabbedList.d.ts.map +1 -0
- package/dist/two-d/ui/TabbedList.js +221 -0
- package/dist/two-d/ui/TabbedList.js.map +1 -0
- package/dist/two-d/ui/TextModel.d.ts +65 -0
- package/dist/two-d/ui/TextModel.d.ts.map +1 -0
- package/dist/two-d/ui/TextModel.js +126 -0
- package/dist/two-d/ui/TextModel.js.map +1 -0
- package/dist/two-d/ui/TreeView.d.ts +68 -0
- package/dist/two-d/ui/TreeView.d.ts.map +1 -0
- package/dist/two-d/ui/TreeView.js +133 -0
- package/dist/two-d/ui/TreeView.js.map +1 -0
- package/dist/two-d/ui/Window.d.ts +13 -0
- package/dist/two-d/ui/Window.d.ts.map +1 -1
- package/dist/two-d/ui/Window.js +23 -0
- package/dist/two-d/ui/Window.js.map +1 -1
- package/dist/two-d/ui/WindowStack.d.ts.map +1 -1
- package/dist/two-d/ui/WindowStack.js +2 -0
- package/dist/two-d/ui/WindowStack.js.map +1 -1
- package/dist/two-d/ui/index.d.ts +29 -3
- package/dist/two-d/ui/index.d.ts.map +1 -1
- package/dist/two-d/ui/index.js +15 -2
- package/dist/two-d/ui/index.js.map +1 -1
- package/dist/two-d/ui/markup.d.ts +181 -0
- package/dist/two-d/ui/markup.d.ts.map +1 -0
- package/dist/two-d/ui/markup.js +370 -0
- package/dist/two-d/ui/markup.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/world/SideTurns.d.ts +115 -0
- package/dist/world/SideTurns.d.ts.map +1 -0
- package/dist/world/SideTurns.js +138 -0
- package/dist/world/SideTurns.js.map +1 -0
- package/dist/world/index.d.ts +2 -0
- package/dist/world/index.d.ts.map +1 -1
- package/dist/world/index.js +1 -0
- package/dist/world/index.js.map +1 -1
- package/package.json +2 -1
package/dist/mwl/readers.js
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
import { isMwlId } from './schema.js';
|
|
2
|
+
/**
|
|
3
|
+
* Read a compiled node with one shared coercion and diagnostic policy.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* import { compile, readAttributes } from '@datamoc/mw_games/mwl';
|
|
8
|
+
*
|
|
9
|
+
* const game = compile('[game]\nschema=0.1\n[/game]');
|
|
10
|
+
* const { value } = readAttributes(game.roots[0]!, { schema: { type: 'string' } });
|
|
11
|
+
* console.log(value.schema); // '0.1'
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
2
14
|
export function readAttributes(node, fields) {
|
|
3
15
|
const value = {};
|
|
4
16
|
const diagnostics = [];
|
|
@@ -20,7 +32,18 @@ export function readAttributes(node, fields) {
|
|
|
20
32
|
}
|
|
21
33
|
return { value: value, diagnostics };
|
|
22
34
|
}
|
|
23
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* Collect children without making every game adapter repeat this filter.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* import { compile, readAttributes, readChildren } from '@datamoc/mw_games/mwl';
|
|
41
|
+
*
|
|
42
|
+
* const game = compile('[game]\nschema=0.1\n[side]\nid=1\n[/side]\n[/game]');
|
|
43
|
+
* const sides = readChildren(game.roots[0]!, 'side', (child) => readAttributes(child, { id: { type: 'id' } }));
|
|
44
|
+
* console.log(sides.value.length); // 1
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
24
47
|
export function readChildren(node, tag, read) {
|
|
25
48
|
const values = [];
|
|
26
49
|
const diagnostics = [];
|
|
@@ -37,7 +60,7 @@ function coerce(raw, type) {
|
|
|
37
60
|
if (type === 'string')
|
|
38
61
|
return raw;
|
|
39
62
|
if (type === 'id')
|
|
40
|
-
return
|
|
63
|
+
return isMwlId(raw) ? raw : undefined;
|
|
41
64
|
if (type === 'number')
|
|
42
65
|
return Number.isFinite(Number(raw)) ? Number(raw) : undefined;
|
|
43
66
|
if (type === 'integer')
|
|
@@ -49,7 +72,7 @@ function coerce(raw, type) {
|
|
|
49
72
|
.map((part) => part.trim())
|
|
50
73
|
.filter(Boolean);
|
|
51
74
|
if (type === 'id-list')
|
|
52
|
-
return parts.every((part) =>
|
|
75
|
+
return parts.every((part) => isMwlId(part)) ? parts : undefined;
|
|
53
76
|
return parts.every((part) => Number.isFinite(Number(part))) ? parts.map(Number) : undefined;
|
|
54
77
|
}
|
|
55
78
|
function diagnostic(code, message, node) {
|
package/dist/mwl/readers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readers.js","sourceRoot":"","sources":["../../src/mwl/readers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"readers.js","sourceRoot":"","sources":["../../src/mwl/readers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAgBtC;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,cAAc,CAC7B,IAAqB,EACrB,MAAwD;IAExD,MAAM,KAAK,GAA4B,EAAE,CAAC;IAC1C,MAAM,WAAW,GAAoB,EAAE,CAAC;IACxC,KAAK,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACnD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC;QACnC,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACpC,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;YACvB,IAAI,IAAI,CAAC,QAAQ;gBAChB,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,oBAAoB,EAAE,+BAA+B,MAAM,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;iBAC/F,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS;gBAAE,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC;YAChE,SAAS;QACV,CAAC;QACD,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AC,EAAE,EAAE,CAAC;AAC5F,CAAC"}
|
package/dist/mwl/report.d.ts
CHANGED
|
@@ -18,8 +18,27 @@ export interface MwlContentLoadReport {
|
|
|
18
18
|
readonly ignored: readonly string[];
|
|
19
19
|
readonly diagnostics: readonly MwlContentDiagnostic[];
|
|
20
20
|
}
|
|
21
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Compile content and return a stable, machine-readable load report instead of throwing.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* import { loadContent } from '@datamoc/mw_games/mwl';
|
|
27
|
+
*
|
|
28
|
+
* const report = loadContent([{ file: 'a.mwl', source: '[game]\nschema=0.1\n[/game]' }]);
|
|
29
|
+
* console.log(report.game?.schema); // '0.1'
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
22
32
|
export declare function loadContent(files: readonly MwlSourceFile[], options?: MwlCompileOptions): MwlContentLoadReport;
|
|
23
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Summarise a compiled catalog for parity checks and CI output.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* import { compile, contentReport } from '@datamoc/mw_games/mwl';
|
|
39
|
+
*
|
|
40
|
+
* console.log(contentReport(compile('[game]\nschema=0.1\n[/game]')).tags);
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
24
43
|
export declare function contentReport(game: MwlCompiledGame): MwlContentReport;
|
|
25
44
|
//# sourceMappingURL=report.d.ts.map
|
package/dist/mwl/report.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/mwl/report.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAIjH,MAAM,WAAW,gBAAgB;IAChC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAA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AM,EAAE,CAAC;CAC/C;AAED,MAAM,WAAW,oBAAoB;IACpC,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,oBAAoB,GAAG,YAAY,CAAC;IAC/D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,oBAAoB;IACpC,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe,CAAC;IAChC,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,WAAW,EAAE,SAAS,oBAAoB,EAAE,CAAC;CACtD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,aAAa,EAAE,EAAE,OAAO,GAAE,iBAAsB,GAAG,oBAAoB,CA4BlH;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,eAAe,GAAG,gBAAgB,CA+BrE"}
|
package/dist/mwl/report.js
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { compileSources } from './compiler.js';
|
|
2
2
|
import { schema01 } from './schema.js';
|
|
3
3
|
import { flattenNodes } from './utils.js';
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Compile content and return a stable, machine-readable load report instead of throwing.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { loadContent } from '@datamoc/mw_games/mwl';
|
|
10
|
+
*
|
|
11
|
+
* const report = loadContent([{ file: 'a.mwl', source: '[game]\nschema=0.1\n[/game]' }]);
|
|
12
|
+
* console.log(report.game?.schema); // '0.1'
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
5
15
|
export function loadContent(files, options = {}) {
|
|
6
16
|
try {
|
|
7
17
|
const game = compileSources(files, options);
|
|
@@ -32,7 +42,16 @@ export function loadContent(files, options = {}) {
|
|
|
32
42
|
};
|
|
33
43
|
}
|
|
34
44
|
}
|
|
35
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* Summarise a compiled catalog for parity checks and CI output.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* import { compile, contentReport } from '@datamoc/mw_games/mwl';
|
|
51
|
+
*
|
|
52
|
+
* console.log(contentReport(compile('[game]\nschema=0.1\n[/game]')).tags);
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
36
55
|
export function contentReport(game) {
|
|
37
56
|
const nodes = flattenNodes(game.roots);
|
|
38
57
|
const tags = {};
|
package/dist/mwl/report.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../src/mwl/report.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAoE,MAAM,eAAe,CAAC;AACjH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAwB1C
|
|
1
|
+
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../src/mwl/report.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAoE,MAAM,eAAe,CAAC;AACjH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAwB1C;;;;;;;;;;GAUG;AACH,MAAM,UAAU,WAAW,CAAC,KAA+B,EAAE,OAAO,GAAsB,EAAE;IAC3F,IAAI,CAAC;QACJ,MAAM,IAAI,GAAG,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAC5C,MAAM,OAAO,GAAG,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,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;QACrF,UAAU;QACV,UAAU,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,IAAI,EAAE;QAClC,kBAAkB,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE;KACrF,CAAC;AACH,CAAC"}
|
package/dist/mwl/runtime.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { MwlCompiledGame, MwlCompiledNode } from './compiler.ts';
|
|
2
2
|
import type { AiHook, CommandHook, GeneratorHook, MigrationHook, ModifierHook, PredicateHook } from './hooks.ts';
|
|
3
3
|
import { type MwlPersistenceOptions } from './persistence.ts';
|
|
4
|
+
import type { MwlCarryover, MwlSideRef } from './carryover.ts';
|
|
4
5
|
export interface MwlMapStart {
|
|
5
6
|
readonly x: number;
|
|
6
7
|
readonly y: number;
|
|
@@ -11,8 +12,8 @@ export interface MwlMap {
|
|
|
11
12
|
readonly height: number;
|
|
12
13
|
/** row-major terrain codes, keep markers stripped */
|
|
13
14
|
readonly codes: readonly string[];
|
|
14
|
-
/** side
|
|
15
|
-
readonly starts: Readonly<Record<
|
|
15
|
+
/** side id -> keep/start positions; the id a `<side> <code>` token names, number or not */
|
|
16
|
+
readonly starts: Readonly<Record<string, readonly MwlMapStart[]>>;
|
|
16
17
|
}
|
|
17
18
|
export type MwlValue = string | number | boolean | MwlValue[] | {
|
|
18
19
|
[key: string]: MwlValue;
|
|
@@ -25,8 +26,19 @@ export interface MwlWorld {
|
|
|
25
26
|
y: number;
|
|
26
27
|
alive: boolean;
|
|
27
28
|
type?: string;
|
|
28
|
-
side?:
|
|
29
|
+
side?: string;
|
|
29
30
|
moves?: number;
|
|
31
|
+
/** the unit's own name, as `[unit] name=` wrote it */
|
|
32
|
+
name?: string;
|
|
33
|
+
/** the unit's role/function: `[unit] role=`, or stamped from `[role]` */
|
|
34
|
+
role?: string;
|
|
35
|
+
/** whether the unit can recruit, i.e. is a leader: `[unit] can_recruit=`, or a side's own leader */
|
|
36
|
+
can_recruit?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* whether this unit is the one the `[side]` named as its leader. What `can_recruit` means
|
|
39
|
+
* to a game, `leader` answers outright, so a consumer does not recompute `sides[id].leader === id`.
|
|
40
|
+
*/
|
|
41
|
+
leader?: boolean;
|
|
30
42
|
}>;
|
|
31
43
|
readonly sides: Record<string, {
|
|
32
44
|
gold: number;
|
|
@@ -34,6 +46,17 @@ export interface MwlWorld {
|
|
|
34
46
|
leader?: string;
|
|
35
47
|
controller?: string;
|
|
36
48
|
recruit?: string;
|
|
49
|
+
/** the team a side belongs to, which is what `sideVisionGroups` reads */
|
|
50
|
+
teamName?: string;
|
|
51
|
+
/** `all`, `shroud` or `none`, as `[side]` wrote it */
|
|
52
|
+
shareVision?: string;
|
|
53
|
+
villageGold?: number;
|
|
54
|
+
heal?: boolean;
|
|
55
|
+
fog?: boolean;
|
|
56
|
+
shroud?: boolean;
|
|
57
|
+
hidden?: boolean;
|
|
58
|
+
flag?: string;
|
|
59
|
+
userTeamName?: string;
|
|
37
60
|
}>;
|
|
38
61
|
readonly maps: Record<string, {
|
|
39
62
|
terrain: string;
|
|
@@ -42,6 +65,15 @@ export interface MwlWorld {
|
|
|
42
65
|
gold: Record<string, number>;
|
|
43
66
|
turn: number;
|
|
44
67
|
status: 'playing' | 'won' | 'lost';
|
|
68
|
+
/**
|
|
69
|
+
* What each side's own `[victory]`/`[defeat]` conditions decided, keyed by the side id
|
|
70
|
+
* `[side]` declared. Only sides whose conditions fired appear here; a side that wrote none
|
|
71
|
+
* keeps no entry, the same "only what the content made" rule `world.sides` follows. The
|
|
72
|
+
* scenario-wide `status` is the aggregate: a side that won or lost ends it too.
|
|
73
|
+
*/
|
|
74
|
+
sideStatus?: Record<string, 'playing' | 'won' | 'lost'>;
|
|
75
|
+
/** what `[endlevel]` decided this scenario hands to the next one, until it is applied */
|
|
76
|
+
carryover?: MwlCarryover;
|
|
45
77
|
/** the primary map, when the content declares one */
|
|
46
78
|
map?: MwlMap | null;
|
|
47
79
|
/** the current schedule entry, by id */
|
|
@@ -53,13 +85,44 @@ export interface MwlWorld {
|
|
|
53
85
|
id: string;
|
|
54
86
|
choices: readonly MwlDialogueChoice[];
|
|
55
87
|
};
|
|
88
|
+
/**
|
|
89
|
+
* Village ownership, keyed `"x,y"`: what `[capture_village]` records. The framework owns the
|
|
90
|
+
* fact of who holds a village; what holding one is worth stays the game's rule (income is
|
|
91
|
+
* `world.sides[id].villageGold` applied by the game, not minted here).
|
|
92
|
+
*/
|
|
93
|
+
villages?: Record<string, {
|
|
94
|
+
x: number;
|
|
95
|
+
y: number;
|
|
96
|
+
side: string;
|
|
97
|
+
name?: string;
|
|
98
|
+
}>;
|
|
99
|
+
/** hexes `[clear_shroud]` has uncovered, by side id, as `"x,y"`; the fog itself is a game layer */
|
|
100
|
+
clearedShroud?: Record<string, string[]>;
|
|
101
|
+
/** unit ids `[role]` assigned to a named role, so a later event can say `role=courier` */
|
|
102
|
+
roles?: Record<string, string[]>;
|
|
103
|
+
/** scenario `[object]` placements, as data; what an object does on pickup is the game's */
|
|
104
|
+
objects?: Array<{
|
|
105
|
+
x: number;
|
|
106
|
+
y: number;
|
|
107
|
+
id?: string;
|
|
108
|
+
name?: string;
|
|
109
|
+
image?: string;
|
|
110
|
+
side?: string;
|
|
111
|
+
}>;
|
|
112
|
+
/** scenario `[story]` entries, as data; rendering them is the story-screen work (item 264) */
|
|
113
|
+
story?: Array<{
|
|
114
|
+
text: string;
|
|
115
|
+
title?: string;
|
|
116
|
+
image?: string;
|
|
117
|
+
music?: string;
|
|
118
|
+
}>;
|
|
56
119
|
}
|
|
57
120
|
/** One `[message]`: the text plus whatever a game needs to show it. */
|
|
58
121
|
export interface MwlMessage {
|
|
59
122
|
readonly text: string;
|
|
60
123
|
readonly speaker?: string;
|
|
61
124
|
readonly portrait?: string;
|
|
62
|
-
readonly side?:
|
|
125
|
+
readonly side?: string;
|
|
63
126
|
/** choices waiting on the player; answer with `answerDialogue` */
|
|
64
127
|
readonly choices?: readonly MwlDialogueChoice[];
|
|
65
128
|
/** identifies the pending dialogue this message's choices belong to */
|
|
@@ -129,29 +192,62 @@ export type MwlCommand = {
|
|
|
129
192
|
readonly hp: number;
|
|
130
193
|
} | {
|
|
131
194
|
readonly name: 'kill';
|
|
132
|
-
readonly target
|
|
195
|
+
readonly target?: string;
|
|
196
|
+
readonly filter?: Readonly<Record<string, string>>;
|
|
133
197
|
} | {
|
|
134
198
|
readonly name: 'attack';
|
|
135
199
|
readonly target: string;
|
|
136
200
|
readonly amount: number;
|
|
137
201
|
} | {
|
|
138
202
|
readonly name: 'end_turn';
|
|
139
|
-
}
|
|
203
|
+
}
|
|
204
|
+
/** `side` records which side won or lost in `world.sideStatus`; the scenario status follows */
|
|
205
|
+
| {
|
|
140
206
|
readonly name: 'win';
|
|
207
|
+
readonly side?: string;
|
|
141
208
|
} | {
|
|
142
209
|
readonly name: 'lose';
|
|
210
|
+
readonly side?: string;
|
|
211
|
+
} | {
|
|
212
|
+
readonly name: 'endlevel';
|
|
213
|
+
readonly result: 'victory' | 'defeat';
|
|
214
|
+
/** whose gold and units are carried; without it, the result is recorded and nothing moves */
|
|
215
|
+
readonly side?: MwlSideRef;
|
|
216
|
+
readonly bonus?: number;
|
|
217
|
+
readonly carryoverPercentage?: number;
|
|
218
|
+
readonly carryoverAdd?: boolean;
|
|
219
|
+
readonly nextScenario?: string | null;
|
|
143
220
|
};
|
|
221
|
+
/**
|
|
222
|
+
* A fresh, empty world: no sides, units, maps or variables, at turn 1 and `playing`.
|
|
223
|
+
*
|
|
224
|
+
* @example
|
|
225
|
+
* ```ts
|
|
226
|
+
* import { createWorld } from '@datamoc/mw_games/mwl';
|
|
227
|
+
*
|
|
228
|
+
* const world = createWorld();
|
|
229
|
+
* console.log(world.turn, world.status); // 1 'playing'
|
|
230
|
+
* ```
|
|
231
|
+
*/
|
|
144
232
|
export declare function createWorld(): MwlWorld;
|
|
145
233
|
/**
|
|
146
234
|
* Parse map text: one row per line, comma-separated codes. A token may be
|
|
147
235
|
* `<side> <code>` to mark that side's keep/start, which is how a leader knows
|
|
148
236
|
* where to appear.
|
|
237
|
+
*
|
|
238
|
+
* @example
|
|
239
|
+
* ```ts
|
|
240
|
+
* import { parseTerrain } from '@datamoc/mw_games/mwl';
|
|
241
|
+
*
|
|
242
|
+
* const map = parseTerrain('Gg,Gg\nGg,1 Kh');
|
|
243
|
+
* console.log(map.width, map.starts['1']); // 2 [{ x: 1, y: 1 }]
|
|
244
|
+
* ```
|
|
149
245
|
*/
|
|
150
246
|
export declare function parseTerrain(text: string): {
|
|
151
247
|
width: number;
|
|
152
248
|
height: number;
|
|
153
249
|
codes: string[];
|
|
154
|
-
starts: Record<
|
|
250
|
+
starts: Record<string, {
|
|
155
251
|
x: number;
|
|
156
252
|
y: number;
|
|
157
253
|
}[]>;
|
|
@@ -164,6 +260,16 @@ export declare function parseTerrain(text: string): {
|
|
|
164
260
|
* real data (pathfinding costs, combat formulas) stay in the engine adapter;
|
|
165
261
|
* this runtime's `move` is a bounds and occupancy check, and `attack` applies
|
|
166
262
|
* the amount the content asks for.
|
|
263
|
+
*
|
|
264
|
+
* @example
|
|
265
|
+
* ```ts
|
|
266
|
+
* import { compile, MwlRuntime } from '@datamoc/mw_games/mwl';
|
|
267
|
+
*
|
|
268
|
+
* const runtime = new MwlRuntime(compile('[game]\nschema=0.1\n[/game]'), {
|
|
269
|
+
* resolveMap: () => 'Gg,Gg\nGg,Gg',
|
|
270
|
+
* });
|
|
271
|
+
* console.log(runtime.world.turn); // 1
|
|
272
|
+
* ```
|
|
167
273
|
*/
|
|
168
274
|
export declare class MwlRuntime {
|
|
169
275
|
readonly game: MwlCompiledGame;
|
|
@@ -196,6 +302,19 @@ export declare class MwlRuntime {
|
|
|
196
302
|
private claimEvent;
|
|
197
303
|
private eventFiltersMatch;
|
|
198
304
|
private executeEvent;
|
|
305
|
+
/**
|
|
306
|
+
* Runs a sequence of commands, with `say` and `dialogue` taking the message path rather
|
|
307
|
+
* than `executeNode`. Shared by an event's top level, an `[if]`/`[else]` body and a
|
|
308
|
+
* dialogue branch, so all three treat a nested pair the same way.
|
|
309
|
+
*/
|
|
310
|
+
private runBlock;
|
|
311
|
+
/**
|
|
312
|
+
* Whether an `[else]` at `index` is the branch its immediately preceding `[if]` already ran.
|
|
313
|
+
* A taken `[if]` runs its own body and owns the `[else]`, so the loop skips that `[else]`;
|
|
314
|
+
* a false `[if]` ran nothing, so the `[else]` is left for the loop to run as its fallback.
|
|
315
|
+
* A free-standing `[else]` with no `[if]` before it is never consumed.
|
|
316
|
+
*/
|
|
317
|
+
private isConsumedElse;
|
|
199
318
|
private executeTracedEvent;
|
|
200
319
|
/**
|
|
201
320
|
* Deliver a `dialogue`: its `message`/`say` lines first, then one message
|
|
@@ -225,11 +344,27 @@ export declare class MwlRuntime {
|
|
|
225
344
|
private loadUnitTypes;
|
|
226
345
|
private loadSchedule;
|
|
227
346
|
private loadInitialContent;
|
|
347
|
+
/** Direct children of `[game]` with a tag, as opposed to `nodes` which searches the whole tree. */
|
|
348
|
+
private topLevelNodes;
|
|
349
|
+
/**
|
|
350
|
+
* Scenario-level data that is not a side, a map or a unit: `[object]` placements, the `[story]`
|
|
351
|
+
* beats, and the `[role]` table. Kept as plain data on the world - the framework sequences and
|
|
352
|
+
* serialises it, and the game decides what an object does, what a story beat looks like, and
|
|
353
|
+
* what a role is for.
|
|
354
|
+
*/
|
|
355
|
+
private loadScenarioExtras;
|
|
228
356
|
private buildMap;
|
|
229
357
|
private loadInitialUnits;
|
|
230
358
|
private loadLeaders;
|
|
231
359
|
private unitAt;
|
|
232
360
|
private executeNode;
|
|
361
|
+
/**
|
|
362
|
+
* A node's children that are commands to run, dropping the condition children the schema
|
|
363
|
+
* allows a branch to carry. A `[condition]` is read by the branch itself, never executed:
|
|
364
|
+
* `[if]`/`[while]` evaluate one through `nodeConditionMatches`, where running it as a command
|
|
365
|
+
* would be an unknown tag.
|
|
366
|
+
*/
|
|
367
|
+
private commandChildren;
|
|
233
368
|
private runHook;
|
|
234
369
|
private applyMove;
|
|
235
370
|
/** Deliver a `[message]` to the game, with speaker and portrait when given. */
|
|
@@ -245,8 +380,29 @@ export declare class MwlRuntime {
|
|
|
245
380
|
private setVariableAt;
|
|
246
381
|
private spawnUnit;
|
|
247
382
|
private killUnit;
|
|
383
|
+
/**
|
|
384
|
+
* Live units a command's filter selects: its `[filter]` child when it has one, otherwise its
|
|
385
|
+
* own attributes, read by the same `unitMatchesFilter` an event filter and `[kill]` use. An
|
|
386
|
+
* empty filter matches every live unit, the rule `[kill]` already documents.
|
|
387
|
+
*/
|
|
388
|
+
private matchingUnits;
|
|
389
|
+
/** The unit snapshots `[store_unit]` wrote into a world variable, or a named content error. */
|
|
390
|
+
private storedUnits;
|
|
391
|
+
/** Writes a stored snapshot back into the world, applying any placement overrides. */
|
|
392
|
+
private restoreUnit;
|
|
393
|
+
/** Changes one cell of the primary map, keeping the parsed grid and its size in step. */
|
|
394
|
+
private setTerrain;
|
|
248
395
|
private addGold;
|
|
249
396
|
private endTurn;
|
|
397
|
+
/**
|
|
398
|
+
* Wesnoth's "time over", as a framework native: once the scenario's `turn_limit` has passed,
|
|
399
|
+
* `time_over` becomes a variable content can test and an event trigger it can answer. The
|
|
400
|
+
* framework reports it rather than ending anything, because a turn limit is usually a defeat and
|
|
401
|
+
* occasionally the whole point of the scenario ("hold out until then"), so what it means is
|
|
402
|
+
* content's business - `[endlevel]` is right there for it. Fired once, and derived from the turn
|
|
403
|
+
* counter rather than kept in step with it.
|
|
404
|
+
*/
|
|
405
|
+
private checkTimeOver;
|
|
250
406
|
private advanceSchedule;
|
|
251
407
|
private resetMoves;
|
|
252
408
|
private filterMatches;
|
|
@@ -266,12 +422,61 @@ export declare class MwlRuntime {
|
|
|
266
422
|
* hold for the event to fire.
|
|
267
423
|
*/
|
|
268
424
|
private filterConditionMatches;
|
|
425
|
+
/**
|
|
426
|
+
* Whether one objective's condition holds. `defaultSide` is the side whose own
|
|
427
|
+
* `[victory]`/`[defeat]` node this is, so a condition that names no side (a side losing
|
|
428
|
+
* when its own units are gone) reads as that side rather than as nobody.
|
|
429
|
+
*/
|
|
269
430
|
private conditionMet;
|
|
431
|
+
/**
|
|
432
|
+
* Evaluates the scenario-wide `[objectives]` conditions first, exactly as before, then each
|
|
433
|
+
* side's own `[victory]`/`[defeat]` children. The scenario ends on the first side whose own
|
|
434
|
+
* condition fires, recording that side in `world.sideStatus`; a side's victory outranks
|
|
435
|
+
* another side's defeat when both fire in the same evaluation, which is the same precedence
|
|
436
|
+
* the scenario-wide pair has always had. A side condition with no `side`/`side_filter` reads
|
|
437
|
+
* as that side's own, so "this side loses when it has no units left" is written without
|
|
438
|
+
* repeating the id.
|
|
439
|
+
*/
|
|
270
440
|
private checkObjectives;
|
|
441
|
+
/** Records one side's own result; the scenario status is set by whichever side fired first. */
|
|
442
|
+
private markSideResult;
|
|
271
443
|
private worldView;
|
|
272
444
|
private emit;
|
|
273
445
|
private attack;
|
|
274
446
|
private nodes;
|
|
275
447
|
}
|
|
448
|
+
/**
|
|
449
|
+
* Applies one already-validated `MwlCommand` to a world, without a runtime around it.
|
|
450
|
+
*
|
|
451
|
+
* @example
|
|
452
|
+
* ```ts
|
|
453
|
+
* import { createWorld, execute } from '@datamoc/mw_games/mwl';
|
|
454
|
+
*
|
|
455
|
+
* const world = createWorld();
|
|
456
|
+
* execute(world, { name: 'set_variable', target: 'gold', value: 50 });
|
|
457
|
+
* console.log(world.variables.gold); // 50
|
|
458
|
+
* ```
|
|
459
|
+
*/
|
|
276
460
|
export declare function execute(world: MwlWorld, command: MwlCommand): void;
|
|
461
|
+
/**
|
|
462
|
+
* The sides a scenario's content says see together, as groups ready for `FactionFog.share`.
|
|
463
|
+
*
|
|
464
|
+
* Wesnoth groups sides into teams with `[side] team_name`, and `share_vision` says whether a side
|
|
465
|
+
* shares what it sees with its team. `none` does not; `all` and `shroud` are treated alike here
|
|
466
|
+
* because `FactionFog` shares sight and memory as one thing rather than keeping them apart, and a
|
|
467
|
+
* fog that separated them would be the place to tell the two apart. A side with no `team_name`
|
|
468
|
+
* shares with nobody, and a team of one is not returned, since sharing with nobody is what it
|
|
469
|
+
* already does.
|
|
470
|
+
*
|
|
471
|
+
* @example
|
|
472
|
+
* ```ts
|
|
473
|
+
* import { sideVisionGroups, type MwlWorld } from '@datamoc/mw_games/mwl';
|
|
474
|
+
*
|
|
475
|
+
* declare const world: MwlWorld;
|
|
476
|
+
*
|
|
477
|
+
* // sides 1 and 2 both wrote team_name=north, and side 3 asked for share_vision=none
|
|
478
|
+
* console.log(sideVisionGroups(world)); // [['1', '2']]
|
|
479
|
+
* ```
|
|
480
|
+
*/
|
|
481
|
+
export declare function sideVisionGroups(world: MwlWorld): readonly (readonly string[])[];
|
|
277
482
|
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/mwl/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,KAAK,EACX,MAAM,EACN,WAAW,EAEX,aAAa,EAEb,aAAa,EACb,YAAY,EACZ,aAAa,EACb,MAAM,YAAY,CAAC;AACpB,OAAO,EAA0B,KAAK,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/mwl/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,eAA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