The engine's receive CONDUCTOR fuses each authoritative mutation behind a view call: the play mutation is an InstantVfx registered to VfxMgr, and the deal hand is seated by MulliganPhaseBase.StartDeal wired to OperateReceive.OnReceiveDeal. Headless, the shared VfxMgr no-op'd registration (correct for the direct ActionProcessor path the M2-M12 oracles use) and OnReceiveDeal was never wired, so the receive path resolved nothing. Untangle (Candidate B, zero Engine logic edits): - InstantVfx.Run() opt-in executor (authored shim). - HeadlessConductorVfxMgr : VfxMgr runs registered InstantVfx; wired only via the node's SessionContentsCreator.CreateVfxMgr (verified the receive mgr's VfxMgr comes from there — BattleManagerBase.cs:768). M2-M12 use HeadlessContentsCreator, so they're isolated by construction. - WireMulliganPhase: construct NetworkMulliganPhase + MulliganEventSetting() to install OnReceiveDeal -> StartDeal (the node never pumps the phase machine). View no-op surface (the 7 from the probe, minus 1 not hit; +1 emergent): - Deal wiring (NetworkMulliganPhase) [node seed] - MulliganInfoControl._partsPlayer/_partsOpponent._exchangeMark/_keepZone/_abandonZone [node seed: prefab + SeedMulliganInfoControl] - Data.BattleRecoveryInfo (IsMulliganEnd=false) [EngineGlobalInit seed] - IBattlePlayerView.PlayQueueView -> HeadlessPlayQueueViewStub [_IfaceImpl.g.cs, both getters] - DetailMgr.DetailPanelControl/SubDetailPanelControl [node seed] - BattleCardIconAnimations.collection (emergent: UpdateInPlayBattleCardIconLabel) -> HeadlessIconAnimations empty SkillCollectionBase [_IfaceImpl.g.cs] - BattleMenuBtn (probe item 7): NOT hit on the vanilla path; not seeded. Oracle (HeadlessConductorTests): node Deal seats 3-card hand; a vanilla hand-card Play leaves hand (-1), adds board (+1), drops PP by cost. Regression: 24/24 BattleEngine.Tests oracles (M2-M12) green; 241/241 SVSim.UnitTests BattleNode green. The 2 SessionEngine capture-replay shadow tests are marked Ignore (superseded): they passed VACUOUSLY when the receive path resolved nothing; with resolution live they hit the documented capture-replay draw-misalignment artifact. Node-native battles are the oracle. Drift: no drift. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
44 lines
2.4 KiB
C#
44 lines
2.4 KiB
C#
extern alias engine;
|
|
using engine::Wizard.BattleMgr;
|
|
using engine::Wizard.Battle.Phase;
|
|
using engine::Wizard.Battle.Recovery;
|
|
using engine::Wizard.Battle.Replay;
|
|
using engine::Wizard.Battle.Resource;
|
|
using engine::Wizard.Battle.View.Vfx;
|
|
|
|
namespace SVSim.BattleNode.Sessions.Engine;
|
|
|
|
/// <summary>The node's production IBattleMgrContentsCreator. Mirrors the test-side
|
|
/// HeadlessContentsCreator (HeadlessFixture.cs) but carries the per-battle master seed so the
|
|
/// engine's RNG stream is born aligned with the seed the node handed both clients (design F-N-5).
|
|
/// The non-RandomSeed members are the no-op recovery/replay/resource/vfx/phase creators the
|
|
/// NetworkStandardBattleMgr ctor dereferences — the engine's own Null* implementations, same set the
|
|
/// headless test harness uses.</summary>
|
|
internal sealed class SessionContentsCreator : IBattleMgrContentsCreator
|
|
{
|
|
public SessionContentsCreator(int masterSeed) => RandomSeed = masterSeed;
|
|
|
|
public int RandomSeed { get; }
|
|
|
|
// No-op managers: the ctor's FirstRecoverySetting/FirstReplaySetting dereference these; recovery/
|
|
// replay recording is irrelevant to a shadow engine, so use the engine's own null implementations.
|
|
public IRecoveryManager RecoveryManager { get; } = new NullRecoveryManager();
|
|
public IRecoveryRecordManager RecoveryRecordManager { get; } = new NullRecoveryRecordManager();
|
|
public IReplayRecordManager ReplayRecordManager { get; } = new NullReplayRecordManager();
|
|
|
|
public IBattleResourceMgr CreateResourceMgr() => new BattleResourceMgr();
|
|
// The receive-conductor VfxMgr: runs the InstantVfx the conductor fuses the play mutation into
|
|
// (design Headless-Conductor Candidate B). The shared VfxMgr no-ops registration — correct for the
|
|
// direct ActionProcessor path, wrong for the receive path. See HeadlessConductorVfxMgr.
|
|
public VfxMgr CreateVfxMgr() => new HeadlessConductorVfxMgr();
|
|
public IPhaseCreator CreatePhaseCreator(engine::BattleManagerBase battleMgr) =>
|
|
new SessionPhaseCreator(battleMgr);
|
|
}
|
|
|
|
/// <summary>Node analogue of the test HeadlessPhaseCreator / the engine's SingleBattlePhaseCreator
|
|
/// (cut from the M1 copy set as an entry-point ctor): inherits PhaseCreatorBase wholesale.</summary>
|
|
internal sealed class SessionPhaseCreator : PhaseCreatorBase
|
|
{
|
|
public SessionPhaseCreator(engine::BattleManagerBase battleMgr) : base(battleMgr) { }
|
|
}
|