feat(battle-engine): close the AI-simulation subsystem (verbatim)
Copied the 89 uncopied AI*SimulationUtility/extension files defining the AIVirtualCard/AIVirtualField extension methods; the compile loop then auto-closed the revealed type deps (~3049 files total, drift-clean). 10.0k -> 62 errors.
This commit is contained in:
47
SVSim.BattleEngine/Engine/Wizard/AIPlayReanimate.cs
Normal file
47
SVSim.BattleEngine/Engine/Wizard/AIPlayReanimate.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class AIPlayReanimate : AIScriptArgumentExpressions
|
||||
{
|
||||
private AIPolishConvertedExpression _reanimateCostArg;
|
||||
|
||||
private AIPolishConvertedExpression _reanimateCountArg;
|
||||
|
||||
private const int REANIMATE_COST_INDEX = 0;
|
||||
|
||||
private const int REANIMATE_COUNT_INDEX = 1;
|
||||
|
||||
public AIPlayReanimate(string text)
|
||||
: base(text)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void InitExpressions(string text)
|
||||
{
|
||||
base.InitExpressions(text);
|
||||
if (_exprList.Count > 1)
|
||||
{
|
||||
_reanimateCostArg = _exprList[0];
|
||||
_reanimateCountArg = _exprList[1];
|
||||
}
|
||||
}
|
||||
|
||||
public int GetReanimateCost(AIVirtualCard tagOwner, List<int> playPtn)
|
||||
{
|
||||
if (_reanimateCostArg == null)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return (int)_reanimateCostArg.EvalArg(tagOwner, playPtn, tagOwner.SelfField);
|
||||
}
|
||||
|
||||
public int GetReanimateCount(AIVirtualCard tagOwner, List<int> playPtn)
|
||||
{
|
||||
if (_reanimateCountArg == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return (int)_reanimateCountArg.EvalArg(tagOwner, playPtn, tagOwner.SelfField);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user