@chrischall/warapp-mcp 0.6.0 → 0.8.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/README.md +100 -7
- package/dist/analysis/accept-surrender.js +20 -2
- package/dist/analysis/calibrate.js +1 -0
- package/dist/analysis/card-support.js +187 -20
- package/dist/analysis/card-threats.js +68 -3
- package/dist/analysis/chat-advice.js +182 -0
- package/dist/analysis/chat-blocks.js +106 -0
- package/dist/analysis/chat-intent.js +559 -0
- package/dist/analysis/chat-read.js +159 -0
- package/dist/analysis/coalition.js +55 -0
- package/dist/analysis/decision-replay.js +279 -0
- package/dist/analysis/decision-truth.js +146 -0
- package/dist/analysis/finished-game.js +62 -3
- package/dist/analysis/game-lessons.js +12 -6
- package/dist/analysis/local-deploy.js +14 -0
- package/dist/analysis/opponent-profile.js +46 -3
- package/dist/analysis/opponents.js +246 -19
- package/dist/analysis/outlook.js +323 -17
- package/dist/analysis/picks.js +270 -37
- package/dist/analysis/plan/after-leftover.js +28 -3
- package/dist/analysis/plan/captures.js +80 -16
- package/dist/analysis/plan/completed.js +8 -1
- package/dist/analysis/plan/conceded-out.js +16 -11
- package/dist/analysis/plan/deploy-estimates.js +513 -0
- package/dist/analysis/plan/doomed-out.js +135 -0
- package/dist/analysis/plan/estimates.js +73 -7
- package/dist/analysis/plan/free-capture.js +34 -0
- package/dist/analysis/plan/guard-off.js +2 -1
- package/dist/analysis/plan/holds.js +85 -313
- package/dist/analysis/plan/horizon.js +42 -0
- package/dist/analysis/plan/leftover.js +188 -10
- package/dist/analysis/plan/observe.js +896 -0
- package/dist/analysis/plan/orders.js +35 -1
- package/dist/analysis/plan/relations.js +115 -2
- package/dist/analysis/plan/report.js +10 -4
- package/dist/analysis/plan/shared.js +7 -1189
- package/dist/analysis/plan/stand-still.js +7 -5
- package/dist/analysis/plan/state.js +12 -0
- package/dist/analysis/plan/stockpile.js +104 -0
- package/dist/analysis/plan/strike-stack.js +467 -0
- package/dist/analysis/plan/strike.js +8 -441
- package/dist/analysis/plan/targets.js +374 -72
- package/dist/analysis/plan/threats.js +120 -9
- package/dist/analysis/plan/transfers.js +35 -1
- package/dist/analysis/plan/two-move.js +70 -0
- package/dist/analysis/plan/vacated.js +124 -2
- package/dist/analysis/plan/withdraw.js +316 -0
- package/dist/analysis/planner.js +356 -53
- package/dist/analysis/player.js +4 -0
- package/dist/analysis/relations.js +8 -2
- package/dist/analysis/since-last.js +18 -5
- package/dist/analysis/stress.js +1 -1
- package/dist/board.js +36 -2
- package/dist/build-id.js +106 -0
- package/dist/bundle.js +15863 -10242
- package/dist/chat-automation.js +22 -0
- package/dist/client.js +14 -0
- package/dist/decision-log.js +1093 -0
- package/dist/finished-store.js +5 -1
- package/dist/lessons-store.js +322 -21
- package/dist/my-games.js +2 -0
- package/dist/open-games.js +122 -18
- package/dist/outlook-log.js +42 -1
- package/dist/protocol/methods.js +4 -2
- package/dist/review-export.js +198 -0
- package/dist/state-bundle.js +62 -3
- package/dist/state-cli.js +5 -3
- package/dist/strategy/notes.js +56 -0
- package/dist/tools/accept-surrender.js +23 -9
- package/dist/tools/award.js +5 -1
- package/dist/tools/card-advice.js +102 -33
- package/dist/tools/card-support-advice.js +53 -8
- package/dist/tools/chat-advice.js +330 -0
- package/dist/tools/chat-inbox.js +15 -4
- package/dist/tools/chat.js +41 -11
- package/dist/tools/check-plan.js +16 -3
- package/dist/tools/commander-check.js +2 -1
- package/dist/tools/decision-capture.js +461 -0
- package/dist/tools/end-of-game.js +146 -18
- package/dist/tools/game-kind.js +92 -0
- package/dist/tools/how-lost.js +7 -2
- package/dist/tools/index.js +3 -0
- package/dist/tools/join-game.js +51 -9
- package/dist/tools/live-context.js +6 -0
- package/dist/tools/live.js +43 -6
- package/dist/tools/map-curves.js +73 -0
- package/dist/tools/notifications.js +4 -3
- package/dist/tools/open-games.js +2 -2
- package/dist/tools/opponents.js +2 -0
- package/dist/tools/past-games.js +74 -8
- package/dist/tools/picks.js +169 -57
- package/dist/tools/profile-hook.js +62 -3
- package/dist/tools/profile-opponents.js +2 -0
- package/dist/tools/push.js +2 -2
- package/dist/tools/relations.js +2 -0
- package/dist/tools/scout.js +16 -2
- package/dist/tools/state.js +6 -1
- package/dist/tools/strategy.js +3 -3
- package/dist/tools/stress-opponents.js +2 -0
- package/dist/tools/surrender-pending.js +10 -1
- package/dist/tools/surrender.js +18 -3
- package/dist/tools/turn.js +353 -19
- package/dist/tools/where.js +3 -1
- package/dist/version.js +1 -1
- package/manifest.json +23 -2
- package/mint.yaml +23 -0
- package/package.json +1 -1
- package/server.json +20 -2
- package/skills/warapp-mcp/SKILL.md +42 -8
package/dist/state-cli.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// and nothing else — never the env file or a credential, never a request. It prints counts and sizes
|
|
5
5
|
// only: never the salt, a file's contents, or an id.
|
|
6
6
|
import { dataDir } from './config.js';
|
|
7
|
-
import { collectExport, encodeBundle, humanSize, StateBundleError, STORES, writeBundleFile } from './state-bundle.js';
|
|
7
|
+
import { collectExport, encodeBundle, humanSize, MAX_EXPORT_DECISION_BYTES, StateBundleError, STORES, writeBundleFile } from './state-bundle.js';
|
|
8
8
|
const USAGE = 'Usage: warapp-mcp export-state --out <file> [--data-dir <dir>] [--account <war.app player id>] [--force]\n' +
|
|
9
9
|
'Writes this install\'s warapp-mcp history (file mode 0600) for warapp_import_state. The file holds the\n' +
|
|
10
10
|
'salt behind your hashed history: keep it private and delete it once imported.';
|
|
@@ -56,9 +56,11 @@ export async function runExportCli(argv, io = defaultIo) {
|
|
|
56
56
|
if (fs.length)
|
|
57
57
|
io.out(` ${store}: ${fs.length} file${fs.length === 1 ? '' : 's'}, ${humanSize(fs.reduce((n, f) => n + f.bytes.length, 0))}`);
|
|
58
58
|
}
|
|
59
|
-
const { finishedGames, unknownGames, otherAccountFiles } = r.leftOut;
|
|
59
|
+
const { finishedGames, unknownGames, otherAccountFiles, decisionLogs } = r.leftOut;
|
|
60
60
|
io.out(`Left out: per-game files of ${finishedGames} finished game(s) and ${unknownGames} game(s) of unknown state, ` +
|
|
61
|
-
`${otherAccountFiles} file(s) of another account
|
|
61
|
+
`${otherAccountFiles} file(s) of another account` +
|
|
62
|
+
(decisionLogs ? `, ${decisionLogs} older decision log(s) past the bundle's ${humanSize(MAX_EXPORT_DECISION_BYTES)} share` : '') +
|
|
63
|
+
'; credentials, chat, maps, stats and the bundle cache are never included.');
|
|
62
64
|
io.out('It holds the salt behind your hashed history: keep it private, and delete it once imported.');
|
|
63
65
|
return 0;
|
|
64
66
|
}
|
package/dist/strategy/notes.js
CHANGED
|
@@ -2152,6 +2152,62 @@ export const STRATEGY_NOTES = [
|
|
|
2152
2152
|
source: S.diplomacyGames,
|
|
2153
2153
|
basis: 'source',
|
|
2154
2154
|
},
|
|
2155
|
+
// ---- diplomacy: chat as game information (#415) ----
|
|
2156
|
+
{
|
|
2157
|
+
id: 'diplomacy-chat-income-check',
|
|
2158
|
+
topic: 'diplomacy',
|
|
2159
|
+
when: on({ format: ['ffa'] }),
|
|
2160
|
+
text: 'An income check in free-for-all chat is mostly a hunt for the leader: a forum poster gives "player X has ' +
|
|
2161
|
+
'1000 income" as the post that turns a game into a popularity contest. Leading or close to it, say little and ' +
|
|
2162
|
+
'give no figure; when another player clearly leads, your honest income helps the table see it.',
|
|
2163
|
+
source: S.forumFfaChatEtiquette,
|
|
2164
|
+
basis: 'derived',
|
|
2165
|
+
encoded: 'the chat advice (adviseReply, src/analysis/chat-advice.ts, #415)',
|
|
2166
|
+
},
|
|
2167
|
+
{
|
|
2168
|
+
id: 'diplomacy-chat-withhold',
|
|
2169
|
+
topic: 'diplomacy',
|
|
2170
|
+
when: on({ format: ['ffa'] }),
|
|
2171
|
+
text: 'Answering chat is a choice: one forum poster simply ignored a deal offered by mail, while another warns that ' +
|
|
2172
|
+
'ignoring it hands rivals an edge. Withholding breaks no rule and a vague reply is fine; what you do say should ' +
|
|
2173
|
+
'be true, so say less rather than invent.',
|
|
2174
|
+
source: S.forumFfaChatEtiquette,
|
|
2175
|
+
basis: 'derived',
|
|
2176
|
+
encoded: 'the chat advice (adviseReply, src/analysis/chat-advice.ts, #415)',
|
|
2177
|
+
},
|
|
2178
|
+
{
|
|
2179
|
+
id: 'diplomacy-chat-gang-up-ask',
|
|
2180
|
+
topic: 'diplomacy',
|
|
2181
|
+
when: on({ format: ['ffa'] }),
|
|
2182
|
+
text: 'The usual pitch is "X wins unless we gang up". Treat it as a deal offer: when X leads and you do not, price it ' +
|
|
2183
|
+
'with warapp_advise_diplomacy as you would a truce. When you are X, it is a warning that others are being ' +
|
|
2184
|
+
'turned on you: check the borders facing the asker and its neighbours.',
|
|
2185
|
+
source: S.forumFfaChatEtiquette,
|
|
2186
|
+
basis: 'derived',
|
|
2187
|
+
encoded: 'the chat advice (adviseReply, src/analysis/chat-advice.ts, #415)',
|
|
2188
|
+
},
|
|
2189
|
+
{
|
|
2190
|
+
id: 'diplomacy-chat-threat',
|
|
2191
|
+
topic: 'diplomacy',
|
|
2192
|
+
when: on({ format: ['ffa'] }),
|
|
2193
|
+
text: 'One poster on truce disputes counts threatening moves of any kind as a possible breach. Read a threat in chat ' +
|
|
2194
|
+
'the same way, as information about where the sender is looking rather than a reason to answer in kind: check ' +
|
|
2195
|
+
'the borders facing that player before you commit.',
|
|
2196
|
+
source: S.forumTrucePsychology,
|
|
2197
|
+
basis: 'derived',
|
|
2198
|
+
encoded: 'the chat advice (adviseReply, src/analysis/chat-advice.ts, #415)',
|
|
2199
|
+
},
|
|
2200
|
+
{
|
|
2201
|
+
id: 'diplomacy-chat-trust-little',
|
|
2202
|
+
topic: 'diplomacy',
|
|
2203
|
+
when: on({ format: ['ffa'] }),
|
|
2204
|
+
text: 'A forum guide to free-for-alls advises making pacts by private message but trusting a new partner only a ' +
|
|
2205
|
+
'little at first, since some players betray quickly. Answer a truce offer by pricing it ' +
|
|
2206
|
+
'(warapp_advise_diplomacy) rather than agreeing in the same breath, and keep that border guarded while it is new.',
|
|
2207
|
+
source: S.ffa,
|
|
2208
|
+
basis: 'derived',
|
|
2209
|
+
encoded: 'the chat advice (adviseReply, src/analysis/chat-advice.ts, #415)',
|
|
2210
|
+
},
|
|
2155
2211
|
{
|
|
2156
2212
|
id: 'teams-team-chat',
|
|
2157
2213
|
topic: 'format',
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
// them and refuses when no surrender is pending from that player or my acceptance is not owed; a
|
|
7
7
|
// finished game and a game I am not playing are refused first. The preview says what accepting does
|
|
8
8
|
// here: whose seat, whether its land turns neutral or goes to an AI, who borders that land (from the
|
|
9
|
-
// live board when it reads
|
|
9
|
+
// live board when it reads; #417: and that its land behind the fog is unknown, the standing carrying no
|
|
10
|
+
// per-player count), whether it goes through now or others still owe theirs, whether it
|
|
10
11
|
// leaves only my side playing (a win), and in a free-for-all one advice line naming the neighbour
|
|
11
12
|
// that gains most (strategy note ffa-surrender-veto).
|
|
12
13
|
//
|
|
@@ -15,7 +16,7 @@
|
|
|
15
16
|
// which carries no result, and nothing is ever resent.
|
|
16
17
|
import { CONFIRM_INJECTION_RULE, toolAnnotations } from '@chrischall/mcp-utils';
|
|
17
18
|
import { z } from 'zod';
|
|
18
|
-
import { surrenderLand, winsOnAcceptance } from '../analysis/accept-surrender.js';
|
|
19
|
+
import { hiddenLandLine, surrenderLand, winsOnAcceptance } from '../analysis/accept-surrender.js';
|
|
19
20
|
import { parseGameId } from '../client.js';
|
|
20
21
|
import { inGameOf, playersByInGameId } from '../live.js';
|
|
21
22
|
import { Method, writeAcceptSurrenderParams } from '../protocol/methods.js';
|
|
@@ -28,6 +29,7 @@ import { mapOf } from './map.js';
|
|
|
28
29
|
import { resolvePlayer } from './resolve.js';
|
|
29
30
|
import { noBrowserNote } from './session.js';
|
|
30
31
|
import { readDetailsSeats } from './surrender-pending.js';
|
|
32
|
+
import { captureGameEvent, turnOfGame } from './decision-capture.js';
|
|
31
33
|
import { resolveTeamsFor } from './team-source.js';
|
|
32
34
|
import { defineGatedWrite, mySeat, refuse, requireMe, requirePlaying, sendAndVerify, worded } from './write-kit.js';
|
|
33
35
|
const PLAYING = 'Playing';
|
|
@@ -83,15 +85,17 @@ function adviceOf(opts) {
|
|
|
83
85
|
return `${cite} Who borders its land is unknown: the live board could not be read.`;
|
|
84
86
|
const top = opts.land.neighbours[0];
|
|
85
87
|
const ai = opts.toAI === true ? ' Its land goes to an AI, which keeps playing it, so it is not up for taking at once.' : '';
|
|
88
|
+
// #417: say plainly that its land behind the fog is not counted.
|
|
89
|
+
const hidden = opts.land.hiddenLand === null ? ' Its land behind the fog is unknown (#417): only what is in view is counted.' : '';
|
|
86
90
|
if (!top)
|
|
87
|
-
return `${cite} No player borders its land in view, so no neighbour gains it at once.${ai}`;
|
|
91
|
+
return `${cite} No player borders its land in view, so no neighbour gains it at once.${ai}${hidden}`;
|
|
88
92
|
const mine = opts.land.neighbours.find((n) => n.inGameId === opts.meInGame)?.bordering ?? 0;
|
|
89
93
|
const fog = opts.land.hiddenNeighbours ? ` (${opts.land.hiddenNeighbours} territories beside it are hidden by fog)` : '';
|
|
90
94
|
if (top.inGameId === opts.meInGame) {
|
|
91
|
-
return `${cite} You border its land with the most territories (${top.bordering})${fog}, so of its neighbours you gain most from it.${ai}`;
|
|
95
|
+
return `${cite} You border its land with the most territories (${top.bordering})${fog}, so of its neighbours you gain most from it.${ai}${hidden}`;
|
|
92
96
|
}
|
|
93
97
|
return (`${cite} ${opts.idOf(top.inGameId)} borders its land with the most territories (${top.bordering}; you: ${mine})${fog}, ` +
|
|
94
|
-
`so it gains most from it.${ai}`);
|
|
98
|
+
`so it gains most from it.${ai}${hidden}`);
|
|
95
99
|
}
|
|
96
100
|
export function registerAcceptSurrenderTool(server, ctx) {
|
|
97
101
|
defineGatedWrite(server, {
|
|
@@ -104,7 +108,8 @@ export function registerAcceptSurrenderTool(server, ctx) {
|
|
|
104
108
|
'player, when your acceptance is not owed (already given, or your seat cannot accept), in a finished game, ' +
|
|
105
109
|
'and in a game you are not playing. `player` names the surrendering player (name or id); it may be omitted ' +
|
|
106
110
|
'when one surrender is pending. The preview says what accepting does: whose seat, whether its land turns ' +
|
|
107
|
-
'neutral or goes to an AI, which players border that land (live board)
|
|
111
|
+
'neutral or goes to an AI, which players border that land (live board) and how much of it the fog may hide ' +
|
|
112
|
+
'(the count behind the fog is unknown: only the land in view is counted), whether it goes through now or ' +
|
|
108
113
|
'others still owe their acceptance, whether it leaves only your side playing (a win), and in a free-for-all ' +
|
|
109
114
|
`one advice line naming the neighbour that gains most (strategy note ${FFA_SURRENDER_NOTE}). Accepting is the ` +
|
|
110
115
|
"owner's decision. The outcome is read back from GameFeed and the game details (`accepted`, `pending` — others " +
|
|
@@ -222,6 +227,10 @@ export function registerAcceptSurrenderTool(server, ctx) {
|
|
|
222
227
|
};
|
|
223
228
|
}),
|
|
224
229
|
hiddenNeighbours: land.hiddenNeighbours,
|
|
230
|
+
// #417: what the fog hides of its land: unknown (null) under any fog, said plainly.
|
|
231
|
+
hiddenLand: land.hiddenLand,
|
|
232
|
+
hiddenOnBoard: land.hiddenOnBoard,
|
|
233
|
+
hiddenLine: hiddenLandLine(land),
|
|
225
234
|
}
|
|
226
235
|
: null,
|
|
227
236
|
othersStillToAccept,
|
|
@@ -232,14 +241,14 @@ export function registerAcceptSurrenderTool(server, ctx) {
|
|
|
232
241
|
untrusted: UNTRUSTED_PREVIEW_NOTE,
|
|
233
242
|
},
|
|
234
243
|
},
|
|
235
|
-
state: { gameId, name: gameLabel(game), me, player: target.player, inGameId: target.inGameId, alreadyAI },
|
|
244
|
+
state: { gameId, name: gameLabel(game), me, player: target.player, inGameId: target.inGameId, alreadyAI, turn: turnOfGame(game) },
|
|
236
245
|
};
|
|
237
246
|
},
|
|
238
|
-
async execute({ gameId, name, me, player, inGameId, alreadyAI }) {
|
|
247
|
+
async execute({ gameId, name, me, player, inGameId, alreadyAI, turn }) {
|
|
239
248
|
await requireApprovedAccount(ctx, writeAccount(me));
|
|
240
249
|
const game = { id: gameId, name };
|
|
241
250
|
const who = { player, inGameId };
|
|
242
|
-
|
|
251
|
+
const result = await sendAndVerify({
|
|
243
252
|
send: async () => {
|
|
244
253
|
await ctx.rpc.call('AcceptSurrender', Method.AcceptSurrender, (w) => writeAcceptSurrenderParams(w, { gameId, playerId: inGameId, accept: true }));
|
|
245
254
|
},
|
|
@@ -306,6 +315,11 @@ export function registerAcceptSurrenderTool(server, ctx) {
|
|
|
306
315
|
};
|
|
307
316
|
},
|
|
308
317
|
});
|
|
318
|
+
// #437: my acceptance, once confirmed, into the decision log (by GameFeed id; a seat without one is not kept).
|
|
319
|
+
if (result.outcome === 'confirmed' && player !== null && turn !== undefined) {
|
|
320
|
+
await captureGameEvent(ctx, gameId, me, { turn, kind: 'surrender-accepted-by-me', player }, { create: true });
|
|
321
|
+
}
|
|
322
|
+
return result;
|
|
309
323
|
},
|
|
310
324
|
});
|
|
311
325
|
}
|
package/dist/tools/award.js
CHANGED
|
@@ -7,6 +7,7 @@ import { readFirstMover, resolveFirstMover, verifiedFirstMover, writeFirstMover
|
|
|
7
7
|
import { readPickRecord, writeAward } from '../pick-list.js';
|
|
8
8
|
import { pickSettings } from './picks.js';
|
|
9
9
|
import { isTeamGame, teammatesOf } from '../teams.js';
|
|
10
|
+
import { capturePicksAward } from './decision-capture.js';
|
|
10
11
|
const isMine = (t, me) => t.owner.kind === 'player' && t.owner.playerId === me;
|
|
11
12
|
/** The army count every territory of mine holds, when they all hold the same (the starting armies on turn 1). */
|
|
12
13
|
function uniformArmies(board, me) {
|
|
@@ -22,6 +23,7 @@ function uniformArmies(board, me) {
|
|
|
22
23
|
* list is kept for this player, the list did not explain the start, or the first board has
|
|
23
24
|
* passed unread. Reads the award (and keeps it) on turn 1; later turns reuse what was kept.
|
|
24
25
|
* `write: false` reads it the same way and keeps nothing (#275 pattern 3: a write's preview).
|
|
26
|
+
* The reading kept is logged once into the game's decision log too (#437 task 3, `decisionLog` its mode).
|
|
25
27
|
* Never throws.
|
|
26
28
|
*/
|
|
27
29
|
export async function loadAward(dataDir, game, me, board, turn, o = {}) {
|
|
@@ -47,8 +49,10 @@ export async function loadAward(dataDir, game, me, board, turn, o = {}) {
|
|
|
47
49
|
// A start the board shows as nobody's, mine or a neutral cannot be another player's: the list is not the one awarded from.
|
|
48
50
|
if (reading?.opponentStarts.some((t) => contradicts(state.get(t), me.id)))
|
|
49
51
|
reading = null;
|
|
50
|
-
if (o.write !== false)
|
|
52
|
+
if (o.write !== false) {
|
|
51
53
|
await writeAward(dataDir, game.id, me.id, reading);
|
|
54
|
+
await capturePicksAward(dataDir, o.decisionLog, game.id, me.id, turn, reading);
|
|
55
|
+
}
|
|
52
56
|
}
|
|
53
57
|
if (!reading)
|
|
54
58
|
return undefined;
|
|
@@ -4,15 +4,17 @@
|
|
|
4
4
|
// (Diplomacy, Sanctions), and (PLAN-TEAMS D2) where to play my Diplomacy, Sanctions, Airlift and
|
|
5
5
|
// Gift. Read-only; everything here is advice — of these only the advised Order Delay is added to the
|
|
6
6
|
// orders; my Bomb and Emergency Blockade and the D2 cards carry an `order` to pass to warapp_submit_turn.
|
|
7
|
-
import { adviseOrderDelay, CARD_ORDER_DELAY, CARD_REINFORCEMENT, isMyCard, readActiveCards } from '../cards.js';
|
|
8
|
-
import { bombAdvice, bombExposure, wallOffer, wallThreats } from '../analysis/card-threats.js';
|
|
7
|
+
import { adviseOrderDelay, CARD_BLOCKADE, CARD_ORDER_DELAY, CARD_REINFORCEMENT, isMyCard, readActiveCards } from '../cards.js';
|
|
8
|
+
import { blockadeOffer, bombAdvice, bombExposure, wallOffer, wallThreats } from '../analysis/card-threats.js';
|
|
9
9
|
import { bonusTerritories } from '../analysis/bonuses.js';
|
|
10
|
-
import { supportAdvice } from './card-support-advice.js';
|
|
10
|
+
import { diplomacyOpponents, supportAdvice } from './card-support-advice.js';
|
|
11
|
+
export { giftInOrders, intelOrders } from './card-support-advice.js';
|
|
11
12
|
import { inGameId } from '../live.js';
|
|
12
13
|
import { capturePieceValue, cardClock } from '../strategy/card-clock.js';
|
|
13
14
|
import { isTeamGame, teammatesOf as teamOf } from '../teams.js';
|
|
14
15
|
const CARD_BOMB = 13;
|
|
15
16
|
const CARD_EMERGENCY_BLOCKADE = 3;
|
|
17
|
+
const CARD_DIPLOMACY = 8;
|
|
16
18
|
/** The game around my hand, for the card policy; in a team game with `me`, my in-game id (V8). */
|
|
17
19
|
export function cardGame(game, me) {
|
|
18
20
|
const team = isTeamGame(game.players);
|
|
@@ -85,12 +87,39 @@ export function adviseCards(input) {
|
|
|
85
87
|
const gone = new Set([...choice.plays, ...choice.discards].map((c) => c.id));
|
|
86
88
|
const held = (type) => own.find((c) => c.type === type && !gone.has(c.id));
|
|
87
89
|
const friends = new Set(teammatesOf(game, me).map((p) => p.id));
|
|
90
|
+
// The cards in effect (unverified decoding), by GameFeed id: read once, for the Bomb's peace and the warnings below.
|
|
91
|
+
const active = readActiveCards(input.info);
|
|
92
|
+
const byInGame = new Map(game.players.flatMap((p) => {
|
|
93
|
+
try {
|
|
94
|
+
return [[inGameId(p), p]];
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
return [];
|
|
98
|
+
}
|
|
99
|
+
}));
|
|
100
|
+
const feed = (id) => (id === undefined ? undefined : byInGame.get(id)?.id);
|
|
101
|
+
const activeView = active.map((a) => ({
|
|
102
|
+
card: a.card,
|
|
103
|
+
...(a.players ? { players: a.players.map((p) => feed(p) ?? p) } : {}),
|
|
104
|
+
...(a.target !== undefined ? { target: feed(a.target) ?? a.target } : {}),
|
|
105
|
+
...(a.playedBy !== undefined ? { playedBy: feed(a.playedBy) ?? a.playedBy } : {}),
|
|
106
|
+
...(a.expiresAfterTurn !== undefined ? { expiresAfterTurn: a.expiresAfterTurn } : {}),
|
|
107
|
+
...(a.untilTurn !== undefined ? { untilTurn: a.untilTurn } : {}),
|
|
108
|
+
}));
|
|
109
|
+
// #452: the players at peace with me — a Diplomacy card in force (decoded, or the plan's T9 set) or a
|
|
110
|
+
// binding truce — whose territories the Bomb advice passes over, as the Sanctions and Diplomacy advice do.
|
|
111
|
+
const peace = new Set([
|
|
112
|
+
...activeView.flatMap((a) => (a.card === 'Diplomacy' && a.players?.includes(me.id) ? a.players.filter((p) => p !== me.id) : [])),
|
|
113
|
+
...(input.enforced ?? []),
|
|
114
|
+
...(input.truces ?? []).map((t) => t.player),
|
|
115
|
+
]);
|
|
88
116
|
const cb = {
|
|
89
117
|
graph: input.graph,
|
|
90
118
|
board: input.board,
|
|
91
119
|
me: me.id,
|
|
92
120
|
friends,
|
|
93
121
|
...(input.truceCovered?.size ? { noBomb: input.truceCovered } : {}),
|
|
122
|
+
...(peace.size ? { peace } : {}),
|
|
94
123
|
deploys: plan.deploys,
|
|
95
124
|
moves: plan.moves,
|
|
96
125
|
enemyDeploy: plan.enemyDeploy,
|
|
@@ -181,26 +210,41 @@ export function adviseCards(input) {
|
|
|
181
210
|
}
|
|
182
211
|
}
|
|
183
212
|
}
|
|
213
|
+
// #434: my Blockade on the one gate into held bonuses the plan concedes — never on a member of one.
|
|
214
|
+
const blockadeCard = held(CARD_BLOCKADE);
|
|
215
|
+
if (blockadeCard) {
|
|
216
|
+
const bkMultiplier = multiplier(game.settings, 'BlockadeCard');
|
|
217
|
+
const offer = bkMultiplier !== undefined ? blockadeOffer(cb, bkMultiplier, plan.conceded) : undefined;
|
|
218
|
+
if (offer) {
|
|
219
|
+
view.blockade = {
|
|
220
|
+
territory: offer.territory,
|
|
221
|
+
armies: offer.armies,
|
|
222
|
+
wall: offer.wall,
|
|
223
|
+
player: offer.player,
|
|
224
|
+
reach: offer.reach,
|
|
225
|
+
bonuses: offer.opens.bonuses,
|
|
226
|
+
income: offer.opens.income,
|
|
227
|
+
behind: offer.opens.ids,
|
|
228
|
+
commander: offer.commander,
|
|
229
|
+
order: { kind: 'card', card: blockadeCard.id, target: offer.territory },
|
|
230
|
+
};
|
|
231
|
+
const bonusName = (id) => input.graph.map.bonuses.find((b) => b.id === id)?.name ?? `${id}`;
|
|
232
|
+
const into = [
|
|
233
|
+
...offer.opens.bonuses.map((b) => `bonus ${bonusName(b)} (+${input.graph.map.bonuses.find((x) => x.id === b)?.value ?? 0} a turn)`),
|
|
234
|
+
...(offer.commander ? ['your commander'] : []),
|
|
235
|
+
].join(' and ');
|
|
236
|
+
warnings.push(`Consider a Blockade on ${label(offer.territory)}: the plan concedes it, and it is the only way into ${into} — every route from an enemy or the fog runs through it. ` +
|
|
237
|
+
`Its ${offer.armies} armies after the plan × ${bkMultiplier} make a wall of ${offer.wall} that player ${offer.player}'s ~${offer.reach} cannot take. ` +
|
|
238
|
+
`The wall forms at the end of the turn, so it holds only if ${label(offer.territory)} is still yours then, and it gives the territory and its armies away for good (it turns neutral). ` +
|
|
239
|
+
'Advice only, not in the orders: pass `cards.advice.blockade.order` to warapp_submit_turn to play it.');
|
|
240
|
+
}
|
|
241
|
+
else if (bkMultiplier === undefined) {
|
|
242
|
+
warnings.push('You hold a Blockade, but the game does not say its multiplier, so no wall is sized for it.');
|
|
243
|
+
}
|
|
244
|
+
}
|
|
184
245
|
// The cards in effect (unverified decoding): Diplomacy protecting a player, Sanctions on me.
|
|
185
|
-
const active = readActiveCards(input.info);
|
|
186
246
|
if (active.length) {
|
|
187
|
-
|
|
188
|
-
try {
|
|
189
|
-
return [[inGameId(p), p]];
|
|
190
|
-
}
|
|
191
|
-
catch {
|
|
192
|
-
return [];
|
|
193
|
-
}
|
|
194
|
-
}));
|
|
195
|
-
const feed = (id) => (id === undefined ? undefined : byInGame.get(id)?.id);
|
|
196
|
-
view.active = active.map((a) => ({
|
|
197
|
-
card: a.card,
|
|
198
|
-
...(a.players ? { players: a.players.map((p) => feed(p) ?? p) } : {}),
|
|
199
|
-
...(a.target !== undefined ? { target: feed(a.target) ?? a.target } : {}),
|
|
200
|
-
...(a.playedBy !== undefined ? { playedBy: feed(a.playedBy) ?? a.playedBy } : {}),
|
|
201
|
-
...(a.expiresAfterTurn !== undefined ? { expiresAfterTurn: a.expiresAfterTurn } : {}),
|
|
202
|
-
...(a.untilTurn !== undefined ? { untilTurn: a.untilTurn } : {}),
|
|
203
|
-
}));
|
|
247
|
+
view.active = activeView;
|
|
204
248
|
const owner = (t) => {
|
|
205
249
|
const o = input.board.territories.find((x) => x.territoryId === t)?.owner;
|
|
206
250
|
return o?.kind === 'player' ? o.playerId : undefined;
|
|
@@ -210,12 +254,20 @@ export function adviseCards(input) {
|
|
|
210
254
|
if (a.card === 'Diplomacy' && a.players?.includes(me.id)) {
|
|
211
255
|
const other = a.players.find((p) => p !== me.id);
|
|
212
256
|
const hit = plan.moves.filter((m) => m.kind === 'attack' && other !== undefined && owner(m.to) === other);
|
|
257
|
+
// #424: its last turn (gone by the next): say so, and chain it with a Diplomacy card in hand —
|
|
258
|
+
// outside a 1v1, where the support advice chains it too (a 1v1 is advised no Diplomacy).
|
|
259
|
+
const last = turn !== null && a.untilTurn === turn + 1;
|
|
213
260
|
warnings.push(`Diplomacy is in effect between you and player ${other}${until}: neither can attack the other.` +
|
|
214
261
|
(other !== undefined && input.enforced?.has(other)
|
|
215
262
|
? ' The plan honours it (T9): no hold against that player and no attack on it.'
|
|
216
263
|
: hit.length
|
|
217
264
|
? ` The plan's attacks on ${hit.map((m) => label(m.to)).join(', ')} would do nothing — drop or redirect them.`
|
|
218
|
-
: '')
|
|
265
|
+
: '') +
|
|
266
|
+
(last
|
|
267
|
+
? ` This is its last turn: from turn ${a.untilTurn} it can attack you again — ${held(CARD_DIPLOMACY) && diplomacyOpponents(game, me.id, friends) >= 2
|
|
268
|
+
? 'chain it: play your Diplomacy card on it this turn (it starts the turn after it is played), or ready the borders it faces.'
|
|
269
|
+
: 'ready the borders it faces.'}`
|
|
270
|
+
: ''));
|
|
219
271
|
}
|
|
220
272
|
if (a.card === 'Sanctions' && a.target === me.id) {
|
|
221
273
|
const pct = game.settings?.raw.SanctionsCard?.Percentage;
|
|
@@ -229,7 +281,9 @@ export function adviseCards(input) {
|
|
|
229
281
|
}
|
|
230
282
|
// PLAN-TEAMS D2: my Diplomacy, Sanctions, Airlift and Gift — advice only, each with its order.
|
|
231
283
|
const atPeace = new Set((view.active ?? []).flatMap((a) => (a.card === 'Diplomacy' && a.players?.includes(me.id) ? a.players.filter((p) => p !== me.id) : [])));
|
|
232
|
-
|
|
284
|
+
// #424: the cards in force whose last turn this is (gone by the next): chained, not passed over.
|
|
285
|
+
const lastTurn = new Set((view.active ?? []).flatMap((a) => a.card === 'Diplomacy' && a.players?.includes(me.id) && turn !== null && a.untilTurn === turn + 1 ? a.players.filter((p) => p !== me.id) : []));
|
|
286
|
+
const support = supportAdvice({ game, me, plan, cards: own.filter((c) => !gone.has(c.id)), cb, atPeace, lastTurn, truces: input.truces ?? [], ...(input.unverifiedPlays ? { unverifiedPlays: input.unverifiedPlays } : {}) });
|
|
233
287
|
Object.assign(view, support.view);
|
|
234
288
|
warnings.push(...support.warnings);
|
|
235
289
|
return { view, warnings };
|
|
@@ -245,15 +299,30 @@ export function cardPieceOption(settings, hand) {
|
|
|
245
299
|
return v.armies !== null && v.armies > 0 ? { cardPieceValue: v.armies } : {};
|
|
246
300
|
}
|
|
247
301
|
/**
|
|
248
|
-
* #164: an opponent's Reinforcement card for the threat model: the first turn one can be in a hand
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
302
|
+
* #164: an opponent's Reinforcement card for the threat model: the first turn one can be in a hand,
|
|
303
|
+
* the armies it adds (a fixed card's `FixedArmies`, else the Reinforcement card in my hand as it is
|
|
304
|
+
* worth now) and the capturing turns each further card takes. `undefined` when no Reinforcement card
|
|
305
|
+
* is in play, none ever comes, or what it adds is unknown.
|
|
306
|
+
*
|
|
307
|
+
* #427 (proposed, owner approval pending): the clock runs at the EXPECTED weighted rate — the card's
|
|
308
|
+
* minimum per capturing turn plus its weighted share of the pieces drawn at random (`capturePieceValue`'s
|
|
309
|
+
* rate) — not the fastest (every random piece a Reinforcement piece), which counted a card every turn or
|
|
310
|
+
* two where one comes every few. Where no piece is drawn at random (most games) the two are the same.
|
|
252
311
|
*/
|
|
253
312
|
export function opponentReinforcement(settings, hand) {
|
|
254
|
-
const
|
|
255
|
-
const
|
|
256
|
-
if (!
|
|
313
|
+
const clock = cardClock(settings);
|
|
314
|
+
const entry = clock?.cards.find((c) => c.card === 'Reinforcement');
|
|
315
|
+
if (!clock || !entry)
|
|
316
|
+
return undefined;
|
|
317
|
+
const drawWeight = clock.cards.reduce((n, c) => n + c.weight, 0);
|
|
318
|
+
const rate = entry.minimumPerTurn + (entry.weight > 0 && drawWeight > 0 ? (clock.randomPerTurn * entry.weight) / drawWeight : 0);
|
|
319
|
+
// Capturing turns until the k-th card is complete (pieces carried over); null when it never comes.
|
|
320
|
+
const turnsFor = (k) => {
|
|
321
|
+
const need = k * entry.pieces - entry.initialPieces;
|
|
322
|
+
return need <= 0 ? 0 : rate > 0 ? Math.ceil(need / rate - 1e-9) : null;
|
|
323
|
+
};
|
|
324
|
+
const firstTurns = turnsFor(1);
|
|
325
|
+
if (firstTurns === null)
|
|
257
326
|
return undefined;
|
|
258
327
|
const raw = settings.raw.ReinforcementCard;
|
|
259
328
|
const fixed = typeof raw === 'object' && raw !== null ? Number(raw.FixedArmies) : NaN;
|
|
@@ -261,7 +330,7 @@ export function opponentReinforcement(settings, hand) {
|
|
|
261
330
|
const armies = Number.isFinite(fixed) && fixed > 0 ? Math.floor(fixed) : inHand;
|
|
262
331
|
if (armies === undefined || armies <= 0)
|
|
263
332
|
return undefined;
|
|
264
|
-
const
|
|
265
|
-
|
|
266
|
-
return { firstTurn:
|
|
333
|
+
const second = turnsFor(2);
|
|
334
|
+
// Pieces arrive at the end of a turn, so the first card is playable the turn after its last piece.
|
|
335
|
+
return { firstTurn: firstTurns + 1, armies, turnsPerCard: second === null ? null : Math.max(1, second - firstTurns) };
|
|
267
336
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
// PLAN-TEAMS D2: where to play my Diplomacy, Sanctions, Airlift and Gift cards this turn, read against the
|
|
2
2
|
// plan (src/analysis/card-support.ts). Advice only, never auto-played: each carries the `order` to pass to
|
|
3
3
|
// warapp_submit_turn as is, whose encodings are UNVERIFIED live (V9) save Airlift's and Diplomacy's (verified
|
|
4
|
-
// live, #296 and #369)
|
|
4
|
+
// live, #296 and #369) — except (#434) a spy card whose play is verified live, which warapp_plan_turn puts
|
|
5
|
+
// into its orders (`intelOrders`). Players and territories by id only.
|
|
5
6
|
import { airliftAdvice, diplomacyAdvice, giftAdvice, intelAdvice, sanctionsAdvice } from '../analysis/card-support.js';
|
|
6
7
|
import { visibleIncomeFor } from '../analysis/plan/shared.js';
|
|
7
8
|
import { STRENGTH_INCOME_TURNS } from '../analysis/profile.js';
|
|
9
|
+
import { UNVERIFIED_CARD_PLAYS } from '../protocol/methods.js';
|
|
10
|
+
import { dealtMode } from './map-details.js';
|
|
8
11
|
const CARD_SPY = 2;
|
|
9
12
|
const CARD_RECONNAISSANCE = 10;
|
|
10
13
|
const CARD_SURVEILLANCE = 11;
|
|
@@ -17,7 +20,24 @@ const CARD_AIRLIFT = 6;
|
|
|
17
20
|
const CARD_GIFT = 7;
|
|
18
21
|
const CARD_DIPLOMACY = 8;
|
|
19
22
|
const CARD_SANCTIONS = 9;
|
|
23
|
+
/** #434: the advised spy-card plays verified live, which warapp_plan_turn adds to its orders. */
|
|
24
|
+
export function intelOrders(view) {
|
|
25
|
+
return [view.spy, view.reconnaissance, view.surveillance].flatMap((a) => (a?.inOrders ? [a.order] : []));
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* #435: the advised completing Gift when its play is verified live: the card orders warapp_plan_turn adds,
|
|
29
|
+
* and whether a planned move is one of the transfers the gift drops. Nothing (no cards, no move dropped)
|
|
30
|
+
* while Gift is unverified or none is advised.
|
|
31
|
+
*/
|
|
32
|
+
export function giftInOrders(view) {
|
|
33
|
+
const g = view.gift?.inOrders ? view.gift : undefined;
|
|
34
|
+
return {
|
|
35
|
+
cards: g ? g.orders : [],
|
|
36
|
+
drops: (m) => !!g?.drop?.some((d) => d.from === m.from && d.to === m.to),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
20
39
|
const PLAY_IT = 'Advice only, not in the orders: pass its `order` to warapp_submit_turn to play it (the encoding is read from the client, not yet verified live).';
|
|
40
|
+
const IN_ORDERS = 'In the orders: its encoding is verified live. Drop it from the orders to keep the card.';
|
|
21
41
|
/** The Sanctions percentage (`SanctionsCard.Percentage`), when the settings carry one. */
|
|
22
42
|
function percentage(game) {
|
|
23
43
|
const raw = game.settings?.raw.SanctionsCard;
|
|
@@ -49,6 +69,13 @@ function strengths(input) {
|
|
|
49
69
|
strength: armies + STRENGTH_INCOME_TURNS * visibleIncomeFor(input.cb.graph, input.cb.board, playerId, input.game.settings),
|
|
50
70
|
}));
|
|
51
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* #424: the opponents still playing (teammates out). A lone one in contact is advised Diplomacy only
|
|
74
|
+
* outside a 1v1 (2 or more), and the last-turn warning offers a chain only then too.
|
|
75
|
+
*/
|
|
76
|
+
export function diplomacyOpponents(game, me, friends) {
|
|
77
|
+
return game.players.filter((p) => p.id !== me && !friends?.has(p.id) && (p.state ?? 'Playing') === 'Playing').length;
|
|
78
|
+
}
|
|
52
79
|
/** The D2 advice for the cards in `cards`: a view and one warning per card advised. */
|
|
53
80
|
export function supportAdvice(input) {
|
|
54
81
|
const { me, cards, cb } = input;
|
|
@@ -57,7 +84,8 @@ export function supportAdvice(input) {
|
|
|
57
84
|
const first = (type) => cards.find((c) => c.type === type);
|
|
58
85
|
const dip = first(CARD_DIPLOMACY);
|
|
59
86
|
if (dip) {
|
|
60
|
-
const
|
|
87
|
+
const opponents = diplomacyOpponents(input.game, me.id, cb.friends);
|
|
88
|
+
const d = diplomacyAdvice(cb, { atPeace: input.atPeace, truces: input.truces, opponents, ...(input.lastTurn ? { lastTurn: input.lastTurn } : {}) });
|
|
61
89
|
if (d) {
|
|
62
90
|
if (d.player !== undefined && d.pressure) {
|
|
63
91
|
view.diplomacy = {
|
|
@@ -66,6 +94,7 @@ export function supportAdvice(input) {
|
|
|
66
94
|
armies: d.pressure.armies,
|
|
67
95
|
...(d.overTruce ? { overTruce: d.overTruce } : {}),
|
|
68
96
|
...(d.skipped.length ? { skipped: d.skipped } : {}),
|
|
97
|
+
...(d.chain ? { chain: true } : {}),
|
|
69
98
|
order: { kind: 'card', card: dip.id, players: [me.id, d.player] },
|
|
70
99
|
};
|
|
71
100
|
}
|
|
@@ -99,6 +128,7 @@ export function supportAdvice(input) {
|
|
|
99
128
|
to: a.to,
|
|
100
129
|
armies: a.armies,
|
|
101
130
|
...(a.teammate !== undefined ? { teammate: a.teammate } : {}),
|
|
131
|
+
...(a.redeploy ? { redeploy: a.redeploy } : {}),
|
|
102
132
|
order: { kind: 'card', card: air.id, from: a.from, to: a.to, armies: a.armies },
|
|
103
133
|
};
|
|
104
134
|
warnings.push(`${a.why} ${PLAY_IT}`);
|
|
@@ -111,16 +141,27 @@ export function supportAdvice(input) {
|
|
|
111
141
|
.filter((p) => p.id !== me.id && !cb.friends?.has(p.id) && (p.state ?? 'Playing') === 'Playing')
|
|
112
142
|
.map((p) => p.id);
|
|
113
143
|
const fog = input.game.settings?.fog;
|
|
114
|
-
|
|
144
|
+
// #443: the distribution mode's territories, when the map already carries them (no read here).
|
|
145
|
+
const starts = dealtMode(input.game.settings, cb.graph.map)?.territories;
|
|
146
|
+
const intel = intelAdvice(cb, {
|
|
147
|
+
...(fog !== undefined ? { fog } : {}),
|
|
148
|
+
opponents,
|
|
149
|
+
held: new Set(intelCards.keys()),
|
|
150
|
+
...(starts?.length ? { likelyStarts: new Set(starts) } : {}),
|
|
151
|
+
});
|
|
152
|
+
// #434: a play verified live goes into the orders; until then (all three today) advice only.
|
|
153
|
+
const unverified = input.unverifiedPlays ?? UNVERIFIED_CARD_PLAYS;
|
|
115
154
|
for (const a of intel.advice) {
|
|
116
155
|
const id = intelCards.get(a.card).id;
|
|
156
|
+
const live = !unverified.has(a.card);
|
|
157
|
+
const flag = live ? { inOrders: true } : {};
|
|
117
158
|
if (a.card === 'Spy' && a.player !== undefined)
|
|
118
|
-
view.spy = { player: a.player, order: { kind: 'card', card: id, player: a.player } };
|
|
159
|
+
view.spy = { player: a.player, ...flag, order: { kind: 'card', card: id, player: a.player } };
|
|
119
160
|
if (a.card === 'Reconnaissance' && a.target !== undefined)
|
|
120
|
-
view.reconnaissance = { target: a.target, order: { kind: 'card', card: id, target: a.target } };
|
|
161
|
+
view.reconnaissance = { target: a.target, ...flag, order: { kind: 'card', card: id, target: a.target } };
|
|
121
162
|
if (a.card === 'Surveillance' && a.bonus !== undefined)
|
|
122
|
-
view.surveillance = { bonus: a.bonus, order: { kind: 'card', card: id, bonus: a.bonus } };
|
|
123
|
-
warnings.push(`${a.why} ${PLAY_IT}`);
|
|
163
|
+
view.surveillance = { bonus: a.bonus, ...flag, order: { kind: 'card', card: id, bonus: a.bonus } };
|
|
164
|
+
warnings.push(`${a.why} ${live ? IN_ORDERS : PLAY_IT}`);
|
|
124
165
|
}
|
|
125
166
|
warnings.push(...intel.hold);
|
|
126
167
|
}
|
|
@@ -128,13 +169,17 @@ export function supportAdvice(input) {
|
|
|
128
169
|
if (gifts.length) {
|
|
129
170
|
const g = giftAdvice(cb, input.plan.team?.sharedBonuses ?? [], gifts.length);
|
|
130
171
|
if (g) {
|
|
172
|
+
// #435: a completing gift goes into the orders once its play is verified live (as #434's spy cards).
|
|
173
|
+
const live = !(input.unverifiedPlays ?? UNVERIFIED_CARD_PLAYS).has('Gift');
|
|
131
174
|
view.gift = {
|
|
132
175
|
player: g.player,
|
|
133
176
|
bonus: g.bonus,
|
|
134
177
|
territories: g.territories,
|
|
178
|
+
...(g.drop.length ? { drop: g.drop } : {}),
|
|
179
|
+
...(live ? { inOrders: true } : {}),
|
|
135
180
|
orders: g.territories.map((t, i) => ({ kind: 'card', card: gifts[i].id, target: t, player: g.player })),
|
|
136
181
|
};
|
|
137
|
-
warnings.push(`${g.why} ${PLAY_IT}`);
|
|
182
|
+
warnings.push(`${g.why} ${live ? `${IN_ORDERS}${g.drop.length ? ' The transfers it drops are out of the orders.' : ''}` : PLAY_IT}`);
|
|
138
183
|
}
|
|
139
184
|
}
|
|
140
185
|
return { view, warnings };
|