Commit 38a5d5ab authored by jwyxym's avatar jwyxym Committed by GitHub

Update AutoChessExecutor.cs

parent b9911733
......@@ -142,6 +142,8 @@ namespace WindBot.Game.AI.Decks
EnemyCardUnTargetMonster(ClientCard card)
得到某个位置的卡片的函数(从神数不神那借来的)
GetZoneCards(CardLocation loc, ClientField player)
系统提示检测
HintFunction(int hint, int last, int[] except)
卡片发动过滤函数
灵摆刻度设置
PendulumActivateFunction()
......@@ -532,6 +534,20 @@ namespace WindBot.Game.AI.Decks
return false;
}
private bool HintFunction(int hint, int last, int[] except)
{
for (int i = 500; i <= 500 + last; i++)
{
foreach (int ex in except)
{
if (i == ex)
i++;
}
if (hint == i)
return true;
}
return false;
}
private bool EnemyCardTargetMonster(ClientCard card)
{
int[] cardsname = new[] {4335645, 7089711, 7852509, 7852510, 21947653, 25847467, 37580756, 41440817, 51945556, 52824910, 94192409, 85034450, 79759861, 74131780, 72427512
......@@ -1017,6 +1033,25 @@ namespace WindBot.Game.AI.Decks
else if (min == 0) return result;
}
if (HintFunction(hint, 13, new[]{506}) && !cards.Any(card => card != null && card.Controller == 1) && cards.Any(card => card != null && card.Location == CardLocation.Hand))
{
IList<ClientCard> scards = cards.Where(card => card != null && (!card.HasSetcode(0x40) || card.Location != CardLocation.Hand)).ToList();
if (scards.Count() < min)
{
IList<ClientCard> scards2 = cards.Where(card => card != null && card.HasSetcode(0x40) && card.Location == CardLocation.Hand).ToList();
if (scards2.Count() > 0)
{
foreach (ClientCard card in scards2)
{
if (scards.Count() < min)
scards.Add(card);
}
}
}
if (scards.Count() >= min)
return Util.CheckSelectCount(scards,cards,min,max);
}
if (HintMsgForEnemy.Contains(hint))
{
IList<ClientCard> enemyCards = cards.Where(card => card.Controller == 1).ToList();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment