Commit f740dceb authored by mercury233's avatar mercury233

fix BlueEyes add null to selectcard

parent b14a08df
......@@ -139,10 +139,10 @@ namespace WindBot.Game.AI.Decks
if (max == 2 && cards[0].Location == CardLocation.Deck)
{
Logger.DebugWriteLine("OnSelectCard MelodyOfAwakeningDragon");
IList<ClientCard> result = new List<ClientCard>();
List<ClientCard> result = new List<ClientCard>();
if (!Bot.HasInHand(CardId.WhiteDragon))
result.Add(cards.FirstOrDefault(card => card.Id == CardId.WhiteDragon));
result = result.Concat(cards.Where(card => card.Id == CardId.AlternativeWhiteDragon)).ToList();
result.AddRange(cards.Where(card => card.Id == CardId.WhiteDragon).Take(1));
result.AddRange(cards.Where(card => card.Id == CardId.AlternativeWhiteDragon));
return AI.Utils.CheckSelectCount(result, cards, min, max);
}
Logger.DebugWriteLine("Use default.");
......
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