feat(battle-node): BuildOpponentTurnEnd builder for v1.1 turn loop
Pairs with BuildOpponentTurnStart. Wire shape from prod capture (turnState=0, resultCode=1). Single test locks uri, ViewerId, Cat, and body shape.
This commit is contained in:
@@ -107,6 +107,15 @@ public static class ScriptedLifecycle
|
||||
EnvelopeForPush(NetworkBattleUri.TurnStart,
|
||||
new OpponentTurnStartBody(Spin: ScriptedProfiles.OpponentTurnStartSpin));
|
||||
|
||||
/// <summary>
|
||||
/// Server-pushed TurnEnd transition that closes the opponent's turn and hands control
|
||||
/// back to the player. Paired with <see cref="BuildOpponentTurnStart"/> in the v1.1 loop.
|
||||
/// Wire shape from prod capture battle-traffic_tk2_regular.ndjson L18:
|
||||
/// <c>{"uri":"TurnEnd","turnState":0,"resultCode":1,"playSeq":N}</c>.
|
||||
/// </summary>
|
||||
public static MsgEnvelope BuildOpponentTurnEnd() =>
|
||||
EnvelopeForPush(NetworkBattleUri.TurnEnd, new TurnEndBody(TurnState: 0));
|
||||
|
||||
private static IReadOnlyList<PosIdx> BuildPosIdxList(IReadOnlyList<long> hand)
|
||||
{
|
||||
var list = new List<PosIdx>(hand.Count);
|
||||
|
||||
Reference in New Issue
Block a user