@almadar/std 16.153.0 → 16.154.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 (75) hide show
  1. package/behaviors/lolo/ui/game/molecules/std-crew-board-2d.lolo +4 -4
  2. package/behaviors/lolo/ui/game/molecules/std-dungeon-board-2d.lolo +6 -6
  3. package/behaviors/lolo/ui/game/molecules/std-tactics-board-2d.lolo +41 -9
  4. package/behaviors/lolo/ui/game/molecules/std-worldmap-board-2d.lolo +2 -2
  5. package/behaviors/lolo/ui/game/organisms/ui-arena-board.lolo +2 -2
  6. package/behaviors/lolo/ui/game/organisms/ui-battle-board.lolo +110 -7
  7. package/behaviors/lolo/ui/game/organisms/ui-builder-board.lolo +5 -20
  8. package/behaviors/lolo/ui/game/organisms/ui-card-battler-board.lolo +2 -0
  9. package/behaviors/lolo/ui/game/organisms/ui-castle-board.lolo +3 -3
  10. package/behaviors/lolo/ui/game/organisms/ui-city-builder-board.lolo +9 -7
  11. package/behaviors/lolo/ui/game/organisms/ui-grid-tactics-demo-board.lolo +2 -2
  12. package/behaviors/lolo/ui/game/organisms/ui-hex-strategy-board.lolo +5 -1
  13. package/behaviors/lolo/ui/game/organisms/ui-holiday-runner-board.lolo +1 -1
  14. package/behaviors/lolo/ui/game/organisms/ui-minigolf-board.lolo +22 -22
  15. package/behaviors/lolo/ui/game/organisms/ui-pinball-board.lolo +7 -7
  16. package/behaviors/lolo/ui/game/organisms/ui-pirate-board.lolo +14 -14
  17. package/behaviors/lolo/ui/game/organisms/ui-platformer-board.lolo +4 -0
  18. package/behaviors/lolo/ui/game/organisms/ui-sports-board.lolo +10 -7
  19. package/behaviors/lolo/ui/game/organisms/ui-tactics-demo-2d.lolo +7 -3
  20. package/behaviors/lolo/ui/game/organisms/ui-tanks-board.lolo +5 -1
  21. package/behaviors/lolo/ui/game/organisms/ui-topdown-rts-board.lolo +5 -1
  22. package/behaviors/lolo/ui/game/organisms/ui-tower-defense-board.lolo +8 -8
  23. package/behaviors/lolo/ui/game/organisms/ui-uncontrolled-battle-board.lolo +5 -5
  24. package/behaviors/lolo/ui/game/organisms/ui-world-map-board.lolo +3 -3
  25. package/behaviors/registry/ui/game/molecules/std-crew-board-2d.orb +10 -12
  26. package/behaviors/registry/ui/game/molecules/std-dungeon-board-2d.orb +15 -18
  27. package/behaviors/registry/ui/game/molecules/std-tactics-board-2d.orb +860 -138
  28. package/behaviors/registry/ui/game/molecules/std-worldmap-board-2d.orb +7 -60
  29. package/behaviors/registry/ui/game/organisms/ui-arena-board.orb +5 -6
  30. package/behaviors/registry/ui/game/organisms/ui-battle-board.orb +86 -99
  31. package/behaviors/registry/ui/game/organisms/ui-builder-board.orb +21 -226
  32. package/behaviors/registry/ui/game/organisms/ui-card-battler-board.orb +42 -0
  33. package/behaviors/registry/ui/game/organisms/ui-castle-board.orb +30 -9
  34. package/behaviors/registry/ui/game/organisms/ui-city-builder-board.orb +49 -0
  35. package/behaviors/registry/ui/game/organisms/ui-grid-tactics-demo-board.orb +5 -6
  36. package/behaviors/registry/ui/game/organisms/ui-hex-strategy-board.orb +30 -10
  37. package/behaviors/registry/ui/game/organisms/ui-holiday-runner-board.orb +2 -3
  38. package/behaviors/registry/ui/game/organisms/ui-minigolf-board.orb +55 -11
  39. package/behaviors/registry/ui/game/organisms/ui-pinball-board.orb +8 -8
  40. package/behaviors/registry/ui/game/organisms/ui-pirate-board.orb +14 -0
  41. package/behaviors/registry/ui/game/organisms/ui-platformer-board.orb +72 -0
  42. package/behaviors/registry/ui/game/organisms/ui-sports-board.orb +60 -0
  43. package/behaviors/registry/ui/game/organisms/ui-tactics-demo-2d.orb +48 -28
  44. package/behaviors/registry/ui/game/organisms/ui-tanks-board.orb +30 -10
  45. package/behaviors/registry/ui/game/organisms/ui-topdown-rts-board.orb +31 -12
  46. package/behaviors/registry/ui/game/organisms/ui-tower-defense-board.orb +8 -0
  47. package/behaviors/registry/ui/game/organisms/ui-uncontrolled-battle-board.orb +5 -0
  48. package/behaviors/registry/ui/game/organisms/ui-world-map-board.orb +8 -12
  49. package/dist/behaviors/behaviors-registry.json +60 -50
  50. package/dist/behaviors/registry/ui/game/molecules/std-crew-board-2d.orb +10 -12
  51. package/dist/behaviors/registry/ui/game/molecules/std-dungeon-board-2d.orb +15 -18
  52. package/dist/behaviors/registry/ui/game/molecules/std-tactics-board-2d.orb +860 -138
  53. package/dist/behaviors/registry/ui/game/molecules/std-worldmap-board-2d.orb +7 -60
  54. package/dist/behaviors/registry/ui/game/organisms/ui-arena-board.orb +5 -6
  55. package/dist/behaviors/registry/ui/game/organisms/ui-battle-board.orb +86 -99
  56. package/dist/behaviors/registry/ui/game/organisms/ui-builder-board.orb +21 -226
  57. package/dist/behaviors/registry/ui/game/organisms/ui-card-battler-board.orb +42 -0
  58. package/dist/behaviors/registry/ui/game/organisms/ui-castle-board.orb +30 -9
  59. package/dist/behaviors/registry/ui/game/organisms/ui-city-builder-board.orb +49 -0
  60. package/dist/behaviors/registry/ui/game/organisms/ui-grid-tactics-demo-board.orb +5 -6
  61. package/dist/behaviors/registry/ui/game/organisms/ui-hex-strategy-board.orb +30 -10
  62. package/dist/behaviors/registry/ui/game/organisms/ui-holiday-runner-board.orb +2 -3
  63. package/dist/behaviors/registry/ui/game/organisms/ui-minigolf-board.orb +55 -11
  64. package/dist/behaviors/registry/ui/game/organisms/ui-pinball-board.orb +8 -8
  65. package/dist/behaviors/registry/ui/game/organisms/ui-pirate-board.orb +14 -0
  66. package/dist/behaviors/registry/ui/game/organisms/ui-platformer-board.orb +72 -0
  67. package/dist/behaviors/registry/ui/game/organisms/ui-sports-board.orb +60 -0
  68. package/dist/behaviors/registry/ui/game/organisms/ui-tactics-demo-2d.orb +48 -28
  69. package/dist/behaviors/registry/ui/game/organisms/ui-tanks-board.orb +30 -10
  70. package/dist/behaviors/registry/ui/game/organisms/ui-topdown-rts-board.orb +31 -12
  71. package/dist/behaviors/registry/ui/game/organisms/ui-tower-defense-board.orb +8 -0
  72. package/dist/behaviors/registry/ui/game/organisms/ui-uncontrolled-battle-board.orb +5 -0
  73. package/dist/behaviors/registry/ui/game/organisms/ui-world-map-board.orb +8 -12
  74. package/dist/behaviors-registry.json +60 -50
  75. package/package.json +2 -2
@@ -1,6 +1,105 @@
1
1
  app ui-battle-board "1.0.0"
2
2
  "RPG-tactics battle: thin organism composing the std-tactics-board-2d frame + std-score + std-xp (kills grant xp; level-ups heal the party via a HEAL intent). Isometric shape-character theme supplied via config."
3
3
  ;; @capabilities "turn-based combat, RPG gameplay, strategy gameplay"
