public override IEnumerator Play() { IEnumerator coroutine; Card characterCard = base.TurnTaker.FindCard("StormTiamatCharacter"); //If {Tiamat}, The Eye of the Storm is active, she deals each hero target 2+X lightning damage, where X is the number of Element of Lightning cards in the villain trash. if (characterCard.IsInPlayAndHasGameText && !characterCard.IsFlipped) { Func <Card, int?> X = (Card c) => new int?(PlusNumberOfThisCardInTrash(2)); coroutine = base.DealDamage(characterCard, (Card c) => c.IsHero, X, DamageType.Lightning); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } } //The hero with the most cards in hand... List <TurnTaker> storedResults = new List <TurnTaker>(); coroutine = base.FindHeroWithMostCardsInHand(storedResults); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } if (storedResults.Count <TurnTaker>() > 0) { //...may not draw cards until the start of the next villain turn. TurnTaker isSpecificTurnTaker = storedResults.First <TurnTaker>(); PreventPhaseActionStatusEffect preventPhaseActionStatusEffect = new PreventPhaseActionStatusEffect(); preventPhaseActionStatusEffect.ToTurnPhaseCriteria.Phase = new Phase?(Phase.DrawCard); preventPhaseActionStatusEffect.ToTurnPhaseCriteria.TurnTaker = isSpecificTurnTaker; preventPhaseActionStatusEffect.UntilStartOfNextTurn(base.TurnTaker); coroutine = base.AddStatusEffect(preventPhaseActionStatusEffect); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } } yield break; }
public override IEnumerator Play() { //Destroy an Environment Card. IEnumerator coroutine = GameController.SelectAndDestroyCard(HeroTurnTakerController, new LinqCardCriteria((Card c) => c.IsEnvironment, "environment"), false, cardSource: GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } //Select a Villain Deck. Until the start of {Rockstar}'s next turn, the target deck may not play cards. List <SelectLocationDecision> storedResults = new List <SelectLocationDecision>(); coroutine = GameController.SelectADeck(DecisionMaker, SelectionType.CannotPlayCards, loc => loc.IsVillain, storedResults, cardSource: GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } if (DidSelectLocation(storedResults)) { Location targetDeck = GetSelectedLocation(storedResults); CannotPlayCardsStatusEffect cannotPlayCardsStatusEffect = new CannotPlayCardsStatusEffect(); cannotPlayCardsStatusEffect.CardCriteria.NativeDeck = targetDeck; cannotPlayCardsStatusEffect.UntilStartOfNextTurn(TurnTaker); coroutine = AddStatusEffect(cannotPlayCardsStatusEffect); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } if (!targetDeck.IsSubDeck) { PreventPhaseActionStatusEffect preventPhaseActionStatusEffect = new PreventPhaseActionStatusEffect(); preventPhaseActionStatusEffect.ToTurnPhaseCriteria.Phase = Phase.PlayCard; preventPhaseActionStatusEffect.ToTurnPhaseCriteria.TurnTaker = targetDeck.OwnerTurnTaker; preventPhaseActionStatusEffect.UntilStartOfNextTurn(TurnTaker); coroutine = AddStatusEffect(preventPhaseActionStatusEffect); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } } } //The Villain target with the highest HP deals Rockstar 3 Irreducible Projectile Damage. List <Card> storedVillainResults = new List <Card>(); DealDamageAction gameAction = new DealDamageAction(GameController, null, CharacterCard, 3, DamageType.Projectile, isIrreducible: true); coroutine = base.GameController.FindTargetWithHighestHitPoints(1, (Card card) => IsVillainTarget(card), storedVillainResults, gameAction, cardSource: GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } Card card2 = storedVillainResults.FirstOrDefault(); if (card2 != null) { coroutine = DealDamage(card2, CharacterCard, 3, DamageType.Projectile, isIrreducible: true, cardSource: GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } } yield break; }