コード例 #1
0
ファイル: BlueEyesExecutor.cs プロジェクト: Kuro59/windbot
        private bool Pierre()
        {
            ClientField Bot = Duel.Fields[0];

            if (!Bot.HasInHand((int)CardId.Maiden) && !(Bot.HasInHand((int)CardId.DragonAppat) && Bot.HasInGraveyard((int)CardId.BlueEyesDragon)) && !(Bot.HasInHand((int)CardId.Kaibaman) || Bot.HasInHand((int)CardId.KomodoDragon) && Bot.HasInHand((int)CardId.BlueEyesDragon)))
            {
                return(true);
            }
            return(false);
        }
コード例 #2
0
ファイル: BlueEyesExecutor.cs プロジェクト: Kuro59/windbot
        private bool DragonEtincelant1OuMirage()
        {
            ClientField Bot = Duel.Fields[0];

            if (Bot.HasInHand((int)CardId.DragonSombreMetalique) && !Bot.HasInHand((int)CardId.Pierre) && !Bot.HasInHand((int)CardId.Maiden) && !(Bot.HasInHand((int)CardId.DragonAppat) && Bot.HasInGraveyard((int)CardId.BlueEyesDragon)) && !(Bot.HasInHand((int)CardId.Kaibaman) || Bot.HasInHand((int)CardId.KomodoDragon) && Bot.HasInHand((int)CardId.BlueEyesDragon)))
            {
                return(true);
            }
            return(false);
        }
コード例 #3
0
ファイル: BlueEyesExecutor.cs プロジェクト: Kuro59/windbot
        private bool KomodoEffect()
        {
            ClientField Bot = Duel.Fields[0];

            if (Bot.HasInHand((int)CardId.BlueEyesDragon))
            {
                AI.SelectCard((int)CardId.BlueEyesDragon);
                return(true);
            }
            else if (Bot.HasInHand((int)CardId.DragonEtincelant1))
            {
                AI.SelectCard((int)CardId.DragonEtincelant1);
                return(true);
            }
            return(false);
        }
コード例 #4
0
ファイル: BlueEyesExecutor.cs プロジェクト: Kuro59/windbot
        private bool DestructionDeMain()
        {
            List <int>  SelectedCards = new List <int>();
            ClientField Bot           = Duel.Fields[0];

            if (Bot.HasInHand((int)CardId.KomodoDragon) && Bot.HasInHand((int)CardId.BlueEyesDragon) && Bot.Hand.Count > 2)
            {
                SelectedCards.Add((int)CardId.KomodoDragon);
                foreach (ClientCard card in Bot.Hand)
                {
                    if (card != null && card.Id != (int)CardId.BlueEyesDragon && SelectedCards.Count != 2)
                    {
                        SelectedCards.Add(card.Id);
                    }
                }
                AI.SelectCard(SelectedCards);
                return(true);
            }
            else if (Bot.HasInHand((int)CardId.DragonAppat) && !Bot.HasInGraveyard((int)CardId.BlueEyesDragon) && Bot.Hand.Count > 2)
            {
                SelectedCards.Add((int)CardId.BlueEyesDragon);
                foreach (ClientCard card in Bot.Hand)
                {
                    if (card != null && card.Id != (int)CardId.DragonAppat && SelectedCards.Count != 2)
                    {
                        SelectedCards.Add(card.Id);
                    }
                }
                AI.SelectCard(SelectedCards);
                return(true);
            }
            else if (Bot.HasInHand((int)CardId.Kaibaman) && Bot.HasInHand((int)CardId.BlueEyesDragon) || (Bot.HasInHand((int)CardId.SilverCry) || Bot.HasInHand((int)CardId.DragonAppat)) && Bot.HasInGraveyard((int)CardId.BlueEyesDragon))
            {
                return(false);
            }
            else if (Bot.HasInHand((int)CardId.Maiden) || Bot.HasInHand((int)CardId.DragonEtincelant1) && !AI.Utils.IsOneEnnemyBetterThanValue(1900, true) || Bot.HasInHand((int)CardId.Pierre) || Bot.HasInHand((int)CardId.DragonSombreMetalique))
            {
                return(false);
            }
            return(true);
        }
コード例 #5
0
ファイル: BlueEyesExecutor.cs プロジェクト: Kuro59/windbot
        private bool DragonSombre()
        {
            ClientField Bot      = Duel.Fields[0];
            int         Selected = 0;

            if (Bot.HasInGraveyard((int)CardId.BlueEyesDragon) || Bot.HasInHand((int)CardId.BlueEyesDragon))
            {
                Selected = (int)CardId.BlueEyesDragon;
            }
            else if (Bot.HasInGraveyard((int)CardId.DragonTonnerre) || Bot.HasInHand((int)CardId.DragonTonnerre))
            {
                Selected = (int)CardId.DragonTonnerre;
            }
            else if (Bot.HasInGraveyard((int)CardId.UltimeDragonBlanc) || Bot.HasInHand((int)CardId.UltimeDragonBlanc))
            {
                Selected = (int)CardId.UltimeDragonBlanc;
            }
            else if (Bot.HasInGraveyard((int)CardId.Dragon5Tetes) || Bot.HasInHand((int)CardId.Dragon5Tetes))
            {
                Selected = (int)CardId.Dragon5Tetes;
            }
            else if (Bot.HasInGraveyard((int)CardId.DragonMirage) || Bot.HasInHand((int)CardId.DragonMirage))
            {
                Selected = (int)CardId.DragonMirage;
            }
            else if (Bot.HasInGraveyard((int)CardId.DragonEtincelant1) || Bot.HasInHand((int)CardId.DragonEtincelant1))
            {
                Selected = (int)CardId.DragonEtincelant1;
            }
            if (Selected != 0)
            {
                AI.SelectCard(Selected);
                return(true);
            }
            return(false);
        }
