Commit 8667065b authored by wind2009's avatar wind2009

2pick windbot

parent 7d2a40df
using YGOSharp.OCGWrapper.Enums;
using System.Collections.Generic;
using WindBot;
using WindBot.Game;
using WindBot.Game.AI;
namespace WindBot.Game.AI.Decks
{
[Deck("Pick", "AI_Trickstar")]
public class PickExecutor : DefaultExecutor
{
public class CardId
{
public const int LeoWizard = 4392470;
public const int Bunilla = 69380702;
}
public PickExecutor(GameAI ai, Duel duel)
: base(ai, duel)
{
AddExecutor(ExecutorType.SpSummon);
AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
AddExecutor(ExecutorType.SummonOrSet);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.SpellSet);
}
IList<ClientCard> lastpick = new List<ClientCard>();
public override IList<ClientCard> OnSelectCard(IList<ClientCard> cards, int min, int max, int hint, bool cancelable)
{
if (hint == 507)
{
Logger.DebugWriteLine("Call SelectCard with hint 507");
if (cards.Count == 4)
{
if (lastpick.Count == 0)
{
lastpick = cards;
}
else
{
IList<ClientCard> now_select = lastpick;
lastpick.Clear();
return now_select;
}
}
}
if (Duel.Phase == DuelPhase.BattleStart)
return null;
IList<ClientCard> selected = new List<ClientCard>();
// select the last cards
for (int i = 1; i <= max; ++i)
selected.Add(cards[cards.Count - i]);
return selected;
}
public override int OnSelectOption(IList<int> options)
{
return Program.Rand.Next(options.Count);
}
}
}
\ No newline at end of file
......@@ -69,6 +69,7 @@
<Compile Include="Game\AI\Decks\BlackwingExecutor.cs" />
<Compile Include="Game\AI\Decks\CyberDragonExecutor.cs" />
<Compile Include="Game\AI\Decks\DarkMagicianExecutor.cs" />
<Compile Include="Game\AI\Decks\PickExecutor.cs" />
<Compile Include="Game\AI\Decks\SkyStrikerExecutor.cs" />
<Compile Include="Game\AI\Decks\MokeyMokeyKingExecutor.cs" />
<Compile Include="Game\AI\Decks\MokeyMokeyExecutor.cs" />
......
{
"windbots": [
{
"name": "琪露诺",
"deck": "Toadally Awesome",
"dialog": "cirno.zh-CN"
},
{
"name": "琪露诺",
"deck": "Rainbow",
"dialog": "cirno.zh-CN"
},
{
"name": "琪露诺",
"deck": "Rainbow",
"dialog": "cirno.zh-CN"
},
{
"name": "谜之剑士LV4",
"deck": "Dragunity",
"dialog": "swordsman.zh-CN"
},
{
"name": "谜之剑士LV4",
"deck": "Rank V",
"dialog": "swordsman.zh-CN"
},
{
"name": "谜之剑士LV4",
"deck": "Zexal Weapons",
"dialog": "swordsman.zh-CN"
},
{
"name": "复制植物",
"deck": "Zoodiac",
"dialog": "copy.zh-CN"
},
{
"name": "复制植物",
"deck": "Blue-Eyes",
"dialog": "copy.zh-CN"
},
{
"name": "复制植物",
"deck": "Blue-Eyes",
"dialog": "copy.zh-CN"
},
{
"name": "复制梁龙",
"deck": "SkyStriker",
"dialog": "anothercopy.zh-CN"
},
{
"name": "复制梁龙",
"deck": "SkyStriker",
"dialog": "anothercopy.zh-CN"
},
{
"name": "复制梁龙",
"deck": "SkyStriker",
"dialog": "anothercopy.zh-CN"
},
{
"name": "尼亚",
"deck": "Yosenju",
"dialog": "near.zh-CN"
},
{
"name": "尼亚",
"deck": "Qliphort",
"dialog": "near.zh-CN"
},
{
"name": "尼亚",
"deck": "Trickstar",
"dialog": "near.zh-CN"
},
{
"name": "试作型机器人1732",
"deck": "ST1732",
"dialog": "default"
},
{
"name": "试作型机器人1732",
"deck": "ST1732",
"name": "千奈",
"deck": "Pick",
"dialog": "default"
},
{
"name": "试作型机器人1732",
"deck": "ST1732",
"dialog": "default"
},
{
"name": "永远之魂",
"deck": "Burn",
"dialog": "soul.zh-CN"
},
{
"name": "永远之魂",
"deck": "Frog",
"dialog": "soul.zh-CN"
},
{
"name": "永远之魂",
"deck": "Horus",
"dialog": "soul.zh-CN"
},
{
"name": "奇異果",
"deck": "LightswornShaddoldinosour",
"dialog": "kiwi.zh-TW"
},
{
"name": "奇異果",
"deck": "LightswornShaddoldinosour",
"dialog": "kiwi.zh-TW"
},
{
"name": "奇魔果",
"deck": "DarkMagician",
"dialog": "kiwi.zh-TW"
},
{
"name": "奇魔果",
"deck": "DarkMagician",
"dialog": "kiwi.zh-TW"
},
{
"name": "燃血鬥士",
"deck": "ChainBurn",
"dialog": "kiwi.zh-TW"
},
{
"name": "燃血鬥士",
"deck": "ChainBurn",
"dialog": "kiwi.zh-TW"
}
]
}
\ 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