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.
83 lines
2.8 KiB
C#
83 lines
2.8 KiB
C#
using System.Linq;
|
|
using Wizard.Battle.UI;
|
|
using Wizard.Battle.View.Vfx;
|
|
|
|
public class Skill_consume_ep_modifier : SkillBase
|
|
{
|
|
private string _tribe = string.Empty;
|
|
|
|
private string _option = string.Empty;
|
|
|
|
public Skill_consume_ep_modifier(SkillParameter skillPrm, string option)
|
|
: base(skillPrm, option)
|
|
{
|
|
_option = option;
|
|
}
|
|
|
|
public override VfxWithLoading Start(CallParameter parameter)
|
|
{
|
|
if (_option == "none")
|
|
{
|
|
foreach (BattleCardBase targetCard in parameter.targetCards)
|
|
{
|
|
SetupNotConsumeTarget(targetCard, targetCard, null);
|
|
}
|
|
if (IsBattleLog)
|
|
{
|
|
BattleLogManager.GetInstance().AddLogSkillGain(parameter.targetCards.ToList(), this, SkillGainType.DontConsumeEp);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
_tribe = base.OptionValue.GetString(SkillFilterCreator.ContentKeyword.tribe, "ALL");
|
|
ValueWithOperator valueWithOperator = base.OptionValue.GetValueWithOperator(SkillFilterCreator.ContentKeyword.base_card_id);
|
|
foreach (BattleCardBase targetCard2 in parameter.targetCards)
|
|
{
|
|
SetupNotConsumeTarget(targetCard2, null, valueWithOperator);
|
|
}
|
|
}
|
|
VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create();
|
|
vfxWithLoadingSequential.RegisterVfxWithLoading(CreateSkillEffect(base.SkillPrm.resourceMgr, parameter.targetCards));
|
|
return vfxWithLoadingSequential;
|
|
}
|
|
|
|
private void SetupNotConsumeTarget(BattleCardBase targetCard, BattleCardBase notConsumeCard, ValueWithOperator cardId)
|
|
{
|
|
NotConsumeEpModifierInfo notConsumeEpModifierInfo = new NotConsumeEpModifierInfo(_tribe, targetCard, this, notConsumeCard, cardId);
|
|
BuffInfoContainer buffInfoContainer = new BuffInfoContainer(targetCard, null, -1, "", null, 0L, notConsumeEpModifierInfo);
|
|
base.buffInfoContainer.Add(buffInfoContainer);
|
|
targetCard.SkillApplyInformation.GiveNotConsumeEpModifier(notConsumeEpModifierInfo);
|
|
SetOnLoseEvent(targetCard, null, buffInfoContainer);
|
|
if (!targetCard.IsClass && IsBattleLog)
|
|
{
|
|
AddBuffInfoIfNeeded(targetCard);
|
|
}
|
|
}
|
|
|
|
public override VfxWithLoading Stop(SkillProcessor skillProcessor)
|
|
{
|
|
base.Stop(skillProcessor);
|
|
foreach (BuffInfoContainer item in buffInfoContainer)
|
|
{
|
|
item._targetCard.SkillApplyInformation.DepriveNotConsumeEpModifier(item._notConsumeEpModifierInfo);
|
|
}
|
|
buffInfoContainer.Clear();
|
|
return NullVfxWithLoading.GetInstance();
|
|
}
|
|
|
|
private void ClearParameterModifier(BuffInfoContainer info)
|
|
{
|
|
info._targetCard.SkillApplyInformation.ForceDepriveNotConsumeEpModifier();
|
|
}
|
|
|
|
public override void SetOnLoseEvent(BattleCardBase targetCard, BuffInfo buff, BuffInfoContainer container)
|
|
{
|
|
targetCard.OnLoseSkillOneTime += delegate
|
|
{
|
|
ClearParameterModifier(container);
|
|
buffInfoContainer.Remove(container);
|
|
return NullVfx.GetInstance();
|
|
};
|
|
}
|
|
}
|