From b22988525921a5dfd7388acf06ea7fe01711b75e Mon Sep 17 00:00:00 2001 From: gamer147 Date: Thu, 4 Jun 2026 18:21:28 -0400 Subject: [PATCH] refactor(battle-node): retire hardcoded BattleSeed + ReadyIdxChangeSeed Both now derive per-battle from the master seed via BattleSeeds; only animation/UI constants (ReadySpin, rank/battlePoint placeholders) remain in BattleFrameDefaults. Co-Authored-By: Claude Opus 4.8 --- .../Lifecycle/BattleFrameDefaults.cs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/SVSim.BattleNode/Lifecycle/BattleFrameDefaults.cs b/SVSim.BattleNode/Lifecycle/BattleFrameDefaults.cs index ca937bf..88f8f05 100644 --- a/SVSim.BattleNode/Lifecycle/BattleFrameDefaults.cs +++ b/SVSim.BattleNode/Lifecycle/BattleFrameDefaults.cs @@ -4,24 +4,20 @@ namespace SVSim.BattleNode.Lifecycle; /// Default frame constants templated from TK2 prod captures, shared by the /// server-authored battle-frame builders. Every value here originated in a real prod /// frame in data_dumps/captures/battle-traffic_tk2_regular.ndjson; pulling them -/// out of makes the magic numerics navigable and gives -/// the seed a single source of truth instead of two duplicated literals. +/// out of makes the magic numerics navigable. The shared effect +/// seed and the deck-shuffle/idxChangeSeed are now derived per-battle from a master seed (see +/// ) — only animation/UI constants remain here. /// internal static class BattleFrameDefaults { - // Shared per the spec — selfInfo.seed and oppoInfo.seed always agree. - // From frame[2] (Matched). - public const long BattleSeed = 17_548_138L; - // From frame[5] (BattleStart). Hardcoded; see spec §Deferred plumbing — sourcing these // from real per-viewer state needs a TK2 rank/battle-point tracker. public const string PlayerRank = "10"; public const string PlayerBattlePoint = "6270"; - // From frame[8] (Ready). Provenance is "what prod sent"; the client - // doesn't validate, but echoing matches the capture protects against - // a regression on a future tightening. - public const int ReadyIdxChangeSeed = 771_335_280; + // From frame[8] (Ready). Provenance is "what prod sent"; the client doesn't validate. This is + // an animation crank value (shared-RNG spin), NOT gameplay randomness — both clients crank it + // identically and stay synced, so it stays a constant. See the spin-rng audit. public const int ReadySpin = 243; ///