refactor(battle-node): rename ScriptedLifecycle->ServerBattleFrames, ScriptedProfiles->BattleFrameDefaults

Pure rename. These hold the shared server-authored frame builders used by every
battle mode's handshake/mulligan dispatch — the 'Scripted' name was a historical
accident that hid the PvP/Bot crossover. No behavior change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-03 20:36:32 -04:00
parent e9493e24c4
commit ba18790156
14 changed files with 59 additions and 59 deletions

View File

@@ -12,10 +12,10 @@ internal sealed class SwapHandler : IFrameHandler
return Array.Empty<DispatchRoute>();
var routes = new List<DispatchRoute>();
var hand = ScriptedLifecycle.ComputeHandAfterSwap(BattleFrames.ExtractIdxList(ctx.Env));
var hand = ServerBattleFrames.ComputeHandAfterSwap(BattleFrames.ExtractIdxList(ctx.Env));
// SwapResponse is always immediate — completes the sender's own mulligan UI.
routes.Add(new DispatchRoute(ctx.From, ScriptedLifecycle.BuildSwapResponse(hand), false));
routes.Add(new DispatchRoute(ctx.From, ServerBattleFrames.BuildSwapResponse(hand), false));
ctx.State.PostSwapHands[ctx.From] = hand;
ctx.SenderPhase = BattleSessionPhase.AfterReady;
@@ -29,8 +29,8 @@ internal sealed class SwapHandler : IFrameHandler
var opponent = ReferenceEquals(p, ctx.A) ? ctx.B : ctx.A;
var ready = opponent is IHasHandshakePhase
&& ctx.State.PostSwapHands.TryGetValue(opponent, out var oppoHand)
? ScriptedLifecycle.BuildReady(ctx.State.PostSwapHands[p], oppoHand)
: ScriptedLifecycle.BuildReady(ctx.State.PostSwapHands[p]);
? ServerBattleFrames.BuildReady(ctx.State.PostSwapHands[p], oppoHand)
: ServerBattleFrames.BuildReady(ctx.State.PostSwapHands[p]);
routes.Add(new DispatchRoute(p, ready, false));
}
}