@almadar/std 16.108.0 → 16.109.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 (90) hide show
  1. package/behaviors/registry/ui/game/2d/organisms/ui-battle-board.orb +213 -125
  2. package/behaviors/registry/ui/game/2d/organisms/ui-fishing-board.orb +2302 -705
  3. package/behaviors/registry/ui/game/2d/organisms/ui-minigolf-board.orb +7872 -1934
  4. package/behaviors/registry/ui/game/2d/organisms/ui-pinball-board.orb +2739 -3050
  5. package/behaviors/registry/ui/game/2d/organisms/ui-roguelike-board.orb +5204 -2967
  6. package/behaviors/registry/ui/game/2d/organisms/ui-sokoban-board.orb +3330 -1619
  7. package/behaviors/registry/ui/game/2d/organisms/ui-space-shmup-board.orb +4637 -4059
  8. package/behaviors/registry/ui/game/2d/organisms/ui-tanks-board.orb +76 -103
  9. package/behaviors/registry/ui/game/2d/organisms/ui-topdown-dungeon-board.orb +4579 -4356
  10. package/behaviors/registry/ui/game/2d/organisms/ui-uncontrolled-battle-board.orb +1164 -2247
  11. package/behaviors/registry/ui/game/2d/organisms/ui-winter-ski-board.orb +4573 -4553
  12. package/behaviors/registry/ui/game/3d/organisms/ui-arcade-board-3d.orb +379 -2
  13. package/behaviors/registry/ui/game/3d/organisms/ui-brick-sandbox-board-3d.orb +168 -1
  14. package/behaviors/registry/ui/game/3d/organisms/ui-city-board-3d.orb +801 -169
  15. package/behaviors/registry/ui/game/3d/organisms/ui-fantasy-town-board-3d.orb +1666 -702
  16. package/behaviors/registry/ui/game/3d/organisms/ui-game-board-3d.orb +1323 -514
  17. package/behaviors/registry/ui/game/3d/organisms/ui-graveyard-board-3d.orb +1186 -384
  18. package/behaviors/registry/ui/game/3d/organisms/ui-hex-strategy-board-3d.orb +342 -170
  19. package/behaviors/registry/ui/game/3d/organisms/ui-holiday-board-3d.orb +509 -3
  20. package/behaviors/registry/ui/game/3d/organisms/ui-market-board-3d.orb +632 -419
  21. package/behaviors/registry/ui/game/3d/organisms/ui-minigolf-board-3d.orb +503 -145
  22. package/behaviors/registry/ui/game/3d/organisms/ui-nature-survival-board-3d.orb +1157 -134
  23. package/behaviors/registry/ui/game/3d/organisms/ui-pirate-board-3d.orb +1203 -383
  24. package/behaviors/registry/ui/game/3d/organisms/ui-platformer-board-3d.orb +1157 -205
  25. package/behaviors/registry/ui/game/3d/organisms/ui-racing-board-3d.orb +656 -565
  26. package/behaviors/registry/ui/game/3d/organisms/ui-skatepark-board-3d.orb +1205 -137
  27. package/behaviors/registry/ui/game/3d/organisms/ui-space-board-3d.orb +1333 -513
  28. package/behaviors/registry/ui/game/3d/organisms/ui-tower-defense-board-3d.orb +332 -7
  29. package/behaviors/registry/ui/game/3d/organisms/ui-toy-track-board-3d.orb +1202 -287
  30. package/dist/behaviors/behaviors-registry.json +282 -273
  31. package/dist/behaviors/registry/ui/game/2d/organisms/ui-battle-board.orb +213 -125
  32. package/dist/behaviors/registry/ui/game/2d/organisms/ui-fishing-board.orb +2302 -705
  33. package/dist/behaviors/registry/ui/game/2d/organisms/ui-minigolf-board.orb +7872 -1934
  34. package/dist/behaviors/registry/ui/game/2d/organisms/ui-pinball-board.orb +2739 -3050
  35. package/dist/behaviors/registry/ui/game/2d/organisms/ui-roguelike-board.orb +5204 -2967
  36. package/dist/behaviors/registry/ui/game/2d/organisms/ui-sokoban-board.orb +3330 -1619
  37. package/dist/behaviors/registry/ui/game/2d/organisms/ui-space-shmup-board.orb +4637 -4059
  38. package/dist/behaviors/registry/ui/game/2d/organisms/ui-tanks-board.orb +76 -103
  39. package/dist/behaviors/registry/ui/game/2d/organisms/ui-topdown-dungeon-board.orb +4579 -4356
  40. package/dist/behaviors/registry/ui/game/2d/organisms/ui-uncontrolled-battle-board.orb +1164 -2247
  41. package/dist/behaviors/registry/ui/game/2d/organisms/ui-winter-ski-board.orb +4573 -4553
  42. package/dist/behaviors/registry/ui/game/3d/organisms/ui-arcade-board-3d.orb +379 -2
  43. package/dist/behaviors/registry/ui/game/3d/organisms/ui-brick-sandbox-board-3d.orb +168 -1
  44. package/dist/behaviors/registry/ui/game/3d/organisms/ui-city-board-3d.orb +801 -169
  45. package/dist/behaviors/registry/ui/game/3d/organisms/ui-fantasy-town-board-3d.orb +1666 -702
  46. package/dist/behaviors/registry/ui/game/3d/organisms/ui-game-board-3d.orb +1323 -514
  47. package/dist/behaviors/registry/ui/game/3d/organisms/ui-graveyard-board-3d.orb +1186 -384
  48. package/dist/behaviors/registry/ui/game/3d/organisms/ui-hex-strategy-board-3d.orb +342 -170
  49. package/dist/behaviors/registry/ui/game/3d/organisms/ui-holiday-board-3d.orb +509 -3
  50. package/dist/behaviors/registry/ui/game/3d/organisms/ui-market-board-3d.orb +632 -419
  51. package/dist/behaviors/registry/ui/game/3d/organisms/ui-minigolf-board-3d.orb +503 -145
  52. package/dist/behaviors/registry/ui/game/3d/organisms/ui-nature-survival-board-3d.orb +1157 -134
  53. package/dist/behaviors/registry/ui/game/3d/organisms/ui-pirate-board-3d.orb +1203 -383
  54. package/dist/behaviors/registry/ui/game/3d/organisms/ui-platformer-board-3d.orb +1157 -205
  55. package/dist/behaviors/registry/ui/game/3d/organisms/ui-racing-board-3d.orb +656 -565
  56. package/dist/behaviors/registry/ui/game/3d/organisms/ui-skatepark-board-3d.orb +1205 -137
  57. package/dist/behaviors/registry/ui/game/3d/organisms/ui-space-board-3d.orb +1333 -513
  58. package/dist/behaviors/registry/ui/game/3d/organisms/ui-tower-defense-board-3d.orb +332 -7
  59. package/dist/behaviors/registry/ui/game/3d/organisms/ui-toy-track-board-3d.orb +1202 -287
  60. package/dist/behaviors-registry.json +282 -273
  61. package/dist/registry/ui/game/2d/organisms/ui-battle-board.orb +213 -125
  62. package/dist/registry/ui/game/2d/organisms/ui-fishing-board.orb +2302 -705
  63. package/dist/registry/ui/game/2d/organisms/ui-minigolf-board.orb +7872 -1934
  64. package/dist/registry/ui/game/2d/organisms/ui-pinball-board.orb +2739 -3050
  65. package/dist/registry/ui/game/2d/organisms/ui-roguelike-board.orb +5204 -2967
  66. package/dist/registry/ui/game/2d/organisms/ui-sokoban-board.orb +3330 -1619
  67. package/dist/registry/ui/game/2d/organisms/ui-space-shmup-board.orb +4637 -4059
  68. package/dist/registry/ui/game/2d/organisms/ui-tanks-board.orb +76 -103
  69. package/dist/registry/ui/game/2d/organisms/ui-topdown-dungeon-board.orb +4579 -4356
  70. package/dist/registry/ui/game/2d/organisms/ui-uncontrolled-battle-board.orb +1164 -2247
  71. package/dist/registry/ui/game/2d/organisms/ui-winter-ski-board.orb +4573 -4553
  72. package/dist/registry/ui/game/3d/organisms/ui-arcade-board-3d.orb +379 -2
  73. package/dist/registry/ui/game/3d/organisms/ui-brick-sandbox-board-3d.orb +168 -1
  74. package/dist/registry/ui/game/3d/organisms/ui-city-board-3d.orb +801 -169
  75. package/dist/registry/ui/game/3d/organisms/ui-fantasy-town-board-3d.orb +1666 -702
  76. package/dist/registry/ui/game/3d/organisms/ui-game-board-3d.orb +1323 -514
  77. package/dist/registry/ui/game/3d/organisms/ui-graveyard-board-3d.orb +1186 -384
  78. package/dist/registry/ui/game/3d/organisms/ui-hex-strategy-board-3d.orb +342 -170
  79. package/dist/registry/ui/game/3d/organisms/ui-holiday-board-3d.orb +509 -3
  80. package/dist/registry/ui/game/3d/organisms/ui-market-board-3d.orb +632 -419
  81. package/dist/registry/ui/game/3d/organisms/ui-minigolf-board-3d.orb +503 -145
  82. package/dist/registry/ui/game/3d/organisms/ui-nature-survival-board-3d.orb +1157 -134
  83. package/dist/registry/ui/game/3d/organisms/ui-pirate-board-3d.orb +1203 -383
  84. package/dist/registry/ui/game/3d/organisms/ui-platformer-board-3d.orb +1157 -205
  85. package/dist/registry/ui/game/3d/organisms/ui-racing-board-3d.orb +656 -565
  86. package/dist/registry/ui/game/3d/organisms/ui-skatepark-board-3d.orb +1205 -137
  87. package/dist/registry/ui/game/3d/organisms/ui-space-board-3d.orb +1333 -513
  88. package/dist/registry/ui/game/3d/organisms/ui-tower-defense-board-3d.orb +332 -7
  89. package/dist/registry/ui/game/3d/organisms/ui-toy-track-board-3d.orb +1202 -287
  90. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  {
2
- "description": "HolidayBoard3D — snowy 3D grid board: nutcracker collects gifts while a reindeer wanders; game-shell + game-canvas-3d.",
2
+ "description": "HolidayBoard3D — snowy 3D grid board: nutcracker collects gifts within a move budget or loses; restart to retry.",
3
3
  "name": "ui-holiday-board-3d",
4
4
  "orbitals": [
5
5
  {
@@ -243,6 +243,51 @@
243
243
  "name": "validMoves",
244
244
  "type": "array"
245
245
  },
246
+ {
247
+ "default": [],
248
+ "items": {
249
+ "properties": {
250
+ "id": {
251
+ "name": "id",
252
+ "required": true,
253
+ "type": "string"
254
+ },
255
+ "message": {
256
+ "name": "message",
257
+ "required": false,
258
+ "type": "string"
259
+ },
260
+ "ttl": {
261
+ "name": "ttl",
262
+ "required": true,
263
+ "type": "number"
264
+ },
265
+ "type": {
266
+ "name": "type",
267
+ "required": true,
268
+ "type": "string"
269
+ },
270
+ "x": {
271
+ "name": "x",
272
+ "required": true,
273
+ "type": "number"
274
+ },
275
+ "y": {
276
+ "name": "y",
277
+ "required": false,
278
+ "type": "number"
279
+ },
280
+ "z": {
281
+ "name": "z",
282
+ "required": false,
283
+ "type": "number"
284
+ }
285
+ },
286
+ "type": "object"
287
+ },
288
+ "name": "fx",
289
+ "type": "array"
290
+ },
246
291
  {
247
292
  "default": "observation",
248
293
  "name": "phase",
@@ -258,7 +303,8 @@
258
303
  "type": "string",
259
304
  "values": [
260
305
  "none",
261
- "won"
306
+ "won",
307
+ "lost"
262
308
  ]
263
309
  },
264
310
  {
@@ -271,6 +317,11 @@
271
317
  "name": "giftsLeft",
272
318
  "type": "number"
273
319
  },
320
+ {
321
+ "default": 12.0,
322
+ "name": "movesLeft",
323
+ "type": "number"
324
+ },
274
325
  {
275
326
  "default": 5.0,
276
327
  "name": "gridWidth",
@@ -581,6 +632,13 @@
581
632
  "tier": "presentation",
582
633
  "type": "boolean"
583
634
  },
635
+ "moveBudget": {
636
+ "default": 12.0,
637
+ "description": "Moves allowed before the round is lost if gifts remain",
638
+ "label": "Move Budget",
639
+ "tier": "presentation",
640
+ "type": "number"
641
+ },
584
642
  "scale": {
585
643
  "default": 0.45,
586
644
  "description": "Canvas render scale",
@@ -1463,10 +1521,12 @@
1463
1521
  "entityContract": {
1464
1522
  "provides": [
1465
1523
  "features",
1524
+ "fx",
1466
1525
  "giftsLeft",
1467
1526
  "gridHeight",
1468
1527
  "gridWidth",
1469
1528
  "movementRange",
1529
+ "movesLeft",
1470
1530
  "phase",
1471
1531
  "result",
1472
1532
  "score",
@@ -1582,6 +1642,11 @@
1582
1642
  "@entity.validMoves",
1583
1643
  []
1584
1644
  ],
1645
+ [
1646
+ "set",
1647
+ "@entity.fx",
1648
+ []
1649
+ ],
1585
1650
  [
1586
1651
  "set",
1587
1652
  "@entity.phase",
@@ -1602,6 +1667,11 @@
1602
1667
  "@entity.giftsLeft",
1603
1668
  4.0
1604
1669
  ],
1670
+ [
1671
+ "set",
1672
+ "@entity.movesLeft",
1673
+ "@config.moveBudget"
1674
+ ],
1605
1675
  [
1606
1676
  "set",
1607
1677
  "@entity.gridWidth",
@@ -1621,8 +1691,28 @@
1621
1691
  "render-ui",
1622
1692
  "main",
1623
1693
  {
1694
+ "addons": {
1695
+ "children": [
1696
+ {
1697
+ "action": "CANCEL",
1698
+ "label": "Cancel",
1699
+ "type": "button",
1700
+ "variant": "secondary"
1701
+ },
1702
+ {
1703
+ "action": "PLAY_AGAIN",
1704
+ "label": "Restart",
1705
+ "type": "button",
1706
+ "variant": "secondary"
1707
+ }
1708
+ ],
1709
+ "direction": "vertical",
1710
+ "gap": "sm",
1711
+ "type": "stack"
1712
+ },
1624
1713
  "children": [
1625
1714
  {
1715
+ "events": "@entity.fx",
1626
1716
  "features": "@entity.features",
1627
1717
  "scale": "@config.scale",
1628
1718
  "selectedUnitId": "@entity.selectedUnitId",
@@ -1645,6 +1735,10 @@
1645
1735
  "label": "Gifts Left",
1646
1736
  "value": "@entity.giftsLeft"
1647
1737
  },
1738
+ {
1739
+ "label": "Moves",
1740
+ "value": "@entity.movesLeft"
1741
+ },
1648
1742
  {
1649
1743
  "label": "Result",
1650
1744
  "value": "@entity.result"
@@ -1652,6 +1746,38 @@
1652
1746
  ],
1653
1747
  "type": "game-hud"
1654
1748
  },
1749
+ "overlay": [
1750
+ "if",
1751
+ [
1752
+ "!=",
1753
+ "@entity.result",
1754
+ "none"
1755
+ ],
1756
+ {
1757
+ "align": "center",
1758
+ "children": [
1759
+ {
1760
+ "stats": [
1761
+ {
1762
+ "label": "Result",
1763
+ "value": "@entity.result"
1764
+ }
1765
+ ],
1766
+ "type": "game-hud"
1767
+ },
1768
+ {
1769
+ "action": "PLAY_AGAIN",
1770
+ "label": "Play Again",
1771
+ "type": "button",
1772
+ "variant": "primary"
1773
+ }
1774
+ ],
1775
+ "direction": "vertical",
1776
+ "gap": "md",
1777
+ "type": "stack"
1778
+ },
1779
+ null
1780
+ ],
1655
1781
  "type": "game-shell"
1656
1782
  }
1657
1783
  ]
@@ -1810,8 +1936,28 @@
1810
1936
  "render-ui",
1811
1937
  "main",
1812
1938
  {
1939
+ "addons": {
1940
+ "children": [
1941
+ {
1942
+ "action": "CANCEL",
1943
+ "label": "Cancel",
1944
+ "type": "button",
1945
+ "variant": "secondary"
1946
+ },
1947
+ {
1948
+ "action": "PLAY_AGAIN",
1949
+ "label": "Restart",
1950
+ "type": "button",
1951
+ "variant": "secondary"
1952
+ }
1953
+ ],
1954
+ "direction": "vertical",
1955
+ "gap": "sm",
1956
+ "type": "stack"
1957
+ },
1813
1958
  "children": [
1814
1959
  {
1960
+ "events": "@entity.fx",
1815
1961
  "features": "@entity.features",
1816
1962
  "scale": "@config.scale",
1817
1963
  "selectedUnitId": "@entity.selectedUnitId",
@@ -1834,6 +1980,10 @@
1834
1980
  "label": "Gifts Left",
1835
1981
  "value": "@entity.giftsLeft"
1836
1982
  },
1983
+ {
1984
+ "label": "Moves",
1985
+ "value": "@entity.movesLeft"
1986
+ },
1837
1987
  {
1838
1988
  "label": "Result",
1839
1989
  "value": "@entity.result"
@@ -1841,6 +1991,38 @@
1841
1991
  ],
1842
1992
  "type": "game-hud"
1843
1993
  },
1994
+ "overlay": [
1995
+ "if",
1996
+ [
1997
+ "!=",
1998
+ "@entity.result",
1999
+ "none"
2000
+ ],
2001
+ {
2002
+ "align": "center",
2003
+ "children": [
2004
+ {
2005
+ "stats": [
2006
+ {
2007
+ "label": "Result",
2008
+ "value": "@entity.result"
2009
+ }
2010
+ ],
2011
+ "type": "game-hud"
2012
+ },
2013
+ {
2014
+ "action": "PLAY_AGAIN",
2015
+ "label": "Play Again",
2016
+ "type": "button",
2017
+ "variant": "primary"
2018
+ }
2019
+ ],
2020
+ "direction": "vertical",
2021
+ "gap": "md",
2022
+ "type": "stack"
2023
+ },
2024
+ null
2025
+ ],
1844
2026
  "type": "game-shell"
1845
2027
  }
1846
2028
  ]
@@ -1957,6 +2139,14 @@
1957
2139
  ],
1958
2140
  "@entity.giftsLeft"
1959
2141
  ]
2142
+ ],
2143
+ [
2144
+ "newMovesLeft",
2145
+ [
2146
+ "-",
2147
+ "@entity.movesLeft",
2148
+ 1.0
2149
+ ]
1960
2150
  ]
