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:
@@ -132,6 +132,24 @@ internal sealed class NodeNativeBattleHarness : IDisposable
|
||||
/// followers evolved (a SET, not an add) — exactly 1.</summary>
|
||||
public const int BoardDependentCostReduced = 1;
|
||||
|
||||
/// <summary>A non-trivial CLAN+TRIBE fixture follower (M-HC-4e). cards.json id 900231030: char_type 1
|
||||
/// (follower), clan 2 (ROYAL / Swordcraft), tribe 2 (LEGION), cost 0, 2/2. Cost 0 makes it playable on
|
||||
/// turn-1 PP 1; its clan (2) matches <see cref="CardClass.Swordcraft"/> so it is legal under a Swordcraft
|
||||
/// seat. Its clan/tribe (2 / "2") are concretely non-zero so the engine-sourced clan/tribe read +
|
||||
/// knownList emit assert REAL values (not the 0/"0" no-tribe default). Verified against cards.json AND the
|
||||
/// prod wire form (comma-joined int TribeType as string: tribe 2 → "2"). Present + creatable in
|
||||
/// cards.json.</summary>
|
||||
public const long ClanTribeFollowerId = 900231030;
|
||||
|
||||
/// <summary>The engine-resolved clan of <see cref="ClanTribeFollowerId"/> as the wire int (ROYAL ==
|
||||
/// ClanType 2). The M-HC-4e knownList emit asserts <c>clan</c> equals this.</summary>
|
||||
public const int ClanTribeFollowerClan = 2;
|
||||
|
||||
/// <summary>The engine-resolved tribe of <see cref="ClanTribeFollowerId"/> in the EXACT prod wire string
|
||||
/// form (LEGION == TribeType 2 → the single-element comma-join "2"). The M-HC-4e knownList emit asserts
|
||||
/// <c>tribe</c> equals this.</summary>
|
||||
public const string ClanTribeFollowerTribe = "2";
|
||||
|
||||
public BattleSessionState State { get; }
|
||||
public StubParticipant SeatA { get; }
|
||||
public StubParticipant SeatB { get; }
|
||||
@@ -176,6 +194,12 @@ internal sealed class NodeNativeBattleHarness : IDisposable
|
||||
return deck;
|
||||
}
|
||||
|
||||
/// <summary>A 30-card deck of the <see cref="ClanTribeFollowerId"/> clan+tribe fixture (M-HC-4e). All one
|
||||
/// identity, all cost 0 — so the opening hand reliably holds a copy to play turn 1, regardless of shuffle,
|
||||
/// and the engine-resolved clan/tribe read off the played card is unambiguous.</summary>
|
||||
public static IReadOnlyList<long> ClanTribeDeck() =>
|
||||
Enumerable.Repeat(ClanTribeFollowerId, 30).ToList();
|
||||
|
||||
/// <summary>Seat the engine exactly as <c>BattleSession.EnsureEngineSetup</c> does: shuffle each
|
||||
/// side's deck from the fixed seed via <see cref="BattleSessionState.GetShuffledDeck"/>, then
|
||||
/// <c>SessionBattleEngine.Setup(seed, deckA, deckB, classA, classB)</c>.</summary>
|
||||
|
||||
Reference in New Issue
Block a user