@chrischall/warapp-mcp 0.26.0 → 0.27.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.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/dist/analysis/fog-view.js +35 -0
- package/dist/bundle.js +506 -152
- package/dist/calibration-source.js +39 -4
- package/dist/fog-history.js +246 -0
- package/dist/history-window.js +85 -0
- package/dist/protocol/methods.js +8 -0
- package/dist/tools/calibration-harness.js +26 -11
- package/dist/tools/fog-capture.js +35 -0
- package/dist/tools/game.js +49 -6
- package/dist/tools/turn.js +7 -0
- package/dist/version.js +1 -1
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"metadata": {
|
|
9
9
|
"description": "MCP server for war.app (Warzone) — your games, players, settings, map bonuses and chokepoints, board analysis and route planning through war.app's per-player GameFeed API, plus the live board, territory picks, cards, turn planning and submission, turn notifications and game chat through your signed-in war.app tab (creating, joining, leaving or surrendering a game, accepting game invitations, closing out a finished game, accepting another player's surrender, a team surrender, a vote to end a game, booting a stalled player, Begin on a speed first turn, picks, turn orders, withdrawing them, chat sends, nudging a player, joining or leaving a ladder, answering a clan invite, joining or leaving a clan, changing quickmatch settings, voting on quickmatch templates, joining or declining a tournament, showing a tournament among your favourites, mail (new threads, replies, adding players, deleting threads), forum posts (new threads, replies, votes, watching a thread), chat reactions, marking notifications and chat read, deleting notifications, importing local history and linking a session are confirm-gated).",
|
|
10
|
-
"version": "0.
|
|
10
|
+
"version": "0.27.0"
|
|
11
11
|
},
|
|
12
12
|
"plugins": [
|
|
13
13
|
{
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"displayName": "war.app (Warzone)",
|
|
16
16
|
"source": "./",
|
|
17
17
|
"description": "war.app (Warzone) game advisor for Claude — games, maps, bonuses, routes, live board, picks, turns, cards and chat",
|
|
18
|
-
"version": "0.
|
|
18
|
+
"version": "0.27.0",
|
|
19
19
|
"author": {
|
|
20
20
|
"name": "Chris Hall"
|
|
21
21
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "warapp-mcp",
|
|
3
3
|
"displayName": "war.app (Warzone)",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.27.0",
|
|
5
5
|
"description": "war.app (Warzone) game advisor for Claude — games, maps, bonuses, routes, live board, picks, turns, cards and chat",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Chris Hall",
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { neighborsOf } from './graph.js';
|
|
2
|
+
/** What a fog setting shows of a territory beside none of mine: its owner, or nothing. */
|
|
3
|
+
const OWNERS_EVERYWHERE = new Set(['LightFog', 'ModerateFog']);
|
|
4
|
+
/** Settings under which I see my own territories only (the wiki: no neighbour shown). */
|
|
5
|
+
const OWN_ONLY = new Set(['VeryFoggy', 'ExtremeFog']);
|
|
6
|
+
/**
|
|
7
|
+
* `board` (a whole board) as `me` sees it under `fog`: under `NoFog` as it is; otherwise my territories (and my
|
|
8
|
+
* teammates') and — except under Very Foggy / Extreme fog — every territory beside them shown whole; the rest show
|
|
9
|
+
* their owner only under Light / Moderate fog, else nothing.
|
|
10
|
+
*/
|
|
11
|
+
export function fogView(graph, board, me, fog, allies = new Set()) {
|
|
12
|
+
const mode = fog ?? 'Foggy';
|
|
13
|
+
if (mode === 'NoFog')
|
|
14
|
+
return { ...board, territories: board.territories.map((t) => ({ ...t, fogLevel: 'Visible' })) };
|
|
15
|
+
const own = (t) => t.owner.kind === 'player' && (t.owner.playerId === me || allies.has(t.owner.playerId));
|
|
16
|
+
const mine = new Set(board.territories.filter(own).map((t) => t.territoryId));
|
|
17
|
+
const seen = new Set(mine);
|
|
18
|
+
if (!OWN_ONLY.has(mode))
|
|
19
|
+
for (const t of mine)
|
|
20
|
+
for (const n of neighborsOf(graph, t))
|
|
21
|
+
seen.add(n);
|
|
22
|
+
const ownersShown = OWNERS_EVERYWHERE.has(mode);
|
|
23
|
+
return {
|
|
24
|
+
...board,
|
|
25
|
+
territories: board.territories.map((t) => {
|
|
26
|
+
if (mine.has(t.territoryId))
|
|
27
|
+
return { ...t, fogLevel: 'You' };
|
|
28
|
+
if (seen.has(t.territoryId))
|
|
29
|
+
return { ...t, fogLevel: 'Visible' };
|
|
30
|
+
if (ownersShown)
|
|
31
|
+
return { territoryId: t.territoryId, owner: t.owner, armies: null, fogLevel: 'OwnerOnly' };
|
|
32
|
+
return { territoryId: t.territoryId, owner: { kind: 'unknown' }, armies: null, fogLevel: 'Fogged' };
|
|
33
|
+
}),
|
|
34
|
+
};
|
|
35
|
+
}
|