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:
85
SVSim.BattleEngine/Engine/Skill_spell_charge.cs
Normal file
85
SVSim.BattleEngine/Engine/Skill_spell_charge.cs
Normal file
@@ -0,0 +1,85 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Wizard;
|
||||
using Wizard.Battle.View.Vfx;
|
||||
|
||||
public class Skill_spell_charge : SkillBase
|
||||
{
|
||||
public static int SPELL_CHARGE_SUMMARY_COUNT = 10;
|
||||
|
||||
public static readonly float SPELL_CHARGE_INTERVAL = 0.3f;
|
||||
|
||||
public static readonly float SPELL_CHARGE_SUMMARY_INTERVAL = 0.4f;
|
||||
|
||||
protected List<BattleCardBase> _targetCards;
|
||||
|
||||
protected List<int> _addList;
|
||||
|
||||
public override bool IsTargetIndicate => false;
|
||||
|
||||
public int AddCount { get; private set; }
|
||||
|
||||
public int DiffAddCount { get; private set; }
|
||||
|
||||
public Skill_spell_charge(SkillParameter skillPrm, string option)
|
||||
: base(skillPrm, option)
|
||||
{
|
||||
}
|
||||
|
||||
public override VfxWithLoading Start(CallParameter parameter)
|
||||
{
|
||||
_targetCards = new List<BattleCardBase>();
|
||||
_addList = new List<int>();
|
||||
AddCount = GetAddBoostCount();
|
||||
DiffAddCount = GetDiffBoostCount();
|
||||
BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(base.SkillPrm.selfBattlePlayer, base.SkillPrm.opponentBattlePlayer);
|
||||
IEnumerable<BattleCardBase> enumerable = parameter.targetCards.Where((BattleCardBase s) => s.IsInHand || s.IsInDeck);
|
||||
if (enumerable.Count() == 0 || (AddCount == 0 && DiffAddCount == 0))
|
||||
{
|
||||
return NullVfxWithLoading.GetInstance();
|
||||
}
|
||||
ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create();
|
||||
foreach (BattleCardBase item in enumerable)
|
||||
{
|
||||
if (DiffAddCount > 0)
|
||||
{
|
||||
AddCount = DiffAddCount - item.SpellChargeCount;
|
||||
if (AddCount <= 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (item.HasSpellCharge)
|
||||
{
|
||||
_targetCards.Add(item);
|
||||
_addList.Add(AddCount);
|
||||
parameter.skillProcessor.Register(item.Skills.CreateWhenSpellChargeInfo(parameter.skillProcessor, playerInfoPair, AddCount));
|
||||
if ((item.IsPlayer || GameMgr.GetIns().IsAdminWatch) && !item.IsInDeck)
|
||||
{
|
||||
parallelVfxPlayer.Register(item.GetSpellChargeLoopEffect(AddCount));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
item.AddSpellChargeCount(AddCount);
|
||||
}
|
||||
}
|
||||
VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create();
|
||||
vfxWithLoadingSequential.RegisterVfxWithLoading(CreateSkillEffect(base.SkillPrm.resourceMgr, enumerable));
|
||||
vfxWithLoadingSequential.RegisterToMainVfx(parallelVfxPlayer);
|
||||
VfxWithLoadingSequential vfxWithLoadingSequential2 = base.SkillPrm.selfBattlePlayer.AddSpellChargeCountVfx(_targetCards, _addList);
|
||||
vfxWithLoadingSequential.RegisterToLoadingVfx(vfxWithLoadingSequential2.LoadingVfx);
|
||||
vfxWithLoadingSequential.RegisterToMainVfx(vfxWithLoadingSequential2.MainVfx);
|
||||
return vfxWithLoadingSequential;
|
||||
}
|
||||
|
||||
public int GetAddBoostCount()
|
||||
{
|
||||
return base.OptionValue.GetInt(SkillFilterCreator.ContentKeyword.add_charge, 0);
|
||||
}
|
||||
|
||||
public int GetDiffBoostCount()
|
||||
{
|
||||
return base.OptionValue.GetInt(SkillFilterCreator.ContentKeyword.diff_charge, 0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user