4
+
5
+ ;; ============================================================================
6
+ ;; PERSONA + USER STORIES
7
+ ;;
8
+ ;; Read these before changing anything here, and walk them end to end after.
9
+ ;; One persona: the PLAYER, commanding a four-unit party on a 16x16 isometric
10
+ ;; grid against four enemies. Status is against the CURRENT file.
11
+ ;;
12
+ ;; HOW THE GAME WORKS (the loop): select a unit -> move it (green cells) ->
13
+ ;; click it again to arm attack (red cells = adjacent enemies) -> click an
14
+ ;; adjacent enemy to strike for 3 -> End Turn -> every living enemy strikes
15
+ ;; adjacent players for 1 or steps 1 cell toward the nearest player -> repeat
16
+ ;; until one side is wiped. Kills score 10 and grant 25 xp; every 100 xp
17
+ ;; (+50 per level) levels up and heals the whole party +2.
18
+ ;; ============================================================================
19
+ ;;
20
+ ;; PLAYER — "I command my party and wipe the enemy before they wipe me."
21
+ ;;
22
+ ;; 1. I open the board and see the whole battlefield framed on screen —
23
+ ;; terrain under every cell, my party at the south, the enemy at the
24
+ ;; north, and the HUD showing Result/Phase/Turn/Score/XP/Lvl.
25
+ ;; WORKS. PlayerIntent renders a game-shell with one canvas, fit: true
26
+ ;; (fills the viewport, camera centered on the tile grid's midpoint),
27
+ ;; projection "isometric". 16x16 all-grass tiles paint from the
28
+ ;; assetManifest; HUD stats come from extraStats (XP, Lvl) appended to
29
+ ;; the frame's Result/Phase/Turn/Score. Zoom is wheel/pinch, clamped
30
+ ;; [0.05, 10] upstream in @almadar/ui useCamera; minimap on.
31
+ ;; 2. Every unit on the board is a visible character sprite with a name
32
+ ;; label and a health bar I can read at a glance.
33
+ ;; WORKS. draw-sprite-layer paints each unit's modelUrl anchored
34
+ ;; "ground"; two draw-shape-layers paint the black backing + green
35
+ ;; health fraction above it; a draw-text-layer paints the name.
36
+ ;; Broken assets would show a magenta fallback square + a
37
+ ;; almadar:ui:draw-sprite warn (upstream DrawSprite contract).
38
+ ;; 3. I click one of MY units and the cells it can reach light up.
39
+ ;; WORKS. UNIT_CLICK (team "player") sets selectedUnitId, uiPhase
40
+ ;; "selection", and validMoves = passable, unoccupied tiles within
41
+ ;; movementRange 2 (manhattan), painted translucent green.
42
+ ;; 4. I click a lit cell and the unit moves there.
43
+ ;; WORKS. TILE_CLICK (in bounds, within range) emits MOVE; the
44
+ ;; grid-tactics authority re-validates (bounds/passable/unoccupied)
45
+ ;; and writes the new position. Selection resets to "observation".
46
+ ;; 5. I click my selected unit again and adjacent enemies I can strike
47
+ ;; light up red.
48
+ ;; WORKS. Second UNIT_CLICK on the same id enters uiPhase "action"
49
+ ;; and computes attackTargets = living enemies at manhattan distance
50
+ ;; <= 1, painted translucent red.
51
+ ;; 6. I click a red-lit enemy and it takes a hit — I see the damage
52
+ ;; number, its health bar shrinks.
53
+ ;; WORKS. UNIT_CLICK (enemy, action phase, adjacent) emits ATTACK;
54
+ ;; the authority subtracts attackDamage 3 and emits BURST, which
55
+ ;; fx-particles spawns as a floating "-3" at the target (ttl 3,
56
+ ;; decayed by FxDecay). The health-bar layer re-derives from
57
+ ;; health/maxHealth on the shared frame.
58
+ ;; 7. I change my mind mid-selection and back out cleanly.
59
+ ;; WORKS. The HUD's Cancel button emits CANCEL, clearing selection,
60
+ ;; highlights, and phase (guarded on a selection existing).
61
+ ;; 8. I end my turn and the enemy takes theirs — they close in and fight
62
+ ;; back.
63
+ ;; WORKS. END_TURN (guarded on result "none") bumps turn and emits
64
+ ;; AI_TURN; the authority damages every player adjacent to a living
65
+ ;; enemy for 1, then steps each unengaged enemy 1 cell toward the
66
+ ;; nearest living player (clamped in-bounds, passable, unoccupied).
67
+ ;; 9. When I kill an enemy I am rewarded — score ticks up, xp ticks up.
68
+ ;; WORKS. Every authority mutation emits UNITS_CHANGED with live
69
+ ;; survivor counts; ScoreKeeper awards (baseline - enemiesAlive) x 10,
70
+ ;; XpKeeper the same x 25. Both are headless atoms on the shared frame.
71
+ ;; 10. When my xp crosses the threshold the party levels up and heals.
72
+ ;; WORKS. XpKeeper at xp >= xpToNext (100, +50/level) bumps level,
73
+ ;; raises the threshold, and emits HEAL { team: "player", amount: 2 },
74
+ ;; which the authority applies (capped at maxHealth).
75
+ ;; 11. When the last enemy falls, I win and the game tells me.
76
+ ;; WORKS. RoundLogic derives result from UNITS_CHANGED: enemiesAlive 0
77
+ ;; -> "victory" (playersAlive 0 -> "defeat") and emits GAME_END; the
78
+ ;; HUD's Result stat shows it and END_TURN is guarded shut.
79
+ ;;
80
+ ;; ASSET INVENTORY (all Kenney, served from almadar-kflow-assets.web.app)
81
+ ;;
82
+ ;; Terrain kenney-isometric-tiles-base/terrain/landscapeTiles_sheet
83
+ ;; grass = landscapeTiles_000.png (all 256 cells), stone =
84
+ ;; landscapeTiles_001.png (manifest-only, no stone tiles seeded).
85
+ ;; Units ui-battle-board/kenney-shape-characters/units/spritesheet_default
86
+ ;; (board-local copy; the _shared sheet was a corrupt 49x49 file
87
+ ;; whose atlas expects 577x577 — repaired there too)
88
+ ;; party: p1 Guardian blue_body_square.png 10hp (3,12)
89
+ ;; p2 Scrapper red_body_rhombus.png 8hp (2,11)
90
+ ;; p3 Worker yellow_body_squircle.png 6hp (4,13)
91
+ ;; p4 Mender green_body_circle.png 7hp (2,13)
92
+ ;; enemy: e1/e2 Guardian 10hp (12,3),(13,4)
93
+ ;; e3/e4 Scrapper 8hp (11,2),(13,2)
94
+ ;; Features ui-battle-board/kenney-cartography-pack/ui/spritesheet_default
95
+ ;; gold_mine = mine.png at (13,1), portal = gate.png at (1,14)
96
+ ;; (decorative; drawn from config.features).
97
+ ;; Effects _shared/kenney-explosion-pack/effects/spritesheet_pixelExplosion
98
+ ;; explosion = pixelExplosion07.png (manifest effects entry).
99
+ ;; UI chrome _shared/kenney-ui-adventure-pack/ui/uipack_rpg_sheet
100
+ ;; panel_beige.png = game-shell background + HUD panel.
101
+ ;; ============================================================================
102
+
4
103
  orbital BattleBoardOrbital {
5
104
  uses Frame from "std/behaviors/std-tactics-board-2d"
6
105
  uses Score from "std/behaviors/std-score"
@@ -70,7 +169,7 @@ orbital BattleBoardOrbital {
70
169
 
71
170
  entity GameState [runtime, shared] {
72
171
  id : string!
73
- units : [Unit] = [ { id: "p1", position: { x: 3, y: 12 }, x: 3, y: 12, z: 0, team: "player", health: 10, maxHealth: 10, unitType: "guardian", name: "Guardian", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.json", sprite: "blue_body_square.png", role: "npc", category: "guardian", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "guardian", thumbnailUrl: "" } }, { id: "p2", position: { x: 2, y: 11 }, x: 2, y: 11, z: 0, team: "player", health: 8, maxHealth: 8, unitType: "scrapper", name: "Scrapper", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.json", sprite: "red_body_rhombus.png", role: "npc", category: "scrapper", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "scrapper", thumbnailUrl: "" } }, { id: "p3", position: { x: 4, y: 13 }, x: 4, y: 13, z: 0, team: "player", health: 6, maxHealth: 6, unitType: "worker", name: "Worker", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.json", sprite: "yellow_body_squircle.png", role: "npc", category: "worker", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "worker", thumbnailUrl: "" } }, { id: "p4", position: { x: 2, y: 13 }, x: 2, y: 13, z: 0, team: "player", health: 7, maxHealth: 7, unitType: "mender", name: "Mender", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.json", sprite: "green_body_circle.png", role: "npc", category: "mender", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "mender", thumbnailUrl: "" } }, { id: "e1", position: { x: 12, y: 3 }, x: 12, y: 3, z: 0, team: "enemy", health: 10, maxHealth: 10, unitType: "guardian", name: "Foe", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.json", sprite: "blue_body_square.png", role: "npc", category: "guardian", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "guardian", thumbnailUrl: "" } }, { id: "e2", position: { x: 13, y: 4 }, x: 13, y: 4, z: 0, team: "enemy", health: 10, maxHealth: 10, unitType: "guardian", name: "Foe", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.json", sprite: "blue_body_square.png", role: "npc", category: "guardian", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "guardian", thumbnailUrl: "" } }, { id: "e3", position: { x: 11, y: 2 }, x: 11, y: 2, z: 0, team: "enemy", health: 8, maxHealth: 8, unitType: "scrapper", name: "Foe", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.json", sprite: "red_body_rhombus.png", role: "npc", category: "scrapper", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "scrapper", thumbnailUrl: "" } }, { id: "e4", position: { x: 13, y: 2 }, x: 13, y: 2, z: 0, team: "enemy", health: 8, maxHealth: 8, unitType: "scrapper", name: "Foe", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.json", sprite: "red_body_rhombus.png", role: "npc", category: "scrapper", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "scrapper", thumbnailUrl: "" } } ]
172
+ units : [Unit] = [ { id: "p1", position: { x: 3, y: 12 }, x: 3, y: 12, z: 0, team: "player", health: 10, maxHealth: 10, unitType: "guardian", name: "Guardian", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/units/guardian.svg", role: "npc", category: "guardian", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "guardian", thumbnailUrl: "" } }, { id: "p2", position: { x: 2, y: 11 }, x: 2, y: 11, z: 0, team: "player", health: 8, maxHealth: 8, unitType: "scrapper", name: "Scrapper", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/units/scrapper.svg", role: "npc", category: "scrapper", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "scrapper", thumbnailUrl: "" } }, { id: "p3", position: { x: 4, y: 13 }, x: 4, y: 13, z: 0, team: "player", health: 6, maxHealth: 6, unitType: "worker", name: "Worker", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/units/worker.svg", role: "npc", category: "worker", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "worker", thumbnailUrl: "" } }, { id: "p4", position: { x: 2, y: 13 }, x: 2, y: 13, z: 0, team: "player", health: 7, maxHealth: 7, unitType: "mender", name: "Mender", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/units/mender.svg", role: "npc", category: "mender", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "mender", thumbnailUrl: "" } }, { id: "e1", position: { x: 12, y: 3 }, x: 12, y: 3, z: 0, team: "enemy", health: 10, maxHealth: 10, unitType: "guardian", name: "Foe", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/units/guardian.svg", role: "npc", category: "guardian", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "guardian", thumbnailUrl: "" } }, { id: "e2", position: { x: 13, y: 4 }, x: 13, y: 4, z: 0, team: "enemy", health: 10, maxHealth: 10, unitType: "guardian", name: "Foe", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/units/guardian.svg", role: "npc", category: "guardian", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "guardian", thumbnailUrl: "" } }, { id: "e3", position: { x: 11, y: 2 }, x: 11, y: 2, z: 0, team: "enemy", health: 8, maxHealth: 8, unitType: "scrapper", name: "Foe", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/units/scrapper.svg", role: "npc", category: "scrapper", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "scrapper", thumbnailUrl: "" } }, { id: "e4", position: { x: 13, y: 2 }, x: 13, y: 2, z: 0, team: "enemy", health: 8, maxHealth: 8, unitType: "scrapper", name: "Foe", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/units/scrapper.svg", role: "npc", category: "scrapper", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "scrapper", thumbnailUrl: "" } } ]
74
173
  fx : [Fx] = []
