@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": "MinigolfBoard3D — 3D grid mini-golf board organism; putt an S-shaped fairway past obstacles into the hole within par.",
2
+ "description": "MinigolfBoard3D — grid mini-golf; putt one adjacent cell at a time along an S-shaped fairway past obstacles into the hole.",
3
3
  "name": "ui-minigolf-board-3d",
4
4
  "orbitals": [
5
5
  {
@@ -164,25 +164,6 @@
164
164
  "name": "validMoves",
165
165
  "type": "array"
166
166
  },
167
- {
168
- "items": {
169
- "properties": {
170
- "x": {
171
- "name": "x",
172
- "required": true,
173
- "type": "number"
174
- },
175
- "z": {
176
- "name": "z",
177
- "required": true,
178
- "type": "number"
179
- }
180
- },
181
- "type": "object"
182
- },
183
- "name": "attackTargets",
184
- "type": "array"
185
- },
186
167
  {
187
168
  "default": 0.0,
188
169
  "name": "strokes",
@@ -214,9 +195,54 @@
214
195
  "type": "number"
215
196
  },
216
197
  {
217
- "default": 2.0,
198
+ "default": 1.0,
218
199
  "name": "movementRange",
219
200
  "type": "number"
201
+ },
202
+ {
203
+ "default": [],
204
+ "items": {
205
+ "properties": {
206
+ "id": {
207
+ "name": "id",
208
+ "required": true,
209
+ "type": "string"
210
+ },
211
+ "message": {
212
+ "name": "message",
213
+ "required": false,
214
+ "type": "string"
215
+ },
216
+ "ttl": {
217
+ "name": "ttl",
218
+ "required": true,
219
+ "type": "number"
220
+ },
221
+ "type": {
222
+ "name": "type",
223
+ "required": true,
224
+ "type": "string"
225
+ },
226
+ "x": {
227
+ "name": "x",
228
+ "required": true,
229
+ "type": "number"
230
+ },
231
+ "y": {
232
+ "name": "y",
233
+ "required": false,
234
+ "type": "number"
235
+ },
236
+ "z": {
237
+ "name": "z",
238
+ "required": false,
239
+ "type": "number"
240
+ }
241
+ },
242
+ "type": "object"
243
+ },
244
+ "name": "fx",
245
+ "type": "array"
220
246
  }
221
247
  ],
222
248
  "name": "MinigolfBoard3DItem",
@@ -1492,7 +1518,7 @@
1492
1518
  },
