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
2.0 KiB
C#
53 lines
2.0 KiB
C#
using System.Collections.Generic;
|
|
|
|
namespace Wizard;
|
|
|
|
public class AIHandPlayEstimator
|
|
{
|
|
public List<AIVirtualCard> InplayEstimations { get; private set; }
|
|
|
|
public AIHandPlayEstimator(AIParamQuery paramQuery, int handIndex, AIVirtualCard handOriginal, BattlePlayerPair sourcePair, EnemyAI ai)
|
|
{
|
|
BattleCardBase baseCard = handOriginal.BaseCard;
|
|
int num = ai.CurrentVirtualField.AllyInplayCards.Count;
|
|
if (baseCard.IsUnit || baseCard.IsField)
|
|
{
|
|
num++;
|
|
}
|
|
List<int> playPtn = new List<int> { handOriginal.SelfField.AllyHandCards.FindIndex((AIVirtualCard c) => c.CardIndex == handOriginal.CardIndex) };
|
|
AISinglePlayptnRecord playptnRecord = ai.PlayPtnRecorder.FindMatchedPlayPtnRecord(playPtn, ai.CurrentVirtualField);
|
|
AIVirtualCard aIVirtualCard = handOriginal.FindRealActor(playptnRecord);
|
|
if (!aIVirtualCard.IsSameCard(handOriginal))
|
|
{
|
|
ai.tokenManager.AddTokenFromCard(aIVirtualCard);
|
|
}
|
|
AIVirtualTargetSelectAction situation = new AIVirtualTargetSelectAction(aIVirtualCard, handOriginal, AIOperationType.PLAY);
|
|
if (aIVirtualCard.BaseCard.Movable())
|
|
{
|
|
List<AITokenInformation> allySideTokenIdsOfPlaySituation = AIPlayTokenSimulationUtility.GetAllySideTokenIdsOfPlaySituation(ai.CurrentVirtualField, new List<int> { handOriginal.SelfField.AllyHandCards.FindIndex((AIVirtualCard c) => c.CardIndex == handOriginal.CardIndex) }, situation);
|
|
if (allySideTokenIdsOfPlaySituation == null || allySideTokenIdsOfPlaySituation.Count <= 0)
|
|
{
|
|
return;
|
|
}
|
|
for (int num2 = 0; num2 < allySideTokenIdsOfPlaySituation.Count; num2++)
|
|
{
|
|
AIVirtualCard tokenFromId = ai.tokenManager.GetTokenFromId(allySideTokenIdsOfPlaySituation[num2].TokenId, isAlly: true, ai.CurrentVirtualField, needsClone: true);
|
|
if (InplayEstimations == null)
|
|
{
|
|
InplayEstimations = new List<AIVirtualCard>();
|
|
}
|
|
InplayEstimations.Add(tokenFromId);
|
|
num++;
|
|
if (num >= 6)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
InplayEstimations = null;
|
|
}
|
|
}
|
|
}
|