75
174
  tiles : [Tile] = [ { id: "t-0-0", x: 0, y: 0, terrain: "grass", passable: true }, { id: "t-1-0", x: 1, y: 0, terrain: "grass", passable: true }, { id: "t-2-0", x: 2, y: 0, terrain: "grass", passable: true }, { id: "t-3-0", x: 3, y: 0, terrain: "grass", passable: true }, { id: "t-4-0", x: 4, y: 0, terrain: "grass", passable: true }, { id: "t-5-0", x: 5, y: 0, terrain: "grass", passable: true }, { id: "t-6-0", x: 6, y: 0, terrain: "grass", passable: true }, { id: "t-7-0", x: 7, y: 0, terrain: "grass", passable: true }, { id: "t-8-0", x: 8, y: 0, terrain: "grass", passable: true }, { id: "t-9-0", x: 9, y: 0, terrain: "grass", passable: true }, { id: "t-10-0", x: 10, y: 0, terrain: "grass", passable: true }, { id: "t-11-0", x: 11, y: 0, terrain: "grass", passable: true }, { id: "t-12-0", x: 12, y: 0, terrain: "grass", passable: true }, { id: "t-13-0", x: 13, y: 0, terrain: "grass", passable: true }, { id: "t-14-0", x: 14, y: 0, terrain: "grass", passable: true }, { id: "t-15-0", x: 15, y: 0, terrain: "grass", passable: true }, { id: "t-0-1", x: 0, y: 1, terrain: "grass", passable: true }, { id: "t-1-1", x: 1, y: 1, terrain: "grass", passable: true }, { id: "t-2-1", x: 2, y: 1, terrain: "grass", passable: true }, { id: "t-3-1", x: 3, y: 1, terrain: "grass", passable: true }, { id: "t-4-1", x: 4, y: 1, terrain: "grass", passable: true }, { id: "t-5-1", x: 5, y: 1, terrain: "grass", passable: true }, { id: "t-6-1", x: 6, y: 1, terrain: "grass", passable: true }, { id: "t-7-1", x: 7, y: 1, terrain: "grass", passable: true }, { id: "t-8-1", x: 8, y: 1, terrain: "grass", passable: true }, { id: "t-9-1", x: 9, y: 1, terrain: "grass", passable: true }, { id: "t-10-1", x: 10, y: 1, terrain: "grass", passable: true }, { id: "t-11-1", x: 11, y: 1, terrain: "grass", passable: true }, { id: "t-12-1", x: 12, y: 1, terrain: "grass", passable: true }, { id: "t-13-1", x: 13, y: 1, terrain: "grass", passable: true }, { id: "t-14-1", x: 14, y: 1, terrain: "grass", passable: true }, { id: "t-15-1", x: 15, y: 1, terrain: "grass", passable: true }, { id: "t-0-2", x: 0, y: 2, terrain: "grass", passable: true }, { id: "t-1-2", x: 1, y: 2, terrain: "grass", passable: true }, { id: "t-2-2", x: 2, y: 2, terrain: "grass", passable: true }, { id: "t-3-2", x: 3, y: 2, terrain: "grass", passable: true }, { id: "t-4-2", x: 4, y: 2, terrain: "grass", passable: true }, { id: "t-5-2", x: 5, y: 2, terrain: "grass", passable: true }, { id: "t-6-2", x: 6, y: 2, terrain: "grass", passable: true }, { id: "t-7-2", x: 7, y: 2, terrain: "grass", passable: true }, { id: "t-8-2", x: 8, y: 2, terrain: "grass", passable: true }, { id: "t-9-2", x: 9, y: 2, terrain: "grass", passable: true }, { id: "t-10-2", x: 10, y: 2, terrain: "grass", passable: true }, { id: "t-11-2", x: 11, y: 2, terrain: "grass", passable: true }, { id: "t-12-2", x: 12, y: 2, terrain: "grass", passable: true }, { id: "t-13-2", x: 13, y: 2, terrain: "grass", passable: true }, { id: "t-14-2", x: 14, y: 2, terrain: "grass", passable: true }, { id: "t-15-2", x: 15, y: 2, terrain: "grass", passable: true }, { id: "t-0-3", x: 0, y: 3, terrain: "grass", passable: true }, { id: "t-1-3", x: 1, y: 3, terrain: "grass", passable: true }, { id: "t-2-3", x: 2, y: 3, terrain: "grass", passable: true }, { id: "t-3-3", x: 3, y: 3, terrain: "grass", passable: true }, { id: "t-4-3", x: 4, y: 3, terrain: "grass", passable: true }, { id: "t-5-3", x: 5, y: 3, terrain: "grass", passable: true }, { id: "t-6-3", x: 6, y: 3, terrain: "grass", passable: true }, { id: "t-7-3", x: 7, y: 3, terrain: "grass", passable: true }, { id: "t-8-3", x: 8, y: 3, terrain: "grass", passable: true }, { id: "t-9-3", x: 9, y: 3, terrain: "grass", passable: true }, { id: "t-10-3", x: 10, y: 3, terrain: "grass", passable: true }, { id: "t-11-3", x: 11, y: 3, terrain: "grass", passable: true }, { id: "t-12-3", x: 12, y: 3, terrain: "grass", passable: true }, { id: "t-13-3", x: 13, y: 3, terrain: "grass", passable: true }, { id: "t-14-3", x: 14, y: 3, terrain: "grass", passable: true }, { id: "t-15-3", x: 15, y: 3, terrain: "grass", passable: true }, { id: "t-0-4", x: 0, y: 4, terrain: "grass", passable: true }, { id: "t-1-4", x: 1, y: 4, terrain: "grass", passable: true }, { id: "t-2-4", x: 2, y: 4, terrain: "grass", passable: true }, { id: "t-3-4", x: 3, y: 4, terrain: "grass", passable: true }, { id: "t-4-4", x: 4, y: 4, terrain: "grass", passable: true }, { id: "t-5-4", x: 5, y: 4, terrain: "grass", passable: true }, { id: "t-6-4", x: 6, y: 4, terrain: "grass", passable: true }, { id: "t-7-4", x: 7, y: 4, terrain: "grass", passable: true }, { id: "t-8-4", x: 8, y: 4, terrain: "grass", passable: true }, { id: "t-9-4", x: 9, y: 4, terrain: "grass", passable: true }, { id: "t-10-4", x: 10, y: 4, terrain: "grass", passable: true }, { id: "t-11-4", x: 11, y: 4, terrain: "grass", passable: true }, { id: "t-12-4", x: 12, y: 4, terrain: "grass", passable: true }, { id: "t-13-4", x: 13, y: 4, terrain: "grass", passable: true }, { id: "t-14-4", x: 14, y: 4, terrain: "grass", passable: true }, { id: "t-15-4", x: 15, y: 4, terrain: "grass", passable: true }, { id: "t-0-5", x: 0, y: 5, terrain: "grass", passable: true }, { id: "t-1-5", x: 1, y: 5, terrain: "grass", passable: true }, { id: "t-2-5", x: 2, y: 5, terrain: "grass", passable: true }, { id: "t-3-5", x: 3, y: 5, terrain: "grass", passable: true }, { id: "t-4-5", x: 4, y: 5, terrain: "grass", passable: true }, { id: "t-5-5", x: 5, y: 5, terrain: "grass", passable: true }, { id: "t-6-5", x: 6, y: 5, terrain: "grass", passable: true }, { id: "t-7-5", x: 7, y: 5, terrain: "grass", passable: true }, { id: "t-8-5", x: 8, y: 5, terrain: "grass", passable: true }, { id: "t-9-5", x: 9, y: 5, terrain: "grass", passable: true }, { id: "t-10-5", x: 10, y: 5, terrain: "grass", passable: true }, { id: "t-11-5", x: 11, y: 5, terrain: "grass", passable: true }, { id: "t-12-5", x: 12, y: 5, terrain: "grass", passable: true }, { id: "t-13-5", x: 13, y: 5, terrain: "grass", passable: true }, { id: "t-14-5", x: 14, y: 5, terrain: "grass", passable: true }, { id: "t-15-5", x: 15, y: 5, terrain: "grass", passable: true }, { id: "t-0-6", x: 0, y: 6, terrain: "grass", passable: true }, { id: "t-1-6", x: 1, y: 6, terrain: "grass", passable: true }, { id: "t-2-6", x: 2, y: 6, terrain: "grass", passable: true }, { id: "t-3-6", x: 3, y: 6, terrain: "grass", passable: true }, { id: "t-4-6", x: 4, y: 6, terrain: "grass", passable: true }, { id: "t-5-6", x: 5, y: 6, terrain: "grass", passable: true }, { id: "t-6-6", x: 6, y: 6, terrain: "grass", passable: true }, { id: "t-7-6", x: 7, y: 6, terrain: "grass", passable: true }, { id: "t-8-6", x: 8, y: 6, terrain: "grass", passable: true }, { id: "t-9-6", x: 9, y: 6, terrain: "grass", passable: true }, { id: "t-10-6", x: 10, y: 6, terrain: "grass", passable: true }, { id: "t-11-6", x: 11, y: 6, terrain: "grass", passable: true }, { id: "t-12-6", x: 12, y: 6, terrain: "grass", passable: true }, { id: "t-13-6", x: 13, y: 6, terrain: "grass", passable: true }, { id: "t-14-6", x: 14, y: 6, terrain: "grass", passable: true }, { id: "t-15-6", x: 15, y: 6, terrain: "grass", passable: true }, { id: "t-0-7", x: 0, y: 7, terrain: "grass", passable: true }, { id: "t-1-7", x: 1, y: 7, terrain: "grass", passable: true }, { id: "t-2-7", x: 2, y: 7, terrain: "grass", passable: true }, { id: "t-3-7", x: 3, y: 7, terrain: "grass", passable: true }, { id: "t-4-7", x: 4, y: 7, terrain: "grass", passable: true }, { id: "t-5-7", x: 5, y: 7, terrain: "grass", passable: true }, { id: "t-6-7", x: 6, y: 7, terrain: "grass", passable: true }, { id: "t-7-7", x: 7, y: 7, terrain: "grass", passable: true }, { id: "t-8-7", x: 8, y: 7, terrain: "grass", passable: true }, { id: "t-9-7", x: 9, y: 7, terrain: "grass", passable: true }, { id: "t-10-7", x: 10, y: 7, terrain: "grass", passable: true }, { id: "t-11-7", x: 11, y: 7, terrain: "grass", passable: true }, { id: "t-12-7", x: 12, y: 7, terrain: "grass", passable: true }, { id: "t-13-7", x: 13, y: 7, terrain: "grass", passable: true }, { id: "t-14-7", x: 14, y: 7, terrain: "grass", passable: true }, { id: "t-15-7", x: 15, y: 7, terrain: "grass", passable: true }, { id: "t-0-8", x: 0, y: 8, terrain: "grass", passable: true }, { id: "t-1-8", x: 1, y: 8, terrain: "grass", passable: true }, { id: "t-2-8", x: 2, y: 8, terrain: "grass", passable: true }, { id: "t-3-8", x: 3, y: 8, terrain: "grass", passable: true }, { id: "t-4-8", x: 4, y: 8, terrain: "grass", passable: true }, { id: "t-5-8", x: 5, y: 8, terrain: "grass", passable: true }, { id: "t-6-8", x: 6, y: 8, terrain: "grass", passable: true }, { id: "t-7-8", x: 7, y: 8, terrain: "grass", passable: true }, { id: "t-8-8", x: 8, y: 8, terrain: "grass", passable: true }, { id: "t-9-8", x: 9, y: 8, terrain: "grass", passable: true }, { id: "t-10-8", x: 10, y: 8, terrain: "grass", passable: true }, { id: "t-11-8", x: 11, y: 8, terrain: "grass", passable: true }, { id: "t-12-8", x: 12, y: 8, terrain: "grass", passable: true }, { id: "t-13-8", x: 13, y: 8, terrain: "grass", passable: true }, { id: "t-14-8", x: 14, y: 8, terrain: "grass", passable: true }, { id: "t-15-8", x: 15, y: 8, terrain: "grass", passable: true }, { id: "t-0-9", x: 0, y: 9, terrain: "grass", passable: true }, { id: "t-1-9", x: 1, y: 9, terrain: "grass", passable: true }, { id: "t-2-9", x: 2, y: 9, terrain: "grass", passable: true }, { id: "t-3-9", x: 3, y: 9, terrain: "grass", passable: true }, { id: "t-4-9", x: 4, y: 9, terrain: "grass", passable: true }, { id: "t-5-9", x: 5, y: 9, terrain: "grass", passable: true }, { id: "t-6-9", x: 6, y: 9, terrain: "grass", passable: true }, { id: "t-7-9", x: 7, y: 9, terrain: "grass", passable: true }, { id: "t-8-9", x: 8, y: 9, terrain: "grass", passable: true }, { id: "t-9-9", x: 9, y: 9, terrain: "grass", passable: true }, { id: "t-10-9", x: 10, y: 9, terrain: "grass", passable: true }, { id: "t-11-9", x: 11, y: 9, terrain: "grass", passable: true }, { id: "t-12-9", x: 12, y: 9, terrain: "grass", passable: true }, { id: "t-13-9", x: 13, y: 9, terrain: "grass", passable: true }, { id: "t-14-9", x: 14, y: 9, terrain: "grass", passable: true }, { id: "t-15-9", x: 15, y: 9, terrain: "grass", passable: true }, { id: "t-0-10", x: 0, y: 10, terrain: "grass", passable: true }, { id: "t-1-10", x: 1, y: 10, terrain: "grass", passable: true }, { id: "t-2-10", x: 2, y: 10, terrain: "grass", passable: true }, { id: "t-3-10", x: 3, y: 10, terrain: "grass", passable: true }, { id: "t-4-10", x: 4, y: 10, terrain: "grass", passable: true }, { id: "t-5-10", x: 5, y: 10, terrain: "grass", passable: true }, { id: "t-6-10", x: 6, y: 10, terrain: "grass", passable: true }, { id: "t-7-10", x: 7, y: 10, terrain: "grass", passable: true }, { id: "t-8-10", x: 8, y: 10, terrain: "grass", passable: true }, { id: "t-9-10", x: 9, y: 10, terrain: "grass", passable: true }, { id: "t-10-10", x: 10, y: 10, terrain: "grass", passable: true }, { id: "t-11-10", x: 11, y: 10, terrain: "grass", passable: true }, { id: "t-12-10", x: 12, y: 10, terrain: "grass", passable: true }, { id: "t-13-10", x: 13, y: 10, terrain: "grass", passable: true }, { id: "t-14-10", x: 14, y: 10, terrain: "grass", passable: true }, { id: "t-15-10", x: 15, y: 10, terrain: "grass", passable: true }, { id: "t-0-11", x: 0, y: 11, terrain: "grass", passable: true }, { id: "t-1-11", x: 1, y: 11, terrain: "grass", passable: true }, { id: "t-2-11", x: 2, y: 11, terrain: "grass", passable: true }, { id: "t-3-11", x: 3, y: 11, terrain: "grass", passable: true }, { id: "t-4-11", x: 4, y: 11, terrain: "grass", passable: true }, { id: "t-5-11", x: 5, y: 11, terrain: "grass", passable: true }, { id: "t-6-11", x: 6, y: 11, terrain: "grass", passable: true }, { id: "t-7-11", x: 7, y: 11, terrain: "grass", passable: true }, { id: "t-8-11", x: 8, y: 11, terrain: "grass", passable: true }, { id: "t-9-11", x: 9, y: 11, terrain: "grass", passable: true }, { id: "t-10-11", x: 10, y: 11, terrain: "grass", passable: true }, { id: "t-11-11", x: 11, y: 11, terrain: "grass", passable: true }, { id: "t-12-11", x: 12, y: 11, terrain: "grass", passable: true }, { id: "t-13-11", x: 13, y: 11, terrain: "grass", passable: true }, { id: "t-14-11", x: 14, y: 11, terrain: "grass", passable: true }, { id: "t-15-11", x: 15, y: 11, terrain: "grass", passable: true }, { id: "t-0-12", x: 0, y: 12, terrain: "grass", passable: true }, { id: "t-1-12", x: 1, y: 12, terrain: "grass", passable: true }, { id: "t-2-12", x: 2, y: 12, terrain: "grass", passable: true }, { id: "t-3-12", x: 3, y: 12, terrain: "grass", passable: true }, { id: "t-4-12", x: 4, y: 12, terrain: "grass", passable: true }, { id: "t-5-12", x: 5, y: 12, terrain: "grass", passable: true }, { id: "t-6-12", x: 6, y: 12, terrain: "grass", passable: true }, { id: "t-7-12", x: 7, y: 12, terrain: "grass", passable: true }, { id: "t-8-12", x: 8, y: 12, terrain: "grass", passable: true }, { id: "t-9-12", x: 9, y: 12, terrain: "grass", passable: true }, { id: "t-10-12", x: 10, y: 12, terrain: "grass", passable: true }, { id: "t-11-12", x: 11, y: 12, terrain: "grass", passable: true }, { id: "t-12-12", x: 12, y: 12, terrain: "grass", passable: true }, { id: "t-13-12", x: 13, y: 12, terrain: "grass", passable: true }, { id: "t-14-12", x: 14, y: 12, terrain: "grass", passable: true }, { id: "t-15-12", x: 15, y: 12, terrain: "grass", passable: true }, { id: "t-0-13", x: 0, y: 13, terrain: "grass", passable: true }, { id: "t-1-13", x: 1, y: 13, terrain: "grass", passable: true }, { id: "t-2-13", x: 2, y: 13, terrain: "grass", passable: true }, { id: "t-3-13", x: 3, y: 13, terrain: "grass", passable: true }, { id: "t-4-13", x: 4, y: 13, terrain: "grass", passable: true }, { id: "t-5-13", x: 5, y: 13, terrain: "grass", passable: true }, { id: "t-6-13", x: 6, y: 13, terrain: "grass", passable: true }, { id: "t-7-13", x: 7, y: 13, terrain: "grass", passable: true }, { id: "t-8-13", x: 8, y: 13, terrain: "grass", passable: true }, { id: "t-9-13", x: 9, y: 13, terrain: "grass", passable: true }, { id: "t-10-13", x: 10, y: 13, terrain: "grass", passable: true }, { id: "t-11-13", x: 11, y: 13, terrain: "grass", passable: true }, { id: "t-12-13", x: 12, y: 13, terrain: "grass", passable: true }, { id: "t-13-13", x: 13, y: 13, terrain: "grass", passable: true }, { id: "t-14-13", x: 14, y: 13, terrain: "grass", passable: true }, { id: "t-15-13", x: 15, y: 13, terrain: "grass", passable: true }, { id: "t-0-14", x: 0, y: 14, terrain: "grass", passable: true }, { id: "t-1-14", x: 1, y: 14, terrain: "grass", passable: true }, { id: "t-2-14", x: 2, y: 14, terrain: "grass", passable: true }, { id: "t-3-14", x: 3, y: 14, terrain: "grass", passable: true }, { id: "t-4-14", x: 4, y: 14, terrain: "grass", passable: true }, { id: "t-5-14", x: 5, y: 14, terrain: "grass", passable: true }, { id: "t-6-14", x: 6, y: 14, terrain: "grass", passable: true }, { id: "t-7-14", x: 7, y: 14, terrain: "grass", passable: true }, { id: "t-8-14", x: 8, y: 14, terrain: "grass", passable: true }, { id: "t-9-14", x: 9, y: 14, terrain: "grass", passable: true }, { id: "t-10-14", x: 10, y: 14, terrain: "grass", passable: true }, { id: "t-11-14", x: 11, y: 14, terrain: "grass", passable: true }, { id: "t-12-14", x: 12, y: 14, terrain: "grass", passable: true }, { id: "t-13-14", x: 13, y: 14, terrain: "grass", passable: true }, { id: "t-14-14", x: 14, y: 14, terrain: "grass", passable: true }, { id: "t-15-14", x: 15, y: 14, terrain: "grass", passable: true }, { id: "t-0-15", x: 0, y: 15, terrain: "grass", passable: true }, { id: "t-1-15", x: 1, y: 15, terrain: "grass", passable: true }, { id: "t-2-15", x: 2, y: 15, terrain: "grass", passable: true }, { id: "t-3-15", x: 3, y: 15, terrain: "grass", passable: true }, { id: "t-4-15", x: 4, y: 15, terrain: "grass", passable: true }, { id: "t-5-15", x: 5, y: 15, terrain: "grass", passable: true }, { id: "t-6-15", x: 6, y: 15, terrain: "grass", passable: true }, { id: "t-7-15", x: 7, y: 15, terrain: "grass", passable: true }, { id: "t-8-15", x: 8, y: 15, terrain: "grass", passable: true }, { id: "t-9-15", x: 9, y: 15, terrain: "grass", passable: true }, { id: "t-10-15", x: 10, y: 15, terrain: "grass", passable: true }, { id: "t-11-15", x: 11, y: 15, terrain: "grass", passable: true }, { id: "t-12-15", x: 12, y: 15, terrain: "grass", passable: true }, { id: "t-13-15", x: 13, y: 15, terrain: "grass", passable: true }, { id: "t-14-15", x: 14, y: 15, terrain: "grass", passable: true }, { id: "t-15-15", x: 15, y: 15, terrain: "grass", passable: true } ]
