feat(battle-node): BuildOpponentJudge builder for v1.2 turn-end Judge
Adds the third frame of the burst. Wire shape from prod (spin + resultCode). OpponentJudgeSpin const next to OpponentTurnStartSpin for consistency. Single test locks uri, ViewerId, Cat, and body shape.
This commit is contained in:
@@ -117,6 +117,16 @@ public static class ScriptedLifecycle
|
||||
public static MsgEnvelope BuildOpponentTurnEnd() =>
|
||||
EnvelopeForPush(NetworkBattleUri.TurnEnd, new TurnEndBody(TurnState: 0));
|
||||
|
||||
/// <summary>
|
||||
/// Server-pushed Judge frame that follows the opponent's TurnEnd and unblocks the
|
||||
/// client's <c>JudgeOperation</c> → <c>ControlTurnStartPlayer</c>, transitioning to the
|
||||
/// player's next turn. Without this frame the client hangs on "Opponent's turn…" —
|
||||
/// see <c>data_dumps/captures/battle-traffic.ndjson</c> line 14 (client emits its own
|
||||
/// Judge then waits forever).
|
||||
/// </summary>
|
||||
public static MsgEnvelope BuildOpponentJudge() =>
|
||||
EnvelopeForPush(NetworkBattleUri.Judge, new JudgeBody(Spin: ScriptedProfiles.OpponentJudgeSpin));
|
||||
|
||||
private static IReadOnlyList<PosIdx> BuildPosIdxList(IReadOnlyList<long> hand)
|
||||
{
|
||||
var list = new List<PosIdx>(hand.Count);
|
||||
|
||||
@@ -51,4 +51,11 @@ internal static class ScriptedProfiles
|
||||
// display state. v1 doesn't simulate the opponent — once this lands,
|
||||
// the client sits there indefinitely.
|
||||
public const int OpponentTurnStartSpin = 100;
|
||||
|
||||
/// <summary>
|
||||
/// Server-pushed Judge frame spin value. Prod varies per push (55, 175, 73, ...) — it's
|
||||
/// an animation seed, not a stateful value. Fixed at 100 here for test stability;
|
||||
/// the client's <c>JudgeOperation</c> doesn't read it.
|
||||
/// </summary>
|
||||
public const int OpponentJudgeSpin = 100;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user