feat(battlenode): emit engine-resolved clan/tribe on knownList entries (M-HC-4e)

Prod always emits clan (int ClanType) + tribe (comma-joined int TribeType
string, "0" for none) on every knownList entry (battle-traffic_tk2_regular
.ndjson). Source both off the resolved engine (SessionBattleEngine.PlayedCardClan/
PlayedCardTribe -> BattleCardBase.Clan/Tribe), so skill-applied clan/tribe
changes ride the wire rather than the static card-master value. Thread through
KnownListBuilder.BuildPlayedCard + PlayActionsHandler; add clan/tribe to the
KnownCardEntry DTO (always present, non-null). Node-side only; no engine edits,
drift clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-07 00:11:28 -04:00
parent daaec20afb
commit 693fba5003
7 changed files with 228 additions and 21 deletions

View File

@@ -56,8 +56,16 @@ internal sealed class PlayActionsHandler : IFrameHandler
// to stay prod-faithful (prod sends the real count). Same senderSeat mapping as the cost read.
int playedSpellboost = ctx.Engine.PlayedCardSpellboost(senderSeat, playIdx, fallback: 0);
// clan/tribe are ALSO engine-sourced (M-HC-4e) — read off the resolved card's Clan/Tribe getters, so
// any skill-applied clan/tribe change (e.g. change_affiliation) rides the wire (the static card-master
// value would miss it). Prod always emits both on every knownList entry: clan as the int ClanType
// ordinal, tribe as the comma-joined int TribeType string ("0" for none). Same senderSeat mapping.
int playedClan = ctx.Engine.PlayedCardClan(senderSeat, playIdx, fallback: 0);
string playedTribe = ctx.Engine.PlayedCardTribe(senderSeat, playIdx);
var played = KnownListBuilder.BuildPlayedCard(
deckMap, playIdx, orderList, cost: playedCost, spellboost: playedSpellboost);
deckMap, playIdx, orderList, cost: playedCost, spellboost: playedSpellboost,
clan: playedClan, tribe: playedTribe);
var oppoTargets = KnownListBuilder.RenameTargets(entries.GetValueOrDefault(WireKeys.TargetList));
// Deck-sourced movements (fetch / search / summon-from-deck) ride the uList — a verbatim,