Copied the 89 uncopied AI*SimulationUtility/extension files defining the AIVirtualCard/AIVirtualField extension methods; the compile loop then auto-closed the revealed type deps (~3049 files total, drift-clean). 10.0k -> 62 errors.
37 lines
938 B
C#
37 lines
938 B
C#
using System.Collections.Generic;
|
|
|
|
namespace Wizard;
|
|
|
|
public static class AIRallySimulationUtility
|
|
{
|
|
public static void ExecuteAppendRallyCount(AIVirtualField field, AIVirtualCard summonCard)
|
|
{
|
|
if (summonCard != null && CanAppendRallyCount(field, summonCard))
|
|
{
|
|
field.AddRallyCount(1, summonCard.IsAlly);
|
|
}
|
|
}
|
|
|
|
public static bool CanAppendRallyCount(AIVirtualField field, AIVirtualCard summonCard)
|
|
{
|
|
if (summonCard.IsUnit)
|
|
{
|
|
return true;
|
|
}
|
|
List<AIVirtualCard> tagHolders = field.CardListSet.GetTagHolders(CardListsForReference.TagHolderReferenceType.RallyCountPlus);
|
|
if (tagHolders == null)
|
|
{
|
|
return false;
|
|
}
|
|
for (int i = 0; i < tagHolders.Count; i++)
|
|
{
|
|
AIVirtualCard aIVirtualCard = tagHolders[i];
|
|
if (aIVirtualCard.TagCollectionContainer.RallyCountPlusTags.CanAppendRallyCount(aIVirtualCard, summonCard))
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
}
|