Files
SVSimServer/SVSim.BattleEngine/Shim/Generated/BattleLogManager.g.cs
gamer147 2d9a6eea4b engine cleanup passes 4-7 + multi-instancing ambient rip
Squashes 146 commits from battle-engine-extraction. Net: 2,045 files changed,
+11,896 / -158,687 lines. Ships engine passes 4-7 (dead-code cull, view-layer
stub, receive-path shrink) plus the Phase-5 AsyncLocal ambient deletion that
turns concurrent battles into a type-system property rather than a scope
contract.

## What landed

**Passes 4-7 (chunks 1-34):** Extended the Phase-4 const-false collapse into a
cascading cull across the skill graph, view layer, and receive-path periphery.
Six mode flags (IsWatchBattle/IsReplayBattle/IsAdmin/IsAdminWatch/IsPuzzleQuest/
IsAINetwork) became `const false`, every guarded block deleted. Field*.cs
subclass ctors + BackGroundBase + ObjectChecker culled to no-ops. Mulligan
family reworked to take a mgr param through IMulliganMgr.InitMulligan.
Emotion/Recovery/Resource clusters null-stubbed. Prediction/OperationSimulator/
skill filters converted from static ambient reads to per-mgr reads via
SkillPrm.ownerCard.SelfBattlePlayer.BattleMgr / ins.BattleMgr / this.BattleMgr.

**Phase-5 ambient rip (chunks 35-47):** Deleted BattleAmbient / BattleAmbient-
Context / TestBattleScope in full. Every per-battle mutable slot now lives on
the mgr instance itself:
  mgr.InstanceIsForecast / InstanceIsRandomDraw / InstanceRecoveryInfo /
  InstanceViewerId / InstanceNetworkAgent / GameMgr
BattleManagerBase.GetIns() returns null unconditionally; the residual static
flags + 3 façades (Certification.ViewerId, Data.BattleRecoveryInfo,
ToolboxGame.RealTimeNetworkAgent) are null-tolerant defaults kept for the
handful of engine-internal readers that still reference their types. Zero
BattleAmbient references anywhere in engine + node + tests.

Added pre-seeded GameMgr ctor overload threaded through the mgr chain
(BattleManagerBase → SingleBattleMgr / NetworkBattleManagerBase → NetworkStandard-
BattleMgr → HeadlessBattleMgr / HeadlessNetworkBattleMgr). Fixtures build a
GameMgr, seed it via HeadlessEngineEnv.SeedCharaIds/SeedNetUser, and pass it
to the mgr's ctor — no ambient reach.

Node side (SVSim.BattleNode/SessionBattleEngine): _ctx replaced with a plain
GameMgr field; 34 `using var _ambient = BattleAmbient.Enter(_ctx)` scope wraps
ripped from every accessor and mutator; EngineGlobalInit.WirePerSessionGameMgr
takes GameMgr as a param and runs from SessionBattleEngine.SetupInternal
BEFORE mgr construction.

Test side: TestBattleScope deleted; 18 fixture [SetUp]s migrated to
`HeadlessEngineEnv.EnsureProcessGlobals()`; MultiInstanceEngineTests rewritten
around per-mgr construction (GetIns() → null is the pinned invariant).

## Regression fixes

- **chunk-48** (MulliganCtrl): chunk-35's `= null` stubs on card lookups broke
  the live receive-driven Deal path (BattlePlayerBase.DrawCard NRE'd downstream
  of NetworkPlayerMulliganCtrl.StartMulliganVfx). Restored the three lookups
  via `_battlePlayer.BattleMgr.GetBattleCardIdx`. Engine tests were satisfied
  by the WireMulliganPhase seam; unit tests exposed the live-path gap.

## Ship state

- SVSim.BattleEngine.Tests: 56/56 pass, 2 skip
- SVSim.UnitTests: 1554/1554 pass (was 1523/31-fail before chunk 48)
- Solution build: 0 source warnings (40 pre-existing NU1902 MessagePack CVEs
  in SVSim.EmulatedEntrypoint, unrelated)
