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>
This commit is contained in:
gamer147
2026-07-03 19:18:54 -04:00
parent 5c1db83967
commit 2d9a6eea4b
2045 changed files with 11704 additions and 158495 deletions

View File

@@ -38,12 +38,6 @@ public abstract class SkillBase
public ICardLifeModifier LifeModifier;
public const int INVALID_INT_VALUE = -1;
public const int INVALID_DUPLICATE_VALUE = 0;
public const string INVALID_STRING_VALUE = "";
public BuffInfoContainer(BattleCardBase targetCard, BuffInfo buffInfo, int intValue = -1, string stringValue = "", SkillBase attachSkill = null, long duplicateBanNum = 0L, NotConsumeEpModifierInfo notConsumeEpModifierInfo = null, ICardCostModifier costModifire = null, ICardOffenseModifier offenseModifire = null, ICardLifeModifier lifeModifire = null)
{
_targetCard = targetCard;
@@ -191,43 +185,28 @@ public abstract class SkillBase
public WaitEffectLoadVfx(string effectPath, EffectMgr.EngineType engineType, string sePath, IBattleResourceMgr resourceMgr, Action<EffectBattle> loadEndCallback)
{
if (!BattleManagerBase.GetIns().IsRecovery)
// Pre-Phase-5b: guarded on the mgr's IsRecovery. Headless has no visible EffectMgr;
// preserve the pre-cull default (register the LoadVfx) — resourceMgr is a null-shim
// in headless, so the register call is a no-op.
EffectPath = effectPath;
LoadVfx = resourceMgr.LoadAndCreateEffectBattleInstance(effectPath, engineType, sePath, delegate(EffectBattle eb)
{
EffectPath = effectPath;
WaitCallbackVfx waitCallbackVfx = new WaitCallbackVfx();
LoadVfx = resourceMgr.LoadAndCreateEffectBattleInstance(effectPath, engineType, sePath, delegate(EffectBattle eb)
{
loadEndCallback.Call(eb);
waitCallbackVfx.Callback();
});
Register(LoadVfx);
Register(waitCallbackVfx);
}
loadEndCallback.Call(eb);
});
Register(LoadVfx);
}
}
protected List<BuffInfoContainer> buffInfoContainer;
public const int PUBLISHED_ACTIVE_SKILL_COUNT_DEFAULT = -1;
public bool IsNotAssignPublishedActiveSkillCount;
private uint _stopTiming;
public const string PARAM_INDUCTION_ICON = "induction";
public const string OPTION_NULL = "_OPT_NULL_";
private string _inductionSkillVoice;
private string _inductionEvolutionSkillVoice;
public string SkillTimingText;
public const uint CALL_NONE = 0u;
public const uint CALL_START = 1u;
public uint OnWhenPlayStart;
public uint OnWhenHandToNotPlayStart;
@@ -400,8 +379,6 @@ public abstract class SkillBase
private List<BattleCardBase> _targetCards;
private const string SUPER_SKYBOUND_ART_TRUE_CONDITION = "{self.super_skybound_art_count}<={me.inplay.class.turn}";
public Func<Func<VfxBase>, VfxBase> CreateInductionSkillActivationVfxFunc;
protected bool? _isMakeFoil = false;
@@ -456,8 +433,6 @@ public abstract class SkillBase
public virtual bool IsAllowDestroyTarget => false;
public bool SelectCompleteFlag { get; set; }
public bool IsInvoked { get; protected set; }
public ExecutionInfoCreatorBase _executionInfoCreator { get; protected set; }
@@ -520,18 +495,6 @@ public abstract class SkillBase
public ConditionSkillFilterCollection ConditionFilterCollection { get; private set; }
public ISkillBattlePlayerFilter ConditionBattlePlayerFilter
{
get
{
return ConditionFilterCollection.BattlePlayerFilter;
}
set
{
ConditionFilterCollection.BattlePlayerFilter = value;
}
}
public List<ISkillConditionChecker> ConditionCheckerList
{
get
@@ -556,8 +519,6 @@ public abstract class SkillBase
}
}
public List<ISkillCardFilter> ConditionCardFilterList => ConditionFilterCollection.CardFilterList;
public ApplySkillTargetFilterCollection ApplyFilterCollection { get; private set; }
public ISkillBattlePlayerFilter ApplyBattlePlayerFilter
@@ -620,18 +581,6 @@ public abstract class SkillBase
public string DuplicateBanSkillNum { get; private set; } = string.Empty;
public string InductionSkillVoice
{
get
{
if (!SkillPrm.ownerCard.IsEvolution)
{
return _inductionSkillVoice;
}
return _inductionEvolutionSkillVoice;
}
}
public List<SkillPreprocessBase> PreprocessList { get; set; }
public IEnumerable<IReadOnlyBattleCardInfo> SkillDrewCards { get; private set; }
@@ -678,7 +627,7 @@ public abstract class SkillBase
{
get
{
if (!GameMgr.GetIns().IsAdmin && !SkillPrm.ownerCard.IsPlayer && SkillPrm.ownerCard.IsInHand && !PreprocessList.Any((SkillPreprocessBase p) => p is SkillPreprocessOpenCard) && OnWhenReturnStart == 0 && OnWhenLeave == 0)
if (!SkillPrm.ownerCard.SelfBattlePlayer.BattleMgr.GameMgr.IsAdmin && !SkillPrm.ownerCard.IsPlayer && SkillPrm.ownerCard.IsInHand && !PreprocessList.Any((SkillPreprocessBase p) => p is SkillPreprocessOpenCard) && OnWhenReturnStart == 0 && OnWhenLeave == 0)
{
return OnWhenGetOff != 0;
}
@@ -727,18 +676,6 @@ public abstract class SkillBase
}
}
public bool IsNoSelectFusionSkill
{
get
{
if (this is Skill_fusion)
{
return GetSkillSelectCount() == 0;
}
return false;
}
}
public bool IsActivity { get; protected set; }
public bool IsReferencePreviousSkill { get; protected set; }
@@ -880,7 +817,7 @@ public abstract class SkillBase
IDetailPanelControl detailPanelControl = SkillPrm.ownerCard.SelfBattlePlayer.BattleMgr.DetailMgr.DetailPanelControl;
if (detailPanelControl.IsShow)
{
GameMgr.GetIns().GetDataMgr();
SkillPrm.ownerCard.SelfBattlePlayer.BattleMgr.GameMgr.GetDataMgr();
List<BattlePlayerBase.MyRotationBonusCondition> list = new List<BattlePlayerBase.MyRotationBonusCondition>();
list.AddRange(target.SelfBattlePlayer.BonusConditionList);
if (detailPanelControl._card != null && detailPanelControl._card.IsClass && detailPanelControl._card.IsPlayer == target.IsPlayer)
@@ -1013,9 +950,9 @@ public abstract class SkillBase
ConditionCheckerList = new List<ISkillConditionChecker>();
ApplyFilterCollection = new ApplySkillTargetFilterCollection();
PreprocessList = new List<SkillPreprocessBase>();
if (skillPrm.ownerCard.SelfBattlePlayer.BattleMgr is NetworkBattleManagerBase && !GameMgr.GetIns().IsAINetwork)
if (skillPrm.ownerCard.SelfBattlePlayer.BattleMgr is NetworkBattleManagerBase && !SkillPrm.ownerCard.SelfBattlePlayer.BattleMgr.GameMgr.IsAINetwork)
{
if (GameMgr.GetIns().IsReplayBattle)
if (SkillPrm.ownerCard.SelfBattlePlayer.BattleMgr.GameMgr.IsReplayBattle)
{
_executionInfoCreator = new ReplayExecutionInfoCreator(this);
}
@@ -1172,7 +1109,7 @@ public abstract class SkillBase
protected VfxWithLoading CreateSkillEffect(IBattleResourceMgr resourceMgr, IEnumerable<BattleCardBase> targetCards, bool isFollowInHand = false, bool addToLastOperation = false, bool skipCallOnEffect = false)
{
if (!SkillPrm.ownerCard.IsPlayer && !GameMgr.GetIns().IsAdminWatch && ApplyingTargetFilter is SkillTargetHandSelfFilter)
if (!SkillPrm.ownerCard.IsPlayer && !SkillPrm.ownerCard.SelfBattlePlayer.BattleMgr.GameMgr.IsAdminWatch && ApplyingTargetFilter is SkillTargetHandSelfFilter)
{
return NullVfxWithLoading.GetInstance();
}
@@ -1180,7 +1117,7 @@ public abstract class SkillBase
{
SkillPrm.ownerCard.SelfBattlePlayer.BattleMgr.OperateMgr.CallOnEffect(SkillPrm.buildInfo, isFollowInHand, isTargetPosition: false, addToLastOperation, OnWhenFusioned != 0);
}
if (BattleManagerBase.GetIns().IsRecovery)
if (SkillPrm.ownerCard.SelfBattlePlayer.BattleMgr.IsRecovery)
{
return NullVfxWithLoading.GetInstance();
}
@@ -1232,7 +1169,7 @@ public abstract class SkillBase
{
effectBattle = eb;
});
DelaySetupVfx mainVfx = new DelaySetupVfx(() => new SkillEffectBattleVfx(effectBattle, SkillPrm.ownerCard.BattleCardView, SkillPrm.resourceMgr, getEffectStartPoint, getEffectEndPoint, 0f, animationTime, moveType, SkillPrm.ownerCard.IsPlayer, color));
VfxBase mainVfx = NullVfx.GetInstance();
return VfxWithLoading.Create(loadingVfx, mainVfx);
}
@@ -1243,12 +1180,9 @@ public abstract class SkillBase
foreach (BattleCardBase targetCard in targetCards)
{
GameObject effectGameObject = null;
WaitLoadEffectAndSetSeVfx vfx = new WaitLoadEffectAndSetSeVfx(effectPath, sePath, delegate(GameObject e)
{
effectGameObject = e;
});
VfxBase vfx = NullVfx.GetInstance();
parallelVfxPlayer.Register(vfx);
PlayEffectAndSeVfx vfx2 = new PlayEffectAndSeVfx(() => effectGameObject, targetCard.BattleCardView.Transform, isFollow: false, isFollowPosition: false, isFollowAll: true);
VfxBase vfx2 = NullVfx.GetInstance();
parallelVfxPlayer2.Register(vfx2);
}
return VfxWithLoading.Create(parallelVfxPlayer, parallelVfxPlayer2);
@@ -1272,7 +1206,7 @@ public abstract class SkillBase
effectBattle = eb;
}));
SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create();
sequentialVfxPlayer.Register(new DelaySetupVfx(() => new SkillEffectBattleVfx(effectBattle, getEffectStartPoint, resourceMgr, () => targetCard.BattleCardView.CardWrapObject.transform.position, 0f, isPlayer, battleCardView, effectMoveType, effectTargetType, effectTime, targetCard.BattleCardView)));
sequentialVfxPlayer.Register(NullVfx.GetInstance());
parallelVfxPlayer2.Register(sequentialVfxPlayer);
}
return VfxWithLoading.Create(parallelVfxPlayer, parallelVfxPlayer2);
@@ -1290,22 +1224,10 @@ public abstract class SkillBase
{
effectBattle = eb;
});
DelaySetupVfx mainVfx = new DelaySetupVfx(() => new SkillEffectBattleVfx(effectBattle, effectStartPoint, resourceMgr, () => effectEndPoint, 0f, isPlayer, battleCardView, effectMoveType, effectTargetType, effectTime, battleCardView));
VfxBase mainVfx = NullVfx.GetInstance();
return VfxWithLoading.Create(loadingVfx, mainVfx);
}
private VfxBase AttachEffectToCard(BattleCardBase targetCard, Func<EffectBattle> getEffectBattle)
{
return InstantVfx.Create(delegate
{
EffectBattle effectBattle = getEffectBattle();
effectBattle.transform.localScale = targetCard.BattleCardView.Transform.localScale;
effectBattle.transform.SetParent(targetCard.BattleCardView.Transform);
effectBattle.transform.localPosition = Vector3.zero;
effectBattle.transform.localRotation = Quaternion.identity;
});
}
public abstract VfxWithLoading Start(CallParameter parameter);
public virtual VfxWithLoading Stop(SkillProcessor skillProcessor)
@@ -1354,26 +1276,6 @@ public abstract class SkillBase
return 0;
}
protected string GetEachOption()
{
return OptionValue.GetString(SkillFilterCreator.ContentKeyword.each, string.Empty);
}
protected int GetEachOptionValue(string getValueOption, BattleCardBase card)
{
return getValueOption switch
{
"life" => card.Life,
"attack" => card.Atk,
_ => -1,
};
}
public void SetStopTiming(uint stopTiming)
{
_stopTiming = stopTiming;
}
public void SetIsAttachSkill(bool flag, bool isInplay)
{
IsAttachedSkill = flag;
@@ -1414,7 +1316,7 @@ public abstract class SkillBase
num = Mathf.Clamp(num, 1, max);
}
VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create();
BattleManagerBase.GetIns().OperateMgr.CallOnSkillVfxStart();
SkillPrm.ownerCard.SelfBattlePlayer.BattleMgr.OperateMgr.CallOnSkillVfxStart();
for (int i = 0; i < num; i++)
{
if (SkillPrm.selfBattlePlayer.Class.IsDead || SkillPrm.opponentBattlePlayer.Class.IsDead)
@@ -1433,7 +1335,7 @@ public abstract class SkillBase
if (skill.SkillPrm.ownerCard.BaseParameter.SkillDescription.Contains("skill_activated_count") && skill.SkillPrm.ownerCard.HasSkillActivatedCountWrapValue)
{
skillDescription = skill.SkillPrm.ownerCard.GetCardSkillDescription(new BattlePlayerBase.SideLogInfo(skill), SkillPrm.ownerCard.IsEvolution);
sideLogCardData = BattleManagerBase.GetIns().OperateMgr.CallOnCreateSideLogCardData(skill.SkillPrm.ownerCard, skill, isDeckSelf, isInHand);
sideLogCardData = SkillPrm.ownerCard.SelfBattlePlayer.BattleMgr.OperateMgr.CallOnCreateSideLogCardData(skill.SkillPrm.ownerCard, skill, isDeckSelf, isInHand);
}
VfxBase vfxToRegister = skill.Preprocess(skillProcessor, checkerOption);
checkerOption.IsRefPrev = true;
@@ -1464,7 +1366,7 @@ public abstract class SkillBase
if (IsPreviousGetSideLogText(skill.SkillPrm.ownerCard.BaseParameter.SkillDescription))
{
skillDescription = skill.SkillPrm.ownerCard.GetCardSkillDescription(new BattlePlayerBase.SideLogInfo(skill), isEvolve);
sideLogCardData = BattleManagerBase.GetIns().OperateMgr.CallOnCreateSideLogCardData(skill.SkillPrm.ownerCard, skill, isDeckSelf, isInHand);
sideLogCardData = SkillPrm.ownerCard.SelfBattlePlayer.BattleMgr.OperateMgr.CallOnCreateSideLogCardData(skill.SkillPrm.ownerCard, skill, isDeckSelf, isInHand);
}
bool flag4 = true;
if (callType == SkillProcessor.ProcessCallType.ResidentStop && ConditionCheckerList.Where((ISkillConditionChecker c) => c is SkillConditionTurn).Any((ISkillConditionChecker t) => !t.IsRight(playerInfoPair, checkerOption)))
@@ -1478,7 +1380,7 @@ public abstract class SkillBase
bool isOnSummonOrReturnTiming = sideLogControl != null && sideLogControl.IsOnSummonOrReturnTimingSkill(skill);
skillProcessor.OnSkillStart += delegate
{
BattleManagerBase.GetIns().OperateMgr.CallOnCreateSideLog(skill.SkillPrm.ownerCard, skill, isEvolve, isOnSummonOrReturnTiming, isDeckSelf, isInHand, sideLogCardData);
SkillPrm.ownerCard.SelfBattlePlayer.BattleMgr.OperateMgr.CallOnCreateSideLog(skill.SkillPrm.ownerCard, skill, isEvolve, isOnSummonOrReturnTiming, isDeckSelf, isInHand, sideLogCardData);
return skill.SkillPrm.ownerCard.CreateShowLogVfx(3f, skill, isEvolve, skillDescription);
};
}
@@ -1562,12 +1464,12 @@ public abstract class SkillBase
}
checkerOption.SetCheckerOptionTransientValue(SkillPrm.ownerCard.SelfBattlePlayer, SkillPrm.ownerCard.OpponentBattlePlayer);
}
if (BattleManagerBase.GetIns() is NetworkBattleManagerBase && (SkillPrm.selfBattlePlayer.Class.IsDead || SkillPrm.opponentBattlePlayer.Class.IsDead))
if (SkillPrm.ownerCard.SelfBattlePlayer.BattleMgr is NetworkBattleManagerBase && (SkillPrm.selfBattlePlayer.Class.IsDead || SkillPrm.opponentBattlePlayer.Class.IsDead))
{
BattleManagerBase.GetIns().LethalPublishedActiveSkillCount = NetworkBattleGenericTool.GetPublishSkillCount(this);
BattleManagerBase.GetIns().LethalMovementCount = NetworkBattleGenericTool.GetSkillMovementNum(this);
SkillPrm.ownerCard.SelfBattlePlayer.BattleMgr.LethalPublishedActiveSkillCount = NetworkBattleGenericTool.GetPublishSkillCount(this);
SkillPrm.ownerCard.SelfBattlePlayer.BattleMgr.LethalMovementCount = NetworkBattleGenericTool.GetSkillMovementNum(this);
}
BattleManagerBase.GetIns().OperateMgr.CallOnSkillVfxEnd();
SkillPrm.ownerCard.SelfBattlePlayer.BattleMgr.OperateMgr.CallOnSkillVfxEnd();
return vfxWithLoadingSequential;
}
@@ -1629,7 +1531,7 @@ public abstract class SkillBase
}
int num;
IReadOnlyVoiceInfo readOnlyVoiceInfo;
if (BattleManagerBase.GetIns().IsRecovery)
if (SkillPrm.ownerCard.SelfBattlePlayer.BattleMgr.IsRecovery)
{
num = ((GetAttachSkill.SkillPrm.ownerCard.BattleCardView is NullBattleCardView) ? 1 : 0);
if (num != 0)
@@ -1703,7 +1605,7 @@ public abstract class SkillBase
protected VfxBase CreateSkillActivationVoiceVfx()
{
if (BattleManagerBase.GetIns().IsRecovery)
if (SkillPrm.ownerCard.SelfBattlePlayer.BattleMgr.IsRecovery)
{
return NullVfx.GetInstance();
}
@@ -1718,7 +1620,7 @@ public abstract class SkillBase
{
text2 = text.Split(new string[1] { "_" }, StringSplitOptions.None)[0];
}
return VfxWithLoading.Create(new WaitLoadVoiceResourceVfx(battleCardView, text2), new PlayCRISoundVfx(battleCardView, text));
return VfxWithLoading.Create(NullVfx.GetInstance(), NullVfx.GetInstance());
}
private bool LightCheckAvailable(SkillBase skill, SkillConditionCheckerOption checkerOption)
@@ -1797,7 +1699,7 @@ public abstract class SkillBase
if (IsInductionSkill && !SkillPrm.ownerCard.IsDead && !SkillPrm.ownerCard.IsInHand)
{
VfxBase inductionVoiceVfx = CreateSkillActivationVoiceVfx();
return ParallelVfxPlayer.Create(CreateInductionSkillActivationVfxFunc.GetAllFuncVfxResults(() => inductionVoiceVfx), new ReactiveSkillActivationVfx(SkillPrm.ownerCard));
return ParallelVfxPlayer.Create(CreateInductionSkillActivationVfxFunc.GetAllFuncVfxResults(() => inductionVoiceVfx), NullVfx.GetInstance());
}
return NullVfx.GetInstance();
}
@@ -1874,25 +1776,6 @@ public abstract class SkillBase
return true;
}
public static T GetSkillLastOrDefaultBeforeTargetSkill<T>(SkillBase targetSkill) where T : SkillBase
{
List<SkillBase> list = targetSkill.SkillPrm.ownerCard.Skills.ToList();
int num = list.FindIndex((SkillBase s) => s == targetSkill);
if (num <= -1)
{
return null;
}
list.RemoveRange(num, list.Count - num);
return (T)list.LastOrDefault((SkillBase s) => s is T);
}
public List<BattleCardBase> GetDrewCardInHand()
{
IEnumerable<BattleCardBase> source = SkillDrewCards.Select((IReadOnlyBattleCardInfo c) => (BattleCardBase)c);
BattlePlayerBase owner = SkillPrm.ownerCard.SelfBattlePlayer;
return source.Where((BattleCardBase c) => owner.HandCardList.Any((BattleCardBase cc) => cc.EquelsID(c))).ToList();
}
public bool IsNeedCheckConditionOnScan()
{
if (ConditionFilterCollection.ConditionCheckerFilterList.Count < 1)
@@ -1999,28 +1882,6 @@ public abstract class SkillBase
return result;
}
public bool CheckConditionWithoutChosenCard(BattlePlayerReadOnlyInfoPair playerInfoPair, SkillConditionCheckerOption option, bool isPrePlay)
{
ISkillTargetFilter targetFilter = null;
List<ISkillCardFilter> cardFilter = null;
bool flag = false;
if (ConditionFilterCollection.TargetFilter is SkillTargetChosenCardsFilter)
{
targetFilter = ConditionFilterCollection.TargetFilter;
ConditionFilterCollection.TargetFilter = new SkillTargetSelfFilter(SkillPrm.ownerCard);
cardFilter = ConditionFilterCollection.CardFilterList.ToList();
ConditionFilterCollection.CardFilterList.Clear();
flag = true;
}
bool result = _executionInfoCreator.CheckCondition(playerInfoPair, option, isPrePlay);
if (flag)
{
ConditionFilterCollection.TargetFilter = targetFilter;
ConditionFilterCollection.SetCardFilter(cardFilter);
}
return result;
}
public virtual void SetEventAfterReplace(BattleCardBase card, BuffInfo buff)
{
}
@@ -2041,7 +1902,7 @@ public abstract class SkillBase
protected void CallOnUpdateSkillEffect(List<BattleCardBase> targetCards, bool updateAttackEffect = false)
{
if (GameMgr.GetIns().IsNetworkBattle)
if (SkillPrm.ownerCard.SelfBattlePlayer.BattleMgr.GameMgr.IsNetworkBattle)
{
SkillPrm.ownerCard.SelfBattlePlayer.BattleMgr.OperateMgr.CallOnUpdateSkillEffect(targetCards, updateAttackEffect);
}