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
1010 B
C#
53 lines
1010 B
C#
using System.Collections.Generic;
|
|
|
|
namespace Wizard;
|
|
|
|
public class AIDeckData
|
|
{
|
|
private Dictionary<int, AICardData> cardDic;
|
|
|
|
public Dictionary<int, AICardData> CardDic => cardDic;
|
|
|
|
public AIDeckData()
|
|
{
|
|
cardDic = new Dictionary<int, AICardData>();
|
|
}
|
|
|
|
public void Clear()
|
|
{
|
|
cardDic.Clear();
|
|
}
|
|
|
|
public bool RegisterCardData(AICardDataAsset asset, AICardData mergeData = null, bool isMergeDefaultParameter = false)
|
|
{
|
|
if (cardDic.ContainsKey(asset.CardID))
|
|
{
|
|
return false;
|
|
}
|
|
AICardData aICardData = new AICardData(asset);
|
|
if (mergeData != null)
|
|
{
|
|
if (isMergeDefaultParameter)
|
|
{
|
|
aICardData.MergeCardData(mergeData);
|
|
}
|
|
else
|
|
{
|
|
aICardData.MergeTagFromAnotherData(mergeData);
|
|
}
|
|
}
|
|
cardDic.Add(asset.CardID, aICardData);
|
|
return true;
|
|
}
|
|
|
|
public AICardData SearchCardData(int card_id)
|
|
{
|
|
AICardData value = null;
|
|
if (CardDic.TryGetValue(card_id, out value))
|
|
{
|
|
return value;
|
|
}
|
|
return null;
|
|
}
|
|
}
|