1493
1519
  "emits": [
1494
1520
  {
1495
- "description": "Emits UI:{tileClickEvent} with { tileId, x, z } — putts the selected ball toward the target tile",
1521
+ "description": "Emits UI:{tileClickEvent} with { tileId, x, z } — putts the selected ball one adjacent cell toward the target tile",
1496
1522
  "event": "TILE_CLICK",
1497
1523
  "payloadSchema": [
1498
1524
  {
@@ -1560,7 +1586,7 @@
1560
1586
  ],
1561
1587
  "entityContract": {
1562
1588
  "provides": [
1563
- "attackTargets",
1589
+ "fx",
1564
1590
  "gridHeight",
1565
1591
  "gridWidth",
1566
1592
  "movementRange",
@@ -1579,10 +1605,6 @@
1579
1605
  "scope": "instance",
1580
1606
  "stateMachine": {
1581
1607
  "events": [
1582
- {
1583
- "key": "START",
1584
- "name": "Start"
1585
- },
1586
1608
  {
1587
1609
  "key": "INIT",
1588
1610
  "name": "Initialize"
@@ -1609,7 +1631,7 @@
1609
1631
  "tier": "domain"
1610
1632
  },
1611
1633
  {
1612
- "description": "Emits UI:{tileClickEvent} with { tileId, x, z } — putts the selected ball toward the target tile",
1634
+ "description": "Emits UI:{tileClickEvent} with { tileId, x, z } — putts the selected ball one adjacent cell toward the target tile",
1613
1635
  "key": "TILE_CLICK",
1614
1636
  "name": "Tile Click",
1615
1637
  "payloadSchema": [
@@ -1659,9 +1681,6 @@
1659
1681
  "isInitial": true,
1660
1682
  "name": "playing"
1661
1683
  },
1662
- {
1663
- "name": "menu"
1664
- },
1665
1684
  {
1666
1685
  "name": "gameover"
1667
1686
  }
@@ -1684,11 +1703,6 @@
1684
1703
  "@entity.validMoves",
1685
1704
  []
1686
1705
  ],
1687
- [
1688
- "set",
1689
- "@entity.attackTargets",
1690
- []
1691
- ],
1692
1706
  [
1693
1707
  "set",
1694
1708
  "@entity.strokes",
@@ -1717,111 +1731,39 @@
1717
1731
  [
1718
1732
  "set",
1719
1733
  "@entity.movementRange",
1720
- 2.0
1734
+ 1.0
1735
+ ],
1736
+ [
1737
+ "set",
1738
+ "@entity.fx",
1739
+ []
1721
1740
  ],
1722
1741
  [
1723
1742
  "render-ui",
1724
1743
  "main",
1725
1744
  {
1726
- "children": [
1727
- {
1728
- "attackTargets": "@entity.attackTargets",
1729
- "features": "@config.features",
1730
- "scale": "@config.scale",
1731
- "selectedUnitId": "@entity.selectedUnitId",
1732
- "tileClickEvent": "TILE_CLICK",
1733
- "tiles": "@config.tiles",
1734
- "type": "game-canvas-3d",
1735
- "unitClickEvent": "UNIT_CLICK",
1736
- "unitScale": "@config.unitScale",
1737
- "units": "@entity.units",
1738
- "validMoves": "@entity.validMoves"
1739
- }
1740
- ],
1741
- "hud": {
1742
- "stats": [
1745
+ "addons": {
1746
+ "children": [
1743
1747
  {
1744
- "label": "Strokes",
1745
- "value": "@entity.strokes"
1746
- },
1747
- {
1748
- "label": "Par",
1749
- "value": "@entity.par"
1748
+ "action": "CANCEL",
1749
+ "label": "Cancel",
1750
+ "type": "button",
1751
+ "variant": "secondary"
1750
1752
  },
1751
1753
  {
1752
- "label": "Result",
1753
- "value": "@entity.result"
1754
+ "action": "PLAY_AGAIN",
1755
+ "label": "Restart",
1756
+ "type": "button",
1757
+ "variant": "secondary"
1754
1758
  }
1755
1759
  ],
1756
- "type": "game-hud"
1760
+ "direction": "vertical",
1761
+ "gap": "sm",
1762
+ "type": "stack"
1757
1763
  },
1758
- "type": "game-shell"
1759
- }
1760
- ]
1761
- ],
1762
- "event": "START",
1763
- "from": "menu",
1764
- "to": "playing"
1765
- },
1766
- {
1767
- "effects": [
1768
- [
1769
- "set",
1770
- "@entity.units",
1771
- "@config.units"
1772
- ],
1773
- [
1774
- "set",
1775
- "@entity.selectedUnitId",
1776
- ""
1777
- ],
1778
- [
1779
- "set",
1780
- "@entity.validMoves",
1781
- []
1782
- ],
1783
- [
1784
- "set",
1785
- "@entity.attackTargets",
1786
- []
1787
- ],
1788
- [
1789
- "set",
1790
- "@entity.strokes",
1791
- 0.0
1792
- ],
1793
- [
1794
- "set",
1795
- "@entity.par",
1796
- "@config.par"
1797
- ],
1798
- [
1799
- "set",
1800
- "@entity.result",
1801
- "none"
1802
- ],
1803
- [
1804
- "set",
1805
- "@entity.gridWidth",
1806
- 6.0
1807
- ],
1808
- [
1809
- "set",
1810
- "@entity.gridHeight",
1811
- 6.0
1812
- ],
1813
- [
1814
- "set",
1815
- "@entity.movementRange",
1816
- 2.0
1817
- ],
1818
- [
1819
- "render-ui",
1820
- "main",
1821
- {
1822
1764
  "children": [
1823
1765
  {
1824
- "attackTargets": "@entity.attackTargets",
1766
+ "events": "@entity.fx",
1825
1767
  "features": "@config.features",
1826
1768
  "scale": "@config.scale",
1827
1769
  "selectedUnitId": "@entity.selectedUnitId",
@@ -1851,6 +1793,42 @@
1851
1793
  ],
1852
1794
  "type": "game-hud"
1853
1795
  },
1796
+ "overlay": [
1797
+ "if",
1798
+ [
1799
+ "!=",
1800
+ "@entity.result",
1801
+ "none"
1802
+ ],
1803
+ {
1804
+ "align": "center",
1805
+ "children": [
1806
+ {
1807
+ "stats": [
1808
+ {
1809
+ "label": "Result",
1810
+ "value": "@entity.result"
1811
+ },
1812
+ {
1813
+ "label": "Strokes",
1814
+ "value": "@entity.strokes"
1815
+ }
1816
+ ],
1817
+ "type": "game-hud"
1818
+ },
1819
+ {
1820
+ "action": "PLAY_AGAIN",
1821
+ "label": "Play Again",
1822
+ "type": "button",
1823
+ "variant": "primary"
1824
+ }
1825
+ ],
1826
+ "direction": "vertical",
1827
+ "gap": "md",
1828
+ "type": "stack"
1829
+ },
1830
+ null
1831
+ ],
1854
1832
  "type": "game-shell"
1855
1833
  }
1856
1834
  ]
@@ -1949,9 +1927,28 @@
1949
1927
  "render-ui",
1950
1928
  "main",
1951
1929
  {
1930
+ "addons": {
1931
+ "children": [
1932
+ {
1933
+ "action": "CANCEL",
1934
+ "label": "Cancel",
1935
+ "type": "button",
1936
+ "variant": "secondary"
1937
+ },
1938
+ {
1939
+ "action": "PLAY_AGAIN",
1940
+ "label": "Restart",
1941
+ "type": "button",
1942
+ "variant": "secondary"
1943
+ }
1944
+ ],
1945
+ "direction": "vertical",
1946
+ "gap": "sm",
1947
+ "type": "stack"
1948
+ },
1952
1949
  "children": [
1953
1950
  {
1954
- "attackTargets": "@entity.attackTargets",
1951
+ "events": "@entity.fx",
1955
1952
  "features": "@config.features",
1956
1953
  "scale": "@config.scale",
1957
1954
  "selectedUnitId": "@entity.selectedUnitId",
@@ -1981,6 +1978,42 @@
1981
1978
  ],
1982
1979
  "type": "game-hud"
1983
1980
  },
1981
+ "overlay": [
1982
+ "if",
1983
+ [
1984
+ "!=",
1985
+ "@entity.result",
1986
+ "none"
1987
+ ],
1988
+ {
1989
+ "align": "center",
1990
+ "children": [
1991
+ {
1992
+ "stats": [
1993
+ {
1994
+ "label": "Result",
1995
+ "value": "@entity.result"
1996
+ },
1997
+ {
1998
+ "label": "Strokes",
1999
+ "value": "@entity.strokes"
2000
+ }
2001
+ ],
2002
+ "type": "game-hud"
2003
+ },
2004
+ {
2005
+ "action": "PLAY_AGAIN",
2006
+ "label": "Play Again",
2007
+ "type": "button",
2008
+ "variant": "primary"
2009
+ }
2010
+ ],
2011
+ "direction": "vertical",
2012
+ "gap": "md",
2013
+ "type": "stack"
2014
+ },
2015
+ null
2016
+ ],
1984
2017
  "type": "game-shell"
1985
2018
  }
1986
2019
  ]
@@ -2031,6 +2064,30 @@
2031
2064
  1.0
2032
2065
  ]
2033
2066
  ],
2067
+ [
2068
+ "set",
2069
+ "@entity.fx",
2070
+ [
2071
+ "array/append",
2072
+ "@entity.fx",
2073
+ {
2074
+ "id": [
2075
+ "str/concat",
2076
+ "putt-",
2077
+ "@entity.strokes"
2078
+ ],
2079
+ "message": [
2080
+ "str/concat",
2081
+ "putt ",
2082
+ "@entity.strokes"
2083
+ ],
2084
+ "ttl": 5.0,
2085
+ "type": "score",
2086
+ "x": "@payload.x",
2087
+ "z": "@payload.z"
2088
+ }
2089
+ ]
2090
+ ],
2034
2091
  [
2035
2092
  "set",
2036
2093
  "@entity.selectedUnitId",
@@ -2045,9 +2102,28 @@
2045
2102
  "render-ui",
2046
2103
  "main",
2047
2104
  {
2105
+ "addons": {
2106
+ "children": [
2107
+ {
2108
+ "action": "CANCEL",
2109
+ "label": "Cancel",
2110
+ "type": "button",
2111
+ "variant": "secondary"
2112
+ },
2113
+ {
2114
+ "action": "PLAY_AGAIN",
2115
+ "label": "Restart",
2116
+ "type": "button",
2117
+ "variant": "secondary"
2118
+ }
2119
+ ],
2120
+ "direction": "vertical",
2121
+ "gap": "sm",
2122
+ "type": "stack"
2123
+ },
2048
2124
  "children": [
2049
2125
  {
2050
- "attackTargets": "@entity.attackTargets",
2126
+ "events": "@entity.fx",
2051
2127
  "features": "@config.features",
2052
2128
  "scale": "@config.scale",
2053
2129
  "selectedUnitId": "@entity.selectedUnitId",
@@ -2077,6 +2153,42 @@
2077
2153
  ],
2078
2154
  "type": "game-hud"
2079
2155
  },
2156
+ "overlay": [
2157
+ "if",
2158
+ [
2159
+ "!=",
2160
+ "@entity.result",
2161
+ "none"
2162
+ ],
2163
+ {
2164
+ "align": "center",
2165
+ "children": [
2166
+ {
2167
+ "stats": [
2168
+ {
2169
+ "label": "Result",
2170
+ "value": "@entity.result"
2171
+ },
2172
+ {
2173
+ "label": "Strokes",
2174
+ "value": "@entity.strokes"
2175
+ }
2176
+ ],
2177
+ "type": "game-hud"
2178
+ },
2179
+ {
2180
+ "action": "PLAY_AGAIN",
2181
+ "label": "Play Again",
2182
+ "type": "button",
2183
+ "variant": "primary"
2184
+ }
2185
+ ],
2186
+ "direction": "vertical",
2187
+ "gap": "md",
2188
+ "type": "stack"
2189
+ },
2190
+ null
2191
+ ],
2080
2192
  "type": "game-shell"
2081
2193
  }
2082
2194
  ]
@@ -2246,17 +2358,42 @@
2246
2358
  "if",
2247
2359
  [
2248
2360
  "<=",
2249
- [
2250
- "+",
2251
- "@entity.strokes",
2252
- 1.0
2253
- ],
2361
+ "@entity.strokes",
2254
2362
  "@entity.par"
2255
2363
  ],
2256
2364
  "won",
2257
2365
  "lost"
2258
2366
  ]
2259
2367
  ],
2368
+ [
2369
+ "set",
2370
+ "@entity.fx",
2371
+ [
2372
+ "array/append",
2373
+ "@entity.fx",
2374
+ {
2375
+ "id": "result-fx",
2376
+ "message": [
2377
+ "str/concat",
2378
+ "Strokes: ",
2379
+ "@entity.strokes"
2380
+ ],
2381
+ "ttl": 999.0,
2382
+ "type": [
2383
+ "if",
2384
+ [
2385
+ "==",
2386
+ "@entity.result",
2387
+ "won"
2388
+ ],
2389
+ "win",
2390
+ "lose"
2391
+ ],
2392
+ "x": "@payload.x",
2393
+ "z": "@payload.z"
2394
+ }
2395
+ ]
2396
+ ],
2260
2397
  [
2261
2398
  "set",
2262
2399
  "@entity.selectedUnitId",
@@ -2271,9 +2408,28 @@
2271
2408
  "render-ui",
2272
2409
  "main",
2273
2410
  {
2411
+ "addons": {
2412
+ "children": [
2413
+ {
2414
+ "action": "CANCEL",
2415
+ "label": "Cancel",
2416
+ "type": "button",
2417
+ "variant": "secondary"
2418
+ },
2419
+ {
2420
+ "action": "PLAY_AGAIN",
2421
+ "label": "Restart",
2422
+ "type": "button",
2423
+ "variant": "secondary"
2424
+ }
2425
+ ],
2426
+ "direction": "vertical",
2427
+ "gap": "sm",
2428
+ "type": "stack"
2429
+ },
2274
2430
  "children": [
2275
2431
  {
2276
- "attackTargets": "@entity.attackTargets",
2432
+ "events": "@entity.fx",
2277
2433
  "features": "@config.features",
2278
2434
  "scale": "@config.scale",
2279
2435
  "selectedUnitId": "@entity.selectedUnitId",
@@ -2303,6 +2459,42 @@
2303
2459
  ],
2304
2460
  "type": "game-hud"
2305
2461
  },
2462
+ "overlay": [
2463
+ "if",
2464
+ [
2465
+ "!=",
2466
+ "@entity.result",
2467
+ "none"
2468
+ ],
2469
+ {
2470
+ "align": "center",
2471
+ "children": [
2472
+ {
2473
+ "stats": [
2474
+ {
2475
+ "label": "Result",
2476
+ "value": "@entity.result"
2477
+ },
2478
+ {
2479
+ "label": "Strokes",
2480
+ "value": "@entity.strokes"
2481
+ }
2482
+ ],
2483
+ "type": "game-hud"
2484
+ },
2485
+ {
2486
+ "action": "PLAY_AGAIN",
2487
+ "label": "Play Again",
2488
+ "type": "button",
2489
+ "variant": "primary"
2490
+ }
2491
+ ],
2492
+ "direction": "vertical",
2493
+ "gap": "md",
2494
+ "type": "stack"
2495
+ },
2496
+ null
2497
+ ],
2306
2498
  "type": "game-shell"
2307
2499
  }
2308
2500
  ]
@@ -2439,9 +2631,28 @@
2439
2631
  "render-ui",
2440
2632
  "main",
2441
2633
  {
2634
+ "addons": {
2635
+ "children": [
2636
+ {
2637
+ "action": "CANCEL",
2638
+ "label": "Cancel",
2639
+ "type": "button",
2640
+ "variant": "secondary"
2641
+ },
2642
+ {
2643
+ "action": "PLAY_AGAIN",
2644
+ "label": "Restart",
2645
+ "type": "button",
2646
+ "variant": "secondary"
2647
+ }
2648
+ ],
2649
+ "direction": "vertical",
2650
+ "gap": "sm",
2651
+ "type": "stack"
2652
+ },
2442
2653
  "children": [
2443
2654
  {
2444
- "attackTargets": "@entity.attackTargets",
2655
+ "events": "@entity.fx",
2445
2656
  "features": "@config.features",
2446
2657
  "scale": "@config.scale",
2447
2658
  "selectedUnitId": "@entity.selectedUnitId",
@@ -2471,6 +2682,42 @@
2471
2682
  ],
2472
2683
  "type": "game-hud"
2473
2684
  },
2685
+ "overlay": [
2686
+ "if",
2687
+ [
2688
+ "!=",
2689
+ "@entity.result",
2690
+ "none"
2691
+ ],
2692
+ {
2693
+ "align": "center",
2694
+ "children": [
2695
+ {
2696
+ "stats": [
2697
+ {
2698
+ "label": "Result",
2699
+ "value": "@entity.result"
2700
+ },
2701
+ {
2702
+ "label": "Strokes",
2703
+ "value": "@entity.strokes"
2704
+ }
2705
+ ],
2706
+ "type": "game-hud"
2707
+ },
2708
+ {
2709
+ "action": "PLAY_AGAIN",
2710
+ "label": "Play Again",
2711
+ "type": "button",
2712
+ "variant": "primary"
2713
+ }
2714
+ ],
2715
+ "direction": "vertical",
2716
+ "gap": "md",
2717
+ "type": "stack"
2718
+ },
2719
+ null
2720
+ ],
2474
2721
  "type": "game-shell"
2475
2722
  }
2476
2723
  ]
@@ -2501,11 +2748,6 @@
2501
2748
  "@entity.validMoves",
2502
2749
  []
2503
2750
  ],
2504
- [
2505
- "set",
2506
- "@entity.attackTargets",
2507
- []
2508
- ],
2509
2751
  [
2510
2752
  "set",
2511
2753
  "@entity.strokes",
@@ -2521,13 +2763,42 @@
2521
2763
  "@entity.result",
2522
2764
  "none"
2523
2765
  ],
2766
+ [
2767
+ "set",
2768
+ "@entity.movementRange",
2769
+ 1.0
2770
+ ],
2771
+ [
2772
+ "set",
2773
+ "@entity.fx",
2774
+ []
2775
+ ],
2524
2776
  [
2525
2777
  "render-ui",
2526
2778
  "main",
2527
2779
  {
2780
+ "addons": {
2781
+ "children": [
2782
+ {
2783
+ "action": "CANCEL",
2784
+ "label": "Cancel",
2785
+ "type": "button",
2786
+ "variant": "secondary"
2787
+ },
2788
+ {
2789
+ "action": "PLAY_AGAIN",
2790
+ "label": "Restart",
2791
+ "type": "button",
2792
+ "variant": "secondary"
2793
+ }
2794
+ ],
2795
+ "direction": "vertical",
2796
+ "gap": "sm",
2797
+ "type": "stack"
2798
+ },
2528
2799
  "children": [
2529
2800
  {
2530
- "attackTargets": "@entity.attackTargets",
2801
+ "events": "@entity.fx",
2531
2802
  "features": "@config.features",
2532
2803
  "scale": "@config.scale",
2533
2804
  "selectedUnitId": "@entity.selectedUnitId",
@@ -2557,16 +2828,103 @@
2557
2828
  ],
2558
2829
  "type": "game-hud"
2559
2830
  },
2831
+ "overlay": [
2832
+ "if",
2833
+ [
2834
+ "!=",
2835
+ "@entity.result",
2836
+ "none"
2837
+ ],
2838
+ {
2839
+ "align": "center",
2840
+ "children": [
2841
+ {
2842
+ "stats": [
2843
+ {
2844
+ "label": "Result",
2845
+ "value": "@entity.result"
2846
+ },
2847
+ {
2848
+ "label": "Strokes",
2849
+ "value": "@entity.strokes"
2850
+ }
2851
+ ],
2852
+ "type": "game-hud"
2853
+ },
2854
+ {
2855
+ "action": "PLAY_AGAIN",
2856
+ "label": "Play Again",
2857
+ "type": "button",
2858
+ "variant": "primary"
2859
+ }
2860
+ ],
2861
+ "direction": "vertical",
2862
+ "gap": "md",
2863
+ "type": "stack"
2864
+ },
2865
+ null
2866
+ ],
2560
2867
  "type": "game-shell"
2561
2868
  }
2562
2869
  ]
2563
2870
  ],
2564
2871
  "event": "PLAY_AGAIN",
2565
2872
  "from": "gameover",
2566
- "to": "menu"
2873
+ "to": "playing"
2567
2874
  }
2568
2875
  ]
