From 774c59c1d405ac4e720ebe26aaea6640e864e3f5 Mon Sep 17 00:00:00 2001 From: sganggs Date: Sat, 3 Oct 2026 03:32:53 +0800 Subject: [PATCH] feedback1 WF: a bench chess carrying a Mutation Cell is not sold before its transformation --- server/match/bot.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/match/bot.js b/server/match/bot.js index e93aa79e..cd0350a5 100644 --- a/server/match/bot.js +++ b/server/match/bot.js @@ -1129,13 +1129,16 @@ function refreshValue(m, ps, ctx) { return v; } -/** Sell the weakest bench chess that is not part of a merge pair (or anything when keepPairs is false). */ +/** + * Sell the weakest bench chess that is not part of a merge pair (or anything when keepPairs is false) and does not + * carry a 突变细胞 (its transformation after the battle is the point). + */ function sellWeakestHand(m, ps, { keepPairs = true, below = Infinity } = {}) { const ctx = context(m, ps); let worst = null; let worstV = Infinity; for (const p of [...ps.temp, ...ps.hand]) { - if (!p || p.kind !== 'chess') continue; + if (!p || p.kind !== 'chess' || (p.items || []).some((it) => isMutationCell(m.gd, it.id))) continue; const base = m.gd.baseIdOf(p.id); if (keepPairs && !m.gd.isGolden(p.id) && (ctx.copies.get(base) || 0) >= 2) continue; const v = pieceValue(m, ps, p, ctx);