private IEnumerator FlipVectorResponse(BulkMoveCardsAction bmca)
        {
            // A virus card was moved under this card, check for flip condition
            if (!ShouldVectorFlip())
            {
                yield break;
            }

            // Flip Vector
            if (base.UseUnityCoroutines)
            {
                yield return(base.GameController.StartCoroutine(FlipVector()));
            }
            else
            {
                base.GameController.ExhaustCoroutine(FlipVector());
            }

            yield break;
        }
예제 #2
0
        public IEnumerator CheckForBulkDiscardedPodResponse(BulkMoveCardsAction bmca)
        {
            // "... put that Pod into play."
            //Log.Debug("TheShelledOneCharacterCardController.CheckForBulkDiscardedPodResponse activated");
            //Log.Debug("CheckForBulkDiscardedPodResponse: bmca.IsDiscard: " + bmca.IsDiscard.ToString());
            //Log.Debug("CheckForBulkDiscardedPodResponse: bmca.CardsToMove.Any((Card c) => c.DoKeywordsContain(\"pod\", true, true)): " + bmca.CardsToMove.Any((Card c) => c.DoKeywordsContain("pod", true, true)).ToString());
            if (bmca.IsDiscard && bmca.CardsToMove.Any((Card c) => c.DoKeywordsContain("pod", true, true)))
            {
                Card discardedPod = bmca.CardsToMove.Where((Card c) => c.DoKeywordsContain("pod", true, true)).FirstOrDefault();
                // Make sure the Pod was discarded from the villain deck or the villain revealed zone
                bool flag = false;
                MoveCardJournalEntry mostRecent = (from mc in base.Journal.MoveCardEntriesThisTurn() where mc.Card == discardedPod && mc.ToLocation.IsTrash select mc).LastOrDefault();

                /*Log.Debug("CheckForBulkDiscardedPodResponse: mostRecent == null: " + (mostRecent == null).ToString());
                 * if (mostRecent != null)
                 * {
                 *  Log.Debug("CheckForBulkDiscardedPodResponse: mostRecent.FromLocation.IsVillain: " + mostRecent.FromLocation.IsVillain.ToString());
                 * }*/
                if (mostRecent != null && mostRecent.FromLocation.IsVillain)
                {
                    //Log.Debug("CheckForBulkDiscardedPodResponse: mostRecent.FromLocation.IsDeck: " + mostRecent.FromLocation.IsDeck.ToString());
                    //Log.Debug("CheckForBulkDiscardedPodResponse: mostRecent.FromLocation.IsRevealed: " + mostRecent.FromLocation.IsRevealed.ToString());
                    if (mostRecent.FromLocation.IsDeck)
                    {
                        flag = true;
                    }
                    else if (mostRecent.FromLocation.IsRevealed)
                    {
                        MoveCardJournalEntry mostRecentReveal = (from mc in base.Journal.MoveCardEntriesThisTurn() where mc.Card == discardedPod && mc.ToLocation.IsRevealed select mc).LastOrDefault();

                        /*Log.Debug("CheckForBulkDiscardedPodResponse: mostRecentReveal == null: " + (mostRecentReveal == null).ToString());
                         * if (mostRecentReveal != null)
                         * {
                         *  Log.Debug("CheckForBulkDiscardedPodResponse: mostRecentReveal.FromLocation.IsDeck: " + mostRecentReveal.FromLocation.IsDeck.ToString());
                         * }*/
                        if (mostRecentReveal != null && mostRecentReveal.FromLocation.IsDeck)
                        {
                            flag = true;
                        }
                    }
                }
                //Log.Debug("CheckForBulkDiscardedPodResponse: flag: " + flag.ToString());
                //Log.Debug("CheckForBulkDiscardedPodResponse: discarded.DoKeyWordsContain(\"pod\", true, true): " + discardedPod.DoKeywordsContain("pod", true, true).ToString());
                // If so, set the "did this already this turn" CardProperty and put it into play
                if (flag && discardedPod.DoKeywordsContain("pod", true, true))
                {
                    SetCardPropertyToTrueIfRealAction(OnePodPerTurn);
                    IEnumerator messageCoroutine = base.GameController.SendMessageAction(base.Card.Title + " plays the first discarded Pod!", Priority.Medium, GetCardSource(), associatedCards: discardedPod.ToEnumerable(), showCardSource: true);
                    if (base.UseUnityCoroutines)
                    {
                        yield return(base.GameController.StartCoroutine(messageCoroutine));
                    }
                    else
                    {
                        base.GameController.ExhaustCoroutine(messageCoroutine);
                    }
                    IEnumerator putCoroutine = base.GameController.PlayCard(base.TurnTakerController, discardedPod, isPutIntoPlay: true, responsibleTurnTaker: base.TurnTaker, actionSource: bmca, cardSource: GetCardSource());
                    if (base.UseUnityCoroutines)
                    {
                        yield return(base.GameController.StartCoroutine(putCoroutine));
                    }
                    else
                    {
                        base.GameController.ExhaustCoroutine(putCoroutine);
                    }
                }
            }
            yield break;
        }
예제 #3
0
        private IEnumerator MoveUpCloseToTrash()
        {
            BulkMoveCardsAction upCloseToTrash = new BulkMoveCardsAction(GameController, FindCardsWhere((Card c) => c.Identifier == "UpClose"), TurnTaker.Trash, false, TurnTaker, false, false);

            return(GameController.DoAction(upCloseToTrash));
        }