feat(battle-engine): full Unity/VFX/god-object shims + expanded copy closure (2570 files)
Authored Unity primitive/object-model shim, VFX layer (control-flow-preserving, InstantVfx never invokes its action -- headless suppression), god-object stubs (GameMgr/EffectMgr/UIManager with faithfully-extracted nested enums), View/UI/Touch tree, LitJson+BetterList+Tuple copied, third-party stubs. Discovered Roslyn header-error masking: fixing class-header type errors unmasks body references, so the true copy closure is ~2570 files (was 782 under masking). Errors: masked-25720 -> 268; our shim files compile clean. Remaining: ~50 residual shim/external types, 24 NGUI UI-base overrides, static-type fixes, plus likely 1-2 more unmask waves.
This commit is contained in:
50
SVSim.BattleEngine/Engine/Skill_trigger.cs
Normal file
50
SVSim.BattleEngine/Engine/Skill_trigger.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System.Collections.Generic;
|
||||
using Wizard.Battle.View.Vfx;
|
||||
|
||||
public class Skill_trigger : SkillBase
|
||||
{
|
||||
private readonly List<BattleCardBase> _targetList = new List<BattleCardBase>();
|
||||
|
||||
public override bool IsTargetIndicate => false;
|
||||
|
||||
public override bool IsInductionSkill => false;
|
||||
|
||||
public Skill_trigger(SkillParameter skillPrm, string option)
|
||||
: base(skillPrm, option)
|
||||
{
|
||||
}
|
||||
|
||||
public override VfxWithLoading Start(CallParameter parameter)
|
||||
{
|
||||
foreach (BattleCardBase targetCard in parameter.targetCards)
|
||||
{
|
||||
targetCard.SkillApplyInformation.GiveTriggerCount(parameter.skillProcessor);
|
||||
_targetList.Add(targetCard);
|
||||
SetOnLoseEvent(targetCard, null, null);
|
||||
}
|
||||
VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create();
|
||||
vfxWithLoadingSequential.RegisterVfxWithLoading(CreateSkillEffect(base.SkillPrm.resourceMgr, parameter.targetCards));
|
||||
vfxWithLoadingSequential.RegisterToMainVfx(base.SkillPrm.ownerCard.BattleCardView.InitializeBattleCardIcon(base.SkillPrm.ownerCard, base.SkillPrm.ownerCard.Skills));
|
||||
return vfxWithLoadingSequential;
|
||||
}
|
||||
|
||||
public override VfxWithLoading Stop(SkillProcessor skillProcessor)
|
||||
{
|
||||
foreach (BattleCardBase target in _targetList)
|
||||
{
|
||||
target.SkillApplyInformation.DepriveTriggerCount();
|
||||
}
|
||||
_targetList.Clear();
|
||||
return VfxWithLoading.Create(base.SkillPrm.ownerCard.BattleCardView.InitializeBattleCardIcon(base.SkillPrm.ownerCard, base.SkillPrm.ownerCard.Skills));
|
||||
}
|
||||
|
||||
public override void SetOnLoseEvent(BattleCardBase targetCard, BuffInfo buff, BuffInfoContainer container)
|
||||
{
|
||||
targetCard.OnLoseSkillOneTime += delegate(SkillBase loseSkill, SkillProcessor skillProcessor, BattleCardBase card)
|
||||
{
|
||||
card.SkillApplyInformation.ForceDepriveTriggerCount();
|
||||
_targetList.Remove(card);
|
||||
return (base.SkillPrm.ownerCard.BaseParameter.BaseCardId == 132141010) ? NullVfx.GetInstance() : base.SkillPrm.ownerCard.BattleCardView.InitializeBattleCardIcon(base.SkillPrm.ownerCard, base.SkillPrm.ownerCard.Skills);
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user