Commit df8ac9d0 authored by mercury233's avatar mercury233

fix CRLF

parent 0974c33d
using YGOSharp.OCGWrapper.Enums; using YGOSharp.OCGWrapper.Enums;
using System.Collections.Generic; using System.Collections.Generic;
using WindBot; using WindBot;
using WindBot.Game; using WindBot.Game;
using WindBot.Game.AI; using WindBot.Game.AI;
namespace WindBot.Game.AI.Decks namespace WindBot.Game.AI.Decks
{ {
[Deck("Test", "AI_Test", "Test")] [Deck("Test", "AI_Test", "Test")]
public class DoEverythingExecutor : DefaultExecutor public class DoEverythingExecutor : DefaultExecutor
{ {
public class CardId public class CardId
{ {
public const int LeoWizard = 4392470; public const int LeoWizard = 4392470;
public const int Bunilla = 69380702; public const int Bunilla = 69380702;
} }
public DoEverythingExecutor(GameAI ai, Duel duel) public DoEverythingExecutor(GameAI ai, Duel duel)
: base(ai, duel) : base(ai, duel)
{ {
AddExecutor(ExecutorType.SpSummon); AddExecutor(ExecutorType.SpSummon);
AddExecutor(ExecutorType.Activate, DefaultDontChainMyself); AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
AddExecutor(ExecutorType.SummonOrSet); AddExecutor(ExecutorType.SummonOrSet);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos); AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.SpellSet); AddExecutor(ExecutorType.SpellSet);
} }
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 (Duel.Phase == DuelPhase.BattleStart) if (Duel.Phase == DuelPhase.BattleStart)
return null; return null;
IList<ClientCard> selected = new List<ClientCard>(); IList<ClientCard> selected = new List<ClientCard>();
// select the last cards // select the last cards
for (int i = 1; i <= max; ++i) for (int i = 1; i <= max; ++i)
selected.Add(cards[cards.Count-i]); selected.Add(cards[cards.Count-i]);
return selected; return selected;
} }
public override int OnSelectOption(IList<int> options) public override int OnSelectOption(IList<int> options)
{ {
return Program.Rand.Next(options.Count); return Program.Rand.Next(options.Count);
} }
} }
} }
\ No newline at end of file
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