Commit 7299ea0d authored by mercury233's avatar mercury233

update LuckyExecutor

select max cards to spsummon
parent 6bd0900f
......@@ -94,6 +94,11 @@ namespace WindBot.Game.AI.Decks
HintMsg.SpSummon, HintMsg.ToGrave, HintMsg.Remove, HintMsg.AddToHand, HintMsg.FusionMaterial
};
private List<int> HintMsgForMaxSelect = new List<int>
{
HintMsg.SpSummon, HintMsg.ToGrave, HintMsg.AddToHand, HintMsg.FusionMaterial, HintMsg.Destroy
};
public override IList<ClientCard> OnSelectCard(IList<ClientCard> _cards, int min, int max, int hint, bool cancelable)
{
if (Duel.Phase == DuelPhase.BattleStart)
......@@ -142,6 +147,17 @@ namespace WindBot.Game.AI.Decks
cards.Remove(card);
}
if (HintMsgForMaxSelect.Contains(hint))
{
// select max cards
while (selected.Count < max)
{
ClientCard card = cards[Program.Rand.Next(cards.Count)];
selected.Add(card);
cards.Remove(card);
}
}
return selected;
}
......
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