Compile-driven bulk-copy loop (tools/engine-port/m1_copy_loop.py) pulled the precise reference closure of the battle-core roots, stopping at the classify god-object/View-VFX-UI boundary. 782 files; no re-explosion (M0 had estimated ~order 1000). Residual frontier = 52 shim-classified + 80 external (Unity/BCL) types to author next.
53 lines
1.2 KiB
C#
53 lines
1.2 KiB
C#
using System.Collections.Generic;
|
|
|
|
namespace Wizard;
|
|
|
|
public class AICannotAttackInformation
|
|
{
|
|
private List<AIScriptTokenBase> _filters;
|
|
|
|
public AICannotAttackInformation(List<AIScriptTokenBase> filters)
|
|
{
|
|
_filters = filters;
|
|
}
|
|
|
|
public bool IsEqual(AICannotAttackInformation info)
|
|
{
|
|
return IsSameFilterList(info._filters);
|
|
}
|
|
|
|
private bool IsSameFilterList(List<AIScriptTokenBase> compare)
|
|
{
|
|
if (_filters == null || _filters.Count <= 0)
|
|
{
|
|
if (compare != null)
|
|
{
|
|
return compare.Count <= 0;
|
|
}
|
|
return true;
|
|
}
|
|
if (_filters.Count != compare.Count)
|
|
{
|
|
return false;
|
|
}
|
|
for (int i = 0; i < _filters.Count; i++)
|
|
{
|
|
if (!_filters[i].IsEqual(compare[i]))
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
public bool IsCannotAttack(AIVirtualField field, AIVirtualAttackInfo situation)
|
|
{
|
|
if (situation.ActionType != AIOperationType.ATTACK)
|
|
{
|
|
return true;
|
|
}
|
|
List<AIVirtualCard> candidates = (situation.Actor.IsAlly ? field.CardListSet.EnemyClassAndInplayCards : field.CardListSet.AllyClassAndInplayCards);
|
|
return AIFilteringUtility.CheckMatchTargetFiltering(situation.AttackTarget, candidates, _filters, field.BestPlayPtn, situation.Actor, situation);
|
|
}
|
|
}
|