Example #1
0
        public void RevealEncounterCard()
        {
            if (EncounterDeck.Cards.Count() == 0)
            {
                if (Game.CurrentPhase.Code == PhaseCode.Quest)
                {
                    EncounterDeck.ShuffleDiscardPileIntoDeck();
                }
                else
                {
                    return;
                }
            }

            cancelWhenRevealedEffect = null;

            var card = EncounterDeck.GetFromTop(1).First();

            EncounterDeck.RemoveFromDeck(card);

            RevealedEncounterCard = GetRevealedEncounterCard(card);

            CheckForResponsesToRevealedCard();

            TriggerWhenRevealedEffects(card);

            TriggerOtherEffects(card);

            if (!(RevealedEncounterCard.Card is ITreacheryCard))
            {
                AddToStagingArea(RevealedEncounterCard);
            }

            RevealedEncounterCard = null;
        }
Example #2
0
        public void CancelRevealedCard(ICancelEffect effect)
        {
            if (effect == null)
            {
                throw new ArgumentNullException("effect");
            }

            cancelWhenRevealedEffect = effect;
        }
Example #3
0
        public void CancelRevealedCard(ICancelEffect effect)
        {
            if (effect == null)
                throw new ArgumentNullException("effect");

            cancelWhenRevealedEffect = effect;
        }
Example #4
0
        public void RevealEncounterCard()
        {
            if (EncounterDeck.Cards.Count() == 0)
            {
                if (Game.CurrentPhase.Code == PhaseCode.Quest)
                {
                    EncounterDeck.ShuffleDiscardPileIntoDeck();
                }
                else
                {
                    return;
                }
            }

            cancelWhenRevealedEffect = null;

            var card = EncounterDeck.GetFromTop(1).First();
            EncounterDeck.RemoveFromDeck(card);

            RevealedEncounterCard = GetRevealedEncounterCard(card);

            CheckForResponsesToRevealedCard();

            TriggerWhenRevealedEffects(card);
            
            TriggerOtherEffects(card);

            if (!(RevealedEncounterCard.Card is ITreacheryCard))
            {
                AddToStagingArea(RevealedEncounterCard);
            }

            RevealedEncounterCard = null;
        }