Esempio n. 1
0
        /// <summary>
        /// Returns a list of minions of the enemy player. This function is only usable if the CPU is the active player
        /// </summary>
        private SampleMinionCard[] GetEnemyMinions()
        {
            SampleBaseCard[]        cardsOnPlayfield = ActiveSampleMatch.GetCardsForPlayer(ActiveSampleMatch.InactiveSamplePlayer);
            List <SampleMinionCard> result           = new List <SampleMinionCard>(cardsOnPlayfield.Length);

            for (int i = 0; i < cardsOnPlayfield.Length; i++)
            {
                result.Add((SampleMinionCard)cardsOnPlayfield[i]);
            }

            return(result.ToArray());
        }
Esempio n. 2
0
        /// <summary>
        /// Returns a list of minions who can still perform some action in this round.
        /// </summary>
        private SampleMinionCard[] GetUsableMinions()
        {
            List <SampleMinionCard> result = new List <SampleMinionCard>();

            SampleBaseCard[] cardsOnPlayfield = ActiveSampleMatch.GetCardsForPlayer(this);
            for (int i = 0; i < cardsOnPlayfield.Length; i++)
            {
                SampleMinionCard card = (SampleMinionCard)cardsOnPlayfield[i];
                if (card.CurrentMovesPerRound > 0)
                {
                    result.Add(card);
                }
            }

            return(result.ToArray());
        }
Esempio n. 3
0
        private SampleMinionCard[] GetOwnDamagedMinions()
        {
            List <SampleMinionCard> result = new List <SampleMinionCard>();

            SampleBaseCard[] minons = ActiveSampleMatch.GetCardsForPlayer(this);

            for (int i = 0; i < minons.Length; i++)
            {
                if (minons[i].CardType == SampleCardType.Minion)
                {
                    SampleMinionCard minion = (SampleMinionCard)minons[i];
                    if (minion.CurrentHealth < minion.MaxHealth)
                    {
                        result.Add(minion);
                    }
                }
            }

            return(result.ToArray());
        }