Commit e153d008 authored by xiaoye's avatar xiaoye

Update AI408AExecutor.cs

parent 1e05d8ba
Pipeline #31684 passed with stage
in 45 seconds
...@@ -157,11 +157,6 @@ namespace WindBot.Game.AI.Decks ...@@ -157,11 +157,6 @@ namespace WindBot.Game.AI.Decks
List<ClientCard> res = cards.Where(card => card != null && !cards.Any(c => c != null && c.Attack > card.Attack)).ToList(); List<ClientCard> res = cards.Where(card => card != null && !cards.Any(c => c != null && c.Attack > card.Attack)).ToList();
return Util.CheckSelectCount(res, cards, min, max); return Util.CheckSelectCount(res, cards, min, max);
} }
if (currentSolvingChain.IsCode(new[] { 60229110, 71044499 }))
{
List<ClientCard> res = cards.Where(card => card != null && card.Controller == 1).ToList();
return Util.CheckSelectCount(res, cards, min, max);
}
if (currentSolvingChain.IsCode(32807846)) if (currentSolvingChain.IsCode(32807846))
{ {
if ((cards.Any(c => c != null && c.IsCode(new[] { 37043180, 70074904 })) && Bot.GetMonsterCount() >= Enemy.GetMonsterCount()) || GetZoneCards(CardLocation.MonsterZone, Enemy).Any(c => c != null && c.IsCode(new[] { 23205979, 31305911 }))) if ((cards.Any(c => c != null && c.IsCode(new[] { 37043180, 70074904 })) && Bot.GetMonsterCount() >= Enemy.GetMonsterCount()) || GetZoneCards(CardLocation.MonsterZone, Enemy).Any(c => c != null && c.IsCode(new[] { 23205979, 31305911 })))
...@@ -172,6 +167,20 @@ namespace WindBot.Game.AI.Decks ...@@ -172,6 +167,20 @@ namespace WindBot.Game.AI.Decks
} }
switch (currentSolvingChain.Id) switch (currentSolvingChain.Id)
{ {
case 60229110:
{
if (cards.Any(card => card != null && card.Controller == 1))
return Util.CheckSelectCount(cards.Where(card => card != null && card.Controller == 1).ToList(), cards, min, max);
if (cards.Any(card => card != null && card.IsFacedown()))
return Util.CheckSelectCount(cards.Where(card => card != null && card.IsFacedown()).ToList(), cards, min, max);
if (cards.Any(card => card != null && card.IsCode(new[] { 70828912, 97077563 })))
return Util.CheckSelectCount(cards.Where(card => card != null && card.IsCode(new[] { 70828912, 97077563 })).ToList(), cards, min, max);
break;
}
case 71044499:
{
return Util.CheckSelectCount(cards.Where(card => card != null && card.Controller == 1).ToList(), cards, min, max);
}
case 27174286: case 27174286:
{ {
return Util.CheckSelectCount(cards, cards, max, max); return Util.CheckSelectCount(cards, cards, max, max);
...@@ -480,7 +489,7 @@ namespace WindBot.Game.AI.Decks ...@@ -480,7 +489,7 @@ namespace WindBot.Game.AI.Decks
g.Sort(CardContainer.CompareCardAttack); g.Sort(CardContainer.CompareCardAttack);
int atk = g[0].Attack; int atk = g[0].Attack;
if (Bot.LifePoints > 2000 && g[0].IsCode(79575620)) atk = g[1].Attack; if (Bot.LifePoints > 2000 && g[0].IsCode(79575620)) atk = g[1].Attack;
if (Enemy.LifePoints > Util.GetBestAttack(Bot) && Enemy.LifePoints - Util.GetBestAttack(Bot) <= 2400 - atk && Enemy.GetMonsterCount() == 0 && !GetZoneCards(CardLocation.Hand, Bot).Any(c => c != null && c.Level < 5 && c.HasType(CardType.Monster))) if (Enemy.LifePoints > Util.GetBestAttack(Bot) && Enemy.LifePoints - Util.GetBestAttack(Bot) <= 2400 - atk && Enemy.GetMonsterCount() == 0 && !GetZoneCards(CardLocation.Hand, Bot).Any(c => c != null && c.Level < 5 && c.HasType(CardType.Monster)) && Duel.MainPhase.CanBattlePhase && GetZoneCards(CardLocation.SpellZone, Bot).Any(c => c != null && !c.IsShouldNotBeTarget() && !c.IsFaceup()))
{ {
chk_release_summon = true; chk_release_summon = true;
return true; return true;
...@@ -493,7 +502,7 @@ namespace WindBot.Game.AI.Decks ...@@ -493,7 +502,7 @@ namespace WindBot.Game.AI.Decks
{ {
return true; return true;
} }
if (Enemy.LifePoints > Util.GetBestAttack(Bot) && Enemy.LifePoints - Util.GetBestAttack(Bot) <= 400 && Enemy.GetMonsterCount() == 0 && !GetZoneCards(CardLocation.Hand, Bot).Any(c => c != null && c.Level < 5 && c.HasType(CardType.Monster))) if (Enemy.LifePoints > Util.GetBestAttack(Bot) && Enemy.LifePoints - Util.GetBestAttack(Bot) <= 400 && Enemy.GetMonsterCount() == 0 && !GetZoneCards(CardLocation.Hand, Bot).Any(c => c != null && c.Level < 5 && c.HasType(CardType.Monster)) && Duel.MainPhase.CanBattlePhase)
{ {
return true; return true;
} }
......
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