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:
@@ -10,9 +10,6 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
{
|
||||
protected BattleCardBase _card;
|
||||
|
||||
protected ICardVfxCreator _vfxCreator;
|
||||
|
||||
public const int DAMAGE_MAX_CLIPPING_NULL = int.MaxValue;
|
||||
|
||||
protected BattlePlayerBase Player => _card.SelfBattlePlayer;
|
||||
|
||||
@@ -398,10 +395,9 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
IsDamageCutProtection = ShieldInfos.Count > 0 || IsDamageCut || ((_card is ClassBattleCardBase) ? (DamageMaxClippingInfo.Where((DamageClippingInfo i) => i.LifeLowerLimit == -1).ToList().Count > 0) : (DamageMaxClippingInfo.Count > 0));
|
||||
}
|
||||
|
||||
public SkillApplyInformation(BattleCardBase card, ICardVfxCreator vfxCreator)
|
||||
public SkillApplyInformation(BattleCardBase card)
|
||||
{
|
||||
_card = card;
|
||||
_vfxCreator = vfxCreator;
|
||||
CantPlayFilterList = new List<CantPlayCardFilterInfo>();
|
||||
DamageMaxClippingInfo = new List<DamageClippingInfo>();
|
||||
ClanSkinInfo = new List<CardBasePrm.ClanType>();
|
||||
@@ -575,13 +571,6 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
TurnBuffCountList.Clear();
|
||||
}
|
||||
|
||||
public void ReSetupVfxCreator(ICardVfxCreator vfxCreator)
|
||||
{
|
||||
if (vfxCreator != null)
|
||||
{
|
||||
_vfxCreator = vfxCreator;
|
||||
}
|
||||
}
|
||||
|
||||
public SkillBase CloneAttachSkill(SkillApplyInformation cloneTarget, SkillBase skill)
|
||||
{
|
||||
@@ -909,27 +898,24 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
{
|
||||
if (!_card.IsDead && ((!isOldAtkBuff && isNowAtkBuff && ((!isOldMaxLifeBuff && !isNowMaxLifeBuff) || (!isOldMaxLifeBuff && isNowMaxLifeBuff))) || (!isOldMaxLifeBuff && isNowMaxLifeBuff && ((!isOldAtkBuff && !isNowAtkBuff) || (!isOldAtkBuff && isNowAtkBuff)))))
|
||||
{
|
||||
sequentialVfxPlayer.Register(_vfxCreator.CreateBuffStart(_card.CreateParameterChangeInfo()));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if ((isOldAtkBuff && !isNowAtkBuff && !isNowMaxLifeBuff) || (isOldMaxLifeBuff && !isNowMaxLifeBuff && !isNowAtkBuff))
|
||||
{
|
||||
sequentialVfxPlayer.Register(_vfxCreator.CreateBuffStop(_card.CreateParameterChangeInfo()));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if (!_card.IsDead && ((!isOldAtkDebuff && isNowAtkDebuff && ((!isOldMaxLifeDebuff && !isNowMaxLifeDebuff) || (!isOldMaxLifeDebuff && isNowMaxLifeDebuff))) || (!isOldMaxLifeDebuff && isNowMaxLifeDebuff && ((!isOldAtkDebuff && !isNowAtkDebuff) || (!isOldAtkDebuff && isNowAtkDebuff)))))
|
||||
{
|
||||
sequentialVfxPlayer.Register(_vfxCreator.CreateDebuffStart(_card.CreateParameterChangeInfo()));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if ((isOldAtkDebuff && !isNowAtkDebuff && !isNowMaxLifeDebuff) || (isOldMaxLifeDebuff && !isNowMaxLifeDebuff && !isNowAtkDebuff))
|
||||
{
|
||||
sequentialVfxPlayer.Register(_vfxCreator.CreateDebuffStop(_card.CreateParameterChangeInfo()));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
}
|
||||
if (_card.IsInHand && !isNoBuff)
|
||||
{
|
||||
ICardVfxCreator vfxCreator = _vfxCreator;
|
||||
BattleCardBase.ParameterChangeInformation parameterChangeInfo = _card.CreateParameterChangeInfo();
|
||||
bool isDebuff2 = isDebuff;
|
||||
return vfxCreator.CreateBuffStartInHand(parameterChangeInfo, !skipWait, isDebuff2);
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
return sequentialVfxPlayer;
|
||||
}
|
||||
@@ -975,7 +961,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
}
|
||||
LifeModifierList.Add(lifeModifier);
|
||||
}
|
||||
bool skipWait = !_card.IsPlayer && _card.IsInHand && !GameMgr.GetIns().IsAdminWatch;
|
||||
bool skipWait = !_card.IsPlayer && _card.IsInHand && !_card.SelfBattlePlayer.BattleMgr.GameMgr.IsAdminWatch;
|
||||
bool isOldAtkBuff = num > _card.BaseAtk;
|
||||
bool isNowAtkBuff = num2 > _card.BaseAtk;
|
||||
bool isOldMaxLifeBuff = num3 > _card.BaseMaxLife;
|
||||
@@ -1005,7 +991,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
bool flag = (byte)num6 != 0;
|
||||
bool isNoBuff = num5 == 0 && !flag;
|
||||
sequentialVfxPlayer.Register(CombatModifierChangeCalc(isOldAtkBuff, isNowAtkBuff, isOldMaxLifeBuff, isNowMaxLifeBuff, isOldAtkDebuff, isNowAtkDebuff, isOldMaxLifeDebuff, isNowMaxLifeDebuff, flag, isNoBuff, skipWait));
|
||||
sequentialVfxPlayer.Register(_vfxCreator.CreateParameterChange(_card.CreateParameterChangeInfo(), isDead: false, isEvolve: false, skipWait));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
sequentialVfxPlayer.Register(this.OnGiveCombatValueModifire.GetAllFuncVfxResults(arg1: false));
|
||||
return sequentialVfxPlayer;
|
||||
}
|
||||
@@ -1044,18 +1030,18 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
bool isOldMaxLifeDebuff = num3 < _card.BaseMaxLife;
|
||||
bool isNowMaxLifeDebuff = num4 < _card.BaseMaxLife;
|
||||
parallelVfxPlayer.Register(CombatModifierChangeCalc(isOldAtkBuff, isNowAtkBuff, isOldMaxLifeBuff, isNowMaxLifeBuff, isOldAtkDebuff, isNowAtkDebuff, isOldMaxLifeDebuff, isNowMaxLifeDebuff));
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateParameterChange(_card.CreateParameterChangeInfo()));
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
return parallelVfxPlayer;
|
||||
}
|
||||
|
||||
public virtual VfxBase ForceDepriveCombatValueModifire()
|
||||
{
|
||||
ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create();
|
||||
parallelVfxPlayer.Register((_card.Atk > _card.BaseAtk || _card.MaxLife > _card.BaseMaxLife) ? _vfxCreator.CreateBuffStop(_card.CreateParameterChangeInfo(), useWait: false) : NullVfx.GetInstance());
|
||||
parallelVfxPlayer.Register((_card.Atk < _card.BaseAtk || _card.MaxLife < _card.BaseMaxLife) ? _vfxCreator.CreateDebuffStop(_card.CreateParameterChangeInfo(), useWait: false) : NullVfx.GetInstance());
|
||||
parallelVfxPlayer.Register((_card.Atk > _card.BaseAtk || _card.MaxLife > _card.BaseMaxLife) ? NullVfx.GetInstance() : NullVfx.GetInstance());
|
||||
parallelVfxPlayer.Register((_card.Atk < _card.BaseAtk || _card.MaxLife < _card.BaseMaxLife) ? NullVfx.GetInstance() : NullVfx.GetInstance());
|
||||
if (_card.Atk > _card.BaseAtk || _card.MaxLife > _card.BaseMaxLife || _card.Atk < _card.BaseAtk || _card.MaxLife < _card.BaseMaxLife)
|
||||
{
|
||||
_vfxCreator.CreateParameterChange(_card.CreateParameterChangeInfo(), _card.IsDead || _card.MetamorphoseCard != null);
|
||||
NullVfx.GetInstance();
|
||||
}
|
||||
return parallelVfxPlayer;
|
||||
}
|
||||
@@ -1069,14 +1055,6 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
OffenseModifierList.Add(modifier);
|
||||
}
|
||||
|
||||
private void RemoveOffenseModifier(ICardOffenseModifier modifier)
|
||||
{
|
||||
if (!_card.IsDead)
|
||||
{
|
||||
OffenseModifierList.Remove(modifier);
|
||||
}
|
||||
}
|
||||
|
||||
public void AddLifeModifier(ICardLifeModifier modifier)
|
||||
{
|
||||
if (modifier.IsClearBeforeModifier)
|
||||
@@ -1086,14 +1064,6 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
LifeModifierList.Add(modifier);
|
||||
}
|
||||
|
||||
private void RemoveLifeModifier(ICardLifeModifier modifier)
|
||||
{
|
||||
if (!_card.IsDead)
|
||||
{
|
||||
LifeModifierList.Remove(modifier);
|
||||
}
|
||||
}
|
||||
|
||||
public void ClearParameterModifier()
|
||||
{
|
||||
OffenseModifierList.Clear();
|
||||
@@ -1367,7 +1337,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
|
||||
public virtual int GetSpecificTurnHealCountOnlySelf(IReadOnlyBattleCardInfo cardInfo, TurnPlayerInfo turnPlayerInfo)
|
||||
{
|
||||
if (cardInfo.IsPlayer != BattleManagerBase.GetIns().BattlePlayer.IsSelfTurn)
|
||||
if (cardInfo.IsPlayer != _card.SelfBattlePlayer.BattleMgr.BattlePlayer.IsSelfTurn)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -1401,7 +1371,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
|
||||
public virtual int GetSpecificTurnAcceleratedCardCountOnlySelf(IReadOnlyBattleCardInfo cardInfo, TurnPlayerInfo turnPlayerInfo)
|
||||
{
|
||||
if (cardInfo.IsPlayer != BattleManagerBase.GetIns().BattlePlayer.IsSelfTurn)
|
||||
if (cardInfo.IsPlayer != _card.SelfBattlePlayer.BattleMgr.BattlePlayer.IsSelfTurn)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -1412,7 +1382,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
{
|
||||
bool flag = cardInfo.IsPlayer == turnPlayerInfo.IsSelfPlayer;
|
||||
int referenceTurn = GetReferenceTurn(flag, turnPlayerInfo.TurnOffset);
|
||||
BattlePlayerBase obj = (flag ? ((BattlePlayerBase)BattleManagerBase.GetIns().BattlePlayer) : ((BattlePlayerBase)BattleManagerBase.GetIns().BattleEnemy));
|
||||
BattlePlayerBase obj = (flag ? ((BattlePlayerBase)_card.SelfBattlePlayer.BattleMgr.BattlePlayer) : ((BattlePlayerBase)_card.SelfBattlePlayer.BattleMgr.BattleEnemy));
|
||||
List<IReadOnlyBattleCardInfo> list = new List<IReadOnlyBattleCardInfo>();
|
||||
foreach (IReadOnlyBattleCardInfo skillInfoGamePlayCard in obj.SkillInfoGamePlayCards)
|
||||
{
|
||||
@@ -1436,7 +1406,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
|
||||
public int GetReferenceTurn(bool isCheckSelf, int turnOffset)
|
||||
{
|
||||
BattleManagerBase ins = BattleManagerBase.GetIns();
|
||||
BattleManagerBase ins = _card.SelfBattlePlayer.BattleMgr;
|
||||
return (isCheckSelf ? ins.BattlePlayer.Turn : ins.BattleEnemy.Turn) - turnOffset;
|
||||
}
|
||||
|
||||
@@ -1531,7 +1501,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
{
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
return _vfxCreator.CreateGuardStart();
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public virtual VfxBase DepriveGuard(GuardInfo info)
|
||||
@@ -1542,7 +1512,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
{
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
return _vfxCreator.CreateGuardStop();
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public virtual VfxBase ForceDepriveGuard()
|
||||
@@ -1552,7 +1522,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
GuardInfo.Clear();
|
||||
IsGuard = false;
|
||||
}
|
||||
return _vfxCreator.CreateGuardStop();
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public virtual VfxBase GiveDrain()
|
||||
@@ -1563,7 +1533,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
{
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
return _vfxCreator.CreateDrainStart();
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public virtual VfxBase DepriveDrain()
|
||||
@@ -1574,7 +1544,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
{
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
return _vfxCreator.CreateDrainStop();
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public virtual VfxBase FourceDepriveDrain()
|
||||
@@ -1584,7 +1554,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
DrainCount = 0;
|
||||
IsDrain = false;
|
||||
}
|
||||
return _vfxCreator.CreateDrainStop();
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public virtual VfxBase GiveKiller()
|
||||
@@ -1595,7 +1565,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
{
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
return _vfxCreator.CreateKillerStart();
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public virtual VfxBase DepriveKiller()
|
||||
@@ -1606,7 +1576,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
{
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
return _vfxCreator.CreateKillerStop();
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public virtual VfxBase FourceDepriveKiller()
|
||||
@@ -1616,7 +1586,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
KillerCount = 0;
|
||||
IsKiller = false;
|
||||
}
|
||||
return _vfxCreator.CreateKillerStop();
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public virtual VfxBase GiveShield(ShieldInfo shield)
|
||||
@@ -1707,7 +1677,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
{
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
return _vfxCreator.CreateSneakStart();
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public virtual VfxBase DepriveSneak()
|
||||
@@ -1717,7 +1687,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
{
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
return _vfxCreator.CreateSneakStop();
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public virtual VfxBase FourceDepriveSneak()
|
||||
@@ -1726,7 +1696,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
{
|
||||
SneakCount = 0;
|
||||
}
|
||||
return _vfxCreator.CreateSneakStop();
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public virtual VfxBase GiveNotBeAttacked(NotBeAttackedInfo info)
|
||||
@@ -1737,7 +1707,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
{
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
return _vfxCreator.CreateNotBeAttackedStart();
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public virtual VfxBase DepriveNotBeAttacked(NotBeAttackedInfo info)
|
||||
@@ -1748,14 +1718,14 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
{
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
return _vfxCreator.CreateNotBeAttackedStop();
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public virtual VfxBase FourceDepriveNotBeAttacked()
|
||||
{
|
||||
NotBeAttackedInfoList.Clear();
|
||||
IsNotBeAttacked = false;
|
||||
return _vfxCreator.CreateNotBeAttackedStop();
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public virtual VfxBase GiveUntouchable(string cardType)
|
||||
@@ -1778,7 +1748,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
}
|
||||
return _vfxCreator.CreateUntouchableStart();
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public virtual VfxBase DepriveUntouchable(string cardType)
|
||||
@@ -1801,7 +1771,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
}
|
||||
return _vfxCreator.CreateUntouchableStop();
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public virtual VfxBase FourceDepriveUntouchable(string cardType)
|
||||
@@ -1816,7 +1786,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
UntouchableCount = 0;
|
||||
IsUntouchable = false;
|
||||
}
|
||||
return _vfxCreator.CreateUntouchableStop();
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public virtual VfxBase GiveAttackByLife(string type)
|
||||
@@ -1906,7 +1876,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
return ParallelVfxPlayer.Create(InstantVfx.Create(delegate
|
||||
{
|
||||
_card.BattleCardView._inPlayFrameEffect.HideFrameEffect();
|
||||
}), _vfxCreator.CreateForceCantAttackStart());
|
||||
}), NullVfx.GetInstance());
|
||||
}
|
||||
return InstantVfx.Create(delegate
|
||||
{
|
||||
@@ -1948,7 +1918,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
_card.BattleCardView._inPlayFrameEffect.UpdateCanAttackEffect();
|
||||
}));
|
||||
}
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateForceCantAttackStop());
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
return parallelVfxPlayer;
|
||||
}
|
||||
return NullVfx.GetInstance();
|
||||
@@ -1976,7 +1946,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
}
|
||||
}));
|
||||
}
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateForceCantAttackStop());
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
return parallelVfxPlayer;
|
||||
}
|
||||
|
||||
@@ -1998,7 +1968,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
}
|
||||
}));
|
||||
}
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateForceCantAttackStop());
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
return parallelVfxPlayer;
|
||||
}
|
||||
|
||||
@@ -2090,7 +2060,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
_card.AttackableCount = Math.Min(_card.MaxAttackableCount, _card.AttackableCount);
|
||||
if (_card.MaxAttackableCount <= 0 && maxAttackableCount > 0)
|
||||
{
|
||||
return _vfxCreator.CreateForceCantAttackStart();
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
@@ -2328,7 +2298,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
IsIndependent = IndependentCount > 0;
|
||||
if (IndependentCount == 1)
|
||||
{
|
||||
sequentialVfxPlayer.Register(_vfxCreator.CreateHeavenlyAegisStart());
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
return sequentialVfxPlayer;
|
||||
}
|
||||
@@ -2340,7 +2310,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
IsIndependent = IndependentCount > 0;
|
||||
if (IndependentCount == 0)
|
||||
{
|
||||
sequentialVfxPlayer.Register(_vfxCreator.CreateHeavenlyAegisStop());
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
return sequentialVfxPlayer;
|
||||
}
|
||||
@@ -2349,7 +2319,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
{
|
||||
IndependentCount = 0;
|
||||
IsIndependent = false;
|
||||
return _vfxCreator.CreateHeavenlyAegisStop();
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public void GiveNotBeDebuffed()
|
||||
@@ -2469,8 +2439,8 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
continue;
|
||||
}
|
||||
num = _card.Life - DamageMaxClippingInfo[i].LifeLowerLimit;
|
||||
DataMgr.SpecialBattleSetting specialBattleSettingInfo = GameMgr.GetIns().GetDataMgr().SpecialBattleSettingInfo;
|
||||
if (lifeLowerLimitEffectVfx != null && !BattleManagerBase.GetIns().IsRecovery && specialBattleSettingInfo != null && specialBattleSettingInfo.Id == "42")
|
||||
DataMgr.SpecialBattleSetting specialBattleSettingInfo = _card.SelfBattlePlayer.BattleMgr.GameMgr.GetDataMgr().SpecialBattleSettingInfo;
|
||||
if (lifeLowerLimitEffectVfx != null && !_card.SelfBattlePlayer.BattleMgr.IsRecovery && specialBattleSettingInfo != null && specialBattleSettingInfo.Id == "42")
|
||||
{
|
||||
lifeLowerLimitEffectVfx.Register(SkillBase.CreateSingleVfx(_card.ResourceMgr, () => _card.BattleCardView.GameObject.transform.position, new List<BattleCardBase> { _card }, _card.IsPlayer, _card.BattleCardView, "btl_nerva_2", EffectMgr.EngineType.SHURIKEN, "se_btl_nerva_2", EffectMgr.MoveType.DIRECT_LEADER, EffectMgr.TargetType.SINGLE, 0f));
|
||||
}
|
||||
@@ -2551,7 +2521,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
{
|
||||
TribeSkinInfo.Add(tribeInfo);
|
||||
}
|
||||
return _vfxCreator.CreateChangeAffiliation(_card, clan, showEffect);
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public virtual VfxBase DepriveChangeAffiliation(CardBasePrm.ClanType clan, CardBasePrm.TribeInfo tribeInfo)
|
||||
@@ -2897,59 +2867,59 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
if ((_card.Atk > _card.BaseAtk || _card.MaxLife > _card.BaseMaxLife || BuffCount > 0 || isBuffed) && _card.IsUnit)
|
||||
{
|
||||
flag = true;
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateBuffStop(_card.CreateParameterChangeInfo(), useWait: false));
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if ((_card.Atk < _card.BaseAtk || _card.MaxLife < _card.BaseMaxLife || isDebuffed) && _card.IsUnit)
|
||||
{
|
||||
flag = true;
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateDebuffStop(_card.CreateParameterChangeInfo(), useWait: false));
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
if (isReturn)
|
||||
{
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateParameterChange(new BattleCardBase.ParameterChangeInformation(_card.BaseAtk, _card.BaseAtk, _card.BaseMaxLife, _card.BaseMaxLife, _card.BaseMaxLife), _card.IsDead, isEvolve));
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
else
|
||||
{
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateParameterChange(_card.CreateParameterChangeInfo(), _card.IsDead, isEvolve));
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
}
|
||||
if (IsGuard)
|
||||
{
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateGuardStop());
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if (IsKiller)
|
||||
{
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateKillerStop());
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if (IsUntouchable)
|
||||
{
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateUntouchableStop());
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if (IsUntouchableBySpell)
|
||||
{
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateUntouchableStop());
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if (IsNotBeAttacked)
|
||||
{
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateNotBeAttackedStop());
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if (IsSneak)
|
||||
{
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateSneakStop());
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if (IsSkillCantAtkAll)
|
||||
{
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateForceCantAttackStop());
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if (IsIndependent)
|
||||
{
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateHeavenlyAegisStop());
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if (IsDamageCutProtection || IsIndestructible || IsReflectionClass)
|
||||
{
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateProtectionStop());
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
return parallelVfxPlayer;
|
||||
}
|
||||
@@ -2959,43 +2929,43 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create();
|
||||
if ((_card.Atk > _card.BaseAtk || _card.MaxLife > _card.BaseMaxLife) && _card.IsUnit)
|
||||
{
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateBuffStart(_card.CreateParameterChangeInfo(), useWait: false));
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if ((_card.Atk < _card.BaseAtk || _card.MaxLife < _card.BaseMaxLife) && _card.IsUnit)
|
||||
{
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateDebuffStart(_card.CreateParameterChangeInfo(), useWait: false));
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if (IsGuard)
|
||||
{
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateGuardStart());
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if (IsKiller)
|
||||
{
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateKillerStart());
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if (IsUntouchable)
|
||||
{
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateUntouchableStart());
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if (IsUntouchableBySpell)
|
||||
{
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateUntouchableStart());
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if (IsNotBeAttacked)
|
||||
{
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateNotBeAttackedStart());
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if (IsSneak)
|
||||
{
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateSneakStart());
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if (IsSkillCantAtkAll)
|
||||
{
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateForceCantAttackStart());
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if (IsIndependent)
|
||||
{
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateHeavenlyAegisStart());
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if (IsDamageCutProtection || IsIndestructible || IsReflectionClass)
|
||||
{
|
||||
@@ -3013,15 +2983,15 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
bool flag3 = _card.BaseMaxLife > _card.MaxLife;
|
||||
if (num || flag2)
|
||||
{
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateBuffStart(_card.CreateParameterChangeInfo(), useWait: false));
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if (flag || flag3)
|
||||
{
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateDebuffStart(_card.CreateParameterChangeInfo(), useWait: false));
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
if (IsBuff || IsDebuff || _card.Atk != _card.BaseAtk || _card.Life != _card.BaseMaxLife || _card.MaxLife != _card.BaseMaxLife)
|
||||
{
|
||||
parallelVfxPlayer.Register(_vfxCreator.CreateParameterChange(_card.CreateParameterChangeInfo()));
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
return parallelVfxPlayer;
|
||||
}
|
||||
@@ -3030,7 +3000,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
{
|
||||
if (isForceStop)
|
||||
{
|
||||
return _vfxCreator.CreateProtectionStop();
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
if (_card.IsInHand)
|
||||
{
|
||||
@@ -3038,21 +3008,21 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
}
|
||||
if (IsReflectionClass)
|
||||
{
|
||||
return _vfxCreator.CreateProtectionStart(ProtectionColorType.DamageReflection);
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
if (IsDamageCutProtection && IsIndestructible)
|
||||
{
|
||||
return _vfxCreator.CreateProtectionStart(ProtectionColorType.MultiInvalid);
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
if (IsIndestructible)
|
||||
{
|
||||
return _vfxCreator.CreateProtectionStart(ProtectionColorType.Indestructible);
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
if (IsDamageCutProtection)
|
||||
{
|
||||
return _vfxCreator.CreateProtectionStart(ProtectionColorType.DamageCut);
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
return _vfxCreator.CreateProtectionStop();
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public virtual void AddTokenDrawModifier(TokenDrawModifier modifier)
|
||||
@@ -3169,7 +3139,7 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
{
|
||||
IsSkillCantAtkClass = inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.SkillCantAtkAll);
|
||||
IsSkillCantAtkUnit = IsSkillCantAtkClass;
|
||||
parallelVfxPlayer.Register(IsSkillCantAtkAll ? _vfxCreator.CreateForceCantAttackStart() : _vfxCreator.CreateForceCantAttackStop());
|
||||
parallelVfxPlayer.Register(IsSkillCantAtkAll ? NullVfx.GetInstance() : NullVfx.GetInstance());
|
||||
}
|
||||
if (isOnlyCantAtk)
|
||||
{
|
||||
@@ -3178,34 +3148,34 @@ public class SkillApplyInformation : ISkillApplyInformation
|
||||
if (IsGuard != inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.Guard))
|
||||
{
|
||||
IsGuard = inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.Guard);
|
||||
parallelVfxPlayer.Register(IsGuard ? _vfxCreator.CreateGuardStart() : _vfxCreator.CreateGuardStop());
|
||||
parallelVfxPlayer.Register(IsGuard ? NullVfx.GetInstance() : NullVfx.GetInstance());
|
||||
}
|
||||
if (IsUntouchable != inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.Untouchable))
|
||||
{
|
||||
IsUntouchable = inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.Untouchable);
|
||||
parallelVfxPlayer.Register(IsUntouchable ? _vfxCreator.CreateUntouchableStart() : _vfxCreator.CreateUntouchableStop());
|
||||
parallelVfxPlayer.Register(IsUntouchable ? NullVfx.GetInstance() : NullVfx.GetInstance());
|
||||
}
|
||||
if (IsNotBeAttacked != inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.NotBeAttacked))
|
||||
{
|
||||
IsNotBeAttacked = inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.NotBeAttacked);
|
||||
parallelVfxPlayer.Register(IsNotBeAttacked ? _vfxCreator.CreateNotBeAttackedStart() : _vfxCreator.CreateNotBeAttackedStop());
|
||||
parallelVfxPlayer.Register(IsNotBeAttacked ? NullVfx.GetInstance() : NullVfx.GetInstance());
|
||||
}
|
||||
if (IsSneak != inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.Sneak))
|
||||
{
|
||||
SneakCount = (inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.Sneak) ? 1 : 0);
|
||||
parallelVfxPlayer.Register(IsSneak ? _vfxCreator.CreateSneakStart() : _vfxCreator.CreateSneakStop());
|
||||
parallelVfxPlayer.Register(IsSneak ? NullVfx.GetInstance() : NullVfx.GetInstance());
|
||||
}
|
||||
if (IsIndependent != inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.Independent))
|
||||
{
|
||||
IsIndependent = inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.Independent);
|
||||
parallelVfxPlayer.Register(IsIndependent ? _vfxCreator.CreateHeavenlyAegisStart() : _vfxCreator.CreateHeavenlyAegisStop());
|
||||
parallelVfxPlayer.Register(IsIndependent ? NullVfx.GetInstance() : NullVfx.GetInstance());
|
||||
}
|
||||
if (IsDamageCutProtection != inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.DamageCutProtection) || IsIndestructible != inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.Indestructible) || IsReflectionClass != inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.ReflectionClass))
|
||||
{
|
||||
IsDamageCutProtection = inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.DamageCutProtection);
|
||||
IsIndestructible = inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.Indestructible);
|
||||
IsReflectionClass = inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.ReflectionClass);
|
||||
parallelVfxPlayer.Register((IsDamageCutProtection || IsIndestructible || IsReflectionClass) ? CreateVfxSkillProtection() : _vfxCreator.CreateProtectionStop());
|
||||
parallelVfxPlayer.Register((IsDamageCutProtection || IsIndestructible || IsReflectionClass) ? CreateVfxSkillProtection() : NullVfx.GetInstance());
|
||||
}
|
||||
if (_card.BattleCardView.BattleCardIconAnimations != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user