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:
57
SVSim.BattleEngine/Engine/Skill_special_lose.cs
Normal file
57
SVSim.BattleEngine/Engine/Skill_special_lose.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
using System.Collections.Generic;
|
||||
using Wizard;
|
||||
using Wizard.Battle.View.Vfx;
|
||||
|
||||
public class Skill_special_lose : SkillBase
|
||||
{
|
||||
protected const string OPTION_TRUE = "true";
|
||||
|
||||
private const string OPTION_WHEN_SPECIAL_LOSE = "when_special_lose";
|
||||
|
||||
public Skill_special_lose(SkillParameter skillPrm, string option)
|
||||
: base(skillPrm, option)
|
||||
{
|
||||
}
|
||||
|
||||
public override VfxWithLoading Start(CallParameter parameter)
|
||||
{
|
||||
if (BattleManagerBase.IsForecast)
|
||||
{
|
||||
return NullVfxWithLoading.GetInstance();
|
||||
}
|
||||
SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create();
|
||||
IEnumerable<BattleCardBase> targetCards = parameter.targetCards;
|
||||
bool flag = base.OptionValue.GetString(SkillFilterCreator.ContentKeyword.ignore_vibration, "_OPT_NULL_") == "true";
|
||||
bool flag2 = base.OptionValue.GetString(SkillFilterCreator.ContentKeyword.invalid_ability, "_OPT_NULL_") == "when_special_lose";
|
||||
foreach (BattleCardBase targetCard in parameter.targetCards)
|
||||
{
|
||||
BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(targetCard.SelfBattlePlayer, targetCard.OpponentBattlePlayer);
|
||||
SkillProcessor.ProcessInfo processInfo = targetCard.SelfBattlePlayer.Class.Skills.CreateWhenSpecialLose(parameter.skillProcessor, playerInfoPair);
|
||||
if (processInfo != null && !flag2)
|
||||
{
|
||||
parameter.skillProcessor.Register(processInfo);
|
||||
continue;
|
||||
}
|
||||
targetCard.SelfBattlePlayer.Class.FlagCardAsDestroyedBySkill();
|
||||
sequentialVfxPlayer.Register(targetCard.OpponentBattlePlayer.BattleMgr.PlaySpecialWin(targetCard.OpponentBattlePlayer));
|
||||
}
|
||||
List<BattleCardBase> list = new List<BattleCardBase>();
|
||||
foreach (BattleCardBase item in targetCards)
|
||||
{
|
||||
list.Add(item.SelfBattlePlayer.Class);
|
||||
}
|
||||
VfxWithLoading vfxWithLoading = CreateSkillEffect(base.SkillPrm.resourceMgr, list);
|
||||
VfxBase vfx = SequentialVfxPlayer.Create(WaitVfx.Create(base.SkillPrm.buildInfo._effectTime), InstantVfx.Create(delegate
|
||||
{
|
||||
Skill_special_win.ShakeScreen();
|
||||
}));
|
||||
SetInductionVoiceIndex(isSpecialWin: true);
|
||||
ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(vfxWithLoading.MainVfx, CreateSkillActivationVoiceVfx());
|
||||
if (!flag)
|
||||
{
|
||||
parallelVfxPlayer.Register(vfx);
|
||||
}
|
||||
VfxBase mainVfx = SequentialVfxPlayer.Create(parallelVfxPlayer, sequentialVfxPlayer);
|
||||
return VfxWithLoading.Create(vfxWithLoading.LoadingVfx, mainVfx);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user