feat(battle-node): emit real spin per-frame on forwarded PlayActions

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-04 15:13:47 -04:00
parent 63cb3248b4
commit 617714ebea
3 changed files with 110 additions and 4 deletions

View File

@@ -8,15 +8,18 @@ namespace SVSim.BattleNode.Protocol.Bodies;
/// (independent of KnownList — a targeted hand play carries both). <c>KeyAction</c> forwards a
/// choice/Discover play's <c>{type,cardId}</c> so the opponent renders the choice-token generation;
/// the pick (<c>selectCard</c>) is stripped for a hidden (open:0) draw-to-hand choice. <c>UList</c>
/// forwards the sender's unapproved-movement list (deck-sourced summons/fetches) verbatim. All are
/// omitted when null via the envelope's WhenWritingNull policy (a vanilla play carries none).</summary>
/// forwards the sender's unapproved-movement list (deck-sourced summons/fetches) verbatim. <c>Spin</c>
/// is the count of hidden, non-reproduced shared-RNG draws in THIS frame (real-spin design §3.2,
/// per-frame delivery); null/omitted = 0 (the client's assumed default). All are omitted when null
/// via the envelope's WhenWritingNull policy (a vanilla play carries none).</summary>
public sealed record PlayActionsBroadcastBody(
[property: JsonPropertyName("playIdx")] int PlayIdx,
[property: JsonPropertyName("type")] int Type,
[property: JsonPropertyName("knownList")] IReadOnlyList<KnownCardEntry>? KnownList,
[property: JsonPropertyName("oppoTargetList")] IReadOnlyList<OppoTargetEntry>? OppoTargetList,
[property: JsonPropertyName("uList")] IReadOnlyList<UnapprovedCardEntry>? UList = null,
[property: JsonPropertyName("keyAction")] IReadOnlyList<KeyActionEntry>? KeyAction = null) : IMsgBody;
[property: JsonPropertyName("keyAction")] IReadOnlyList<KeyActionEntry>? KeyAction = null,
[property: JsonPropertyName("spin")] int? Spin = null) : IMsgBody;
/// <summary>Opponent-facing keyAction entry for a choice/Discover play. <c>type</c>/<c>cardId</c>
/// (the GENERATING card) pass through so the opponent re-derives the candidate pool from that card's