1961
2151
  ],
1962
2152
  [
@@ -2033,6 +2223,36 @@
2033
2223
  "@entity.giftsLeft",
2034
2224
  "@newGiftsLeft"
2035
2225
  ],
2226
+ [
2227
+ "set",
2228
+ "@entity.movesLeft",
2229
+ "@newMovesLeft"
2230
+ ],
2231
+ [
2232
+ "set",
2233
+ "@entity.fx",
2234
+ [
2235
+ "if",
2236
+ "@hasGift",
2237
+ [
2238
+ "array/append",
2239
+ "@entity.fx",
2240
+ {
2241
+ "id": [
2242
+ "str/concat",
2243
+ "fx-",
2244
+ "@hitId"
2245
+ ],
2246
+ "message": "+1",
2247
+ "ttl": 3.0,
2248
+ "type": "pickup",
2249
+ "x": "@payload.x",
2250
+ "z": "@payload.z"
2251
+ }
2252
+ ],
2253
+ "@entity.fx"
2254
+ ]
2255
+ ],
2036
2256
  [
2037
2257
  "set",
2038
2258
  "@entity.selectedUnitId",
@@ -2059,15 +2279,44 @@
2059
2279
  0.0
2060
2280
  ],
2061
2281
  "won",
2062
- "none"
2282
+ [
2283
+ "if",
2284
+ [
2285
+ "<=",
2286
+ "@newMovesLeft",
2287
+ 0.0
2288
+ ],
2289
+ "lost",
2290
+ "none"
2291
+ ]
2063
2292
  ]
