Esempio n. 1
0
        public IEnumerator ApplyConsumeToCard(CardState card)
        {
            yield return(new WaitForSeconds(0.1f));

            // If the card already has Consume for any reason, we pass on modifying it and will try again after we play a card
            if (!cardsWeHaveModified.Contains(card) && !card.HasTrait(typeof(CardTraitExhaustState)) && IsCardStarterSpell(card))
            {
                cardManager.AddTemporaryTraitToCard(card, new CardTraitData {
                    traitStateName = "CardTraitExhaustState"
                });
                cardManager.RefreshCardInHand(card);
                card.RefreshCardBodyTextLocalization();
                cardsWeHaveModified.Add(card);
            }
            yield break;
        }
Esempio n. 2
0
        public IEnumerator ApplyConsume(CardState card)
        {
            yield return(new WaitForSeconds(0.01f));

            // Check and see if we're a starter card
            foreach (var clan in ProviderManager.SaveManager.GetAllGameData().GetAllClassDatas())
            {
                for (int i = 0; i < 2; i++)
                {
                    if (card.GetCardDataID() == clan.GetChampionData(i).starterCardData.GetID() && card.GetCardType() == CardType.Spell)
                    {
                        cardManager.AddTemporaryTraitToCard(card, new CardTraitData {
                            traitStateName = "CardTraitExhaustState"
                        });
                        cardManager.RefreshCardInHand(card);
                        card.RefreshCardBodyTextLocalization();
                        cardsWeHaveModified.Add(card);
                    }
                }
            }

            yield break;
        }