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.
37 lines
1.3 KiB
C#
37 lines
1.3 KiB
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Wizard.Battle;
|
|
|
|
public class SkillParameterSelectRemainActionCountFromSelfFilter : ISkillParameterSelectFilter
|
|
{
|
|
private IReadOnlyBattleCardInfo _originOwnerCard;
|
|
|
|
public SkillParameterSelectRemainActionCountFromSelfFilter(IReadOnlyBattleCardInfo card)
|
|
{
|
|
_originOwnerCard = card;
|
|
}
|
|
|
|
public IEnumerable<int> Filtering(IEnumerable<IReadOnlyBattleCardInfo> cardInfos, SkillConditionCheckerOption checkerOption)
|
|
{
|
|
List<int> list = new List<int>();
|
|
if (_originOwnerCard != null)
|
|
{
|
|
for (int i = 0; i < cardInfos.Count(); i++)
|
|
{
|
|
BattleCardBase card = cardInfos.ElementAt(i) as BattleCardBase;
|
|
IEnumerable<SkillPreprocessBase> source = card.Skills.Where((SkillBase s) => _originOwnerCard.EquelsID((!s.IsAttachedSkill || s.GetAttachSkill == null) ? card : s.GetAttachSkill.SkillPrm.ownerCard)).SelectMany((SkillBase s) => s.PreprocessList.Where((SkillPreprocessBase p) => p is SkillPreprocessRemoveAfterAction));
|
|
for (int num = 0; num < source.Count(); num++)
|
|
{
|
|
SkillPreprocessRemoveAfterAction skillPreprocessRemoveAfterAction = source.ElementAt(num) as SkillPreprocessRemoveAfterAction;
|
|
list.Add(skillPreprocessRemoveAfterAction.Count);
|
|
}
|
|
}
|
|
}
|
|
if (list.Count == 0)
|
|
{
|
|
list.Add(0);
|
|
}
|
|
return list;
|
|
}
|
|
}
|