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.
43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
using System.Collections.Generic;
|
|
|
|
namespace Wizard;
|
|
|
|
public static class AITokenDrawUtility
|
|
{
|
|
public static void ExecuteTokenDraw(AIVirtualCard tagOwner, AISituationInfo situation, AIVirtualField field, List<AITokenInformation> tokenIds, bool isAlly)
|
|
{
|
|
List<AIVirtualCard> list = null;
|
|
for (int i = 0; i < tokenIds.Count; i++)
|
|
{
|
|
int tokenId = tokenIds[i].TokenId;
|
|
AIVirtualCard tokenFromId = field.AI.tokenManager.GetTokenFromId(tokenId, isAlly, field, needsClone: true);
|
|
if (tokenFromId == null)
|
|
{
|
|
AIConsoleUtility.LogError($"AITokenDrawUtility.ExecuteTokenDraw() error!! tokenCard:{tokenId} is null");
|
|
return;
|
|
}
|
|
if (isAlly)
|
|
{
|
|
if (field.AllyHandCards.Count < 9)
|
|
{
|
|
tokenFromId.InitAtDrawToken(tagOwner, situation);
|
|
list = AIParamQuery.AddElementToList(tokenFromId, list);
|
|
}
|
|
}
|
|
else if (field.GetEnemyHandCardList().Count < 9)
|
|
{
|
|
if (field.IsLatestActionField)
|
|
{
|
|
tokenFromId.InitAtDrawToken(tagOwner, situation);
|
|
}
|
|
else
|
|
{
|
|
new EnemyHandVirtualCard(tokenFromId.BaseCard, field).InitAtDrawToken(tagOwner, situation);
|
|
}
|
|
list = AIParamQuery.AddElementToList(tokenFromId, list);
|
|
}
|
|
}
|
|
situation.RegisterOwnDrewCardList(list);
|
|
}
|
|
}
|