2064
2293
  ],
2065
2294
  [
2066
2295
  "render-ui",
2067
2296
  "main",
2068
2297
  {
2298
+ "addons": {
2299
+ "children": [
2300
+ {
2301
+ "action": "CANCEL",
2302
+ "label": "Cancel",
2303
+ "type": "button",
2304
+ "variant": "secondary"
2305
+ },
2306
+ {
2307
+ "action": "PLAY_AGAIN",
2308
+ "label": "Restart",
2309
+ "type": "button",
2310
+ "variant": "secondary"
2311
+ }
2312
+ ],
2313
+ "direction": "vertical",
2314
+ "gap": "sm",
2315
+ "type": "stack"
2316
+ },
2069
2317
  "children": [
2070
2318
  {
2319
+ "events": "@entity.fx",
2071
2320
  "features": "@entity.features",
2072
2321
  "scale": "@config.scale",
2073
2322
  "selectedUnitId": "@entity.selectedUnitId",
@@ -2090,6 +2339,10 @@
2090
2339
  "label": "Gifts Left",
2091
2340
  "value": "@entity.giftsLeft"
2092
2341
  },
2342
+ {
2343
+ "label": "Moves",
2344
+ "value": "@entity.movesLeft"
2345
+ },
2093
2346
  {
2094
2347
  "label": "Result",
2095
2348
  "value": "@entity.result"
@@ -2097,6 +2350,38 @@
2097
2350
  ],
2098
2351
  "type": "game-hud"
2099
2352
  },
2353
+ "overlay": [
2354
+ "if",
2355
+ [
2356
+ "!=",
2357
+ "@entity.result",
2358
+ "none"
2359
+ ],
2360
+ {
2361
+ "align": "center",
2362
+ "children": [
2363
+ {
2364
+ "stats": [
2365
+ {
2366
+ "label": "Result",
2367
+ "value": "@entity.result"
2368
+ }
2369
+ ],
2370
+ "type": "game-hud"
2371
+ },
2372
+ {
2373
+ "action": "PLAY_AGAIN",
2374
+ "label": "Play Again",
2375
+ "type": "button",
2376
+ "variant": "primary"
2377
+ }
2378
+ ],
2379
+ "direction": "vertical",
2380
+ "gap": "md",
2381
+ "type": "stack"
2382
+ },
2383
+ null
2384
+ ],
2100
2385
  "type": "game-shell"
2101
2386
  }
2102
2387
  ]
