patch(rng-seam): make StableRandomDouble/StableRandomOnlySelf virtual (DP5, zero logic change)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-06 10:25:35 -04:00
parent 1a108fa393
commit 201158db5d
3 changed files with 16 additions and 3 deletions

View File

@@ -0,0 +1,13 @@
RNG seam (DP5): make StableRandomDouble() and StableRandomOnlySelf(int) `virtual` so the authored
HeadlessBattleMgr can override all three RNG methods to delegate to an injected IRandomSource
(StableRandom(int) is already virtual). This decouples the authoritative RNG roll from IsForecast's
VFX-suppression+RNG-zeroing (design 2026-06-06-rng-seam, finding F2). ZERO logic change — only the
`virtual` keyword is added; the method bodies are byte-for-byte the decomp.
--- Engine/BattleManagerBase.cs (~line 1586)
- public double StableRandomDouble()
+ public virtual double StableRandomDouble()
--- Engine/BattleManagerBase.cs (~line 1597)
- public int StableRandomOnlySelf(int val)
+ public virtual int StableRandomOnlySelf(int val)