feat(battle-engine): M1 auto-copy closure (782 battle-logic files)
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.
This commit is contained in:
53
SVSim.BattleEngine/Engine/Wizard/AICannotPlayInformation.cs
Normal file
53
SVSim.BattleEngine/Engine/Wizard/AICannotPlayInformation.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class AICannotPlayInformation
|
||||
{
|
||||
public AIVirtualCard Owner;
|
||||
|
||||
public List<AIScriptTokenBase> Filters;
|
||||
|
||||
public AICannotPlayInformation(AIVirtualCard owner, List<AIScriptTokenBase> filters)
|
||||
{
|
||||
Owner = owner;
|
||||
Filters = filters;
|
||||
}
|
||||
|
||||
public bool IsEqual(AIVirtualCard card, List<AIScriptTokenBase> filters)
|
||||
{
|
||||
if (!Owner.IsSameCard(card))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!IsSameFilterList(filters))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user