feat(battle-node): typed OpponentTurnStart/ResultCodeOnly/BattleFinish/AlivePush bodies

This commit is contained in:
gamer147
2026-06-01 10:35:18 -04:00
parent 97b9b6fe42
commit c7745d8785
5 changed files with 82 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
using System.Text.Json.Serialization;
namespace SVSim.BattleNode.Protocol.Bodies;
public sealed record AlivePushBody(
[property: JsonPropertyName("scs")] string Scs,
[property: JsonPropertyName("ocs")] string Ocs) : IMsgBody;

View File

@@ -0,0 +1,7 @@
using System.Text.Json.Serialization;
namespace SVSim.BattleNode.Protocol.Bodies;
public sealed record BattleFinishBody(
[property: JsonPropertyName("result")] int Result,
[property: JsonPropertyName("resultCode")] int ResultCode = 1) : IMsgBody;

View File

@@ -0,0 +1,7 @@
using System.Text.Json.Serialization;
namespace SVSim.BattleNode.Protocol.Bodies;
public sealed record OpponentTurnStartBody(
[property: JsonPropertyName("spin")] int Spin,
[property: JsonPropertyName("resultCode")] int ResultCode = 1) : IMsgBody;

View File

@@ -0,0 +1,6 @@
using System.Text.Json.Serialization;
namespace SVSim.BattleNode.Protocol.Bodies;
public sealed record ResultCodeOnlyBody(
[property: JsonPropertyName("resultCode")] int ResultCode = 1) : IMsgBody;