private IEnumerator SelectHeroToPlayRelic(List <PlayCardAction> storedPlay, List <SelectTurnTakerDecision> storedHero, List <bool> couldDecide) { var heroesWithPlayableRelics = FindActiveHeroTurnTakerControllers() .Where(httc => GameController.GetPlayableCardsInHand(httc, false).Any(c => c.IsRelic) && AskIfTurnTakerIsVisibleToCardSource(httc.TurnTaker, GetCardSource()) != false) .Select(httc => httc.TurnTaker); if (heroesWithPlayableRelics.Count() == 0) { couldDecide.Add(false); yield break; } var selectHero = new SelectTurnTakerDecision(GameController, DecisionMaker, heroesWithPlayableRelics, SelectionType.PlayCard, isOptional: true, cardSource: GetCardSource()); IEnumerator coroutine = GameController.SelectTurnTakerAndDoAction(selectHero, tt => PlayRelic(tt, storedPlay)); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } if (selectHero.SelectedTurnTaker != null && DidPlayCards(storedPlay)) { storedHero.Add(selectHero); } yield break; }
private IEnumerator SelectHeroToMoveRelicOnDeck(TurnTaker excludedHero, List <SelectCardDecision> storedMove, bool couldDecidePlay) { var heroesWithMovableRelics = FindActiveHeroTurnTakerControllers() .Where(httc => httc.TurnTaker != excludedHero && httc.TurnTaker.Trash.Cards.Any(c => c.IsRelic) && AskIfTurnTakerIsVisibleToCardSource(httc.TurnTaker, GetCardSource()) != false) .Select(httc => httc.TurnTaker); string message; IEnumerator coroutine; if (heroesWithMovableRelics.Count() == 0) { if (couldDecidePlay) { message = "No hero could return a relic from their trash."; } else { message = $"No heroes could play relics or return relics from their trash, so {DecisionMaker.TurnTaker.Name} will draw a card."; } coroutine = GameController.SendMessageAction(message, Priority.Medium, GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } yield break; } if (!couldDecidePlay) { message = "No hero could play a relic."; coroutine = GameController.SendMessageAction(message, Priority.Medium, GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } } var selectDecision = new SelectTurnTakerDecision(GameController, DecisionMaker, heroesWithMovableRelics, SelectionType.MoveCardOnDeck, isOptional: true, cardSource: GetCardSource()); coroutine = GameController.SelectTurnTakerAndDoAction(selectDecision, tt => SelectAndMoveCardOptional(FindHeroTurnTakerController(tt.ToHero()), c => c.Location == tt.Trash && c.IsRelic, tt.Deck, optional: true, storedResults: storedMove, cardSource: GetCardSource())); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } yield break; }
public override IEnumerator Play() { // "When this card enters play, move it to a play area with no other Relay cards." List <SelectTurnTakerDecision> decisions = new List <SelectTurnTakerDecision>(); IEnumerator directCoroutine = base.GameController.SelectTurnTaker(base.HeroTurnTakerController, SelectionType.MoveCardToPlayArea, decisions, optional: false, additionalCriteria: (TurnTaker tt) => tt.PlayArea.Cards.Where((Card c) => IsRelay(c)).Count() == 0 || tt.PlayArea.Cards.Where((Card c) => IsRelay(c)).Count() == 1 && tt.PlayArea == base.Card.Location, cardSource: GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(directCoroutine)); } else { base.GameController.ExhaustCoroutine(directCoroutine); } SelectTurnTakerDecision choice = decisions.FirstOrDefault(); if (choice != null && choice.SelectedTurnTaker != null) { IEnumerator moveCoroutine = base.GameController.MoveCard(base.TurnTakerController, base.Card, choice.SelectedTurnTaker.PlayArea, playCardIfMovingToPlayArea: false, showMessage: true, responsibleTurnTaker: base.TurnTaker, evenIfIndestructible: true, doesNotEnterPlay: true, cardSource: GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(moveCoroutine)); } else { base.GameController.ExhaustCoroutine(moveCoroutine); } } // "You may play a Relay card from your trash." IEnumerator playCoroutine = base.GameController.SelectAndPlayCard(base.HeroTurnTakerController, base.FindCardsWhere(new LinqCardCriteria((Card c) => IsRelay(c) && c.Location == base.TurnTaker.Trash)), optional: true, isPutIntoPlay: false, cardSource: GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(playCoroutine)); } else { base.GameController.ExhaustCoroutine(playCoroutine); } // "Then, destroy all but 2 Relay cards." IEnumerator destroyCoroutine = DestroyExcessRelaysResponse(); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(destroyCoroutine)); } else { base.GameController.ExhaustCoroutine(destroyCoroutine); } yield break; }
public override IEnumerator Play() { //"One player may return one of their non-character cards in play to their hand.", //"If they do, they may select a card in their trash that shares a keyword with that card and put it into play." var validHeroes = new SelectTurnTakerDecision(GameController, DecisionMaker, GameController.AllHeroControllers.Select((HeroTurnTakerController httc) => httc.TurnTaker), SelectionType.TurnTaker, cardSource: GetCardSource()); IEnumerator coroutine = GameController.SelectTurnTakerAndDoAction(validHeroes, ReturnCardAndRescueMatching); if (UseUnityCoroutines) { yield return(GameController.StartCoroutine(coroutine)); } else { GameController.ExhaustCoroutine(coroutine); } yield break; }
public IEnumerator PlayOngEqpResponse(GameAction ga) { // "... one player may play an Ongoing or Equipment card." IEnumerable <TurnTaker> options = base.GameController.FindTurnTakersWhere((TurnTaker tt) => tt.IsHero && !tt.IsIncapacitatedOrOutOfGame && tt.ToHero().Hand.Cards.Any((Card c) => c.DoKeywordsContain("ongoing") || c.DoKeywordsContain("equipment"))); SelectTurnTakerDecision playerChoice = new SelectTurnTakerDecision(base.GameController, DecisionMaker, options, SelectionType.PlayCard, cardSource: GetCardSource()); IEnumerator selectCoroutine = base.GameController.SelectTurnTakerAndDoAction(playerChoice, PlayOngEqp); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(selectCoroutine)); } else { base.GameController.ExhaustCoroutine(selectCoroutine); } yield break; }
public override IEnumerator UsePower(int index = 0) { //Each player may draw a card. When a player draws a card this way, 1 other player must discard a card. int otherPlayers = GetPowerNumeral(0, 1); List <DrawCardAction> storedResults = new List <DrawCardAction>(); //Each player may draw a card. IEnumerator coroutine = base.EachPlayerDrawsACard(optional: true, allowAutoDraw: false, storedResults: storedResults); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } //When a player draws a card this way... if (storedResults.Any()) { foreach (DrawCardAction action in storedResults) { //If Guise makes more/fewer players discard cards for (int i = 0; i < otherPlayers; i++) { //...1 other player must discard a card. IEnumerable <TurnTaker> choices = base.Game.TurnTakers.Where((TurnTaker tt) => tt.IsHero && tt.ToHero() != action.HeroTurnTaker); SelectTurnTakerDecision decision = new SelectTurnTakerDecision(base.GameController, base.HeroTurnTakerController, choices, SelectionType.DiscardCard, cardSource: base.GetCardSource()); coroutine = base.GameController.SelectTurnTakerAndDoAction(decision, (TurnTaker tt) => base.GameController.SelectAndDiscardCard(base.FindHeroTurnTakerController(tt.ToHero()))); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } } } } yield break; }
public override IEnumerator UseIncapacitatedAbility(int index) { switch (index) { case 0: { // One player may play a card. IEnumerator coroutine3 = SelectHeroToPlayCard(DecisionMaker); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine3)); } else { base.GameController.ExhaustCoroutine(coroutine3); } break; } case 1: { // Add 1 token to your element pool. TokenPool elementPool = base.CharacterCard.FindTokenPool(LadyOfTheWoodElementPoolIdentifier); IEnumerator coroutine2 = base.GameController.AddTokensToPool(elementPool, 1, GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine2)); } else { base.GameController.ExhaustCoroutine(coroutine2); } break; } case 2: { // Spend 1 token from your element pool. If you do, 1 hero deals 1 target 3 damage of any type. TokenPool elementPool = base.CharacterCard.FindTokenPool(LadyOfTheWoodElementPoolIdentifier); List <RemoveTokensFromPoolAction> storedResults = new List <RemoveTokensFromPoolAction>(); IEnumerator coroutine = base.GameController.RemoveTokensFromPool(elementPool, 1, storedResults: storedResults, cardSource: base.GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } if (DidRemoveTokens(storedResults)) { //select a hero character card List <SelectTurnTakerDecision> storedTurnTakerResults = new List <SelectTurnTakerDecision>(); IEnumerator coroutine3 = base.GameController.SelectHeroTurnTaker(DecisionMaker, SelectionType.CardToDealDamage, false, false, storedTurnTakerResults, cardSource: GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine3)); } else { base.GameController.ExhaustCoroutine(coroutine3); } SelectTurnTakerDecision selectTurnTakerDecision = storedTurnTakerResults.FirstOrDefault(); if (selectTurnTakerDecision != null && selectTurnTakerDecision.SelectedTurnTaker != null) { Card source = selectTurnTakerDecision.SelectedTurnTaker.CharacterCard; HeroTurnTakerController httc = FindHeroTurnTakerController(selectTurnTakerDecision.SelectedTurnTaker.ToHero()); //Select a damage type. List <SelectDamageTypeDecision> storedDamageTypeResults = new List <SelectDamageTypeDecision>(); coroutine = base.GameController.SelectDamageType(httc, storedDamageTypeResults, cardSource: GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } DamageType damageType = GetSelectedDamageType(storedDamageTypeResults).Value; //selected hero deals damage of the selected type coroutine3 = base.GameController.SelectTargetsAndDealDamage(httc, new DamageSource(base.GameController, source), 3, damageType, new int?(1), false, new int?(1), cardSource: GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine3)); } else { base.GameController.ExhaustCoroutine(coroutine3); } } } break; } } yield break; }
public override IEnumerator UseIncapacitatedAbility(int index) { IEnumerator coroutine; switch (index) { case (0): { //"One target deals another target 1 melee damage.", List <SelectCardDecision> storedResults = new List <SelectCardDecision>(); coroutine = GameController.SelectCardAndStoreResults(this.DecisionMaker, SelectionType.SelectTargetNoDamage, new LinqCardCriteria((Card c) => c.IsInPlayAndHasGameText && c.IsTarget, "target to deal damage", false), storedResults, false, cardSource: base.GetCardSource()); if (base.UseUnityCoroutines) { yield return(GameController.StartCoroutine(coroutine)); } else { GameController.ExhaustCoroutine(coroutine); } if (DidSelectCard(storedResults)) { Card selectedCard = GetSelectedCard(storedResults); coroutine = GameController.SelectTargetsAndDealDamage(this.DecisionMaker, new DamageSource(GameController, selectedCard), 1, DamageType.Melee, 1, false, 1, additionalCriteria: (Card c) => c != selectedCard, cardSource: GetCardSource()); if (base.UseUnityCoroutines) { yield return(GameController.StartCoroutine(coroutine)); } else { GameController.ExhaustCoroutine(coroutine); } } break; } case (1): { //"Put a card in a trash pile under its associated deck.", var trashesWithCards = GameController.AllTurnTakers.Where(tt => tt.Trash.HasCards && AskIfTurnTakerIsVisibleToCardSource(tt, GetCardSource()) != false).Select(tt => new LocationChoice(tt.Trash)); Func <Location, List <MoveCardDestination> > bottomOfSameDeck = (Location trash) => new List <MoveCardDestination> { new MoveCardDestination(trash.OwnerTurnTaker.Deck, toBottom: true) }; if (trashesWithCards.Count() == 1) { var trash = trashesWithCards.FirstOrDefault().Location; coroutine = GameController.SelectCardsFromLocationAndMoveThem(DecisionMaker, trash, 1, 1, new LinqCardCriteria(c => true), bottomOfSameDeck(trash), cardSource: GetCardSource()); } else { var selectLocation = new SelectLocationDecision(GameController, DecisionMaker, trashesWithCards, SelectionType.MoveCardOnBottomOfDeck, false, cardSource: GetCardSource()); coroutine = GameController.SelectLocationAndDoAction(selectLocation, trash => GameController.SelectCardsFromLocationAndMoveThem(DecisionMaker, trash, 1, 1, new LinqCardCriteria(c => true), bottomOfSameDeck(trash), cardSource: GetCardSource())); } if (UseUnityCoroutines) { yield return(GameController.StartCoroutine(coroutine)); } else { GameController.ExhaustCoroutine(coroutine); } break; } case (2): { //"One player selects a keyword and reveals the top 3 cards of their deck, putting any revealed cards with that keyword into their hand and discarding the rest." var selectHero = new SelectTurnTakerDecision(GameController, DecisionMaker, GameController.AllTurnTakers.Where(tt => tt.IsHero && !tt.IsIncapacitatedOrOutOfGame), SelectionType.RevealCardsFromDeck, cardSource: GetCardSource()); coroutine = GameController.SelectTurnTakerAndDoAction(selectHero, SelectKeywordThenRevealAndMoveCards); if (UseUnityCoroutines) { yield return(GameController.StartCoroutine(coroutine)); } else { GameController.ExhaustCoroutine(coroutine); } break; } } yield break; }
public override IEnumerator UseIncapacitatedAbility(int index) { IEnumerator coroutine; switch (index) { case (0): { //"One hero may put a card from their trash on top of their deck.", var turnTakerDecision = new SelectTurnTakerDecision(GameController, DecisionMaker, GameController.FindTurnTakersWhere((TurnTaker tt) => tt.IsHero && !tt.IsIncapacitatedOrOutOfGame && GameController.IsTurnTakerVisibleToCardSource(tt, GetCardSource())), SelectionType.MoveCardOnDeck, true, cardSource: GetCardSource()); coroutine = GameController.SelectTurnTakerAndDoAction(turnTakerDecision, (TurnTaker tt) => GameController.SelectAndMoveCard(FindHeroTurnTakerController(tt.ToHero()), (Card c) => c.Location == tt.Trash, tt.Deck, cardSource: GetCardSource())); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } break; } case (1): { //"Destroy 1 ongoing card.", coroutine = GameController.SelectAndDestroyCard(DecisionMaker, new LinqCardCriteria((Card c) => c.IsOngoing, "ongoing"), false, cardSource: GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } break; } case (2): { //"Select a target. Until the start of your next turn that target is immune to damage from environment cards." var storedTarget = new List <SelectCardDecision> { }; coroutine = GameController.SelectCardAndStoreResults(DecisionMaker, SelectionType.PreventDamage, new LinqCardCriteria((Card c) => c.IsInPlayAndHasGameText && AskIfCardIsVisibleToCardSource(c, GetCardSource()) != false && c.IsTarget), storedTarget, false, cardSource: GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } var card = storedTarget.FirstOrDefault()?.SelectedCard; if (card != null) { var preventDamage = new ImmuneToDamageStatusEffect(); preventDamage.TargetCriteria.IsSpecificCard = card; preventDamage.SourceCriteria.IsEnvironment = true; preventDamage.UntilStartOfNextTurn(TurnTaker); coroutine = AddStatusEffect(preventDamage); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } } break; } } yield break; }
public override IEnumerator UseIncapacitatedAbility(int index) { switch (index) { case 0: { //one player may discard hand, then draw discarded amount + 1 List <SelectTurnTakerDecision> sttd = new List <SelectTurnTakerDecision>(); List <DiscardCardAction> dca = new List <DiscardCardAction>(); IEnumerator selectPlayer = base.GameController.SelectHeroToDiscardTheirHand(this.DecisionMaker, false, true, false, null, sttd, dca, null, GetCardSource(null)); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(selectPlayer)); } else { base.GameController.ExhaustCoroutine(selectPlayer); } int X = base.GetNumberOfCardsDiscarded(dca); if (base.DidDiscardHand(sttd)) { SelectTurnTakerDecision sttd2 = sttd.FirstOrDefault <SelectTurnTakerDecision>(); IEnumerator drawCards = base.GameController.DrawCards(base.FindHeroTurnTakerController(sttd2.SelectedTurnTaker.ToHero()), X + 1, false, false, null, true, null, null); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(drawCards)); } else { base.GameController.ExhaustCoroutine(drawCards); } } break; } case 1: { //one hero deals a target 3 fire List <SelectCardDecision> storedResults = new List <SelectCardDecision>(); IEnumerator dealFire = base.GameController.SelectCardAndStoreResults(this.DecisionMaker, SelectionType.SelectTargetNoDamage, new LinqCardCriteria((Card c) => c.IsTarget && c.IsInPlay && c.IsHeroCharacterCard, "hero", true, false, null, null, false), storedResults, false, false, null, true, base.GetCardSource(null)); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(dealFire)); } else { base.GameController.ExhaustCoroutine(dealFire); } Card selectedCard = base.GetSelectedCard(storedResults); dealFire = base.GameController.SelectTargetsAndDealDamage(this.DecisionMaker, new DamageSource(base.GameController, selectedCard), 3, DamageType.Fire, 1, false, 0, false, false, false, null, null, null, null, null, false, null, null, false, null, GetCardSource(null)); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(dealFire)); } else { base.GameController.ExhaustCoroutine(dealFire); } break; } case 2: { //the environment deals each non-hero 1 irreducible fire var nonHeroTargets = GameController.FindCardsWhere(new LinqCardCriteria(c => c.IsTarget && c.IsInPlayAndHasGameText && !c.IsHero)); foreach (Card c in nonHeroTargets) { IEnumerator envBurns = base.GameController.DealDamageToTarget(new DamageSource(this.GameController, this.FindEnvironment(null).TurnTaker), c, 1, DamageType.Fire, true, false, null, null, null, null, false, false, GetCardSource(null)); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(envBurns)); } else { base.GameController.ExhaustCoroutine(envBurns); } } break; } } yield break; }
public override IEnumerator UseIncapacitatedAbility(int index) { switch (index) { case 0: { //"One player may put an ongoing card from their trash into their hand.", List <TurnTaker> usableHeroes = GameController.AllTurnTakers .Where((TurnTaker tt) => tt.IsHero && !tt.IsIncapacitatedOrOutOfGame && GameController.IsTurnTakerVisibleToCardSource(tt, GetCardSource()) && tt.Trash.Cards.Where((Card c) => c.IsOngoing).Count() > 0) .ToList(); SelectTurnTakerDecision whoGetsCard = new SelectTurnTakerDecision(GameController, HeroTurnTakerController, usableHeroes, SelectionType.MoveCardToHandFromTrash, isOptional: true, cardSource: GetCardSource()); Func <TurnTaker, IEnumerator> getOngoingFromTrash = (TurnTaker tt) => GameController.SelectAndMoveCard(GameController.FindHeroTurnTakerController(tt.ToHero()), (Card c) => c.IsInTrash && c.IsOngoing && c.Location == tt.Trash, tt.ToHero().Hand, optional: true, cardSource: GetCardSource()); IEnumerator coroutine = GameController.SelectTurnTakerAndDoAction(whoGetsCard, getOngoingFromTrash); if (UseUnityCoroutines) { yield return(GameController.StartCoroutine(coroutine)); } else { GameController.ExhaustCoroutine(coroutine); } break; } case 1: { //"One player may use a power now.", IEnumerator coroutine2 = GameController.SelectHeroToUsePower(HeroTurnTakerController, optionalSelectHero: false, optionalUsePower: true, allowAutoDecide: false, null, null, null, omitHeroesWithNoUsablePowers: true, canBeCancelled: true, GetCardSource()); if (UseUnityCoroutines) { yield return(GameController.StartCoroutine(coroutine2)); } else { GameController.ExhaustCoroutine(coroutine2); } break; } case 2: { //"Look at the top card of a deck, and replace it or discard it." List <SelectLocationDecision> storedDeck = new List <SelectLocationDecision> { }; IEnumerator pickDeck = GameController.SelectADeck(HeroTurnTakerController, SelectionType.RevealTopCardOfDeck, (Location loc) => true, storedDeck, cardSource: GetCardSource()); if (UseUnityCoroutines) { yield return(GameController.StartCoroutine(pickDeck)); } else { GameController.ExhaustCoroutine(pickDeck); } if (!DidSelectDeck(storedDeck)) { yield break; } Location chosenDeck = storedDeck.FirstOrDefault().SelectedLocation.Location; IEnumerator revealTopCard = RevealCard_DiscardItOrPutItOnDeck(HeroTurnTakerController, HeroTurnTakerController, chosenDeck, false); if (UseUnityCoroutines) { yield return(GameController.StartCoroutine(revealTopCard)); } else { GameController.ExhaustCoroutine(revealTopCard); } break; } } yield break; }
public override IEnumerator UseIncapacitatedAbility(int index) { IEnumerator routine; switch (index) { case 0: // Destroy 1 ongoing card. routine = this.GameController.SelectAndDestroyCard(this.HeroTurnTakerController, new LinqCardCriteria(card => card.IsOngoing && card.IsInPlay, "ongoing"), true, cardSource: this.GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(routine)); } else { base.GameController.ExhaustCoroutine(routine); } break; case 1: // One player may draw 2 cards, then discard 2 cards. List <TurnTaker> viableHeroes = GameController.AllHeroes.Where((HeroTurnTaker tt) => !tt.IsIncapacitatedOrOutOfGame && GameController.IsTurnTakerVisibleToCardSource(tt, GetCardSource())).Select(htt => htt as TurnTaker).ToList(); var selectTurnTaker = new SelectTurnTakerDecision(GameController, DecisionMaker, viableHeroes, SelectionType.DiscardAndDrawCard, numberOfCards: 2, cardSource: GetCardSource()); routine = GameController.SelectTurnTakerAndDoAction(selectTurnTaker, MayDrawTwoDiscardTwo); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(routine)); } else { base.GameController.ExhaustCoroutine(routine); } break; case 2: // Move the top card of the villain deck to the bottom of the villain deck. List <SelectLocationDecision> storedResults = new List <SelectLocationDecision>(); routine = FindVillainDeck(this.HeroTurnTakerController, SelectionType.MoveCard, storedResults, loc => !loc.IsSubDeck); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(routine)); } else { base.GameController.ExhaustCoroutine(routine); } Location deck = GetSelectedLocation(storedResults); routine = base.GameController.SelectLocationAndMoveCard(base.HeroTurnTakerController, deck.TopCard, new[] { new MoveCardDestination(deck, toBottom: true, showMessage: true) }, cardSource: GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(routine)); } else { base.GameController.ExhaustCoroutine(routine); } break; } }