76
175
  result : string = "none"
@@ -93,7 +192,7 @@ orbital BattleBoardOrbital {
93
192
  gridWidth: 16
94
193
  gridHeight: 16
95
194
  attackDamage: 3
96
- units: [ { id: "p1", position: { x: 3, y: 12 }, x: 3, y: 12, z: 0, team: "player", health: 10, maxHealth: 10, unitType: "guardian", name: "Guardian", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.json", sprite: "blue_body_square.png", role: "npc", category: "guardian", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "guardian", thumbnailUrl: "" } }, { id: "p2", position: { x: 2, y: 11 }, x: 2, y: 11, z: 0, team: "player", health: 8, maxHealth: 8, unitType: "scrapper", name: "Scrapper", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.json", sprite: "red_body_rhombus.png", role: "npc", category: "scrapper", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "scrapper", thumbnailUrl: "" } }, { id: "p3", position: { x: 4, y: 13 }, x: 4, y: 13, z: 0, team: "player", health: 6, maxHealth: 6, unitType: "worker", name: "Worker", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.json", sprite: "yellow_body_squircle.png", role: "npc", category: "worker", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "worker", thumbnailUrl: "" } }, { id: "p4", position: { x: 2, y: 13 }, x: 2, y: 13, z: 0, team: "player", health: 7, maxHealth: 7, unitType: "mender", name: "Mender", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.json", sprite: "green_body_circle.png", role: "npc", category: "mender", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "mender", thumbnailUrl: "" } }, { id: "e1", position: { x: 12, y: 3 }, x: 12, y: 3, z: 0, team: "enemy", health: 10, maxHealth: 10, unitType: "guardian", name: "Foe", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.json", sprite: "blue_body_square.png", role: "npc", category: "guardian", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "guardian", thumbnailUrl: "" } }, { id: "e2", position: { x: 13, y: 4 }, x: 13, y: 4, z: 0, team: "enemy", health: 10, maxHealth: 10, unitType: "guardian", name: "Foe", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.json", sprite: "blue_body_square.png", role: "npc", category: "guardian", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "guardian", thumbnailUrl: "" } }, { id: "e3", position: { x: 11, y: 2 }, x: 11, y: 2, z: 0, team: "enemy", health: 8, maxHealth: 8, unitType: "scrapper", name: "Foe", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.json", sprite: "red_body_rhombus.png", role: "npc", category: "scrapper", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "scrapper", thumbnailUrl: "" } }, { id: "e4", position: { x: 13, y: 2 }, x: 13, y: 2, z: 0, team: "enemy", health: 8, maxHealth: 8, unitType: "scrapper", name: "Foe", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.json", sprite: "red_body_rhombus.png", role: "npc", category: "scrapper", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "scrapper", thumbnailUrl: "" } } ]
195
+ units: [ { id: "p1", position: { x: 3, y: 12 }, x: 3, y: 12, z: 0, team: "player", health: 10, maxHealth: 10, unitType: "guardian", name: "Guardian", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/units/guardian.svg", role: "npc", category: "guardian", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "guardian", thumbnailUrl: "" } }, { id: "p2", position: { x: 2, y: 11 }, x: 2, y: 11, z: 0, team: "player", health: 8, maxHealth: 8, unitType: "scrapper", name: "Scrapper", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/units/scrapper.svg", role: "npc", category: "scrapper", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "scrapper", thumbnailUrl: "" } }, { id: "p3", position: { x: 4, y: 13 }, x: 4, y: 13, z: 0, team: "player", health: 6, maxHealth: 6, unitType: "worker", name: "Worker", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/units/worker.svg", role: "npc", category: "worker", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "worker", thumbnailUrl: "" } }, { id: "p4", position: { x: 2, y: 13 }, x: 2, y: 13, z: 0, team: "player", health: 7, maxHealth: 7, unitType: "mender", name: "Mender", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/units/mender.svg", role: "npc", category: "mender", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "mender", thumbnailUrl: "" } }, { id: "e1", position: { x: 12, y: 3 }, x: 12, y: 3, z: 0, team: "enemy", health: 10, maxHealth: 10, unitType: "guardian", name: "Foe", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/units/guardian.svg", role: "npc", category: "guardian", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "guardian", thumbnailUrl: "" } }, { id: "e2", position: { x: 13, y: 4 }, x: 13, y: 4, z: 0, team: "enemy", health: 10, maxHealth: 10, unitType: "guardian", name: "Foe", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/units/guardian.svg", role: "npc", category: "guardian", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "guardian", thumbnailUrl: "" } }, { id: "e3", position: { x: 11, y: 2 }, x: 11, y: 2, z: 0, team: "enemy", health: 8, maxHealth: 8, unitType: "scrapper", name: "Foe", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/units/scrapper.svg", role: "npc", category: "scrapper", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "scrapper", thumbnailUrl: "" } }, { id: "e4", position: { x: 13, y: 2 }, x: 13, y: 2, z: 0, team: "enemy", health: 8, maxHealth: 8, unitType: "scrapper", name: "Foe", modelUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/units/scrapper.svg", role: "npc", category: "scrapper", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "scrapper", thumbnailUrl: "" } } ]
97
196
  tiles: [ { id: "t-0-0", x: 0, y: 0, terrain: "grass", passable: true }, { id: "t-1-0", x: 1, y: 0, terrain: "grass", passable: true }, { id: "t-2-0", x: 2, y: 0, terrain: "grass", passable: true }, { id: "t-3-0", x: 3, y: 0, terrain: "grass", passable: true }, { id: "t-4-0", x: 4, y: 0, terrain: "grass", passable: true }, { id: "t-5-0", x: 5, y: 0, terrain: "grass", passable: true }, { id: "t-6-0", x: 6, y: 0, terrain: "grass", passable: true }, { id: "t-7-0", x: 7, y: 0, terrain: "grass", passable: true }, { id: "t-8-0", x: 8, y: 0, terrain: "grass", passable: true }, { id: "t-9-0", x: 9, y: 0, terrain: "grass", passable: true }, { id: "t-10-0", x: 10, y: 0, terrain: "grass", passable: true }, { id: "t-11-0", x: 11, y: 0, terrain: "grass", passable: true }, { id: "t-12-0", x: 12, y: 0, terrain: "grass", passable: true }, { id: "t-13-0", x: 13, y: 0, terrain: "grass", passable: true }, { id: "t-14-0", x: 14, y: 0, terrain: "grass", passable: true }, { id: "t-15-0", x: 15, y: 0, terrain: "grass", passable: true }, { id: "t-0-1", x: 0, y: 1, terrain: "grass", passable: true }, { id: "t-1-1", x: 1, y: 1, terrain: "grass", passable: true }, { id: "t-2-1", x: 2, y: 1, terrain: "grass", passable: true }, { id: "t-3-1", x: 3, y: 1, terrain: "grass", passable: true }, { id: "t-4-1", x: 4, y: 1, terrain: "grass", passable: true }, { id: "t-5-1", x: 5, y: 1, terrain: "grass", passable: true }, { id: "t-6-1", x: 6, y: 1, terrain: "grass", passable: true }, { id: "t-7-1", x: 7, y: 1, terrain: "grass", passable: true }, { id: "t-8-1", x: 8, y: 1, terrain: "grass", passable: true }, { id: "t-9-1", x: 9, y: 1, terrain: "grass", passable: true }, { id: "t-10-1", x: 10, y: 1, terrain: "grass", passable: true }, { id: "t-11-1", x: 11, y: 1, terrain: "grass", passable: true }, { id: "t-12-1", x: 12, y: 1, terrain: "grass", passable: true }, { id: "t-13-1", x: 13, y: 1, terrain: "grass", passable: true }, { id: "t-14-1", x: 14, y: 1, terrain: "grass", passable: true }, { id: "t-15-1", x: 15, y: 1, terrain: "grass", passable: true }, { id: "t-0-2", x: 0, y: 2, terrain: "grass", passable: true }, { id: "t-1-2", x: 1, y: 2, terrain: "grass", passable: true }, { id: "t-2-2", x: 2, y: 2, terrain: "grass", passable: true }, { id: "t-3-2", x: 3, y: 2, terrain: "grass", passable: true }, { id: "t-4-2", x: 4, y: 2, terrain: "grass", passable: true }, { id: "t-5-2", x: 5, y: 2, terrain: "grass", passable: true }, { id: "t-6-2", x: 6, y: 2, terrain: "grass", passable: true }, { id: "t-7-2", x: 7, y: 2, terrain: "grass", passable: true }, { id: "t-8-2", x: 8, y: 2, terrain: "grass", passable: true }, { id: "t-9-2", x: 9, y: 2, terrain: "grass", passable: true }, { id: "t-10-2", x: 10, y: 2, terrain: "grass", passable: true }, { id: "t-11-2", x: 11, y: 2, terrain: "grass", passable: true }, { id: "t-12-2", x: 12, y: 2, terrain: "grass", passable: true }, { id: "t-13-2", x: 13, y: 2, terrain: "grass", passable: true }, { id: "t-14-2", x: 14, y: 2, terrain: "grass", passable: true }, { id: "t-15-2", x: 15, y: 2, terrain: "grass", passable: true }, { id: "t-0-3", x: 0, y: 3, terrain: "grass", passable: true }, { id: "t-1-3", x: 1, y: 3, terrain: "grass", passable: true }, { id: "t-2-3", x: 2, y: 3, terrain: "grass", passable: true }, { id: "t-3-3", x: 3, y: 3, terrain: "grass", passable: true }, { id: "t-4-3", x: 4, y: 3, terrain: "grass", passable: true }, { id: "t-5-3", x: 5, y: 3, terrain: "grass", passable: true }, { id: "t-6-3", x: 6, y: 3, terrain: "grass", passable: true }, { id: "t-7-3", x: 7, y: 3, terrain: "grass", passable: true }, { id: "t-8-3", x: 8, y: 3, terrain: "grass", passable: true }, { id: "t-9-3", x: 9, y: 3, terrain: "grass", passable: true }, { id: "t-10-3", x: 10, y: 3, terrain: "grass", passable: true }, { id: "t-11-3", x: 11, y: 3, terrain: "grass", passable: true }, { id: "t-12-3", x: 12, y: 3, terrain: "grass", passable: true }, { id: "t-13-3", x: 13, y: 3, terrain: "grass", passable: true }, { id: "t-14-3", x: 14, y: 3, terrain: "grass", passable: true }, { id: "t-15-3", x: 15, y: 3, terrain: "grass", passable: true }, { id: "t-0-4", x: 0, y: 4, terrain: "grass", passable: true }, { id: "t-1-4", x: 1, y: 4, terrain: "grass", passable: true }, { id: "t-2-4", x: 2, y: 4, terrain: "grass", passable: true }, { id: "t-3-4", x: 3, y: 4, terrain: "grass", passable: true }, { id: "t-4-4", x: 4, y: 4, terrain: "grass", passable: true }, { id: "t-5-4", x: 5, y: 4, terrain: "grass", passable: true }, { id: "t-6-4", x: 6, y: 4, terrain: "grass", passable: true }, { id: "t-7-4", x: 7, y: 4, terrain: "grass", passable: true }, { id: "t-8-4", x: 8, y: 4, terrain: "grass", passable: true }, { id: "t-9-4", x: 9, y: 4, terrain: "grass", passable: true }, { id: "t-10-4", x: 10, y: 4, terrain: "grass", passable: true }, { id: "t-11-4", x: 11, y: 4, terrain: "grass", passable: true }, { id: "t-12-4", x: 12, y: 4, terrain: "grass", passable: true }, { id: "t-13-4", x: 13, y: 4, terrain: "grass", passable: true }, { id: "t-14-4", x: 14, y: 4, terrain: "grass", passable: true }, { id: "t-15-4", x: 15, y: 4, terrain: "grass", passable: true }, { id: "t-0-5", x: 0, y: 5, terrain: "grass", passable: true }, { id: "t-1-5", x: 1, y: 5, terrain: "grass", passable: true }, { id: "t-2-5", x: 2, y: 5, terrain: "grass", passable: true }, { id: "t-3-5", x: 3, y: 5, terrain: "grass", passable: true }, { id: "t-4-5", x: 4, y: 5, terrain: "grass", passable: true }, { id: "t-5-5", x: 5, y: 5, terrain: "grass", passable: true }, { id: "t-6-5", x: 6, y: 5, terrain: "grass", passable: true }, { id: "t-7-5", x: 7, y: 5, terrain: "grass", passable: true }, { id: "t-8-5", x: 8, y: 5, terrain: "grass", passable: true }, { id: "t-9-5", x: 9, y: 5, terrain: "grass", passable: true }, { id: "t-10-5", x: 10, y: 5, terrain: "grass", passable: true }, { id: "t-11-5", x: 11, y: 5, terrain: "grass", passable: true }, { id: "t-12-5", x: 12, y: 5, terrain: "grass", passable: true }, { id: "t-13-5", x: 13, y: 5, terrain: "grass", passable: true }, { id: "t-14-5", x: 14, y: 5, terrain: "grass", passable: true }, { id: "t-15-5", x: 15, y: 5, terrain: "grass", passable: true }, { id: "t-0-6", x: 0, y: 6, terrain: "grass", passable: true }, { id: "t-1-6", x: 1, y: 6, terrain: "grass", passable: true }, { id: "t-2-6", x: 2, y: 6, terrain: "grass", passable: true }, { id: "t-3-6", x: 3, y: 6, terrain: "grass", passable: true }, { id: "t-4-6", x: 4, y: 6, terrain: "grass", passable: true }, { id: "t-5-6", x: 5, y: 6, terrain: "grass", passable: true }, { id: "t-6-6", x: 6, y: 6, terrain: "grass", passable: true }, { id: "t-7-6", x: 7, y: 6, terrain: "grass", passable: true }, { id: "t-8-6", x: 8, y: 6, terrain: "grass", passable: true }, { id: "t-9-6", x: 9, y: 6, terrain: "grass", passable: true }, { id: "t-10-6", x: 10, y: 6, terrain: "grass", passable: true }, { id: "t-11-6", x: 11, y: 6, terrain: "grass", passable: true }, { id: "t-12-6", x: 12, y: 6, terrain: "grass", passable: true }, { id: "t-13-6", x: 13, y: 6, terrain: "grass", passable: true }, { id: "t-14-6", x: 14, y: 6, terrain: "grass", passable: true }, { id: "t-15-6", x: 15, y: 6, terrain: "grass", passable: true }, { id: "t-0-7", x: 0, y: 7, terrain: "grass", passable: true }, { id: "t-1-7", x: 1, y: 7, terrain: "grass", passable: true }, { id: "t-2-7", x: 2, y: 7, terrain: "grass", passable: true }, { id: "t-3-7", x: 3, y: 7, terrain: "grass", passable: true }, { id: "t-4-7", x: 4, y: 7, terrain: "grass", passable: true }, { id: "t-5-7", x: 5, y: 7, terrain: "grass", passable: true }, { id: "t-6-7", x: 6, y: 7, terrain: "grass", passable: true }, { id: "t-7-7", x: 7, y: 7, terrain: "grass", passable: true }, { id: "t-8-7", x: 8, y: 7, terrain: "grass", passable: true }, { id: "t-9-7", x: 9, y: 7, terrain: "grass", passable: true }, { id: "t-10-7", x: 10, y: 7, terrain: "grass", passable: true }, { id: "t-11-7", x: 11, y: 7, terrain: "grass", passable: true }, { id: "t-12-7", x: 12, y: 7, terrain: "grass", passable: true }, { id: "t-13-7", x: 13, y: 7, terrain: "grass", passable: true }, { id: "t-14-7", x: 14, y: 7, terrain: "grass", passable: true }, { id: "t-15-7", x: 15, y: 7, terrain: "grass", passable: true }, { id: "t-0-8", x: 0, y: 8, terrain: "grass", passable: true }, { id: "t-1-8", x: 1, y: 8, terrain: "grass", passable: true }, { id: "t-2-8", x: 2, y: 8, terrain: "grass", passable: true }, { id: "t-3-8", x: 3, y: 8, terrain: "grass", passable: true }, { id: "t-4-8", x: 4, y: 8, terrain: "grass", passable: true }, { id: "t-5-8", x: 5, y: 8, terrain: "grass", passable: true }, { id: "t-6-8", x: 6, y: 8, terrain: "grass", passable: true }, { id: "t-7-8", x: 7, y: 8, terrain: "grass", passable: true }, { id: "t-8-8", x: 8, y: 8, terrain: "grass", passable: true }, { id: "t-9-8", x: 9, y: 8, terrain: "grass", passable: true }, { id: "t-10-8", x: 10, y: 8, terrain: "grass", passable: true }, { id: "t-11-8", x: 11, y: 8, terrain: "grass", passable: true }, { id: "t-12-8", x: 12, y: 8, terrain: "grass", passable: true }, { id: "t-13-8", x: 13, y: 8, terrain: "grass", passable: true }, { id: "t-14-8", x: 14, y: 8, terrain: "grass", passable: true }, { id: "t-15-8", x: 15, y: 8, terrain: "grass", passable: true }, { id: "t-0-9", x: 0, y: 9, terrain: "grass", passable: true }, { id: "t-1-9", x: 1, y: 9, terrain: "grass", passable: true }, { id: "t-2-9", x: 2, y: 9, terrain: "grass", passable: true }, { id: "t-3-9", x: 3, y: 9, terrain: "grass", passable: true }, { id: "t-4-9", x: 4, y: 9, terrain: "grass", passable: true }, { id: "t-5-9", x: 5, y: 9, terrain: "grass", passable: true }, { id: "t-6-9", x: 6, y: 9, terrain: "grass", passable: true }, { id: "t-7-9", x: 7, y: 9, terrain: "grass", passable: true }, { id: "t-8-9", x: 8, y: 9, terrain: "grass", passable: true }, { id: "t-9-9", x: 9, y: 9, terrain: "grass", passable: true }, { id: "t-10-9", x: 10, y: 9, terrain: "grass", passable: true }, { id: "t-11-9", x: 11, y: 9, terrain: "grass", passable: true }, { id: "t-12-9", x: 12, y: 9, terrain: "grass", passable: true }, { id: "t-13-9", x: 13, y: 9, terrain: "grass", passable: true }, { id: "t-14-9", x: 14, y: 9, terrain: "grass", passable: true }, { id: "t-15-9", x: 15, y: 9, terrain: "grass", passable: true }, { id: "t-0-10", x: 0, y: 10, terrain: "grass", passable: true }, { id: "t-1-10", x: 1, y: 10, terrain: "grass", passable: true }, { id: "t-2-10", x: 2, y: 10, terrain: "grass", passable: true }, { id: "t-3-10", x: 3, y: 10, terrain: "grass", passable: true }, { id: "t-4-10", x: 4, y: 10, terrain: "grass", passable: true }, { id: "t-5-10", x: 5, y: 10, terrain: "grass", passable: true }, { id: "t-6-10", x: 6, y: 10, terrain: "grass", passable: true }, { id: "t-7-10", x: 7, y: 10, terrain: "grass", passable: true }, { id: "t-8-10", x: 8, y: 10, terrain: "grass", passable: true }, { id: "t-9-10", x: 9, y: 10, terrain: "grass", passable: true }, { id: "t-10-10", x: 10, y: 10, terrain: "grass", passable: true }, { id: "t-11-10", x: 11, y: 10, terrain: "grass", passable: true }, { id: "t-12-10", x: 12, y: 10, terrain: "grass", passable: true }, { id: "t-13-10", x: 13, y: 10, terrain: "grass", passable: true }, { id: "t-14-10", x: 14, y: 10, terrain: "grass", passable: true }, { id: "t-15-10", x: 15, y: 10, terrain: "grass", passable: true }, { id: "t-0-11", x: 0, y: 11, terrain: "grass", passable: true }, { id: "t-1-11", x: 1, y: 11, terrain: "grass", passable: true }, { id: "t-2-11", x: 2, y: 11, terrain: "grass", passable: true }, { id: "t-3-11", x: 3, y: 11, terrain: "grass", passable: true }, { id: "t-4-11", x: 4, y: 11, terrain: "grass", passable: true }, { id: "t-5-11", x: 5, y: 11, terrain: "grass", passable: true }, { id: "t-6-11", x: 6, y: 11, terrain: "grass", passable: true }, { id: "t-7-11", x: 7, y: 11, terrain: "grass", passable: true }, { id: "t-8-11", x: 8, y: 11, terrain: "grass", passable: true }, { id: "t-9-11", x: 9, y: 11, terrain: "grass", passable: true }, { id: "t-10-11", x: 10, y: 11, terrain: "grass", passable: true }, { id: "t-11-11", x: 11, y: 11, terrain: "grass", passable: true }, { id: "t-12-11", x: 12, y: 11, terrain: "grass", passable: true }, { id: "t-13-11", x: 13, y: 11, terrain: "grass", passable: true }, { id: "t-14-11", x: 14, y: 11, terrain: "grass", passable: true }, { id: "t-15-11", x: 15, y: 11, terrain: "grass", passable: true }, { id: "t-0-12", x: 0, y: 12, terrain: "grass", passable: true }, { id: "t-1-12", x: 1, y: 12, terrain: "grass", passable: true }, { id: "t-2-12", x: 2, y: 12, terrain: "grass", passable: true }, { id: "t-3-12", x: 3, y: 12, terrain: "grass", passable: true }, { id: "t-4-12", x: 4, y: 12, terrain: "grass", passable: true }, { id: "t-5-12", x: 5, y: 12, terrain: "grass", passable: true }, { id: "t-6-12", x: 6, y: 12, terrain: "grass", passable: true }, { id: "t-7-12", x: 7, y: 12, terrain: "grass", passable: true }, { id: "t-8-12", x: 8, y: 12, terrain: "grass", passable: true }, { id: "t-9-12", x: 9, y: 12, terrain: "grass", passable: true }, { id: "t-10-12", x: 10, y: 12, terrain: "grass", passable: true }, { id: "t-11-12", x: 11, y: 12, terrain: "grass", passable: true }, { id: "t-12-12", x: 12, y: 12, terrain: "grass", passable: true }, { id: "t-13-12", x: 13, y: 12, terrain: "grass", passable: true }, { id: "t-14-12", x: 14, y: 12, terrain: "grass", passable: true }, { id: "t-15-12", x: 15, y: 12, terrain: "grass", passable: true }, { id: "t-0-13", x: 0, y: 13, terrain: "grass", passable: true }, { id: "t-1-13", x: 1, y: 13, terrain: "grass", passable: true }, { id: "t-2-13", x: 2, y: 13, terrain: "grass", passable: true }, { id: "t-3-13", x: 3, y: 13, terrain: "grass", passable: true }, { id: "t-4-13", x: 4, y: 13, terrain: "grass", passable: true }, { id: "t-5-13", x: 5, y: 13, terrain: "grass", passable: true }, { id: "t-6-13", x: 6, y: 13, terrain: "grass", passable: true }, { id: "t-7-13", x: 7, y: 13, terrain: "grass", passable: true }, { id: "t-8-13", x: 8, y: 13, terrain: "grass", passable: true }, { id: "t-9-13", x: 9, y: 13, terrain: "grass", passable: true }, { id: "t-10-13", x: 10, y: 13, terrain: "grass", passable: true }, { id: "t-11-13", x: 11, y: 13, terrain: "grass", passable: true }, { id: "t-12-13", x: 12, y: 13, terrain: "grass", passable: true }, { id: "t-13-13", x: 13, y: 13, terrain: "grass", passable: true }, { id: "t-14-13", x: 14, y: 13, terrain: "grass", passable: true }, { id: "t-15-13", x: 15, y: 13, terrain: "grass", passable: true }, { id: "t-0-14", x: 0, y: 14, terrain: "grass", passable: true }, { id: "t-1-14", x: 1, y: 14, terrain: "grass", passable: true }, { id: "t-2-14", x: 2, y: 14, terrain: "grass", passable: true }, { id: "t-3-14", x: 3, y: 14, terrain: "grass", passable: true }, { id: "t-4-14", x: 4, y: 14, terrain: "grass", passable: true }, { id: "t-5-14", x: 5, y: 14, terrain: "grass", passable: true }, { id: "t-6-14", x: 6, y: 14, terrain: "grass", passable: true }, { id: "t-7-14", x: 7, y: 14, terrain: "grass", passable: true }, { id: "t-8-14", x: 8, y: 14, terrain: "grass", passable: true }, { id: "t-9-14", x: 9, y: 14, terrain: "grass", passable: true }, { id: "t-10-14", x: 10, y: 14, terrain: "grass", passable: true }, { id: "t-11-14", x: 11, y: 14, terrain: "grass", passable: true }, { id: "t-12-14", x: 12, y: 14, terrain: "grass", passable: true }, { id: "t-13-14", x: 13, y: 14, terrain: "grass", passable: true }, { id: "t-14-14", x: 14, y: 14, terrain: "grass", passable: true }, { id: "t-15-14", x: 15, y: 14, terrain: "grass", passable: true }, { id: "t-0-15", x: 0, y: 15, terrain: "grass", passable: true }, { id: "t-1-15", x: 1, y: 15, terrain: "grass", passable: true }, { id: "t-2-15", x: 2, y: 15, terrain: "grass", passable: true }, { id: "t-3-15", x: 3, y: 15, terrain: "grass", passable: true }, { id: "t-4-15", x: 4, y: 15, terrain: "grass", passable: true }, { id: "t-5-15", x: 5, y: 15, terrain: "grass", passable: true }, { id: "t-6-15", x: 6, y: 15, terrain: "grass", passable: true }, { id: "t-7-15", x: 7, y: 15, terrain: "grass", passable: true }, { id: "t-8-15", x: 8, y: 15, terrain: "grass", passable: true }, { id: "t-9-15", x: 9, y: 15, terrain: "grass", passable: true }, { id: "t-10-15", x: 10, y: 15, terrain: "grass", passable: true }, { id: "t-11-15", x: 11, y: 15, terrain: "grass", passable: true }, { id: "t-12-15", x: 12, y: 15, terrain: "grass", passable: true }, { id: "t-13-15", x: 13, y: 15, terrain: "grass", passable: true }, { id: "t-14-15", x: 14, y: 15, terrain: "grass", passable: true }, { id: "t-15-15", x: 15, y: 15, terrain: "grass", passable: true } ]
