Commit d8236839 authored by Wind's avatar Wind

Arbitrary Pick update

parent 8667065b
...@@ -25,25 +25,23 @@ namespace WindBot.Game.AI.Decks ...@@ -25,25 +25,23 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.SpellSet); AddExecutor(ExecutorType.SpellSet);
} }
IList<ClientCard> lastpick = new List<ClientCard>(); IList<ClientCard> picked = new List<ClientCard>();
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 (hint == 507) if (hint == 507 && Duel.Turn == 1)
{ {
Logger.DebugWriteLine("Call SelectCard with hint 507"); Logger.DebugWriteLine("Call SelectCard with hint 507");
if (cards.Count == 4) if (cancelable)
{ {
if (lastpick.Count == 0) IList<ClientCard> submit = picked;
{ picked.Clear();
lastpick = cards; return submit;
}
else
{
IList<ClientCard> now_select = lastpick;
lastpick.Clear();
return now_select;
}
} }
ClientCard thispick = cards[Program.Rand.Next(cards.Count)];
IList <ClientCard> group = new List<ClientCard>();
group.Add(thispick);
picked.Add(thispick);
return group;
} }
if (Duel.Phase == DuelPhase.BattleStart) if (Duel.Phase == DuelPhase.BattleStart)
return null; return null;
......
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