@@ -2233,8 +2518,28 @@
2233
2518
  "render-ui",
2234
2519
  "main",
2235
2520
  {
2521
+ "addons": {
2522
+ "children": [
2523
+ {
2524
+ "action": "CANCEL",
2525
+ "label": "Cancel",
2526
+ "type": "button",
2527
+ "variant": "secondary"
2528
+ },
2529
+ {
2530
+ "action": "PLAY_AGAIN",
2531
+ "label": "Restart",
2532
+ "type": "button",
2533
+ "variant": "secondary"
2534
+ }
2535
+ ],
2536
+ "direction": "vertical",
2537
+ "gap": "sm",
2538
+ "type": "stack"
2539
+ },
2236
2540
  "children": [
2237
2541
  {
2542
+ "events": "@entity.fx",
2238
2543
  "features": "@entity.features",
2239
2544
  "scale": "@config.scale",
2240
2545
  "selectedUnitId": "@entity.selectedUnitId",
@@ -2257,6 +2562,10 @@
2257
2562
  "label": "Gifts Left",
2258
2563
  "value": "@entity.giftsLeft"
2259
2564
  },
2565
+ {
2566
+ "label": "Moves",
2567
+ "value": "@entity.movesLeft"
2568
+ },
2260
2569
  {
2261
2570
  "label": "Result",
2262
2571
  "value": "@entity.result"
@@ -2264,6 +2573,38 @@
2264
2573
  ],
2265
2574
  "type": "game-hud"
2266
2575
  },
2576
+ "overlay": [
2577
+ "if",
2578
+ [
2579
+ "!=",
2580
+ "@entity.result",
2581
+ "none"
2582
+ ],
2583
+ {
2584
+ "align": "center",
2585
+ "children": [
2586
+ {
2587
+ "stats": [
2588
+ {
2589
+ "label": "Result",
2590
+ "value": "@entity.result"
2591
+ }
2592
+ ],
2593
+ "type": "game-hud"
2594
+ },
2595
+ {
2596
+ "action": "PLAY_AGAIN",
2597
+ "label": "Play Again",
2598
+ "type": "button",
2599
+ "variant": "primary"
2600
+ }
2601
+ ],
2602
+ "direction": "vertical",
2603
+ "gap": "md",
2604
+ "type": "stack"
2605
+ },
2606
+ null
2607
+ ],
2267
2608
  "type": "game-shell"
2268
2609
  }
