Commit c439a017 authored by xiaoye's avatar xiaoye

Update Earth_408Executor.cs

parent 9058ec2e
Pipeline #31793 passed with stage
in 52 seconds
...@@ -19,6 +19,7 @@ namespace WindBot.Game.AI.Decks ...@@ -19,6 +19,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, 19613556, OnSelectActivate); AddExecutor(ExecutorType.Activate, 19613556, OnSelectActivate);
AddExecutor(ExecutorType.Activate, 45986603, OnSelectActivate); AddExecutor(ExecutorType.Activate, 45986603, OnSelectActivate);
AddExecutor(ExecutorType.Activate, 71044499, OnSelectActivate);
AddExecutor(ExecutorType.Activate, OnSelectActivate); AddExecutor(ExecutorType.Activate, OnSelectActivate);
AddExecutor(ExecutorType.Summon, 79575620, OnSelectSummon); AddExecutor(ExecutorType.Summon, 79575620, OnSelectSummon);
...@@ -147,9 +148,9 @@ namespace WindBot.Game.AI.Decks ...@@ -147,9 +148,9 @@ namespace WindBot.Game.AI.Decks
} }
public override IList<ClientCard> OnSelectCard(IList<ClientCard> cards, int min, int max, int hint, bool cancelable) public override IList<ClientCard> OnSelectCard(IList<ClientCard> cards, int min, int max, int hint, bool cancelable)
{ {
if (AI.HaveSelectedCards()) return null;
if (max > cards.Count()) max = cards.Count(); if (max > cards.Count()) max = cards.Count();
ClientCard currentSolvingChain = Duel.GetCurrentSolvingChainCard(); // ClientCard currentSolvingChain = Duel.GetCurrentSolvingChainCard();
ClientCard currentSolvingChain = Card;
if (currentSolvingChain != null) if (currentSolvingChain != null)
{ {
if (currentSolvingChain.IsCode(new[] { 97077563, 70828912 })) if (currentSolvingChain.IsCode(new[] { 97077563, 70828912 }))
...@@ -159,11 +160,11 @@ namespace WindBot.Game.AI.Decks ...@@ -159,11 +160,11 @@ namespace WindBot.Game.AI.Decks
} }
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 }))))
return Util.CheckSelectCount(cards.Where(card => card != null && card.IsCode(new[] { 37043180, 70074904 }) && !cards.Any(c => c != null && !c.IsCode(card.Id) && c.Attack > card.Attack)).ToList(), cards, min, max); return Util.CheckSelectCount(cards.Where(card => card != null && card.IsCode(new[] { 37043180, 70074904 }) && !cards.Any(c => c != null && !c.IsCode(card.Id) && c.Attack < card.Attack)).ToList(), cards, min, max);
if (cards.Any(c => c != null && c.IsCode(74131780) && !GetZoneCards(CardLocation.MonsterZone, Enemy).Any(card => card != null && card.GetDefensePower() < 1000)) && GetZoneCards(CardLocation.MonsterZone, Enemy).Any(card => card != null && !card.IsShouldNotBeTarget())) if (cards.Any(c => c != null && c.IsCode(74131780) && !GetZoneCards(CardLocation.MonsterZone, Enemy).Any(card => card != null && card.GetDefensePower() < 1000)) && GetZoneCards(CardLocation.MonsterZone, Enemy).Any(card => card != null && !card.IsShouldNotBeTarget()))
return Util.CheckSelectCount(cards.Where(c => c != null && c.IsCode(74131780)).ToList(), cards, min, max); return Util.CheckSelectCount(cards.Where(c => c != null && c.IsCode(74131780)).ToList(), cards, min, max);
return Util.CheckSelectCount(cards.Where(card => card != null && !cards.Any(c => c != null && !c.IsCode(card.Id) && c.Attack > card.Attack)).ToList(), cards, min, max); return Util.CheckSelectCount(cards.Where(card => card != null && !cards.Any(c => c != null && !c.IsCode(card.Id) && c.Attack < card.Attack)).ToList(), cards, min, max);
} }
switch (currentSolvingChain.Id) switch (currentSolvingChain.Id)
{ {
...@@ -171,8 +172,6 @@ namespace WindBot.Game.AI.Decks ...@@ -171,8 +172,6 @@ namespace WindBot.Game.AI.Decks
{ {
if (cards.Any(card => card != null && card.Controller == 1)) if (cards.Any(card => card != null && card.Controller == 1))
return Util.CheckSelectCount(cards.Where(card => card != null && card.Controller == 1).ToList(), cards, min, max); 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 }))) 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); return Util.CheckSelectCount(cards.Where(card => card != null && card.IsCode(new[] { 70828912, 97077563 })).ToList(), cards, min, max);
break; break;
...@@ -368,7 +367,7 @@ namespace WindBot.Game.AI.Decks ...@@ -368,7 +367,7 @@ namespace WindBot.Game.AI.Decks
private bool OnSelectActivate() private bool OnSelectActivate()
{ {
if (Card.IsDisabled()) return false; if (Card.IsDisabled()) return false;
IList<int> activate_return_true = new[] { 97017120, 32807846, 79571449, 29401950, 44095762, 70828912, 97077563 }; IList<int> activate_return_true = new[] { 97017120, 32807846, 79571449, 29401950, 44095762, 70828912, 97077563, 42386471, 45986603 };
switch (Card.Id) switch (Card.Id)
{ {
case 74131780: case 74131780:
......
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