From f6955e34489c79f6d5b764cb6a39b1387366b433 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Sun, 8 Nov 2026 21:56:29 +0100 Subject: Phase 0: project scaffolding - server/: Dart game-server package (shelf + WebSocket) with the hello/welcome handshake, ping/pong, error responses, healthz, static SPA serving with SPA fallback, and smoke tests (5/5) - web/: Svelte 5 + TypeScript SPA with the protocol client, connection-status page, vitest and svelte-check; Vite dev server proxies /ws to the Dart server - game data assets copied from the read-only reference app into server/assets/ (data, images, i18n, fonts, testData) - PLAN.md implementation plan and progress tracker; README rewritten for the web app; AGPLv3 LICENSE inherited from the reference app; .gitignore; scripts/ci.sh (full pipeline) - CLAUDE.md project guidance Verified: scripts/ci.sh passes end-to-end; live smoke confirms the server serves the built SPA at / and answers a WebSocket hello with a welcome message. --- .../assets/testData/editions/Jaws of the Lion.json | 481 +++++++++++++++++++++ 1 file changed, 481 insertions(+) create mode 100644 server/assets/testData/editions/Jaws of the Lion.json (limited to 'server/assets/testData/editions/Jaws of the Lion.json') diff --git a/server/assets/testData/editions/Jaws of the Lion.json b/server/assets/testData/editions/Jaws of the Lion.json new file mode 100644 index 0000000..54f44fd --- /dev/null +++ b/server/assets/testData/editions/Jaws of the Lion.json @@ -0,0 +1,481 @@ +{ + "edition": "Jaws of the Lion", + "classes": [ + { + "name": "Hatchet", + "color": "FF7BBBD6", + "colorSecondary": "ff224c6c", + "edition": "Jaws of the Lion", + "health": [8,9,11,12,14,15,17,18,20], + "hidden": false, + "summons": {} + }, + { + "name": "Demolitionist", + "color": "FFE5A26F", + "edition": "Jaws of the Lion", + "health": [8,9,11,12,14,15,17,18,20], + "hidden": false, + "summons": {} + } + ], + "monsterAbilities": [ + { + "name": "Zealot", + "cards": [ + ["Nothing special", 384, false, 50, "%move% + 0","*.........", "%attack% + 0" ], + ["Hasty Assault", 385, false, 35, "%move% + 1","*.........", "%attack% - 1" ], + ["Calculated Strike", 386, false, 65, "%move% - 1","*.........", "%attack% + 1"], + ["Drain Life", 387, true, 27, [{ + "gfx": "dark", + "x": 0.70, + "y": 0.56 + }],"%move% + 0","**.........", "%attack% - 1", "^%range% 2","*.........", "%heal% X", "^Self", "[r]", "^^X is damage suffered by target of attack", "[/r]"], + ["Boil Blood", 388, false, 46, "%attack% - 1", "^%range% 2", "^%target% 2", "^%muddle%", "[r]", "%fire%%use%", "^+2 %range%", "[/r]" ], + ["Vile Scourge", 389, false, 77, "%move% - 1","*.........", "[r]", "[c]", "%attack% - 1", "^%poison%", "[s]", "%air%%use%", "!^+1 %attack%", "[/s]", "[/c]", "¤aoe-triangle-2-side-with-black", "[/r]"], + ["Hex Whip", 390, false, 19, "%move% + 1", "^%jump%","*.........", "%attack% - 1", "^%curse%", "%air%"], + ["Unholy Flame", 391, true, 82, "%attack% + 1", "^%range% 3", "%fire%" ] + ] + }, + { + "name": "Vermling Raider", + "cards": [ + ["Screaming Shot", 372, true, 85, "%push% 1", "^Target all adjacent enemies","*.........", "%attack% + 1", "^%range% 2" ], + ["Careful Throw", 373, false, 36, "%move% + 0","*.........", "%attack% - 1", "^%range% 4" ], + ["Dual Daggers", 374, false, 59, "%attack% + 0", "^%range% 3", "^%target% 2" ], + ["Nothing Special", 375, false, 50, "%move% + 0","*.........", "%attack% + 0" ], + ["Patch Wounds", 376, true, 30, "%move% + 1","*.........", "%heal% 3", "^Self" ], + ["Parry", 377, false, 70, "%move% + 0","*.........", "%attack% - 1", "^%disarm%" ], + ["Vicious Spear", 378, false, 77, "%move% - 1","*.........", "%attack% + 0", "^%range% 3", "^%wound%" ], + ["Spiked Pit",379, false, 20, "%attack% + 0", "^%range% 4","*.........", "^^Create one 3-damage trap in an adjacent","^^empty hex closest to an enemy." ] + + ] + }, + { + "name": "Black Sludge", + "cards": [ + ["Hasty Assault", 428, false, 36, "%move% + 1","*.........", "%attack% - 1", "^%range% 3"], + ["Nothing Special", 429, false, 57, "%move% + 0","*.........", "%attack% + 0", "^%range% 2"], + ["Toxic Explosion", 430, false, 57, "%attack% + 0", "^%range% 2", "^%target% 2", "^%poison%", "[r]", "%earth%%use%", "^+1 %target%","[/r]"], + ["Calculated Strike", 431, false, 66, "%move% - 1","*.........", "%attack% + 1", "^%range% 3"], + ["Feed", 432, false, 66, "%move% + 0","**.........", "%loot% 1","**.........", "%heal% 2", "^Self", "[r]", "%dark%%use%", "^+1 %heal%", "[/r]"], + ["Plasma Ward", 433, false, 85, "%push% 1 and", "%poison%", "^Target all adjacent enemies","*.........", "%attack% + 1", "^%range% 2"], + ["Black Hex", 434, true, 85, "^The closest enemy in", "^line-of-sight, regardless of","^range, suffers 1+L/2 (rounded up) damage.","*.........", "%heal% 1", "^Self", "%dark%"], + ["Septic Hex", 435, true, 85, "^The closest enemy in", "^line-of-sight, regardless of", "^range, suffers 1+L/2 (rounded up) damage.","*.........", "%heal% 1", "^Self", "%earth%"] + ] + }, + { + "name": "Monstrosity", + "cards": [ + ["Nothing Special", 420, false, 39, "%move% + 0","*.........", "%attack% + 0"], + ["Calculated Strike", 421, false, 60, "%move% - 1","*.........", "%attack% + 1"], + ["Unstable Scratch", 422, true, 52, "%move% + 0","*.........", "%attack% + 1", "[r]", "[c]","^If this attack is performed, the","^^Monstrosity suffers 1 damage.","[/c]", "[/r]"], + ["Swarm", 423, false, 21, "%move% + 1","*.........", "%attack% - 1", "[r]", "[c]","^Add +1 %attack% if the target is adjacent", "^^to any of the Monstrosity's allies.","[/c]", "[/r]"], + ["Swarm", 424, false, 21, "%move% + 1","*.........", "%attack% - 1","[r]", "[c]", "^Add +1 %attack% if the target is adjacent", "^^to any of the Monstrosity's allies.","[/c]", "[/r]"], + ["Weakening Bite", 425, false, 34, "%move% + 0","*.........", "%attack% + 0", "^%muddle%"], + ["Explosive Blisters", 426, true, 9, "%move% + 1","*.........", "^Any time a figure attacks the","^^Monstrosity this round, that","^^figure suffers 2 damage."], + ["Unstable Frenzy" ,427, false, 74, "%move% + 0","*.........", "^Monstrosity suffers 1 damage.","*.........", "%attack% + 1", "^Target all adjacent enemies"] + ] + }, + { + "name": "Chaos Demon", + "cards": [ + ["Chilling Breath", 412, false, 13, "%move% - 1", + "[r]", + "[c]", "*........." , "%attack% + 0","*.........", "[/c]", + "¤aoe-triangle-2-side-with-black", + "[/r]", + "[r]", "%ice%%use%", + "[c]", "*Any time a figure attacks the","*Chaos Demon this round,","*that figure suffers 2 damage.","[/c]", + "[/r]" ], + ["Heal Blast", 413, false, 1, "%move% + 1","*.........", "%attack% - 1", "^%range% 3", "[r]", "%fire%%use%", "^%wound%", "[/r]" ], + ["Seismic Punch", 414, false, 67, "%move% - 2","*.........", "%attack% + 1", "^%push% 2", "[r]", "%earth%%use%", "¤aoe-triangle-2-side-with-black", "[/r]" ], + ["Whirlwind", 415, false, 20, "%move% + 0","*.........", "[r]", "[c]", "%attack% - 1", "^%range% 2", "[/c]", "¤aoe-triangle-2-side", "[/r]", "*.........", "[r]", "%air%%use%", "^%shield% 2", "[/r]"] , + ["Flashing Claws", 416, false, 41, "%move% + 0","*.........", "%attack% + 0", "^Advantage","*.........", "[r]","%light%%use%","[c]", "^%heal% 4", "^Self","[/c]", "[/r]" ], + ["Black Tendrils", 417, false, 52, "%move% - 1","*.........", "%attack% + 1", "[r]", "%dark%%use%", "[c]","*All enemies adjacent to the","*target suffer 1 damage.","[/c]", "[/r]" ], + ["Mana Explosion", 418, true, 76, "%move% + 0","*.........", "%attack% + 0", "%fire% %ice% %air% %earth% %light% %dark%" ], + ["Hungry Maw", 419, true, 98, "%move% - 1","*.........", "%attack% - 1", "[r]","%any%%use%", "^%disarm%", "[/r]" ] + ] + }, + { + "name": "Boss (JotL)", + "note": "Custom deck for JotL Bosses. Only one card has changed and it's minor.", + "cards": [ + ["Accelerated Power", 468, false, 11, "Special 2"], + ["Accelerated Power", 469, false, 14, "Special 2"], + ["Accelerated Power", 470, true, 17, "Special 2"], + ["Lingering Strength", 471, true, 85, "Special 1"], + ["Lingering Strength", 472, false, 79, "Special 1"], + ["Lingering Strength", 473, false, 73, "Special 1"], + ["Nothing Special", 474, false, 36, "%move% + 0","*.........", "%attack% + 0"], + ["Twin Missiles", 475, false, 54, "%move% - 1","*.........", "%attack% - 1", "^%range% 3", "^%target% 2"] + ] + } + ], + + + "monsters": { + "Zealot":{ + "deck": "Zealot", + "count": 6, + "levels": [ + { + "level": 0, + "normal": { "health": 4, "move": 2, "attack": 2 }, + "elite": { "health": 7, "move": 2, "attack": 3 } + }, + { + "level": 1, + "normal": { "health": 6, "move": 2, "attack": 2 }, + "elite": { "health": 8, "move": 2, "attack": 3, "attributes": [ "%wound%" ] } + }, + { + "level": 2, + "normal": { "health": 7, "move": 3, "attack": 3 }, + "elite": { "health": 11, "move": 3, "attack": 3, "attributes": [ "%wound%" ] } + }, + { + "level": 3, + "normal": { "health": 8, "move": 3, "attack": 3, "attributes": [ "%wound%" ] }, + "elite": { "health": 13, "move": 3, "attack": 4, "attributes": [ "%wound%" ] } + }, + { + "level": 4, + "normal": { "health": 10, "move": 3, "attack": 3, "attributes": [ "%wound%" ] }, + "elite": { "health": 17, "move": 3, "attack": 4, "attributes": [ "%wound%" ] } + }, + { + "level": 5, + "normal": { "health": 12, "move": 4, "attack": 3, "attributes": [ "%wound%" ] }, + "elite": { "health": 18, "move": 4, "attack": 5, "attributes": [ "%wound%" ] } + }, + { + "level": 6, + "normal": { "health": 14, "move": 4, "attack": 4, "attributes": [ "%wound%" ] }, + "elite": { "health": 22, "move": 4, "attack": 6, "attributes": [ "%wound%" ] } + }, + { + "level": 7, + "normal": { "health": 16, "move": 4, "attack": 5, "attributes": [ "%wound%" ] }, + "elite": { "health": 26, "move": 4, "attack": 7, "attributes": [ "%wound%" ] } + } + ] + }, + "Vermling Raider":{ + "deck": "Vermling Raider", + "count": 6, + "levels": [ + { + "level": 0, + "normal": { "health": 4, "move": 1, "attack": 2 }, + "elite": { "health": 8, "move": 1, "attack": 2 } + }, + { + "level": 1, + "normal": { "health": 5, "move": 1, "attack": 2 }, + "elite": { "health": 10, "move": 1, "attack": 2 } + }, + { + "level": 2, + "normal": { "health": 9, "move": 2, "attack": 2 }, + "elite": { "health": 14, "move": 3, "attack": 3 } + }, + { + "level": 3, + "normal": { "health": 11, "move": 3, "attack": 2 }, + "elite": { "health": 16, "move": 3, "attack": 4 } + }, + { + "level": 4, + "normal": { "health": 12, "move": 3, "attack": 3 }, + "elite": { "health": 19, "move": 4, "attack": 4 } + }, + { + "level": 5, + "normal": { "health": 15, "move": 3, "attack": 3 }, + "elite": { "health": 23, "move": 4, "attack": 4 } + }, + { + "level": 6, + "normal": { "health": 17, "move": 4, "attack": 3 }, + "elite": { "health": 27, "move": 4, "attack": 5 } + }, + { + "level": 7, + "normal": { "health": 19, "move": 4, "attack": 4 }, + "elite": { "health": 31, "move": 4, "attack": 6 } + } + ] + }, + "Black Sludge":{ + "deck": "Black Sludge", + "count": 6, + "levels": [ + { + "level": 0, + "normal": { "health": 4, "move": 1, "attack": 2 }, + "elite": { "health": 8, "move": 1, "attack": 2 } + }, + { + "level": 1, + "normal": { "health": 5, "move": 1, "attack": 2, "attributes": [ "%shield% 1" ] }, + "elite": { "health": 9, "move": 1, "attack": 2, "attributes": [ "%shield% 1" ] } + }, + { + "level": 2, + "normal": { "health": 7, "move": 1, "attack": 2, "attributes": [ "%shield% 1" ] }, + "elite": { "health": 11, "move": 1, "attack": 3, "attributes": [ "%shield% 1" ] } + }, + { + "level": 3, + "normal": { "health": 8, "move": 1, "attack": 3, "attributes": [ "%shield% 1" ] }, + "elite": { "health": 11, "move": 2, "attack": 3, "attributes": [ "%poison%", "%shield% 1" ] } + }, + { + "level": 4, + "normal": { "health": 9, "move": 2, "attack": 3, "attributes": [ "%shield% 1" ] }, + "elite": { "health": 13, "move": 2, "attack": 4, "attributes": [ "%poison%", "%shield% 1" ] } + }, + { + "level": 5, + "normal": { "health": 10, "move": 2, "attack": 3, "attributes": [ "%poison%", "%shield% 1" ] }, + "elite": { "health": 15, "move": 3, "attack": 4, "attributes": [ "%poison%", "%shield% 1" ] } + }, + { + "level": 6, + "normal": { "health": 12, "move": 2, "attack": 4, "attributes": [ "%poison%", "%shield% 1" ] }, + "elite": { "health": 16, "move": 3, "attack": 4, "attributes": [ "%poison%", "%shield% 2" ] } + }, + { + "level": 7, + "normal": { "health": 16, "move": 2, "attack": 4, "attributes": [ "%poison%", "%shield% 1" ] }, + "elite": { "health": 18, "move": 3, "attack": 5, "attributes": [ "%poison%", "%shield% 2" ] } + } + ] + }, + "Rat Monstrosity":{ + "deck": "Monstrosity", + "count": 10, + "levels": [ + { + "level": 0, + "normal": { "health": 4, "move": 1, "attack": 1, "attributes": [ "^^On death, all","^^adjacent figures","^^suffer 1 damage" ] }, + "elite": { "health": 6, "move": 1, "attack": 2, "attributes": [ "^^^On death, all","^^adjacent figures","^^suffer 1 damage" ] } + }, + { + "level": 1, + "normal": { "health": 4, "move": 1, "attack": 2, "attributes": [ "^^On death, all","^^adjacent figures","^^suffer 1 damage" ] }, + "elite": { "health": 7, "move": 1, "attack": 2, "attributes": [ "^^On death, all","^^adjacent figures","^^suffer 2 damage", "^Advantage" ] } + }, + { + "level": 2, + "normal": { "health": 5, "move": 2, "attack": 2, "attributes": [ "^^On death, all","^^adjacent figures","^^suffer 1 damage" ] }, + "elite": { "health": 8, "move": 1, "attack": 3, "attributes": [ "^^On death, all","^^adjacent figures","^^suffer 2 damage", "^Advantage" ] } + }, + { + "level": 3, + "normal": { "health": 6, "move": 2, "attack": 3, "attributes": [ "^^On death, all","^^adjacent figures","^^suffer 2 damage" ] }, + "elite": { "health": 10, "move": 2, "attack": 3, "attributes": [ "^^On death, all","^^adjacent figures","^^suffer 2 damage", "^Advantage" ] } + }, + { + "level": 4, + "normal": { "health": 8, "move": 2, "attack": 3, "attributes": [ "^^On death, all","^^adjacent figures","^^suffer 2 damage" ] }, + "elite": { "health": 12, "move": 2, "attack": 3, "attributes": [ "^^On death, all","^^adjacent figures","^^suffer 3 damage", "^Advantage" ] } + }, + { + "level": 5, + "normal": { "health": 10, "move": 3, "attack": 3, "attributes": [ "^^On death, all","^^adjacent figures","^^suffer 2 damage" ] }, + "elite": { "health": 13, "move": 2, "attack": 4, "attributes": [ "^^On death, all","^^adjacent figures","^^suffer 3 damage", "^Advantage" ] } + }, + { + "level": 6, + "normal": { "health": 12, "move": 3, "attack": 3, "attributes": [ "^^On death, all","^^adjacent figures","^^suffer 3 damage" ] }, + "elite": { "health": 14, "move": 3, "attack": 4, "attributes": [ "^^On death, all","^^adjacent figures","^^suffer 3 damage", "^Advantage" ] } + }, + { + "level": 7, + "normal": { "health": 12, "move": 3, "attack": 4, "attributes": [ "^^On death, all","^^adjacent figures","^^suffer 3 damage" ] }, + "elite": { "health": 16, "move": 3, "attack": 5, "attributes": [ "^^On death, all","^^adjacent figures","^^suffer 4 damage", "^Advantage" ] } + } + ] + }, + "Chaos Demon":{ + "deck": "Chaos Demon", + "count": 4, + "levels": [ + { + "level": 0, + "normal": { "health": 7, "move": 3, "attack": 2, "attributes": [ "%muddle%" ] }, + "elite": { "health": 10, "move": 4, "attack": 3, "attributes": [ "%muddle%" ] } + }, + { + "level": 1, + "normal": { "health": 8, "move": 3, "attack": 3, "attributes": [ "%muddle%" ] }, + "elite": { "health": 12, "move": 4, "attack": 4, "attributes": [ "%muddle%" ] } + }, + { + "level": 2, + "normal": { "health": 11, "move": 3, "attack": 3, "attributes": [ "%muddle%" ] }, + "elite": { "health": 14, "move": 4, "attack": 5, "attributes": [ "%muddle%" ] } + }, + { + "level": 3, + "normal": { "health": 12, "move": 3, "attack": 4, "attributes": [ "%muddle%" ] }, + "elite": { "health": 18, "move": 5, "attack": 5, "attributes": [ "%muddle%" ] } + }, + { + "level": 4, + "normal": { "health": 15, "move": 4, "attack": 4, "attributes": [ "%muddle%" ] }, + "elite": { "health": 21, "move": 5, "attack": 6, "attributes": [ "%muddle%" ] } + }, + { + "level": 5, + "normal": { "health": 16, "move": 4, "attack": 5, "attributes": [ "%muddle%" ] }, + "elite": { "health": 26, "move": 5, "attack": 6, "attributes": [ "%muddle%" ] } + }, + { + "level": 6, + "normal": { "health": 20, "move": 4, "attack": 5, "attributes": [ "%muddle%" ] }, + "elite": { "health": 30, "move": 5, "attack": 7, "attributes": [ "%muddle%" ] } + }, + { + "level": 7, + "normal": { "health": 22, "move": 4, "attack": 6, "attributes": [ "%muddle%" ] }, + "elite": { "health": 35, "move": 5, "attack": 8, "attributes": [ "%muddle%" ] } + } + ] + }, + "Blood Tumor":{ + "count": 1, + "deck": "Boss (JotL)", + "levels": [ + { + "level": 0, + "health": "7xC", + "move": 0, + "attack": "C-1", + "special1": [ "%heal% C", "^Self"], + "special2": [ "%heal% 2", "^Target all allies" ], + "immunities": [ "%disarm%", "%muddle%", "%stun%" ] + + }, + { + "level": 1, + "health": "10xC", + "move": 0, + "attack": "C", + "special1": [ "%heal% C", "^Self"], + "special2": [ "%heal% 2", "^Target all allies" ], + "immunities": [ "%disarm%", "%muddle%", "%stun%" ] + }, + { + "level": 2, + "health": "12xC", + "move": 0, + "attack": "C", + "special1": [ "%heal% C+1", "^Self"], + "special2": [ "%heal% 3", "^Target all allies" ], + "immunities": [ "%disarm%", "%muddle%", "%stun%" ] + }, + { + "level": 3, + "health": "15xC", + "move": 0, + "attack": "C+1", + "special1": [ "%heal% C+1", "^Self"], + "special2": [ "%heal% 3", "^Target all allies" ], + "immunities": [ "%disarm%", "%muddle%", "%stun%" ] + }, + { + "level": 4, + "health": "17xC", + "move": 0, + "attack": "C+1", + "special1": [ "%heal% C+2", "^Self"], + "special2": [ "%heal% 4", "^Target all allies" ], + "immunities": [ "%disarm%", "%muddle%", "%stun%" ] + }, + { + "level": 5, + "health": "20xC", + "move": 0, + "attack": "C+2", + "special1": [ "%heal% C+2", "^Self"], + "special2": [ "%heal% 4", "^Target all allies" ], + "immunities": [ "%disarm%", "%muddle%", "%stun%" ] + }, + { + "level": 6, + "health": "23xC", + "move": 0, + "attack": "C+2", + "special1": [ "%heal% C+2", "^Self"], + "special2": [ "%heal% 5", "^Target all allies" ], + "immunities": [ "%disarm%", "%muddle%", "%stun%" ] + }, + { + "level": 7, + "health": "28xC", + "move": 0, + "attack": "C+3", + "special1": [ "%heal% C+3", "^Self"], + "special2": [ "%heal% 5", "^Target all allies" ], + "immunities": [ "%disarm%", "%muddle%", "%stun%" ] + } + ] + } + }, + + "scenarios": { + "#5 A Deeper Understanding": { + "monsters": [ "Zealot", "Chaos Demon", "Blood Tumor" ] + }, + "#6 Corrupted Research": { + "monsters": [ "Rat Monstrosity", "Black Sludge" ], + "special": [ + { + "type": "Allies", + "list": ["Rat Monstrosity"] + }, + { + "type": "Objective", + "name": "Growth 1", + "health": "(1+L)xC" + }, + { + "type": "Objective", + "name": "Growth 2", + "health": "(1+L)xC" + }, + { + "type": "Objective", + "name": "Growth 3", + "health": "(1+L)xC" + }, + { + "type": "Objective", + "name": "Growth 4", + "health": "(1+L)xC" + }, + { + "type": "Objective", + "name": "Growth 5", + "health": "(1+L)xC" + }, + { + "type": "Objective", + "name": "Growth 6", + "health": "(1+L)xC" + }, + { + "type": "Objective", + "name": "Growth 7", + "health": "(1+L)xC" + } + ] + }, + "#7 Sunken Tumor": { + "monsters": [ "Vermling Scout (JotL)", "Zealot", "Blood Tumor" ] + } + } +} \ No newline at end of file -- cgit v1.3.1