2269
2610
  ]
@@ -2299,6 +2640,11 @@
2299
2640
  "@entity.validMoves",
2300
2641
  []
2301
2642
  ],
2643
+ [
2644
+ "set",
2645
+ "@entity.fx",
2646
+ []
2647
+ ],
2302
2648
  [
2303
2649
  "set",
2304
2650
  "@entity.phase",
@@ -2319,12 +2665,37 @@
2319
2665
  "@entity.giftsLeft",
2320
2666
  4.0
2321
2667
  ],
2668
+ [
2669
+ "set",
2670
+ "@entity.movesLeft",
2671
+ "@config.moveBudget"
2672
+ ],
2322
2673
  [
2323
2674
  "render-ui",
2324
2675
  "main",
2325
2676
  {
2677
+ "addons": {
2678
+ "children": [
2679
+ {
2680
+ "action": "CANCEL",
2681
+ "label": "Cancel",
2682
+ "type": "button",
2683
+ "variant": "secondary"
2684
+ },
2685
+ {
2686
+ "action": "PLAY_AGAIN",
2687
+ "label": "Restart",
2688
+ "type": "button",
2689
+ "variant": "secondary"
2690
+ }
2691
+ ],
2692
+ "direction": "vertical",
2693
+ "gap": "sm",
2694
+ "type": "stack"
2695
+ },
2326
2696
  "children": [
2327
2697
  {
2698
+ "events": "@entity.fx",
2328
2699
  "features": "@entity.features",
2329
2700
  "scale": "@config.scale",
2330
2701
  "selectedUnitId": "@entity.selectedUnitId",
@@ -2347,6 +2718,10 @@
2347
2718
  "label": "Gifts Left",
2348
2719
  "value": "@entity.giftsLeft"
2349
2720
  },
2721
+ {
2722
+ "label": "Moves",
2723
+ "value": "@entity.movesLeft"
2724
+ },
2350
2725
  {
2351
2726
  "label": "Result",
2352
2727
  "value": "@entity.result"
@@ -2354,6 +2729,38 @@
2354
2729
  ],
2355
2730
  "type": "game-hud"
2356
2731
  },
2732
+ "overlay": [
2733
+ "if",
2734
+ [
2735
+ "!=",
2736
+ "@entity.result",
2737
+ "none"
2738
+ ],
2739
+ {
2740
+ "align": "center",
2741
+ "children": [
2742
+ {
2743
+ "stats": [
2744
+ {
2745
+ "label": "Result",
2746
+ "value": "@entity.result"
2747
+ }
2748
+ ],
2749
+ "type": "game-hud"
2750
+ },
2751
+ {
2752
+ "action": "PLAY_AGAIN",
2753
+ "label": "Play Again",
2754
+ "type": "button",
2755
+ "variant": "primary"
2756
+ }
2757
+ ],
2758
+ "direction": "vertical",
2759
+ "gap": "md",
2760
+ "type": "stack"
2761
+ },
2762
+ null
2763
+ ],
2357
2764
  "type": "game-shell"
2358
2765
  }
2359
2766
  ]
