feedback1c WK: 变形同构体 wearers in the bond popup's members and on their card

Player report: with 变形同构体 and the matching bond item the wearer gets the
bond's effect, but the bond's member count leaves the converted operator out.

The count that activates the bond already included the wearer on every server
path (bondsMeta.pieceBonds: prep count, views, battle input; support.unitBonds:
the battle). The client did not: the bond popup's member list (成员 x/y) and the
wearer's card read only the chess records' bonds, so the popup said 在场 3 but
成员 2/10 without the wearer, and the card had no chip for the bond.

- gameLogic.grantedBonds / pieceBondIds: the server's 变形同构体 rule on the
  client; bondMembers lists wearers (tagged 同构, one row per operator, on the
  board or owned), so 成员 x/y agrees with 在场.
- detailPanel: the card's chips include the granted bond (dashed, 同构).
- Teammates: UnitInfo carries an ally operator's item ids (sim unitInfo,
  Match.prepFieldMeta); ownerBoard / runner.ownerOps keep them.
- Tests: every pairing on real matches (prep, views, battle input, the real
  battle), bench vs board, half pairs, distinct members; the client rule
  against the server's; popup / card rendering.
This commit is contained in:
sganggs committed 2026-10-03 02:29:28 +08:00
1 parent 7f134737ce
commit 0c898bb524
13 files changed
+464 -34

No files matched your search

+4 -3
View File
@@ -151,8 +151,9 @@ export function withLiveLayers(bonds, live) {
* (gameLogic bondMembers): their operators on the field meta on screen (the prep scouting board, a server-run battle
* field's units) and, under client-side combat, the battle on screen's (`extra` = battle/runner.js ownerOps: the meta
* the runner publishes is taken before the operators deploy). Their hand is never sent — members count as owned only
* when they are on the field. null without a field or battle.
* @param {any} field @param {string} ownerId @param {any[]|null} [extra] UnitInfo-like { kind, ownerId, defId }
* when they are on the field. Their operators keep the items the unit info carries (UnitInfo `items`), so a 变形同构体
* wearer is listed as a member of the bond it grants (gameLogic grantedBonds). null without a field or battle.
* @param {any} field @param {string} ownerId @param {any[]|null} [extra] UnitInfo-like { kind, ownerId, defId, items? }
*/
export function ownerBoard(field, ownerId, extra = null) {
const fromField = isObj(field) && Array.isArray(field.units) ? field.units : null;
@@ -160,7 +161,7 @@ export function ownerBoard(field, ownerId, extra = null) {
if (!fromField && !fromBattle) return null;
const board = [...(fromField || []), ...(fromBattle || [])]
.filter((u) => isObj(u) && u.ownerId === ownerId && u.kind === 'op' && typeof u.defId === 'string')
.map((u) => ({ kind: 'chess', id: u.defId }));
.map((u) => (Array.isArray(u.items) && u.items.length ? { kind: 'chess', id: u.defId, items: u.items.filter((x) => typeof x === 'string') } : { kind: 'chess', id: u.defId }));
return { board, hand: [], temp: [] };
}