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.
69 lines
3.1 KiB
C#
69 lines
3.1 KiB
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Wizard;
|
|
using Wizard.Battle.UI;
|
|
using Wizard.Battle.View.Vfx;
|
|
|
|
public class Skill_heal : SkillBase
|
|
{
|
|
private const int NONE_AMOUNT = -1;
|
|
|
|
protected List<BattleCardBase.HealResult> HealResultList = new List<BattleCardBase.HealResult>();
|
|
|
|
public Skill_heal(SkillParameter skillPrm, string option)
|
|
: base(skillPrm, option)
|
|
{
|
|
}
|
|
|
|
public override VfxWithLoading Start(CallParameter parameter)
|
|
{
|
|
int num = base.OptionValue.GetInt(SkillFilterCreator.ContentKeyword.healing, 0);
|
|
List<BattleCardBase.HealResult> list = new List<BattleCardBase.HealResult>();
|
|
List<BattleCardBase> list2 = new List<BattleCardBase>();
|
|
if (num == -1)
|
|
{
|
|
return NullVfxWithLoading.GetInstance();
|
|
}
|
|
for (int i = 0; i < parameter.targetCards.Count(); i++)
|
|
{
|
|
BattleCardBase battleCardBase = parameter.targetCards.ElementAt(i);
|
|
battleCardBase.SelfBattlePlayer.HealingCards.Add(battleCardBase);
|
|
list2.Add(battleCardBase.VirtualClone(battleCardBase.SelfBattlePlayer, battleCardBase.OpponentBattlePlayer));
|
|
BattleCardBase.HealParam healParam = new BattleCardBase.HealParam(num, base.SkillPrm.ownerCard, battleCardBase);
|
|
BattleCardBase.HealResult item = battleCardBase.ApplyHealing(healParam, parameter.skillProcessor);
|
|
list.Add(item);
|
|
}
|
|
RegisterHealTriggerSkill(parameter.skillProcessor, parameter.targetCards, list);
|
|
HealResultList = list;
|
|
VfxWithLoading vfxWithLoading = CreateSkillEffect(base.SkillPrm.resourceMgr, parameter.targetCards);
|
|
ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create();
|
|
ParallelVfxPlayer parallelVfxPlayer2 = ParallelVfxPlayer.Create();
|
|
ParallelVfxPlayer parallelVfxPlayer3 = ParallelVfxPlayer.Create();
|
|
foreach (BattleCardBase.HealResult item2 in list)
|
|
{
|
|
parallelVfxPlayer.Register(item2.PrehealVfxVfx);
|
|
parallelVfxPlayer2.Register(item2.HealVfx);
|
|
parallelVfxPlayer3.Register(item2.PosthealVfxVfx);
|
|
base.SkillPrm.ownerCard.SkillApplyInformation.AddSkillHealValue(item2.HealAmount);
|
|
}
|
|
if (IsBattleLog)
|
|
{
|
|
BattleLogManager.GetInstance().AddLogSkillHeal(list2, list, this);
|
|
}
|
|
VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create(parallelVfxPlayer, vfxWithLoading.MainVfx, parallelVfxPlayer2, parallelVfxPlayer3);
|
|
vfxWithLoadingSequential.RegisterToLoadingVfx(vfxWithLoading.LoadingVfx);
|
|
return vfxWithLoadingSequential;
|
|
}
|
|
|
|
private void RegisterHealTriggerSkill(SkillProcessor skillProcessor, IEnumerable<BattleCardBase> target, List<BattleCardBase.HealResult> healResult)
|
|
{
|
|
for (int i = 0; i < target.Count(); i++)
|
|
{
|
|
BattleCardBase battleCardBase = target.ElementAt(i);
|
|
BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(battleCardBase.SelfBattlePlayer, battleCardBase.OpponentBattlePlayer);
|
|
skillProcessor.Register(battleCardBase.Skills.CreateWhenHealing(battleCardBase, skillProcessor, playerInfoPair, healResult[i].HealAmount));
|
|
}
|
|
base.SkillPrm.selfBattlePlayer.StartSkillWhenHealingSelfAndOther(target.ToList(), skillProcessor, healResult.Select((BattleCardBase.HealResult h) => h.HealAmount).ToList());
|
|
}
|
|
}
|