diff --git a/SVSim.BattleEngine.Tests/RandomDrawOracleTests.cs b/SVSim.BattleEngine.Tests/RandomDrawOracleTests.cs index d1bacd9..b6ac8d6 100644 --- a/SVSim.BattleEngine.Tests/RandomDrawOracleTests.cs +++ b/SVSim.BattleEngine.Tests/RandomDrawOracleTests.cs @@ -16,6 +16,15 @@ namespace SVSim.BattleEngine.Tests [TestFixture] public class RandomDrawOracleTests { + [TearDown] + public void ResetRandomDrawGate() + { + // NewAuthoritativeBattle sets the process-global BattleManagerBase.IsRandomDraw = true; reset it + // so this fixture doesn't leak that state into later-running fixtures (which expect the default + // false / top-of-deck draw behavior). Prevents order-dependent flakes as more RNG oracles land. + BattleManagerBase.IsRandomDraw = false; + } + // Draw with a single scripted unit; return (drawnCardId, deckCountAfter). The deck is seeded with // three distinguishable cards at indices 2,3,4 -> Index-order positions 0,1,2 map to // RngDeckCardA/B/C. The draw makes one StableRandom(3) call -> index = floor(3*unit).