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:
55
SVSim.BattleEngine/Engine/Skill_draw.cs
Normal file
55
SVSim.BattleEngine/Engine/Skill_draw.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Wizard.Battle.UI;
|
||||
using Wizard.Battle.View.Vfx;
|
||||
|
||||
public class Skill_draw : SkillBase
|
||||
{
|
||||
private const string CARD_OPEN_TRUE = "true";
|
||||
|
||||
private bool _isActiveChangeShortageDeck;
|
||||
|
||||
public override bool IsAllowDestroyTarget => true;
|
||||
|
||||
public override bool IsVisibleTarget { get; protected set; }
|
||||
|
||||
public bool IsActiveChangeShortageDeck => _isActiveChangeShortageDeck;
|
||||
|
||||
public Skill_draw(SkillParameter skillPrm, string option)
|
||||
: base(skillPrm, option)
|
||||
{
|
||||
}
|
||||
|
||||
public override VfxWithLoading Start(CallParameter parameter)
|
||||
{
|
||||
_isActiveChangeShortageDeck = false;
|
||||
List<BattleCardBase> list = parameter.targetCards.ToList();
|
||||
IsVisibleTarget = base.OptionValue.GetString(SkillFilterCreator.ContentKeyword.is_open, string.Empty) == "true";
|
||||
BattlePlayerBase battlePlayerBase = ((!(base.ApplyBattlePlayerFilter is SelfBattlePlayerFilter)) ? base.SkillPrm.opponentBattlePlayer : base.SkillPrm.selfBattlePlayer);
|
||||
bool isPlayer = battlePlayerBase.IsPlayer;
|
||||
bool flag = false;
|
||||
flag = base.ApplyCardFilterList.Where((ISkillCardFilter f) => f.GetType() != typeof(SkillNullFilter) && f.GetType() != typeof(SkillAllCardFilter)).Count() < 1 && battlePlayerBase.CheckShortageDeck(base.ApplySelectFilter.CalcCount(base.OptionValue), parameter.skillProcessor, out _isActiveChangeShortageDeck);
|
||||
SkillProcessor skillProcessor = parameter.skillProcessor;
|
||||
bool isVisibleTarget = IsVisibleTarget;
|
||||
SkillResultInfo calledSkillResultInfo = parameter.calledSkillResultInfo;
|
||||
VfxWith<IEnumerable<BattleCardBase>> vfxWith = battlePlayerBase.DrawManagement(list, skillProcessor, isVisibleTarget, flag, calledSkillResultInfo, this);
|
||||
if (vfxWith.Value.Count() <= 0 && !flag)
|
||||
{
|
||||
return NullVfxWithLoading.GetInstance();
|
||||
}
|
||||
List<BattleCardBase> list2 = list.Where((BattleCardBase s) => s.IsInHand).ToList();
|
||||
for (int num = 0; num < list2.Count(); num++)
|
||||
{
|
||||
base.SkillPrm.ownerCard.SkillApplyInformation.AddSkillDrewCard(list2.ElementAt(num));
|
||||
BattleLogManager.GetInstance().UpdateFusionedCardSkillDrewCard(base.SkillPrm.ownerCard);
|
||||
}
|
||||
if (IsBattleLog)
|
||||
{
|
||||
BattleLogManager.GetInstance().AddLogSkillDrawCard(list2, this, IsVisibleTarget, isPlayer, isOverDraw: false);
|
||||
BattleLogManager.GetInstance().AddLogSkillDrawCard(list.Where((BattleCardBase s) => !s.IsInHand).ToList(), this, IsVisibleTarget, isPlayer, isOverDraw: true);
|
||||
}
|
||||
VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create();
|
||||
vfxWithLoadingSequential.RegisterToMainVfx(vfxWith.Vfx);
|
||||
return vfxWithLoadingSequential;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user