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

@@ -62,7 +62,7 @@ BattleFinishToOpponentDisConnectChecker.cs BattleFinishToOpponentDisConnectCheck
BattleKeywordInfoListMgr.cs BattleKeywordInfoListMgr.cs a014170d0b3f5499635bcc2e29755dc2f3125d5a5a28b1741a4abc74b4abcf86 0
BattleLifeTimeSharedObject.cs BattleLifeTimeSharedObject.cs ab8bc3703d268752a1de56ab5d3e9ebd276980c20076eb0ca300838b3db13d5f 0
BattleLogTextBuilderAttachSkill.cs BattleLogTextBuilderAttachSkill.cs 11c585ae931fa3dc734bb231d6da61df3b51b803516ca2c5d88a0c78bc7c0104 0
BattleManagerBase.cs BattleManagerBase.cs b4181eac7af0ed578835ea75b7003e1b3466331006a35cd84b40139825680eb7 0
BattleManagerBase.cs BattleManagerBase.cs 849737bd494e33221b9f8672f67a685ca2372d23fae11ad2e1cfb5406caa5750 1
BattleMenuMgr.cs BattleMenuMgr.cs 7418699063e01641d0df1ed16773a9ac9418f418cc047fc18c5892eb7971d361 0
BattlePlayer.cs BattlePlayer.cs 001409844b46ddaf0a5edbce4e015749ece61053adf725a978987d7063a02632 0
BattlePlayerBase.cs BattlePlayerBase.cs 9d3a665158706460a52900008dcfcdf575dbe08cb6d3cc05e63e718b2885b51b 0
1 # engine-relpath source-relpath sha256 patched(0|1)
62 BattleKeywordInfoListMgr.cs BattleKeywordInfoListMgr.cs a014170d0b3f5499635bcc2e29755dc2f3125d5a5a28b1741a4abc74b4abcf86 0
63 BattleLifeTimeSharedObject.cs BattleLifeTimeSharedObject.cs ab8bc3703d268752a1de56ab5d3e9ebd276980c20076eb0ca300838b3db13d5f 0
64 BattleLogTextBuilderAttachSkill.cs BattleLogTextBuilderAttachSkill.cs 11c585ae931fa3dc734bb231d6da61df3b51b803516ca2c5d88a0c78bc7c0104 0
65 BattleManagerBase.cs BattleManagerBase.cs b4181eac7af0ed578835ea75b7003e1b3466331006a35cd84b40139825680eb7 849737bd494e33221b9f8672f67a685ca2372d23fae11ad2e1cfb5406caa5750 0 1
66 BattleMenuMgr.cs BattleMenuMgr.cs 7418699063e01641d0df1ed16773a9ac9418f418cc047fc18c5892eb7971d361 0
67 BattlePlayer.cs BattlePlayer.cs 001409844b46ddaf0a5edbce4e015749ece61053adf725a978987d7063a02632 0
68 BattlePlayerBase.cs BattlePlayerBase.cs 9d3a665158706460a52900008dcfcdf575dbe08cb6d3cc05e63e718b2885b51b 0

View File

@@ -1583,7 +1583,7 @@ public class BattleManagerBase
return (int)Math.Floor((double)val * randomResult);
}
public double StableRandomDouble()
public virtual double StableRandomDouble()
{
if (IsForecast)
{
@@ -1594,7 +1594,7 @@ public class BattleManagerBase
return randomResult;
}
public int StableRandomOnlySelf(int val)
public virtual int StableRandomOnlySelf(int val)
{
if (IsForecast)
{

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)