feedback1b WG: item merges re-checked; returned equipment auto-merges

Player report after 0.1.0: "源石溶剂两个白的合成一个金色的之后又多给一个白的".
Not reproduced: buying next to a white (hand / equipped), buying twice, equip
on another or a full carrier, reward pick, 道具补给, 列装, 整备, 画卷 and the
sale of a carrier all end with one golden and no white; random intents over
all 50 mergeable items conserve the white-equivalents and never leave a pair.

The one gap: equipment a promotion (PlayerState._mergeChess) or an effect
that removes an operator (ctx.destroyPiece) returns to the hand skipped the
auto-merge. Unreachable from a normal state (a pair never exists), closed:
both now run checkItemMerges.
This commit is contained in:
sganggs committed 2026-10-03 02:31:44 +08:00
1 parent b4fa21a0a6
commit 8fa7a85a52
4 files changed
+185 -2

No files matched your search

+1
View File
@@ -506,6 +506,7 @@ export function makeCtx(m, ps, source, hook, ev = null) {
for (const it of l.piece.items || []) ps.stow(it, { allowTemp: true });
l.piece.items = [];
ps.returnCopies(l.piece);
ps.checkItemMerges(); // the returned equipment auto-merges like any gain
}
ps.recompute();
return true;