@@ -2662,12 +3069,75 @@
2662
3069
  "@entity.units"
2663
3070
  ]
2664
3071
  ],
3072
+ [
3073
+ "set",
3074
+ "@entity.fx",
3075
+ [
3076
+ "array/filter",
3077
+ [
3078
+ "array/map",
3079
+ "@entity.fx",
3080
+ [
3081
+ "fn",
3082
+ "e",
3083
+ [
3084
+ "object/merge",
3085
+ "@e",
3086
+ {
3087
+ "ttl": [
3088
+ "-",
3089
+ [
3090
+ "object/get",
3091
+ "@e",
3092
+ "ttl"
3093
+ ],
3094
+ 1.0
3095
+ ]
3096
+ }
3097
+ ]
3098
+ ]
3099
+ ],
3100
+ [
3101
+ "fn",
3102
+ "e",
3103
+ [
3104
+ ">",
3105
+ [
3106
+ "object/get",
3107
+ "@e",
3108
+ "ttl"
3109
+ ],
3110
+ 0.0
3111
+ ]
3112
+ ]
3113
+ ]
3114
+ ],
2665
3115
  [
2666
3116
  "render-ui",
2667
3117
  "main",
2668
3118
  {
3119
+ "addons": {
3120
+ "children": [
3121
+ {
3122
+ "action": "CANCEL",
3123
+ "label": "Cancel",
3124
+ "type": "button",
3125
+ "variant": "secondary"
3126
+ },
3127
+ {
3128
+ "action": "PLAY_AGAIN",
3129
+ "label": "Restart",
3130
+ "type": "button",
3131
+ "variant": "secondary"
3132
+ }
3133
+ ],
3134
+ "direction": "vertical",
3135
+ "gap": "sm",
3136
+ "type": "stack"
3137
+ },
2669
3138
  "children": [
2670
3139
  {
3140
+ "events": "@entity.fx",
2671
3141
  "features": "@entity.features",
2672
3142
  "scale": "@config.scale",
2673
3143
  "selectedUnitId": "@entity.selectedUnitId",
@@ -2690,6 +3160,10 @@
2690
3160
  "label": "Gifts Left",
2691
3161
  "value": "@entity.giftsLeft"
2692
3162
  },
3163
+ {
3164
+ "label": "Moves",
3165
+ "value": "@entity.movesLeft"
3166
+ },
2693
3167
  {
2694
3168
  "label": "Result",
2695
3169
  "value": "@entity.result"
@@ -2697,6 +3171,38 @@
2697
3171
  ],
2698
3172
  "type": "game-hud"
2699
3173
  },
3174
+ "overlay": [
3175
+ "if",
3176
+ [
3177
+ "!=",
3178
+ "@entity.result",
3179
+ "none"
3180
+ ],
3181
+ {
3182
+ "align": "center",
3183
+ "children": [
3184
+ {
3185
+ "stats": [
3186
+ {
3187
+ "label": "Result",
3188
+ "value": "@entity.result"
3189
+ }
3190
+ ],
3191
+ "type": "game-hud"
3192
+ },
3193
+ {
3194
+ "action": "PLAY_AGAIN",
3195
+ "label": "Play Again",
3196
+ "type": "button",
3197
+ "variant": "primary"
3198
+ }
3199
+ ],
3200
+ "direction": "vertical",
3201
+ "gap": "md",
3202
+ "type": "stack"
3203
+ },
3204
+ null
3205
+ ],
2700
3206
  "type": "game-shell"
2701
3207
  }
2702
3208
  ]