98
197
  }
99
198
  }
@@ -114,6 +213,10 @@ orbital BattleBoardOrbital {
114
213
  config { running: true, xpPerKill: 25, startXp: 0, baseXpToNext: 100, xpToNextIncrement: 50, levelUpHeal: 2, healTeam: "player", initialEnemies: 4 }
115
214
  }
116
215
 
216
+ trait AnimClock = Frame.traits.AnimClock -> GameState {
217
+ config { frames: [] }
218
+ }
219
+
117
220
  trait Player = Frame.traits.PlayerIntent -> GameState {
118
221
  config {
119
222
  gridWidth: 16
@@ -122,13 +225,13 @@ orbital BattleBoardOrbital {
122
225
  projection: "isometric"
123
226
  showMinimap: true
124
227
  scale: 1
125
- backgroundAsset: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-adventure-pack/ui/uipack_rpg_sheet.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-adventure-pack/ui/uipack_rpg_sheet.json", sprite: "panel_beige.png", role: "ui", category: "ui", animations: [], style: "adventure", dimension: "2d", aspect: "1:1", name: "panel-frame", thumbnailUrl: "" }
126
- hudBackgroundAsset: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-adventure-pack/ui/uipack_rpg_sheet.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-adventure-pack/ui/uipack_rpg_sheet.json", sprite: "panel_beige.png", role: "ui", category: "ui", animations: [], style: "adventure", dimension: "2d", aspect: "1:1", name: "panel-frame", thumbnailUrl: "" }
228
+ backgroundAsset: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/ui/panel-frame.svg", role: "ui", category: "ui", animations: [], style: "adventure", dimension: "2d", aspect: "1:1", name: "panel-frame", thumbnailUrl: "" }
229
+ hudBackgroundAsset: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/ui/panel-frame.svg", role: "ui", category: "ui", animations: [], style: "adventure", dimension: "2d", aspect: "1:1", name: "panel-frame", thumbnailUrl: "" }
127
230
  extraStats: [ { label: "XP", value: @entity.xp }, { label: "Lvl", value: @entity.level } ]
128
- features: [ { id: "f1", x: 13, y: 1, type: "gold_mine", assetUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/kenney-cartography-pack/ui/spritesheet_default.png", atlas: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/kenney-cartography-pack/ui/spritesheet_default.json", sprite: "mine.png", role: "decoration", category: "gold_mine", animations: ["static"], style: "", dimension: "2d", aspect: "1:1", name: "gold_mine", thumbnailUrl: "" } }, { id: "f2", x: 1, y: 14, type: "portal", assetUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/kenney-cartography-pack/ui/spritesheet_default.png", atlas: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/kenney-cartography-pack/ui/spritesheet_default.json", sprite: "gate.png", role: "decoration", category: "portal", animations: ["static"], style: "", dimension: "2d", aspect: "1:1", name: "portal", thumbnailUrl: "" } } ]
129
- assetManifest: { terrains: { grass: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/kenney-isometric-tiles-base/terrain/landscapeTiles_sheet.png", atlas: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/kenney-isometric-tiles-base/terrain/landscapeTiles_sheet.json", sprite: "landscapeTiles_000.png", role: "tile", category: "grass", animations: ["static"], style: "", dimension: "2d", aspect: "1:1", name: "grass", thumbnailUrl: "" }, stone: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/kenney-isometric-tiles-base/terrain/landscapeTiles_sheet.png", atlas: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/kenney-isometric-tiles-base/terrain/landscapeTiles_sheet.json", sprite: "landscapeTiles_001.png", role: "tile", category: "stone", animations: ["static"], style: "", dimension: "2d", aspect: "1:1", name: "stone", thumbnailUrl: "" } }, units: { guardian: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.json", sprite: "blue_body_square.png", role: "npc", category: "guardian", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "guardian", thumbnailUrl: "" }, scrapper: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.json", sprite: "red_body_rhombus.png", role: "npc", category: "scrapper", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "scrapper", thumbnailUrl: "" }, worker: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.json", sprite: "yellow_body_squircle.png", role: "npc", category: "worker", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "worker", thumbnailUrl: "" }, mender: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-shape-characters/units/spritesheet_default.json", sprite: "green_body_circle.png", role: "npc", category: "mender", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "mender", thumbnailUrl: "" } }, features: { gold_mine: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/kenney-cartography-pack/ui/spritesheet_default.png", atlas: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/kenney-cartography-pack/ui/spritesheet_default.json", sprite: "mine.png", role: "decoration", category: "gold_mine", animations: ["static"], style: "", dimension: "2d", aspect: "1:1", name: "gold_mine", thumbnailUrl: "" }, portal: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/kenney-cartography-pack/ui/spritesheet_default.png", atlas: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/kenney-cartography-pack/ui/spritesheet_default.json", sprite: "gate.png", role: "decoration", category: "portal", animations: ["static"], style: "", dimension: "2d", aspect: "1:1", name: "portal", thumbnailUrl: "" } }, effects: { explosion: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-explosion-pack/effects/spritesheet_pixelExplosion.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-explosion-pack/effects/spritesheet_pixelExplosion.json", sprite: "pixelExplosion07.png", role: "effect", category: "explosion", animations: ["static"], style: "", dimension: "2d", aspect: "8:1", name: "explosion", thumbnailUrl: "" } } }
231
+ features: [ { id: "f1", x: 13, y: 1, type: "gold_mine", assetUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/features/gold_mine.svg", role: "decoration", category: "gold_mine", animations: ["static"], style: "", dimension: "2d", aspect: "1:1", name: "gold_mine", thumbnailUrl: "" } }, { id: "f2", x: 1, y: 14, type: "portal", assetUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/features/portal.svg", role: "decoration", category: "portal", animations: ["static"], style: "", dimension: "2d", aspect: "1:1", name: "portal", thumbnailUrl: "" } } ]
232
+ assetManifest: { terrains: { grass: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/terrain/grass.svg", role: "tile", category: "grass", animations: ["static"], style: "", dimension: "2d", aspect: "1:1", name: "grass", thumbnailUrl: "" }, stone: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/terrain/stone.svg", role: "tile", category: "stone", animations: ["static"], style: "", dimension: "2d", aspect: "1:1", name: "stone", thumbnailUrl: "" } }, units: { guardian: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/units/guardian.svg", role: "npc", category: "guardian", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "guardian", thumbnailUrl: "" }, scrapper: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/units/scrapper.svg", role: "npc", category: "scrapper", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "scrapper", thumbnailUrl: "" }, worker: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/units/worker.svg", role: "npc", category: "worker", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "worker", thumbnailUrl: "" }, mender: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/units/mender.svg", role: "npc", category: "mender", animations: ["idle","walk","attack","hit","death"], style: "", dimension: "2d", aspect: "1:1", name: "mender", thumbnailUrl: "" } }, features: { gold_mine: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/features/gold_mine.svg", role: "decoration", category: "gold_mine", animations: ["static"], style: "", dimension: "2d", aspect: "1:1", name: "gold_mine", thumbnailUrl: "" }, portal: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/features/portal.svg", role: "decoration", category: "portal", animations: ["static"], style: "", dimension: "2d", aspect: "1:1", name: "portal", thumbnailUrl: "" } }, effects: { explosion: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/effects/explosion.svg", role: "effect", category: "explosion", animations: ["static"], style: "", dimension: "2d", aspect: "8:1", name: "explosion", thumbnailUrl: "" }, hit: { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/effects/hit.svg", role: "effect", category: "hit", animations: ["static"], style: "", dimension: "2d", aspect: "1:1", name: "hit", thumbnailUrl: "" } }, ui: { "panel-frame": { url: "https://almadar-kflow-assets.web.app/shared/ui-battle-board/svg/isometric/ui/panel-frame.svg", role: "ui", category: "ui", animations: [], style: "adventure", dimension: "2d", aspect: "1:1", name: "panel-frame", thumbnailUrl: "" } } }
130
233
  }
