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:
@@ -166,6 +166,19 @@ public class ScriptedLifecycleTests
|
||||
Assert.That(body.ResultCode, Is.EqualTo(1));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void BuildOpponentJudge_emits_Judge_uri_with_spin_and_default_result_code()
|
||||
{
|
||||
var env = ScriptedLifecycle.BuildOpponentJudge();
|
||||
|
||||
Assert.That(env.Uri, Is.EqualTo(NetworkBattleUri.Judge));
|
||||
Assert.That(env.ViewerId, Is.EqualTo(ScriptedLifecycle.FakeOpponentViewerId));
|
||||
Assert.That(env.Cat, Is.EqualTo(EmitCategory.Battle));
|
||||
var body = (JudgeBody)env.Body;
|
||||
Assert.That(body.Spin, Is.EqualTo(ScriptedProfiles.OpponentJudgeSpin));
|
||||
Assert.That(body.ResultCode, Is.EqualTo(1));
|
||||
}
|
||||
|
||||
private static MatchContext FixtureCtx(IReadOnlyList<long>? deck = null) => new(
|
||||
SelfDeckCardIds: deck ?? Enumerable.Range(1, 30).Select(i => 100_011_010L).ToList(),
|
||||
ClassId: "1", CharaId: "1", CardMasterName: "card_master_node_10015",
|
||||
|
||||
Reference in New Issue
Block a user