public static void ManageNeutralMinion(Card.Cards card)
        {
            //<= max mana
            var boardCard = new BoardCard(card);

            if (boardCard.ResultingBoardCard.Quality >= ValueReader.MinCardQualityToInstantAddMinion) //epic by default
            {
                MainLists.chosenCards.Add(card);
            }
            else
            {
                //card quality not hight enoughbut <= max mana
                if (!ValueReader.AttendMinionValue ||
                    boardCard.ResultingBoardCard.Cost < ValueReader.MinManaCostToAttendValue)
                {
                    //mana <= max cost & mana < MinManaCostToAttendValue
                    MainLists.chosenCards.Add(card);
                }
                else if (boardCard.ResultingBoardCard.Cost >= ValueReader.MinManaCostToAttendValue)
                {
                    var minionCard = new NeutralMinion(card);
                    MinionValue.Value requiredMinNeutralMinionValue =
                        minionCard.minionBoardCard.IsMaxManaCard && ValueReader.IncreaseMinMinionValueIfMaxCost
                            ? ValueReader.IncreasedMinNeutralMinionValue
                            : ValueReader.MinNeutralMinionValue;

                    if (minionCard.thisCardValue >= requiredMinNeutralMinionValue)
                    {
                        MainLists.chosenCards.Add(card);
                    }
                }
            }
        }
        public static void ManageNeutralMinion(Card.Cards card)
        {
            //<= max mana
            var boardCard = new BoardCard(card);

            if (boardCard.ResultingBoardCard.Quality >= ValueReader.MinCardQualityToInstantAddMinion) //epic by default
                MainLists.chosenCards.Add(card);
            else
            {
                //card quality not hight enoughbut <= max mana
                if (!ValueReader.AttendMinionValue ||
                    boardCard.ResultingBoardCard.Cost < ValueReader.MinManaCostToAttendValue)
                    //mana <= max cost & mana < MinManaCostToAttendValue
                    MainLists.chosenCards.Add(card);
                else if (boardCard.ResultingBoardCard.Cost >= ValueReader.MinManaCostToAttendValue)
                {
                    var minionCard = new NeutralMinion(card);
                    MinionValue.Value requiredMinNeutralMinionValue =
                        minionCard.minionBoardCard.IsMaxManaCard && ValueReader.IncreaseMinMinionValueIfMaxCost
                            ? ValueReader.IncreasedMinNeutralMinionValue
                            : ValueReader.MinNeutralMinionValue;

                    if (minionCard.thisCardValue >= requiredMinNeutralMinionValue)
                        MainLists.chosenCards.Add(card);
                }
            }
        }
Exemple #3
0
        public static bool HasGoodEffect(Card.Cards _card)
        {
            var card = new BoardCard(_card).ResultingBoardCard;

            return(card.Charge || card.Divineshield || card.Enrage || card.Freeze ||
                   card.Stealth || card.Taunt || card.Windfury || card.Spellpower > 0);
        }
        public static Value SetCardValue(BoardCard minionBoardCard)
        {
            Value resultingValue;

            float rawValue = (minionBoardCard.ResultingBoardCard.Atk + minionBoardCard.ResultingBoardCard.Health) / 2;
            float resultingValueFloat = rawValue - minionBoardCard.ResultingBoardCard.Cost;

            if (resultingValueFloat > 0)
                resultingValue = Value.Good;
            else if (resultingValueFloat == 0)
                resultingValue = Value.Medium;
            else
                resultingValue = Value.Bad;

            if (CardEffects.HasBadEffect(minionBoardCard.ResultingBoardCard))
                resultingValue = ReduceCardValue(resultingValue);

            if (CardEffects.HasGoodEffect(minionBoardCard.ResultingBoardCard))
                resultingValue = IncreaseCardValue(resultingValue);

            if (CardEffects.HasInspire(minionBoardCard.ResultingBoardCard))
                resultingValue = Value.Excellent;

            return resultingValue;
        }
        private NeutralMinion(Card.Cards NeutralMinionMulliganCard)
        {
            minionBoardCard = new BoardCard(NeutralMinionMulliganCard).IsClassCard() ||
                NeutralMinionMulliganCard.ToString() == "GAME_005"
                ?
                null
                :
                new BoardCard(NeutralMinionMulliganCard);

            thisCardValue =
                minionBoardCard != null
                    ? MinionValue.SetCardValue(minionBoardCard)
                    : MinionValue.Value.NotANeutralMinion;

            if (minionBoardCard != null && MainLists.whiteList.Contains(minionBoardCard.ResultingBoardCard.Name))
                thisCardValue = MinionValue.Value.InWhiteList;
        }
        private NeutralMinion(Card.Cards NeutralMinionMulliganCard)
        {
            minionBoardCard = new BoardCard(NeutralMinionMulliganCard).IsClassCard() ||
                              NeutralMinionMulliganCard.ToString() == "GAME_005"
                ?
                              null
                :
                              new BoardCard(NeutralMinionMulliganCard);

            thisCardValue =
                minionBoardCard != null
                    ? MinionValue.SetCardValue(minionBoardCard)
                    : MinionValue.Value.NotANeutralMinion;

            if (minionBoardCard != null && MainLists.whiteList.Contains(minionBoardCard.ResultingBoardCard.Name))
            {
                thisCardValue = MinionValue.Value.InWhiteList;
            }
        }
        public static Value SetCardValue(BoardCard minionBoardCard)
        {
            Value resultingValue;

            float rawValue            = (minionBoardCard.ResultingBoardCard.Atk + minionBoardCard.ResultingBoardCard.Health) / 2;
            float resultingValueFloat = rawValue - minionBoardCard.ResultingBoardCard.Cost;

            if (resultingValueFloat > 0)
            {
                resultingValue = Value.Good;
            }
            else if (resultingValueFloat == 0)
            {
                resultingValue = Value.Medium;
            }
            else
            {
                resultingValue = Value.Bad;
            }

            if (CardEffects.HasBadEffect(minionBoardCard.ResultingBoardCard))
            {
                resultingValue = ReduceCardValue(resultingValue);
            }

            if (CardEffects.HasGoodEffect(minionBoardCard.ResultingBoardCard))
            {
                resultingValue = IncreaseCardValue(resultingValue);
            }

            if (CardEffects.HasInspire(minionBoardCard.ResultingBoardCard))
            {
                resultingValue = Value.Excellent;
            }

            return(resultingValue);
        }
 public static bool HasInspire(Card.Cards _card)
 {
     var card = new BoardCard(_card).ResultingBoardCard;
     return card.Inspire;
 }
 public static bool HasGoodEffect(Card.Cards _card)
 {
     var card = new BoardCard(_card).ResultingBoardCard;
     return card.Charge || card.Divineshield || card.Enrage || card.Freeze ||
         card.Stealth || card.Taunt || card.Windfury || card.Spellpower > 0;
 }
Exemple #10
0
 public static bool HasBadEffect(Card.Cards _card)
 {
     var card = new BoardCard(_card).ResultingBoardCard;
     return CardsWithBadProperties.Contains(card.Name) || card.Overload > 0;
 }
Exemple #11
0
        public static bool HasInspire(Card.Cards _card)
        {
            var card = new BoardCard(_card).ResultingBoardCard;

            return(card.Inspire);
        }
Exemple #12
0
        public static bool HasBadEffect(Card.Cards _card)
        {
            var card = new BoardCard(_card).ResultingBoardCard;

            return(CardsWithBadProperties.Contains(card.Name) || card.Overload > 0);
        }