コード例 #6
0
        private bool DragonRavineEffect()
        {
            if (Card.Location != CardLocation.SpellZone)
            {
                return(false);
            }

            ClientField field = Duel.Fields[0];

            int tributeId = -1;

            if (field.HasInHand((int)CardId.DragunityPhalanx))
            {
                tributeId = (int)CardId.DragunityPhalanx;
            }
            else if (field.HasInHand((int)CardId.FireFormationTenki))
            {
                tributeId = (int)CardId.FireFormationTenki;
            }
            else if (field.HasInHand((int)CardId.Terraforming))
            {
                tributeId = (int)CardId.Terraforming;
            }
            else if (field.HasInHand((int)CardId.DragonRavine))
            {
                tributeId = (int)CardId.DragonRavine;
            }
            else if (field.HasInHand((int)CardId.AssaultTeleport))
            {
                tributeId = (int)CardId.AssaultTeleport;
            }
            else if (field.HasInHand((int)CardId.AssaultBeast))
            {
                tributeId = (int)CardId.AssaultBeast;
            }
            else if (field.HasInHand((int)CardId.DragunityArmaMysletainn))
            {
                tributeId = (int)CardId.DragunityArmaMysletainn;
            }
            else
            {
                int count = 0;
                foreach (ClientCard card in Duel.Fields[0].Hand)
                {
                    if (card.Id == (int)CardId.DragunityDux)
                    {
                        ++count;
                    }
                }
                if (count >= 2)
                {
                    tributeId = (int)CardId.DragunityDux;
                }
            }
            if (tributeId == -1 && field.HasInHand((int)CardId.StardustDragonAssaultMode))
            {
                tributeId = (int)CardId.StardustDragonAssaultMode;
            }

            if (tributeId == -1)
            {
                return(false);
            }

            int needId = -1;

            if (!field.HasInMonstersZone((int)CardId.DragunityPhalanx) &&
                !field.HasInGraveyard((int)CardId.DragunityPhalanx))
            {
                needId = (int)CardId.DragunityPhalanx;
            }
            else if (field.GetMonsterCount() == 0)
            {
                needId = (int)CardId.DragunityDux;
            }
            else
            {
                bool hasRealMonster = false;
                foreach (ClientCard card in field.GetMonsters())
                {
                    if (card.Id != (int)CardId.AssaultBeast)
                    {
                        hasRealMonster = true;
                        break;
                    }
                }
                if (!hasRealMonster || GetProblematicCard() != null)
                {
                    needId = (int)CardId.DragunityDux;
                }
            }

            if (needId == -1)
            {
                return(false);
            }

            int option;

            if (tributeId == (int)CardId.DragunityPhalanx)
            {
                needId = (int)CardId.DragunityDux;
            }

            int remaining = 3;

            foreach (ClientCard card in Duel.Fields[0].Hand)
            {
                if (card.Id == needId)
                {
                    remaining--;
                }
            }
            foreach (ClientCard card in Duel.Fields[0].Graveyard)
            {
                if (card.Id == needId)
                {
                    remaining--;
                }
            }
            foreach (ClientCard card in Duel.Fields[0].Banished)
            {
                if (card.Id == needId)
                {
                    remaining--;
                }
            }
            if (remaining <= 0)
            {
                return(false);
            }

            if (needId == (int)CardId.DragunityPhalanx)
            {
                option = 2;
            }
            else
            {
                option = 1;
            }

            if (ActivateDescription != (int)CardId.DragonRavine * 16 + option)
            {
                return(false);
            }

            AI.SelectCard(tributeId);
            AI.SelectNextCard(needId);

            return(true);
        }
コード例 #7
0
 private bool 装甲电子翼()
 {
     if (CyberDragonInHand() && (Bot.GetMonsterCount() == 0 && Duel.Fields[1].GetMonsterCount() != 0) || (Bot.HasInHand((int)CardId.电子龙三型) || Bot.HasInHand((int)CardId.电子凤凰)) && !AI.Utils.IsOneEnnemyBetterThanValue(1800, true))
     {
         return(false);
     }
     return(true);
 }
コード例 #8
0
ファイル: CyberDragonExecutor.cs プロジェクト: Kuro59/windbot
 private bool CyberVouivre()
 {
     if (CyberDragonInHand() && (Bot.GetMonsterCount() == 0 && Duel.Fields[1].GetMonsterCount() != 0) || (Bot.HasInHand((int)CardId.CyberDragonDrei) || Bot.HasInHand((int)CardId.CyberPhoenix)) && !AI.Utils.IsOneEnnemyBetterThanValue(1800, true))
     {
         return(false);
     }
     return(true);
 }