feedback3: a prep-end item may sit unmerged through the fight, and bonds.json matches the offline build
This commit is contained in:
1 parent
351ead3603
commit
9f3785636a
3 files changed
+7
-2
No files matched your search
@@ -721,6 +721,9 @@ export class PlayerState {
|
||||
const rec = this.gd.item(itemId);
|
||||
if (!rec) return null;
|
||||
let piece = this.newPiece('item', itemId);
|
||||
// A prep-end grant may sit beside an identical copy until the next prep. The invariant counts only copies
|
||||
// without this mark, so the fight that is about to start is not reported as a missed merge.
|
||||
if (deferMerge) piece.deferMerge = true;
|
||||
if (!deferMerge && this.completesItemMerge(itemId)) {
|
||||
piece = this._mergeItem(itemId, piece);
|
||||
if (!piece) return null;
|
||||
|
||||
@@ -72,7 +72,9 @@ export function collectViolations(m, { limit = 25 } = {}) {
|
||||
const boardChessUids = new Set();
|
||||
for (const p of ps.board.values()) if (p.kind === 'chess') boardChessUids.add(p.uid);
|
||||
const itemCounts = new Map();
|
||||
const countItem = (it) => itemCounts.set(it.id, (itemCounts.get(it.id) || 0) + 1);
|
||||
// A copy gained as the previous prep ended (PlayerState.acquireItem deferMerge) waits until the next prep.
|
||||
// It does not count toward "merges are immediate" until that prep's checkItemMerges consumes it.
|
||||
const countItem = (it) => { if (it.deferMerge) return; itemCounts.set(it.id, (itemCounts.get(it.id) || 0) + 1); };
|
||||
for (const p of all) {
|
||||
note(ps, p);
|
||||
if (p.kind === 'chess') {
|
||||
|
||||
Reference in new issue
Block a user