- Sequential PVP smoke: verified live (two back-to-back battles, no regression
  on cleanup/spinup)
- Concurrent PVP smoke: verified live

Adds tools/engine-port/ClosureAnalyzer/ — the Roslyn transitive-type-closure
analyzer needed to make future cascade cleanup safe (per feedback memory
"Engine cleanup needs closure tool" from the 2026-06-28 pass-3 failure).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-03 19:18:54 -04:00

112 lines
10 KiB
C#

// AUTO-GENERATED no-op stubs (m1_stub_gen) from Shadowverse_Code_2026-05-23\Wizard.Battle.UI\BattleLogManager.cs
// TODO(engine-cleanup-pass2): 145 of 159 methods unrun in baseline
// Type: Wizard.Battle.UI.BattleLogManager
// See data_dumps/reports/engine-cleanup/live-methods.baseline.txt
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using Wizard.Battle.View.Vfx;
namespace Wizard.Battle.UI
{
public partial class BattleLogManager
{
public partial class WarPair { }
public partial class CostCardLogInfo { }
public partial class CardLogInfo { }
public delegate void FuncSetup(BattleLogItem logItem);
// PlayerFusionCard / EnemyFusionCard hoisted to BattleManagerBase as instance fields
// (2026-07-02) so concurrent battles don't alias a process-wide list — see
// BattleManagerBase.EnemyFusionCard.
private static BattleLogManager _instance;
public static BattleLogManager GetInstance() => _instance ??= new BattleLogManager(); // HEADLESS-FIX (M9): non-null singleton so the draw's unguarded BattleLog tail (UpdateFusionedCardSkillDrewCard, and the IsBattleLog AddLogSkillDrawCard calls) no-ops instead of NRE on a null instance
private BattleLogManager() { }
public void SetUp(Transform parent, BattleManagerBase battleMgr, OperateMgr operateMgr, BattlePlayer battlePlayer) { }
public void Clear() { }
public void ClearDestroyedCardList(bool isPlayer) { }
public void SetActiveShowButton(bool isActive) { }
public void HideLog() { }
public void BeginLogBlockEvolution(BattleCardBase card) { }
public VfxBase EndLogBlockEvolution() => global::Wizard.Battle.View.Vfx.NullVfx.GetInstance();
public VfxBase EndLogBlockFusion() => global::Wizard.Battle.View.Vfx.NullVfx.GetInstance();
public void BeginLogBlockPlay(BattleCardBase card) { }
public void BeginLogAccelerate(BattleCardBase card) { }
public void BeginLogCrystallize(BattleCardBase card) { }
public VfxBase EndLogBlockPlay() => global::Wizard.Battle.View.Vfx.NullVfx.GetInstance();
public VfxBase BeginLogBlockTurnChangeReactive() => global::Wizard.Battle.View.Vfx.NullVfx.GetInstance();
public VfxBase EndLogBlockTurnChangeReactive() => global::Wizard.Battle.View.Vfx.NullVfx.GetInstance();
public VfxBase SetupWarActionLog() => global::Wizard.Battle.View.Vfx.NullVfx.GetInstance();
public VfxBase BeginLogBlockWar(BattleCardBase attackCard, BattleCardBase attackedCard) => global::Wizard.Battle.View.Vfx.NullVfx.GetInstance();
public VfxBase EndLogBlockWar(BattleCardBase attackCard, BattleCardBase attackedCard, bool needAttack) => global::Wizard.Battle.View.Vfx.NullVfx.GetInstance();
public void AddNecromanceIcon(SkillBase skill, BattleCardBase card, bool isSpell) { }
public void AddLogDestFollower(BattleLogWindow.BattleLogType type, BattleCardBase card, List<NewReplayBattleMgr.BattleLogTextureInfo> battleLogTextureInfo = null) { }
public VfxBase AddLogWar(BattleCardBase attackCard, BattleCardBase attackedCard) => global::Wizard.Battle.View.Vfx.NullVfx.GetInstance();
public void AddLogFusion(BattleCardBase card, List<BattleCardBase> ingrediens) { }
public void AddLogSkillGetOn(BattleCardBase card, List<BattleCardBase> ingrediens) { }
public void AddLogSkillGetOff(SkillBase skill, List<BattleCardBase> ingrediens) { }
public BattleLogItem AddLogTurn(bool isSelfTurn, int turn = -1) => default!;
public void AddLogMulliganChanged(BattlePlayerBase player, int changedNum) { }
public void AddLogSkillDrawCard(List<BattleCardBase> drawCards, SkillBase skill, bool isOpen, bool isPlayerDraw, bool isOverDraw) { }
public void AddLogSkillDrawToken(List<BattleCardBase> drawCards, SkillBase skill, bool isOpen, bool isOverDraw = false) { }
public void AddLogOverDrawCards(List<BattleCardBase> overDrawCards) { }
public void AddLogSkillReturnCard(List<BattleCardBase> returnCards, SkillBase skill) { }
public void AddLogSkillDiscard(List<BattleCardBase> discardCards, bool isPlayer, SkillBase skill) { }
public void AddLogSkillBanishHand(List<BattleCardBase> banishCards, bool isPlayer, SkillBase skill) { }
public void AddLogSkillBanishDeck(List<BattleCardBase> banishCards, SkillBase skill, bool isOpen) { }
public void AddLogSkillChangeCemetery(int num, SkillBase skill) { }
public void AddLogSkillClearDestroyedCardList(SkillBase skill, BattlePlayerBase player) { }
public void AddLogSkillClearSummonedCardList(SkillBase skill, BattlePlayerBase player) { }
public void AddLogSkillChangeChantCount(int num, BattleCardBase targetCard, SkillBase skill) { }
public void AddLogSkillChangePP(BattleCardBase targetCard, int changePP, int ppTotalPrev, bool isTotal, SkillBase skill) { }
public void AddLogSkillSetEP(int ep, BattleCardBase targetCard, SkillBase skill) { }
public void AddLogSkillGain(List<BattleCardBase> targetCards, SkillBase skill, SkillGainType gainType, int val1 = 0) { }
public void AddLogSkillAttachSkill(BattleCardBase targetCard, SkillBase attachedSkill, SkillBase skill, bool isTargetInOpponentHand = false) { }
public void AddLogSkillCantAttack(List<BattleCardBase> targetCards, SkillBase skill, CantAttackType type) { }
public void AddLogSkillAttackCountRecovery(List<BattleCardBase> targetCards, SkillBase skill) { }
public void AddLogSkillChangeDeck(BattleCardBase classCard, SkillBase skill) { }
public void AddLogSkillAddDeck(List<BattleCardBase> addCards, SkillBase skill) { }
public void AddLogSkillSummon(List<BattleCardBase> summonCards, SkillBase skill) { }
public void AddLogSkillSummon(List<BattleCardBase> summonCards) { }
public void AddLogSkillRandomArray(List<BattleCardBase> targetCards, int[] randomArray, SkillBase skill) { }
public void AddLogSkillBuffSet(List<BattleCardBase> buffCards, int setAttack, int setLife, Skill_power_down skill, bool isTargetInOpponentHand, List<int> beforeAttackList, List<int> beforeLifeList) { }
public void AddLogSkillBuffAdd(List<BattleCardBase> buffCards, int addAttack, int addLife, SkillBase skill, bool isMinusZeroAttack, bool isMinusZeroLife) { }
public void AddLogSkillBuffAdd(List<BattleCardBase> buffCards, int addAttack, int addLife, int gainAttack, int gainLife, SkillBase skill) { }
public void AddLogSkillBuffMultiply(List<BattleCardBase> buffCards, int multiplyAttack, int multiplyLife, SkillBase skill) { }
public void AddLogSkillBuffAddClass(List<BattleCardBase> buffCards, SkillBase skill) { }
public void AddLogSkillBuffSetLife(BattleCardBase ownercard, LogType logType, List<BattleCardBase> buffCards, int setLife, bool isTargetInOpponentHand) { }
public void AddLogSkillBuffSetMaxLife(List<BattleCardBase> buffCards, int setMaxLife, SkillBase skill, List<int> beforeLifeList) { }
public void AddLogSkillBuffAddMaxLife(List<BattleCardBase> buffCards, int addMaxLife, SkillBase skill) { }
public void AddLogSkillBuffInHandAdd(List<BattleCardBase> buffCards, int addAttack, int addLife, SkillBase skill, bool isTargetInOpponentHand, bool isTargetSelfOpenCardSkill) { }
public void AddLogSkillBuffInDeckAdd(BattleCardBase target, int addAttack, int addLife, SkillBase skill) { }
public void AddLogSkillHeal(List<BattleCardBase> beforeHealCards, List<BattleCardBase.HealResult> healResults, SkillBase skill) { }
public void AddLogSkillHeal(List<BattleCardBase> beforeHealCards, List<BattleCardBase.HealResult> healResults) { }
public void AddLogHeal(BattleCardBase beforeHealCard, int healAmount) { }
public void AddLogSkillDamage(BattleCardBase beforeDamage, BattleCardBase afterDamage, BattleCardBase beforeRefrection, BattleCardBase afterRefrection, SkillBase skill) { }
public void AddLogSkillDeath(List<BattleCardBase> deathCards, SkillBase skill) { }
public void AddLogSkillDeath(List<BattleCardBase> deathCards) { }
public void AddLogDeath(BattleCardBase deathCard) { }
public void AddLogSkillEvolution(List<BattleCardBase> evolveCards, SkillBase skill) { }
public void AddLogSkillMetamorphose(List<Skill_metamorphose.MetamorphoseCardPair> pairList, SkillBase skill, bool isTargetInOpponentHand = false, bool isFusion = false) { }
public void AddLogSkillUnite(Skill_unite.UniteCardPair pair, SkillBase skill) { }
public void AddLogSkillForceBerserk(BattleCardBase classCard, SkillBase skill) { }
public void AddLogLose(List<BattleCardBase> cards, SkillBase skill) { }
public void AddLogPlayAsChoiceTransform(BattleCardBase card) { }
public void AddLogCopiedSkill(BattleCardBase card, SkillBase skill, bool isRemain) { }
public void AddLogSkillChangeClan(List<BattleCardBase> cards, CardBasePrm.ClanType newClan, SkillBase skill, bool isTargetInOpponentHand = false) { }
public void AddLogSkillChangeTribe(List<BattleCardBase> cards, List<CardBasePrm.TribeType> newTribe, SkillBase skill, bool isTargetInOpponentHand = false) { }
public void AddTokenDrawModifier(List<BattleCardBase> targetCards, SkillBase skill) { }
public void AddLogSkillChangePlayCount(BattleCardBase card, int count, SkillBase skill) { }
public void AddLogSkillShortageDeckWin(List<BattleCardBase> cards, SkillBase skill) { }
public void AddLogCostChange(List<BattleCardBase> cards, SkillBase skill, int cost, bool isSetCost, bool isTargetInOpponentHand, List<int> setCostDifferenceList) { }
public void AddLogOpenCard(BattleCardBase card) { }
public void InsertExclusionTargetListLog(SkillBase skill) { }
public void AddLogSkillUsePp(SkillBase skill, BattleCardBase card, int usePp) { }
public void AddLogGiveWhiteRitualStack(int num, BattleCardBase targetCard, SkillBase skill) { }
public void AddLogDepriveWhiteRitualStack(int num, BattleCardBase targetCard, SkillBase skill) { }
public void UpdateSkillTiming(BattleCardBase card, LogType oldType, LogType newType) { }
public static int ConvertPremiumIdToNormalId(int cardId) => default!;
public void AddFusionIngredients(BattleCardBase fusionCard, bool isCreateClone) { }
public void UpdateFusionedCardSkillDrewCard(BattleCardBase fusionCard) { }
}
}