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.
57 lines
2.3 KiB
C#
57 lines
2.3 KiB
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Wizard.Battle.UI;
|
|
using Wizard.Battle.View.Vfx;
|
|
|
|
public class Skill_stack_white_ritual : SkillBase
|
|
{
|
|
public const int DEFAULT_WHITE_RITUAL_COUNT = 1;
|
|
|
|
protected int _addCount;
|
|
|
|
public int InitialWhiteRitualStack { get; private set; }
|
|
|
|
public Skill_stack_white_ritual(SkillParameter skillPrm, string option)
|
|
: base(skillPrm, option)
|
|
{
|
|
InitialWhiteRitualStack = base.OptionValue.GetInt(SkillFilterCreator.ContentKeyword.white_ritual_stack, 1);
|
|
}
|
|
|
|
protected List<BattleCardBase> GetStackTarget()
|
|
{
|
|
return base.SkillPrm.selfBattlePlayer.InPlayCards.Where((BattleCardBase c) => c != base.SkillPrm.ownerCard && c.IsTribe(CardBasePrm.TribeType.WHITE_RITUAL) && (c.IsField || c.IsChantField)).ToList();
|
|
}
|
|
|
|
public override VfxWithLoading Start(CallParameter parameter)
|
|
{
|
|
VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create();
|
|
ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create();
|
|
List<BattleCardBase> list = new List<BattleCardBase>();
|
|
_addCount = 0;
|
|
List<BattleCardBase> stackTarget = GetStackTarget();
|
|
for (int i = 0; i < stackTarget.Count(); i++)
|
|
{
|
|
BattleCardBase target = stackTarget[i];
|
|
parallelVfxPlayer.Register(target.SelfBattlePlayer.CardManagement(target, parameter.skillProcessor, BattlePlayerBase.CARD_MANAGEMENT.BANISH, base.UsedRandom));
|
|
if (base.SkillPrm.selfBattlePlayer.BanishList.Any((BattleCardBase c) => c == target))
|
|
{
|
|
_addCount += target.SkillApplyInformation.WhiteRitualCount;
|
|
list.Add(target);
|
|
}
|
|
}
|
|
base.SkillPrm.ownerCard.SkillApplyInformation.GiveWhiteRitualCount(_addCount);
|
|
vfxWithLoadingSequential.RegisterToMainVfx(parallelVfxPlayer);
|
|
vfxWithLoadingSequential.RegisterToMainVfx(new ChangeWhiteRitualCountVfx(base.SkillPrm.ownerCard, _addCount));
|
|
if (base.SkillPrm.ownerCard.HasStackWhiteRitualAndOtherIconSkill())
|
|
{
|
|
vfxWithLoadingSequential.RegisterToMainVfx(base.SkillPrm.ownerCard.BattleCardView.InitializeBattleCardIcon(base.SkillPrm.ownerCard, base.SkillPrm.ownerCard.Skills, _addCount != 0));
|
|
}
|
|
if (IsBattleLog)
|
|
{
|
|
BattleLogManager.GetInstance().AddLogSkillDeath(list, this);
|
|
BattleLogManager.GetInstance().AddLogGiveWhiteRitualStack(_addCount, base.SkillPrm.ownerCard, this);
|
|
}
|
|
return vfxWithLoadingSequential;
|
|
}
|
|
}
|