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.6 KiB
C#
68 lines
2.6 KiB
C#
using System.Collections.Generic;
|
|
|
|
namespace Wizard;
|
|
|
|
public class AIWhenPlaySummonToken : AIWhenPlayTokenArgumentBase
|
|
{
|
|
protected override bool _isSelectCountImplemented => true;
|
|
|
|
protected override int SELECT_COUNT_OFFSET => 2;
|
|
|
|
protected override int SELECT_TYPE_OFFSET => 3;
|
|
|
|
public AIWhenPlaySummonToken(string text)
|
|
: base(text, AITokenType.Default)
|
|
{
|
|
}
|
|
|
|
protected override AITokenIdCollection GetBothSideTokenIdCollectionFromTag(AIVirtualCard tagOwner, AIVirtualField field, List<int> playPtn, AISituationInfo situation)
|
|
{
|
|
List<AIVirtualCard> targetsFromField = GetTargetsFromField(tagOwner, field, playPtn, situation, isBlockDead: false);
|
|
int selectCount = GetSelectCount(tagOwner, field, playPtn, situation);
|
|
return AISummonTokenUtility.GetBothSideTokenIdListFromFilter(tagOwner, field, targetsFromField, base.Filters, AITokenType.Default, SideType, base.SelectType, selectCount, playPtn, situation);
|
|
}
|
|
|
|
public override List<AITokenInformation> GetAllyTokenIdList(AIVirtualCard tagOwner, AIVirtualField field, List<int> playPtn, AISituationInfo situation)
|
|
{
|
|
AITokenIdCollection bothSideTokenIdCollection = GetBothSideTokenIdCollection(tagOwner, field, playPtn, situation);
|
|
if (bothSideTokenIdCollection == null || !bothSideTokenIdCollection.HasAllyToken)
|
|
{
|
|
return null;
|
|
}
|
|
return bothSideTokenIdCollection.AllyTokenIdList;
|
|
}
|
|
|
|
protected override void InitializeSelectCount()
|
|
{
|
|
int num = (_expectedSelectCountArgOffset = SELECT_COUNT_OFFSET - _ommittedIndexOffset);
|
|
AIPolishConvertedExpression aIPolishConvertedExpression = _exprList[_exprList.Count - num];
|
|
if (aIPolishConvertedExpression.IsMathematicExpress())
|
|
{
|
|
_selectCount = aIPolishConvertedExpression;
|
|
return;
|
|
}
|
|
AIConsoleUtility.LogError("AIWhenPlaySummonToken.InitializeSelectCount error!! Cannot find _selectCount from argument expression!!!!!");
|
|
_ommittedIndexOffset++;
|
|
}
|
|
|
|
protected override void InitSelectType()
|
|
{
|
|
int num = SELECT_TYPE_OFFSET - _ommittedIndexOffset;
|
|
if (AIPlayTagInitializingUtility.TryCreateSelectType(_exprList[_exprList.Count - num], base.LegalSelectTypes, out var selectType))
|
|
{
|
|
base.SelectType = selectType;
|
|
}
|
|
else
|
|
{
|
|
_ommittedIndexOffset++;
|
|
base.SelectType = AIScriptTokenArgType.ALL_SELECT;
|
|
}
|
|
_realNonFilterFirstOffset = SELECT_TYPE_OFFSET - _ommittedIndexOffset;
|
|
}
|
|
|
|
public override List<AIVirtualCard> GetTargetsFromField(AIVirtualCard owner, AIVirtualField field, List<int> playPtn, AISituationInfo situation, bool isBlockDead = true)
|
|
{
|
|
return GetCandidateRange(field);
|
|
}
|
|
}
|