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:
@@ -0,0 +1,46 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class PlaySkipWithEvoInformation : PlaySkipInformation
|
||||
{
|
||||
private List<AIVirtualCard> _evolutionPermittedCards;
|
||||
|
||||
public bool HasEvolutionPermittedCards
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_evolutionPermittedCards != null)
|
||||
{
|
||||
return _evolutionPermittedCards.Any();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public PlaySkipWithEvoInformation()
|
||||
{
|
||||
TagType = AIPlayTagType.PlaySkipWithEvo;
|
||||
base.IsEvolutionPermittedTag = true;
|
||||
_evolutionPermittedCards = null;
|
||||
}
|
||||
|
||||
public override bool IsEvoCardLegal(AIVirtualCard evoCard)
|
||||
{
|
||||
if (evoCard == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (HasEvolutionPermittedCards)
|
||||
{
|
||||
return _evolutionPermittedCards.Any((AIVirtualCard c) => c.IsSameCard(evoCard));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void AddEvolutionPermittedCards(List<AIVirtualCard> cards)
|
||||
{
|
||||
_evolutionPermittedCards = AIParamQuery.AddRangeToList(cards, _evolutionPermittedCards);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user