2569
- }
2876
+ },
2877
+ "ticks": [
2878
+ {
2879
+ "effects": [
2880
+ [
2881
+ "set",
2882
+ "@entity.fx",
2883
+ [
2884
+ "array/filter",
2885
+ [
2886
+ "array/map",
2887
+ "@entity.fx",
2888
+ [
2889
+ "fn",
2890
+ "e",
2891
+ [
2892
+ "object/merge",
2893
+ "@e",
2894
+ {
2895
+ "ttl": [
2896
+ "-",
2897
+ [
2898
+ "object/get",
2899
+ "@e",
2900
+ "ttl"
2901
+ ],
2902
+ 1.0
2903
+ ]
2904
+ }
2905
+ ]
2906
+ ]
2907
+ ],
2908
+ [
2909
+ "fn",
2910
+ "e",
2911
+ [
2912
+ ">",
2913
+ [
2914
+ "object/get",
2915
+ "@e",
2916
+ "ttl"
2917
+ ],
2918
+ 0.0
2919
+ ]
2920
+ ]
2921
+ ]
2922
+ ]
2923
+ ],
2924
+ "interval": 500.0,
2925
+ "name": "decayTick"
2926
+ }
2927
+ ]
2570
2928
  }
2571
2929
  ]
2572
2930
  }