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.
68 lines
2.3 KiB
C#
68 lines
2.3 KiB
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Wizard.Battle.UI;
|
|
using Wizard.Battle.View.Vfx;
|
|
|
|
public class Skill_token_draw_modifier : SkillBase
|
|
{
|
|
private List<TokenDrawModifier> _tokenDrawModifierList;
|
|
|
|
public Skill_token_draw_modifier(SkillParameter skillPrm, string option)
|
|
: base(skillPrm, option)
|
|
{
|
|
}
|
|
|
|
public override VfxWithLoading Start(CallParameter parameter)
|
|
{
|
|
_tokenDrawModifierList = CreateTokenDrawModifierList();
|
|
List<BattleCardBase> list = parameter.targetCards.ToList();
|
|
for (int i = 0; i < parameter.targetCards.Count(); i++)
|
|
{
|
|
BuffInfo buffInfo = AddBuffInfoIfNeeded(list[i]);
|
|
for (int j = 0; j < _tokenDrawModifierList.Count; j++)
|
|
{
|
|
list[i].SkillApplyInformation.AddTokenDrawModifier(_tokenDrawModifierList[j]);
|
|
}
|
|
buffInfoContainer.Add(new BuffInfoContainer(list[i], buffInfo, -1, "", null, 0L));
|
|
}
|
|
VfxWithLoading result = CreateSkillEffect(base.SkillPrm.resourceMgr, parameter.targetCards);
|
|
if (IsBattleLog)
|
|
{
|
|
BattleLogManager.GetInstance().AddTokenDrawModifier(list, this);
|
|
}
|
|
SetOnLoseEvent(base.SkillPrm.ownerCard, null, null);
|
|
return result;
|
|
}
|
|
|
|
private List<TokenDrawModifier> CreateTokenDrawModifierList()
|
|
{
|
|
string[] array = base.OptionValue.GetString(SkillFilterCreator.ContentKeyword.card_id).Split(':');
|
|
int multiplyCount = int.Parse(base.OptionValue.GetString(SkillFilterCreator.ContentKeyword.multiply_count));
|
|
List<TokenDrawModifier> list = new List<TokenDrawModifier>();
|
|
for (int i = 0; i < array.Count(); i++)
|
|
{
|
|
list.Add(new TokenDrawModifier(int.Parse(array[i]), multiplyCount));
|
|
}
|
|
return list;
|
|
}
|
|
|
|
public override VfxWithLoading Stop(SkillProcessor skillProcessor)
|
|
{
|
|
for (int i = 0; i < buffInfoContainer.Count; i++)
|
|
{
|
|
for (int j = 0; j < _tokenDrawModifierList.Count; j++)
|
|
{
|
|
buffInfoContainer[i]._targetCard.SkillApplyInformation.RemoveTokenDrawModifier(_tokenDrawModifierList[j]);
|
|
buffInfoContainer[i]._targetCard.RemoveBuffInfo(buffInfoContainer[i]._buffInfo);
|
|
}
|
|
}
|
|
buffInfoContainer.Clear();
|
|
return base.Stop(skillProcessor);
|
|
}
|
|
|
|
public override void SetOnLoseEvent(BattleCardBase targetCard, BuffInfo buff, BuffInfoContainer container)
|
|
{
|
|
targetCard.OnLoseSkillOneTime += (SkillBase loseSkill, SkillProcessor skillProcessor, BattleCardBase card) => Stop(skillProcessor);
|
|
}
|
|
}
|