131
234
  }
132
235
 
133
- page "/battle-board" as BattleBoardPage -> Authority, FxDecay, RoundLogic, ScoreKeeper, XpKeeper, Player
236
+ page "/battle-board" as BattleBoardPage -> Authority, FxDecay, RoundLogic, ScoreKeeper, XpKeeper, Player, AnimClock
134
237
  }
@@ -53,25 +53,6 @@ orbital BuilderBoardOrbital {
53
53
  trait BuilderBoardRender -> @rebindable BuilderBoardItem [interaction, instance] {
54
54
  initial: playing
55
55
 
56
- state menu {
57
- START -> playing
58
- (set @entity.components @config.components)
59
- (set @entity.slots (array/map @config.slots (fn s (object/merge @s { options: (array/map @config.components (fn c { slotId: (object/get @s id), componentId: (object/get @c id), label: (object/get @c label), iconUrl: (object/get @c iconUrl) })) }))))
60
- (set @entity.title @config.title)
61
- (set @entity.description @config.description)
62
- (set @entity.hint @config.hint)
63
- (set @entity.attempts 0)
64
- (set @entity.result "none")
65
- (render-ui main {
66
- type: game-shell
67
- hud: { type: stack, direction: horizontal, gap: md, justify: between, children: [ { type: game-hud, stats: [ { label: "Attempts", value: @entity.attempts }, { label: "Status", value: @entity.result } ] }, { type: stack, direction: horizontal, gap: sm, children: [ { type: button, action: CHECK, label: "Check", variant: primary }, { type: button, action: PLAY_AGAIN, label: "Reset", variant: secondary } ] } ] }
68
- children: [
69
- { type: card, children: [ { type: typography, variant: h4, content: @entity.title }, { type: typography, variant: body, content: @entity.description } ] },
70
- { type: card, children: [ { type: data-list, entity: @entity.slots, fields: [], gap: sm, renderItem: (fn s { type: card, children: [ { type: stack, direction: horizontal, gap: sm, justify: between, children: [ { type: typography, variant: label, content: @s.id }, { type: badge, label: @s.placedComponentId } ] }, { type: data-list, entity: @s.options, fields: [], gap: sm, renderItem: (fn opt { type: button, action: PLACE, actionPayload: { slotId: @opt.slotId, componentId: @opt.componentId }, label: @opt.label, iconAsset: @opt.iconUrl, variant: primary }) } ] }) } ] }
71
- ]
72
- })
73
- }
74
-
75
56
  state playing {
76
57
  INIT -> playing
77
58
  (set @entity.components @config.components)
@@ -125,8 +106,12 @@ orbital BuilderBoardOrbital {
125
106
  }
126
107
 
127
108
  state complete {
128
- PLAY_AGAIN -> menu
109
+ PLAY_AGAIN -> playing
110
+ (set @entity.components @config.components)
129
111
  (set @entity.slots (array/map @config.slots (fn s (object/merge @s { options: (array/map @config.components (fn c { slotId: (object/get @s id), componentId: (object/get @c id), label: (object/get @c label), iconUrl: (object/get @c iconUrl) })) }))))
112
+ (set @entity.title @config.title)
113
+ (set @entity.description @config.description)
114
+ (set @entity.hint @config.hint)
130
115
  (set @entity.attempts 0)
131
116
  (set @entity.result "none")
132
117
  (render-ui main {
@@ -85,6 +85,7 @@ orbital CardBattlerBoardOrbital {
85
85
  (set @entity.hand (array/concat @entity.hand (array/slice @entity.deck 0 @config.drawPerTurn)))
86
86
  (set @entity.deck (array/slice @entity.deck @config.drawPerTurn (array/len @entity.deck)))
87
87
  (set @entity.result (if (>= @entity.turn @config.turnsToWin) "won" @entity.result))
88
+ (if (!= @entity.result "none") (emit GAME_END { result: @entity.result }) null)
88
89
  (render-ui main {
89
90
  type: game-shell
90
91
  hud: { type: stack, direction: horizontal, gap: md, justify: between, children: [ { type: game-hud, stats: [ { label: "Mana", value: @entity.mana }, { label: "Turn", value: @entity.turn } ] }, { type: stack, direction: horizontal, gap: sm, children: [ { type: button, action: END_TURN, label: "End Turn", variant: primary }, { type: button, action: PLAY_AGAIN, label: "Play Again", variant: secondary } ] } ] }
@@ -97,6 +98,7 @@ orbital CardBattlerBoardOrbital {
97
98
  GAME_END -> gameover when (or (== @entity.result "won") (== @entity.result "lost"))
98
99
  (render-ui main {
99
100
  type: game-shell
101
+ overlay: { type: game-menu, title: (if (== @entity.result "won") "VICTORY!" "DEFEAT"), subtitle: (str/concat "Result: " @entity.result), options: [ { id: "again", label: "Play Again", event: "PLAY_AGAIN", variant: "primary" } ] }
100
102
  hud: { type: stack, direction: horizontal, gap: md, justify: between, children: [ { type: game-hud, stats: [ { label: "Mana", value: @entity.mana }, { label: "Turn", value: @entity.turn } ] }, { type: stack, direction: horizontal, gap: sm, children: [ { type: button, action: END_TURN, label: "End Turn", variant: primary }, { type: button, action: PLAY_AGAIN, label: "Play Again", variant: secondary } ] } ] }
101
103
  children: [
102
104
  { type: data-list, entity: @entity.board, fields: [], gap: sm, renderItem: (fn c { type: button, variant: ghost, children: [ { type: atlas-image, asset: { url: "https://almadar-kflow-assets.web.app/shared/ui-card-battler-board/kenney-boardgame-pack/ui/diceWhite_border.png", atlas: "https://almadar-kflow-assets.web.app/shared/ui-card-battler-board/kenney-boardgame-pack/ui/diceWhite_border.json", sprite: "dieWhite_border6.png", role: "ui", category: "ui", animations: [], style: "", variant: "", dimension: "2d", aspect: "5:7", name: "card-frame", thumbnailUrl: "" }, fill: true, fit: "fill" }, { type: stack, direction: vertical, gap: xs, align: center, children: [ { type: badge, label: @c.cost, variant: info }, { type: game-icon, assetUrl: @c.sprite, icon: "image", size: 52, alt: @c.title }, { type: typography, variant: caption, content: @c.title }, { type: stack, direction: horizontal, gap: xs, justify: between, children: [ { type: typography, variant: caption, content: (str/concat "⚔" @c.attack) }, { type: typography, variant: caption, content: (str/concat "🛡" @c.defense) } ] } ] } ] }) },
@@ -325,7 +325,7 @@ orbital CastleBoardOrbital {
325
325
  ] } ]
326
326
  })
327
327
 
328
- WAVE_DEFEATED -> victory when (>= @entity.wave 3)
328
+ WAVE_DEFEATED -> victory when (and (>= @entity.wave 3) (> @entity.health 0))
329
329
  (set @entity.result "victory")
330
330
  (render-ui main {
331
331
  type: game-shell
@@ -518,7 +518,7 @@ orbital CastleBoardOrbital {
518
518
  waveTick every 8s
519
519
  when (and (== @entity.result "none") (and (> @entity.health 0) (< @entity.wave 3)))
520
520
  (set @entity.wave (+ @entity.wave 1))
521
- (set @entity.lastWaveDamage (math/max 0 (- @entity.wave (array/len @entity.buildings))))
521
+ (set @entity.lastWaveDamage (math/max 0 (- (* @entity.wave 4) (array/len @entity.buildings))))
522
522
  (set @entity.health (math/max 0 (- @entity.health @entity.lastWaveDamage)))
523
523
  (set @entity.units (array/map @entity.units (fn u (if (== @u.team "enemy") (object/merge @u { animation: "attack" }) (if (== @u.team "player") (object/merge @u { animation: (if (<= @entity.health 0) "hit" "idle") }) @u)))))
524
524
  (set @entity.effects (array/append @entity.effects { key: "slash", x: (object/get (object/get (array/first (array/filter @entity.units (fn u (== @u.team "enemy")))) position) x), y: (object/get (object/get (array/first (array/filter @entity.units (fn u (== @u.team "enemy")))) position) y), ttl: 4 }))
@@ -543,7 +543,7 @@ orbital CastleBoardOrbital {
543
543
  ] } ]
544
544
  })
545
545
  (emit CASTLE_HIT { damage: @entity.lastWaveDamage })
546
- (emit WAVE_DEFEATED { wave: @entity.wave })
546
+ (if (> @entity.health 0) (emit WAVE_DEFEATED { wave: @entity.wave }) null)
547
547
  }
548
548
 
549
549
  emits {
@@ -107,7 +107,7 @@ orbital CityBuilderBoardOrbital {
107
107
  backgroundAsset: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.json", sprite: "grey_panel.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "panel-frame", thumbnailUrl: "" }
108
108
  hudBackgroundAsset: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.json", sprite: "grey_panel.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "panel-frame", thumbnailUrl: "" }
109
109
  hud: { type: stack, direction: horizontal, gap: md, justify: between, children: [ { type: game-hud, stats: [ { label: "Population", value: @entity.population, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.json", sprite: "icon_hand", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-population", thumbnailUrl: "" } }, { label: "Gold", value: @entity.gold, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.json", sprite: "icon_money", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-gold", thumbnailUrl: "" } }, { label: "Wood", value: @entity.wood, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.png", atlas: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.json", sprite: "wood046.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-wood", thumbnailUrl: "" } }, { label: "Build", value: @entity.pendingBuildType } ] }, { type: stat-badge, label: "Gold", value: @entity.gold, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.json", sprite: "icon_money", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-gold", thumbnailUrl: "" } }, { type: stat-badge, label: "Wood", value: @entity.wood, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.png", atlas: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.json", sprite: "wood046.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-wood", thumbnailUrl: "" } }, { type: control-grid, items: @config.buildTypes, action: SELECT_BUILD_TYPE, labelKey: "label", valueKey: "type", selected: @entity.pendingBuildType } ] }
110
- children: [ { type: canvas, camera: { zoom: @config.scale }, projection: "isometric", showMinimap: true, tileClickEvent: PLACE_BUILDING, children: [
110
+ children: [ { type: canvas, fit: true, camera: { zoom: @config.scale }, projection: "isometric", showMinimap: true, tileClickEvent: PLACE_BUILDING, children: [
111
111
  { type: draw-sprite-layer, items: (array/map @config.tiles (fn t { type: draw-sprite, position: { x: (object/get @t x), y: (object/get @t y) }, asset: (object/get @t terrainSprite) })) }
112
112
  { type: draw-sprite-layer, items: (array/map @entity.features (fn f { type: draw-sprite, position: { x: (object/get @f x), y: (object/get @f y) }, asset: (object/get @f sprite) })) }
113
113
  { type: draw-shape-layer, items: (array/map @entity.validMoves (fn m { type: draw-shape, shape: "cell", position: { x: (object/get @m x), y: (object/get @m y) }, fill: "rgba(74,222,128,0.4)" })) }
@@ -124,7 +124,7 @@ orbital CityBuilderBoardOrbital {
124
124
  backgroundAsset: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.json", sprite: "grey_panel.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "panel-frame", thumbnailUrl: "" }
125
125
  hudBackgroundAsset: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.json", sprite: "grey_panel.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "panel-frame", thumbnailUrl: "" }
126
126
  hud: { type: stack, direction: horizontal, gap: md, justify: between, children: [ { type: game-hud, stats: [ { label: "Population", value: @entity.population, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.json", sprite: "icon_hand", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-population", thumbnailUrl: "" } }, { label: "Gold", value: @entity.gold, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.json", sprite: "icon_money", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-gold", thumbnailUrl: "" } }, { label: "Wood", value: @entity.wood, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.png", atlas: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.json", sprite: "wood046.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-wood", thumbnailUrl: "" } }, { label: "Build", value: @entity.pendingBuildType } ] }, { type: stat-badge, label: "Gold", value: @entity.gold, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.json", sprite: "icon_money", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-gold", thumbnailUrl: "" } }, { type: stat-badge, label: "Wood", value: @entity.wood, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.png", atlas: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.json", sprite: "wood046.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-wood", thumbnailUrl: "" } }, { type: control-grid, items: @config.buildTypes, action: SELECT_BUILD_TYPE, labelKey: "label", valueKey: "type", selected: @entity.pendingBuildType } ] }
127
- children: [ { type: canvas, camera: { zoom: @config.scale }, projection: "isometric", showMinimap: true, tileClickEvent: PLACE_BUILDING, children: [
127
+ children: [ { type: canvas, fit: true, camera: { zoom: @config.scale }, projection: "isometric", showMinimap: true, tileClickEvent: PLACE_BUILDING, children: [
128
128
  { type: draw-sprite-layer, items: (array/map @config.tiles (fn t { type: draw-sprite, position: { x: (object/get @t x), y: (object/get @t y) }, asset: (object/get @t terrainSprite) })) }
129
129
  { type: draw-sprite-layer, items: (array/map @entity.features (fn f { type: draw-sprite, position: { x: (object/get @f x), y: (object/get @f y) }, asset: (object/get @f sprite) })) }
130
130
  { type: draw-shape-layer, items: (array/map @entity.validMoves (fn m { type: draw-shape, shape: "cell", position: { x: (object/get @m x), y: (object/get @m y) }, fill: "rgba(74,222,128,0.4)" })) }
@@ -139,6 +139,7 @@ orbital CityBuilderBoardOrbital {
139
139
  (set @entity.features (array/concat @entity.features [{ id: (str/concat "bld-" (array/len @entity.features)), x: ?x, y: ?y, type: @entity.pendingBuildType, sprite: (object/get @config.featureSprites @entity.pendingBuildType) }]))
140
140
  (set @entity.population (+ @entity.population @config.populationPerBuilding))
141
141
  (set @entity.result (if (>= @entity.population @config.targetPopulation) "won" @entity.result))
142
+ (if (!= @entity.result "none") (emit GAME_END { result: @entity.result }) null)
142
143
  (set @entity.selectedUnitId "")
143
144
  (set @entity.validMoves [])
144
145
  (render-ui main {
@@ -146,7 +147,7 @@ orbital CityBuilderBoardOrbital {
146
147
  backgroundAsset: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.json", sprite: "grey_panel.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "panel-frame", thumbnailUrl: "" }
147
148
  hudBackgroundAsset: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.json", sprite: "grey_panel.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "panel-frame", thumbnailUrl: "" }
148
149
  hud: { type: stack, direction: horizontal, gap: md, justify: between, children: [ { type: game-hud, stats: [ { label: "Population", value: @entity.population, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.json", sprite: "icon_hand", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-population", thumbnailUrl: "" } }, { label: "Gold", value: @entity.gold, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.json", sprite: "icon_money", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-gold", thumbnailUrl: "" } }, { label: "Wood", value: @entity.wood, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.png", atlas: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.json", sprite: "wood046.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-wood", thumbnailUrl: "" } }, { label: "Build", value: @entity.pendingBuildType } ] }, { type: stat-badge, label: "Gold", value: @entity.gold, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.json", sprite: "icon_money", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-gold", thumbnailUrl: "" } }, { type: stat-badge, label: "Wood", value: @entity.wood, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.png", atlas: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.json", sprite: "wood046.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-wood", thumbnailUrl: "" } }, { type: control-grid, items: @config.buildTypes, action: SELECT_BUILD_TYPE, labelKey: "label", valueKey: "type", selected: @entity.pendingBuildType } ] }
149
- children: [ { type: canvas, camera: { zoom: @config.scale }, projection: "isometric", showMinimap: true, tileClickEvent: PLACE_BUILDING, children: [
150
+ children: [ { type: canvas, fit: true, camera: { zoom: @config.scale }, projection: "isometric", showMinimap: true, tileClickEvent: PLACE_BUILDING, children: [
150
151
  { type: draw-sprite-layer, items: (array/map @config.tiles (fn t { type: draw-sprite, position: { x: (object/get @t x), y: (object/get @t y) }, asset: (object/get @t terrainSprite) })) }
151
152
  { type: draw-sprite-layer, items: (array/map @entity.features (fn f { type: draw-sprite, position: { x: (object/get @f x), y: (object/get @f y) }, asset: (object/get @f sprite) })) }
152
153
  { type: draw-shape-layer, items: (array/map @entity.validMoves (fn m { type: draw-shape, shape: "cell", position: { x: (object/get @m x), y: (object/get @m y) }, fill: "rgba(74,222,128,0.4)" })) }
@@ -159,10 +160,11 @@ orbital CityBuilderBoardOrbital {
159
160
  GAME_END -> gameover when (or (== @entity.result "won") (== @entity.result "lost"))
160
161
  (render-ui main {
161
162
  type: game-shell
163
+ overlay: { type: game-menu, title: (if (== @entity.result "won") "CITY COMPLETE!" "GAME OVER"), subtitle: (str/concat "Population: " @entity.population), options: [ { id: "again", label: "Play Again", event: "PLAY_AGAIN", variant: "primary" } ] }
162
164
  backgroundAsset: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.json", sprite: "grey_panel.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "panel-frame", thumbnailUrl: "" }
163
165
  hudBackgroundAsset: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.json", sprite: "grey_panel.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "panel-frame", thumbnailUrl: "" }
164
166
  hud: { type: stack, direction: horizontal, gap: md, justify: between, children: [ { type: game-hud, stats: [ { label: "Population", value: @entity.population, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.json", sprite: "icon_hand", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-population", thumbnailUrl: "" } }, { label: "Gold", value: @entity.gold, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.json", sprite: "icon_money", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-gold", thumbnailUrl: "" } }, { label: "Wood", value: @entity.wood, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.png", atlas: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.json", sprite: "wood046.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-wood", thumbnailUrl: "" } }, { label: "Build", value: @entity.pendingBuildType } ] }, { type: stat-badge, label: "Gold", value: @entity.gold, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.json", sprite: "icon_money", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-gold", thumbnailUrl: "" } }, { type: stat-badge, label: "Wood", value: @entity.wood, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.png", atlas: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.json", sprite: "wood046.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-wood", thumbnailUrl: "" } }, { type: control-grid, items: @config.buildTypes, action: SELECT_BUILD_TYPE, labelKey: "label", valueKey: "type", selected: @entity.pendingBuildType } ] }
165
- children: [ { type: canvas, camera: { zoom: @config.scale }, projection: "isometric", showMinimap: true, tileClickEvent: PLACE_BUILDING, children: [
167
+ children: [ { type: canvas, fit: true, camera: { zoom: @config.scale }, projection: "isometric", showMinimap: true, tileClickEvent: PLACE_BUILDING, children: [
166
168
  { type: draw-sprite-layer, items: (array/map @config.tiles (fn t { type: draw-sprite, position: { x: (object/get @t x), y: (object/get @t y) }, asset: (object/get @t terrainSprite) })) }
167
169
  { type: draw-sprite-layer, items: (array/map @entity.features (fn f { type: draw-sprite, position: { x: (object/get @f x), y: (object/get @f y) }, asset: (object/get @f sprite) })) }
168
170
  { type: draw-shape-layer, items: (array/map @entity.validMoves (fn m { type: draw-shape, shape: "cell", position: { x: (object/get @m x), y: (object/get @m y) }, fill: "rgba(74,222,128,0.4)" })) }
@@ -191,7 +193,7 @@ orbital CityBuilderBoardOrbital {
191
193
  backgroundAsset: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.json", sprite: "grey_panel.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "panel-frame", thumbnailUrl: "" }
192
194
  hudBackgroundAsset: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.json", sprite: "grey_panel.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "panel-frame", thumbnailUrl: "" }
193
195
  hud: { type: stack, direction: horizontal, gap: md, justify: between, children: [ { type: game-hud, stats: [ { label: "Population", value: @entity.population, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.json", sprite: "icon_hand", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-population", thumbnailUrl: "" } }, { label: "Gold", value: @entity.gold, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.json", sprite: "icon_money", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-gold", thumbnailUrl: "" } }, { label: "Wood", value: @entity.wood, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.png", atlas: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.json", sprite: "wood046.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-wood", thumbnailUrl: "" } }, { label: "Build", value: @entity.pendingBuildType } ] }, { type: stat-badge, label: "Gold", value: @entity.gold, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.json", sprite: "icon_money", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-gold", thumbnailUrl: "" } }, { type: stat-badge, label: "Wood", value: @entity.wood, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.png", atlas: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.json", sprite: "wood046.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-wood", thumbnailUrl: "" } }, { type: control-grid, items: @config.buildTypes, action: SELECT_BUILD_TYPE, labelKey: "label", valueKey: "type", selected: @entity.pendingBuildType } ] }
194
- children: [ { type: canvas, camera: { zoom: @config.scale }, projection: "isometric", showMinimap: true, tileClickEvent: PLACE_BUILDING, children: [
196
+ children: [ { type: canvas, fit: true, camera: { zoom: @config.scale }, projection: "isometric", showMinimap: true, tileClickEvent: PLACE_BUILDING, children: [
195
197
  { type: draw-sprite-layer, items: (array/map @config.tiles (fn t { type: draw-sprite, position: { x: (object/get @t x), y: (object/get @t y) }, asset: (object/get @t terrainSprite) })) }
196
198
  { type: draw-sprite-layer, items: (array/map @entity.features (fn f { type: draw-sprite, position: { x: (object/get @f x), y: (object/get @f y) }, asset: (object/get @f sprite) })) }
197
199
  { type: draw-shape-layer, items: (array/map @entity.validMoves (fn m { type: draw-shape, shape: "cell", position: { x: (object/get @m x), y: (object/get @m y) }, fill: "rgba(74,222,128,0.4)" })) }
@@ -211,7 +213,7 @@ orbital CityBuilderBoardOrbital {
211
213
  backgroundAsset: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.json", sprite: "grey_panel.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "panel-frame", thumbnailUrl: "" }
212
214
  hudBackgroundAsset: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.json", sprite: "grey_panel.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "panel-frame", thumbnailUrl: "" }
213
215
  hud: { type: stack, direction: horizontal, gap: md, justify: between, children: [ { type: game-hud, stats: [ { label: "Population", value: @entity.population, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.json", sprite: "icon_hand", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-population", thumbnailUrl: "" } }, { label: "Gold", value: @entity.gold, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.json", sprite: "icon_money", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-gold", thumbnailUrl: "" } }, { label: "Wood", value: @entity.wood, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.png", atlas: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.json", sprite: "wood046.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-wood", thumbnailUrl: "" } }, { label: "Build", value: @entity.pendingBuildType } ] }, { type: stat-badge, label: "Gold", value: @entity.gold, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.json", sprite: "icon_money", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-gold", thumbnailUrl: "" } }, { type: stat-badge, label: "Wood", value: @entity.wood, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.png", atlas: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.json", sprite: "wood046.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-wood", thumbnailUrl: "" } }, { type: control-grid, items: @config.buildTypes, action: SELECT_BUILD_TYPE, labelKey: "label", valueKey: "type", selected: @entity.pendingBuildType } ] }
214
- children: [ { type: canvas, camera: { zoom: @config.scale }, projection: "isometric", showMinimap: true, tileClickEvent: PLACE_BUILDING, children: [
216
+ children: [ { type: canvas, fit: true, camera: { zoom: @config.scale }, projection: "isometric", showMinimap: true, tileClickEvent: PLACE_BUILDING, children: [
215
217
  { type: draw-sprite-layer, items: (array/map @config.tiles (fn t { type: draw-sprite, position: { x: (object/get @t x), y: (object/get @t y) }, asset: (object/get @t terrainSprite) })) }
216
218
  { type: draw-sprite-layer, items: (array/map @entity.features (fn f { type: draw-sprite, position: { x: (object/get @f x), y: (object/get @f y) }, asset: (object/get @f sprite) })) }
217
219
  { type: draw-shape-layer, items: (array/map @entity.validMoves (fn m { type: draw-shape, shape: "cell", position: { x: (object/get @m x), y: (object/get @m y) }, fill: "rgba(74,222,128,0.4)" })) }
@@ -232,7 +234,7 @@ orbital CityBuilderBoardOrbital {
232
234
  backgroundAsset: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.json", sprite: "grey_panel.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "panel-frame", thumbnailUrl: "" }
233
235
  hudBackgroundAsset: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-ui-pack/ui/greySheet.json", sprite: "grey_panel.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "panel-frame", thumbnailUrl: "" }
234
236
  hud: { type: stack, direction: horizontal, gap: md, justify: between, children: [ { type: game-hud, stats: [ { label: "Population", value: @entity.population, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.json", sprite: "icon_hand", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-population", thumbnailUrl: "" } }, { label: "Gold", value: @entity.gold, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.json", sprite: "icon_money", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-gold", thumbnailUrl: "" } }, { label: "Wood", value: @entity.wood, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.png", atlas: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.json", sprite: "wood046.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-wood", thumbnailUrl: "" } }, { label: "Build", value: @entity.pendingBuildType } ] }, { type: stat-badge, label: "Gold", value: @entity.gold, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.png", atlas: "https://almadar-kflow-assets.web.app/shared/_shared/kenney-mobile-controls/ui/icons-default.json", sprite: "icon_money", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-gold", thumbnailUrl: "" } }, { type: stat-badge, label: "Wood", value: @entity.wood, iconUrl: { url: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.png", atlas: "https://almadar-kflow-assets.web.app/shared/ui-city-builder-board/kenney-isometric-vector-buildings/features/spritesheet_wood.json", sprite: "wood046.png", role: "ui", category: "ui", animations: [], style: "vector", variant: "", dimension: "2d", aspect: "1:1", name: "icon-wood", thumbnailUrl: "" } }, { type: control-grid, items: @config.buildTypes, action: SELECT_BUILD_TYPE, labelKey: "label", valueKey: "type", selected: @entity.pendingBuildType } ] }
235
- children: [ { type: canvas, camera: { zoom: @config.scale }, projection: "isometric", showMinimap: true, tileClickEvent: PLACE_BUILDING, children: [
237
+ children: [ { type: canvas, fit: true, camera: { zoom: @config.scale }, projection: "isometric", showMinimap: true, tileClickEvent: PLACE_BUILDING, children: [
236
238
  { type: draw-sprite-layer, items: (array/map @config.tiles (fn t { type: draw-sprite, position: { x: (object/get @t x), y: (object/get @t y) }, asset: (object/get @t terrainSprite) })) }
237
239
  { type: draw-sprite-layer, items: (array/map @entity.features (fn f { type: draw-sprite, position: { x: (object/get @f x), y: (object/get @f y) }, asset: (object/get @f sprite) })) }
238
240
  { type: draw-shape-layer, items: (array/map @entity.validMoves (fn m { type: draw-shape, shape: "cell", position: { x: (object/get @m x), y: (object/get @m y) }, fill: "rgba(74,222,128,0.4)" })) }
@@ -53,7 +53,7 @@ orbital GridTacticsDemoOrbital {
53
53
  type: game-shell
54
54
  hud: { type: game-hud, stats: [ { label: "Result", value: @entity.result }, { label: "Phase", value: @entity.uiPhase }, { label: "Selected", value: @entity.selectedUnitId } ] }
55
55
  addons: { type: stack, direction: vertical, gap: sm, children: [ { type: button, action: END_TURN, label: "End Turn", variant: primary }, { type: button, action: CANCEL, label: "Cancel", variant: secondary } ] }
56
- children: [ { type: canvas, projection: "flat", showMinimap: false, tileClickEvent: TILE_CLICK, unitClickEvent: UNIT_CLICK, children: [
56
+ children: [ { type: canvas, fit: true, projection: "flat", showMinimap: false, tileClickEvent: TILE_CLICK, unitClickEvent: UNIT_CLICK, children: [
57
57
  { type: draw-shape-layer, items: (array/map @entity.tiles (fn t { type: draw-shape, shape: "cell", position: { x: (object/get @t x), y: (object/get @t y) }, fill: (if (== (object/get @t passable) true) "rgba(148,163,184,0.15)" "rgba(51,65,85,0.75)") })) }
58
58
  { type: draw-shape-layer, items: (array/map @entity.validMoves (fn m { type: draw-shape, shape: "cell", position: { x: (object/get @m x), y: (object/get @m z) }, fill: "rgba(74,222,128,0.4)" })) }
59
59
  { type: draw-shape-layer, items: (array/map (array/filter @entity.units (fn u (== (object/get @u id) @entity.selectedUnitId))) (fn u { type: draw-shape, shape: "ellipse", position: (object/get @u position), radiusX: 0.5, radiusY: 0.2, stroke: "rgba(0,200,255,0.8)", strokeWidth: 3 })) }
@@ -101,7 +101,7 @@ orbital GridTacticsDemoOrbital {
101
101
  type: game-shell
102
102
  hud: { type: game-hud, stats: [ { label: "Result", value: @entity.result }, { label: "Phase", value: @entity.uiPhase }, { label: "Selected", value: @entity.selectedUnitId } ] }
103
103
  addons: { type: stack, direction: vertical, gap: sm, children: [ { type: button, action: END_TURN, label: "End Turn", variant: primary }, { type: button, action: CANCEL, label: "Cancel", variant: secondary } ] }
104
- children: [ { type: canvas, projection: "flat", showMinimap: false, tileClickEvent: TILE_CLICK, unitClickEvent: UNIT_CLICK, children: [
104
+ children: [ { type: canvas, fit: true, projection: "flat", showMinimap: false, tileClickEvent: TILE_CLICK, unitClickEvent: UNIT_CLICK, children: [
105
105
  { type: draw-shape-layer, items: (array/map @entity.tiles (fn t { type: draw-shape, shape: "cell", position: { x: (object/get @t x), y: (object/get @t y) }, fill: (if (== (object/get @t passable) true) "rgba(148,163,184,0.15)" "rgba(51,65,85,0.75)") })) }
106
106
  { type: draw-shape-layer, items: (array/map @entity.validMoves (fn m { type: draw-shape, shape: "cell", position: { x: (object/get @m x), y: (object/get @m z) }, fill: "rgba(74,222,128,0.4)" })) }
107
107
  { type: draw-shape-layer, items: (array/map (array/filter @entity.units (fn u (== (object/get @u id) @entity.selectedUnitId))) (fn u { type: draw-shape, shape: "ellipse", position: (object/get @u position), radiusX: 0.5, radiusY: 0.2, stroke: "rgba(0,200,255,0.8)", strokeWidth: 3 })) }