Files
SVSimServer/SVSim.BattleEngine/Engine/Wizard/AIHealRecorderCollection.cs
gamer147 0d9d8acae0 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.
2026-06-05 16:57:20 -04:00

75 lines
1.8 KiB
C#

using System.Collections.Generic;
namespace Wizard;
public class AIHealRecorderCollection
{
public class AIHealRecorder
{
public int TurnCount { get; private set; }
public AIVirtualCard Card { get; private set; }
public AIHealRecorder(int turnCount, AIVirtualCard healedCard)
{
TurnCount = turnCount;
Card = healedCard;
}
}
public List<AIHealRecorder> AllyHealRecorderList { get; private set; }
public List<AIHealRecorder> EnemyHealRecorderList { get; private set; }
public AIHealRecorderCollection()
{
AllyHealRecorderList = new List<AIHealRecorder>();
EnemyHealRecorderList = new List<AIHealRecorder>();
}
private AIHealRecorderCollection(AIHealRecorderCollection original)
{
AllyHealRecorderList = new List<AIHealRecorder>(original.AllyHealRecorderList);
EnemyHealRecorderList = new List<AIHealRecorder>(original.EnemyHealRecorderList);
}
public AIHealRecorderCollection Clone()
{
return new AIHealRecorderCollection(this);
}
public int GetTurnHealCount(int turn, List<AIVirtualCard> checkTargets, bool isAlly)
{
List<AIHealRecorder> list = (isAlly ? AllyHealRecorderList : EnemyHealRecorderList);
int num = 0;
for (int i = 0; i < list.Count; i++)
{
AIHealRecorder aIHealRecorder = list[i];
if (aIHealRecorder.TurnCount != turn)
{
continue;
}
for (int j = 0; j < checkTargets.Count; j++)
{
if (aIHealRecorder.Card.IsSameCard(checkTargets[j]))
{
num++;
break;
}
}
}
return num;
}
public void AppendHealCount(int turn, AIVirtualCard healedCard, bool isAlly)
{
(isAlly ? AllyHealRecorderList : EnemyHealRecorderList).Add(new AIHealRecorder(turn, healedCard));
}
public void Clear()
{
AllyHealRecorderList.Clear();
EnemyHealRecorderList.Clear();
}
}