예제 #1
0
        private bool BellowOfTheSilverDragon()
        {
            if (Duel.Player == 0 && (Duel.Phase == DuelPhase.Draw || Duel.Phase == DuelPhase.Standby))
            {
                return(false);
            }
            if (Duel.Player == 1 && Duel.Phase == DuelPhase.End)
            {
                return(false);
            }

            List <ClientCard> cards = new List <ClientCard>(Duel.Fields[0].Graveyard);

            cards.Sort(AIFunctions.CompareCardAttack);
            for (int i = cards.Count - 1; i >= 0; --i)
            {
                ClientCard card = cards[i];
                if (card.Attack < 1000)
                {
                    return(false);
                }
                if (card.IsMonster() && card.HasType(CardType.Normal))
                {
                    AI.SelectCard(card);
                    return(true);
                }
            }
            return(false);
        }
예제 #2
0
        private bool SilversCry()
        {
            if (Duel.Player == 0 && (Duel.Phase == DuelPhase.Draw || Duel.Phase == DuelPhase.Standby))
            {
                return(false);
            }
            if (Duel.Player == 1 && Duel.Phase == DuelPhase.End)
            {
                return(false);
            }

            List <ClientCard> cards = new List <ClientCard>(Bot.Graveyard);

            cards.Sort(CardContainer.CompareCardAttack);
            for (int i = cards.Count - 1; i >= 0; --i)
            {
                ClientCard card = cards[i];
                if (card.Attack < 1000)
                {
                    return(false);
                }
                if (card.IsMonster() && card.HasType(CardType.Normal))
                {
                    AI.SelectCard(card);
                    return(true);
                }
            }
            return(false);
        }
예제 #3
0
        private bool MonsterReborn()
        {
            List <ClientCard> cards = new List <ClientCard>(this.Bot.Graveyard.GetMatchingCards(card => card.IsCanRevive()));

            cards.Sort(CardContainer.CompareCardAttack);
            ClientCard selectedCard = null;

            for (int i = cards.Count - 1; i >= 0; --i)
            {
                ClientCard card = cards[i];
                if (card.Attack < 2000)
                {
                    break;
                }

                if (card.IsCode(CardId.StardustDragonAssaultMode, CardId.FiveHeadedDragon))
                {
                    continue;
                }

                if (card.IsMonster())
                {
                    selectedCard = card;
                    break;
                }
            }
            cards = new List <ClientCard>(this.Enemy.Graveyard.GetMatchingCards(card => card.IsCanRevive()));
            cards.Sort(CardContainer.CompareCardAttack);
            for (int i = cards.Count - 1; i >= 0; --i)
            {
                ClientCard card = cards[i];
                if (card.Attack < 2000)
                {
                    break;
                }

                if (card.IsMonster() && card.HasType(CardType.Normal) && (selectedCard == null || card.Attack > selectedCard.Attack))
                {
                    selectedCard = card;
                    break;
                }
            }
            if (selectedCard != null)
            {
                this.AI.SelectCard(selectedCard);
                return(true);
            }
            return(false);
        }
예제 #4
0
        private bool MonsterReborn()
        {
            List <ClientCard> cards = new List <ClientCard>(Bot.Graveyard);

            cards.Sort(AIFunctions.CompareCardAttack);
            ClientCard selectedCard = null;

            for (int i = cards.Count - 1; i >= 0; --i)
            {
                ClientCard card = cards[i];
                if (card.Attack < 2000)
                {
                    break;
                }
                if (card.Id == (int)CardId.StardustDragonAssaultMode ||
                    card.Id == (int)CardId.FiveHeadedDragon)
                {
                    continue;
                }
                if (card.IsMonster())
                {
                    selectedCard = card;
                    break;
                }
            }
            cards = new List <ClientCard>(Enemy.Graveyard);
            cards.Sort(AIFunctions.CompareCardAttack);
            for (int i = cards.Count - 1; i >= 0; --i)
            {
                ClientCard card = cards[i];
                if (card.Attack < 2000)
                {
                    break;
                }
                if (card.IsMonster() && card.HasType(CardType.Normal) && (selectedCard == null || card.Attack > selectedCard.Attack))
                {
                    selectedCard = card;
                    break;
                }
            }
            if (selectedCard != null)
            {
                AI.SelectCard(selectedCard);
                return(true);
            }
            return(false);
        }
예제 #5
0
        //神宣告

        public bool SolemnJudgment_activate()
        {
            if (Util.IsChainTargetOnly(Card) && Bot.HasInHand(CardId.Multifaker))
            {
                return(false);
            }
            if ((DefaultSolemnJudgment() && spell_trap_activate(true)))
            {
                ClientCard target = Util.GetLastChainCard();
                if (target != null && !target.IsMonster() && !spell_trap_activate(false, target))
                {
                    return(false);
                }
                return(true);
            }
            return(false);
        }
예제 #6
0
        private bool MonsterReborn()
        {
            List <ClientCard> cards = new List <ClientCard>(Duel.Fields[0].Graveyard);

            cards.Sort(AIFunctions.CompareCardAttack);
            ClientCard selectedCard = null;

            for (int i = cards.Count - 1; i >= 0; --i)
            {
                ClientCard card = cards[i];
                if (card.Attack < 1000)
                {
                    break;
                }
                if (card.IsMonster())
                {
                    selectedCard = card;
                    break;
                }
            }
            cards = new List <ClientCard>(Duel.Fields[1].Graveyard);
            cards.Sort(AIFunctions.CompareCardAttack);
            for (int i = cards.Count - 1; i >= 0; --i)
            {
                ClientCard card = cards[i];
                if (card.Attack < 1000)
                {
                    break;
                }
                if (card.IsMonster() && card.HasType(CardType.Normal) && (selectedCard == null || card.Attack > selectedCard.Attack))
                {
                    selectedCard = card;
                    break;
                }
            }
            if (selectedCard != null)
            {
                AI.SelectCard(selectedCard);
                return(true);
            }
            return(false);
        }
예제 #7
0
        private bool MonsterReborn()
        {
            List <ClientCard> cards = new List <ClientCard>(Bot.Graveyard.GetMatchingCards(card => card.IsCanRevive()));

            cards.Sort(CardContainer.CompareCardAttack);
            ClientCard selectedCard = null;

            for (int i = cards.Count - 1; i >= 0; --i)
            {
                ClientCard card = cards[i];
                if (card.Attack < 1000)
                {
                    break;
                }
                if (card.IsMonster())
                {
                    selectedCard = card;
                    break;
                }
            }
            cards = new List <ClientCard>(Enemy.Graveyard.GetMatchingCards(card => card.IsCanRevive()));
            cards.Sort(CardContainer.CompareCardAttack);
            for (int i = cards.Count - 1; i >= 0; --i)
            {
                ClientCard card = cards[i];
                if (card.Attack < 1000)
                {
                    break;
                }
                if (card.IsMonster() && card.HasType(CardType.Normal) && (selectedCard == null || card.Attack > selectedCard.Attack))
                {
                    selectedCard = card;
                    break;
                }
            }
            if (selectedCard != null)
            {
                AI.SelectCard(selectedCard);
                return(true);
            }
            return(false);
        }
예제 #8
0
 private bool ShouldBeDestroyedBeforeMainPhaseEnd(ClientCard card)
 {
     return(((card.IsMonster() && card.IsFaceup()) || (card.IsFaceup() && (card.HasType(CardType.Continuous) || card.HasType(CardType.Field)))) && this.IsDestroyableCard(card));
 }