/*"Prevent the end of turn effects of Microstorms this turn. For each Microstorm in play, one player may draw 1 card." * "One hero target regains 2 HP." * "Until the start of your next turn, whenever a hero deals damage, another hero regains 1 HP." * "Select a target. Until the start of your next turn, damage dealt to that target is irreducible."*/ public override IEnumerator UsePower(int index = 0) { PreventPhaseEffectStatusEffect ppese = new PreventPhaseEffectStatusEffect(Phase.End); ppese.UntilStartOfNextTurn(base.GameController.FindNextTurnTaker()); ppese.CardCriteria.HasAnyOfTheseKeywords = new List <string>() { "microstorm" }; IEnumerator preventEnd = base.AddStatusEffect(ppese, true); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(preventEnd)); } else { base.GameController.ExhaustCoroutine(preventEnd); } int X = base.FindCardsWhere((Card c) => c.DoKeywordsContain("microstorm", false, false) && c.IsInPlayAndHasGameText, false, null, false).Count <Card>(); for (int i = 0; i < X; i++) { IEnumerator coroutine = base.GameController.SelectHeroToDrawCard(base.HeroTurnTakerController, false, true, false, null, null, new int?(1), base.GetCardSource(null)); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } } yield break; }
protected void PreventStartOfTurnEffects(TurnTakerController ttc, Card cardToPrevent) { PreventPhaseEffectStatusEffect preventPhaseEffectStatusEffect = new PreventPhaseEffectStatusEffect(Phase.Start); preventPhaseEffectStatusEffect.UntilEndOfNextTurn(ttc.TurnTaker); preventPhaseEffectStatusEffect.CardCriteria.IsSpecificCard = cardToPrevent; RunCoroutine(base.GameController.AddStatusEffect(preventPhaseEffectStatusEffect, showMessage: true, ttc.CharacterCardController.GetCardSource())); }
private IEnumerator RemoveEndOfTurnResponse(DealDamageAction dd) { //Non-character-card targets dealt damage this way may not use any End of Turn abilities until the start of {Rockstar}'s next turn. if (dd != null && dd.DidDealDamage && dd.Target != null && !dd.Target.IsCharacter) { PreventPhaseEffectStatusEffect preventPhaseEffectStatusEffect = new PreventPhaseEffectStatusEffect(); preventPhaseEffectStatusEffect.UntilStartOfNextTurn(TurnTaker); preventPhaseEffectStatusEffect.CardCriteria.IsSpecificCard = dd.Target; IEnumerator coroutine = AddStatusEffect(preventPhaseEffectStatusEffect); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } } }
private IEnumerator RemoveEndOfTurnResponse(DealDamageAction dd) { int conduitCount = base.FindCardsWhere((Card c) => c.DoKeywordsContain("conduit", false, false) && c.IsInPlayAndHasGameText && c.Location.IsPlayAreaOf(this.TurnTaker)).Count <Card>(); if (dd != null && dd.DidDealDamage && dd.Target != null && !dd.Target.IsCharacter && conduitCount > 0) { PreventPhaseEffectStatusEffect preventPhaseEffectStatusEffect = new PreventPhaseEffectStatusEffect(Phase.End); preventPhaseEffectStatusEffect.UntilStartOfNextTurn(base.TurnTaker); preventPhaseEffectStatusEffect.CardCriteria.IsSpecificCard = dd.Target; IEnumerator coroutine = base.AddStatusEffect(preventPhaseEffectStatusEffect, true); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } } yield break; }