Commit 85b9b0ce authored by wind2009's avatar wind2009 Committed by GitHub

Merge pull request #1 from IceYGO/master

merge
parents bd858159 0fe0aaaa
......@@ -8,9 +8,6 @@
42790071
14558127
14558127
59438930
62015408
62015408
89538537
89538537
23434538
......@@ -22,6 +19,8 @@
2295440
18144506
35261759
49238328
49238328
68462976
68462976
10045474
......@@ -45,16 +44,16 @@
99916754
86221741
85289965
5043010
85289965
49725936
49725936
24094258
59934749
1508649
1508649
1508649
50588353
63288573
90673288
41999284
41999284
41999284
94259633
94259633
!side
......@@ -24,6 +24,7 @@ namespace WindBot.Game.AI.Decks
public const int Meluseek = 25533642;
public const int OneForOne = 2295440;
public const int PotofDesires = 35261759;
public const int PotofIndulgence = 49238328;
public const int Impermanence = 10045474;
public const int WakingtheDragon = 10813327;
public const int EvenlyMatched = 15693423;
......@@ -115,6 +116,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.MaxxC, G_activate);
AddExecutor(ExecutorType.Activate, CardId.Anti_Spell, Anti_Spell_activate);
AddExecutor(ExecutorType.Activate, CardId.PotofIndulgence, PotofIndulgence_activate);
AddExecutor(ExecutorType.Activate, field_activate);
AddExecutor(ExecutorType.Activate, CardId.SecretVillage, SecretVillage_activate);
......@@ -2155,6 +2157,32 @@ namespace WindBot.Game.AI.Decks
return false;
}
public bool PotofIndulgence_activate()
{
if (!spell_trap_activate()) return false;
if (!Bot.HasInGraveyard(CardId.Linkuriboh) && !Bot.HasInGraveyard(CardId.Hexstia))
{
int important_count = 0;
foreach (ClientCard card in Bot.ExtraDeck)
{
if (card.Id == CardId.Linkuriboh || card.Id == CardId.Hexstia)
{
important_count++;
}
}
if (important_count > 0)
{
AI.SelectPlace(SelectSTPlace(Card, true));
AI.SelectOption(1);
return true;
}
return false;
}
AI.SelectPlace(SelectSTPlace(Card, true));
AI.SelectOption(1);
return true;
}
public bool Anima_ss()
{
if (Duel.Phase != DuelPhase.Main2) return false;
......
......@@ -430,7 +430,15 @@ namespace WindBot.Game.AI.Decks
&& Bot.HasInGraveyard(CardId.DragunityPhalanx))
|| Bot.HasInMonstersZone(CardId.DragunityPhalanx)
|| Bot.HasInHand(CardId.DragunitySpearOfDestiny))
{
List<ClientCard> monster_sorted = Bot.GetMonsters();
monster_sorted.Sort(AIFunctions.CompareCardAttack);
foreach (ClientCard monster in monster_sorted)
{
AI.SelectMaterials(monster);
return true;
}
}
return false;
}
......
......@@ -261,7 +261,7 @@ namespace WindBot.Game.AI.Decks
private bool AfterburnersEffect()
{
ClientCard target = AI.Utils.GetBestEnemyMonster(true);
ClientCard target = AI.Utils.GetBestEnemyMonster(true, true);
if (target != null)
{
AI.SelectCard(target);
......@@ -293,7 +293,7 @@ namespace WindBot.Game.AI.Decks
{
if (AI.Utils.ChainContainsCard(CardId.WidowAnchor))
return false;
ClientCard target = AI.Utils.GetProblematicEnemyMonster();
ClientCard target = AI.Utils.GetProblematicEnemyMonster(0, true);
if (target != null)
{
WidowAnchorTarget = target;
......@@ -382,7 +382,7 @@ namespace WindBot.Game.AI.Decks
if (!HaveThreeSpellsInGrave() || Duel.Player == 1 || Duel.Phase < DuelPhase.Main1 || Duel.Phase >= DuelPhase.Main2 || AI.Utils.ChainContainsCard(CardId.WidowAnchor))
return false;
ClientCard target = AI.Utils.GetBestEnemyMonster(true);
ClientCard target = AI.Utils.GetBestEnemyMonster(true, true);
if (target != null && !target.IsDisabled() && !target.HasType(CardType.Normal))
{
WidowAnchorTarget = target;
......
......@@ -22,7 +22,7 @@ namespace WindBot
Host = "127.0.0.1";
Port = 7911;
HostInfo = "";
Version = 0x1347;
Version = 0x1348;
Hand = 0;
Debug = false;
Chat = true;
......
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