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:
52
SVSim.BattleEngine/Engine/Wizard/AIDeckData.cs
Normal file
52
SVSim.BattleEngine/Engine/Wizard/AIDeckData.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user