refactor(battle-node): drop dead BattleResult.{Lose,Win,Consistency} members
No dispatch arm has emitted these since the Retire/Kill rewrite to RetireWin=105 / RetireLose=106. Remove them and the docstring paragraph that explained them. Test fallout: delete BattleFinishBody_LoseAndConsistency_SerializeAsZeroAndTwo (its only purpose was locking the dead wire values), and re-point BattleFinishBody_SerializesResultAndResultCode_AsNumericWireValues at the live LifeWin=101 so it still guards the JsonNumberEnumConverter numeric-wire behavior. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -30,33 +30,12 @@ namespace SVSim.BattleNode.Protocol;
|
||||
/// reproduction that exposed the inversion.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// The legacy <c>Lose = 0</c> / <c>Win = 1</c> / <c>Consistency = 2</c> values
|
||||
/// (client <c>RESULT_CODE.NotFinish</c> / <c>NoContest</c> / <c>Invalid</c>) are
|
||||
/// no longer emitted by any dispatch arm: the Retire/Kill flow now ships the
|
||||
/// proper <c>RetireWin</c> / <c>RetireLose</c> codes, and the involuntary-drop
|
||||
/// cascade ships <c>DisconnectWin</c>. They survive only as wire-constant
|
||||
/// references in serialization tests and can be deleted once those are dropped.
|
||||
/// (Historically <c>Win = 1</c> was shipped on Retire and rendered client-side
|
||||
/// as "battle ended in no contest" — the wrong text — which is why it was
|
||||
/// replaced.)
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// Always serialize as the int value, not the name; see the
|
||||
/// <c>JsonNumberEnumConverter</c> on <see cref="Bodies.BattleFinishBody.Result"/>.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public enum BattleResult
|
||||
{
|
||||
/// <summary>Pre-2026-06-02 value, kept for the existing Retire/Kill Scripted flow.
|
||||
/// Wire-equivalent of <c>RESULT_CODE.NotFinish = 0</c>. Don't use for new code.</summary>
|
||||
Lose = 0,
|
||||
/// <summary>Pre-2026-06-02 value, kept for the existing Retire/Kill Scripted flow.
|
||||
/// Wire-equivalent of <c>RESULT_CODE.NoContest = 1</c>. Don't use for new code.</summary>
|
||||
Win = 1,
|
||||
/// <summary>Pre-2026-06-02 value, kept for the existing Retire/Kill Scripted flow.
|
||||
/// Wire-equivalent of <c>RESULT_CODE.Invalid = 2</c>. Don't use for new code.</summary>
|
||||
Consistency = 2,
|
||||
|
||||
/// <summary>Player won by reducing opponent's life to 0. Pushed to the winner
|
||||
/// on <c>TurnEndFinal</c>. Routes through the client switch to
|
||||
/// <c>InitiateGameEndSequence(hasWon: true)</c>.</summary>
|
||||
|
||||
Reference in New Issue
Block a user