public override IEnumerator Play() { //Until the start of your next turn, reduce damage dealt to {Baccarat} by 1. ReduceDamageStatusEffect reduceDamageStatusEffect = new ReduceDamageStatusEffect(1); reduceDamageStatusEffect.SourceCriteria.IsSpecificCard = base.CharacterCard; reduceDamageStatusEffect.UntilTargetLeavesPlay(base.CharacterCard); reduceDamageStatusEffect.UntilStartOfNextTurn(base.TurnTaker); IEnumerator coroutine = base.AddStatusEffect(reduceDamageStatusEffect, true); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } coroutine = base.GameController.SelectTargetsAndDealDamage(this.DecisionMaker, new DamageSource(base.GameController, base.CharacterCard), 2, DamageType.Melee, new int?(1), false, new int?(1), false, false, false, null, null, null, null, null, false, null, null, false, null, base.GetCardSource(null)); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } yield break; }
private IEnumerator UseGrantedPower() { int reduces = GetPowerNumeral(0, 2); var usePowerAction = ActionSources.OfType <UsePowerAction>().First(); var cs = usePowerAction.CardSource ?? usePowerAction.Power.CardSource; var card = GetCardThisCardIsNextTo(); ReduceDamageStatusEffect effect = new ReduceDamageStatusEffect(reduces); effect.CardSource = cs.Card; effect.UntilStartOfNextTurn(this.DecisionMaker.TurnTaker); effect.TargetCriteria.IsInPlayAndNotUnderCard = true; effect.TargetCriteria.IsHero = true; effect.TargetCriteria.IsTarget = true; var coroutine = GameController.AddStatusEffect(effect, true, cs); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } yield break; }
public IEnumerator ReduceRetaliateResponse(DealDamageAction dda) { SetCardPropertyToTrueIfRealAction(OncePerTurn); // "... reduce damage dealt to {FractureCharacter} this turn by 1..." ReduceDamageStatusEffect protection = new ReduceDamageStatusEffect(1); protection.TargetCriteria.IsSpecificCard = base.CharacterCard; protection.UntilThisTurnIsOver(base.Game); IEnumerator statusCoroutine = base.GameController.AddStatusEffect(protection, true, GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(statusCoroutine)); } else { base.GameController.ExhaustCoroutine(statusCoroutine); } // "... and {FractureCharacter} may deal the source of that damage 1 psychic damage." if (dda.DamageSource != null && dda.DamageSource.IsTarget) { IEnumerator damageCoroutine = DealDamage(base.CharacterCard, dda.DamageSource.Card, 1, DamageType.Psychic, optional: true, isCounterDamage: true, cardSource: GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(damageCoroutine)); } else { base.GameController.ExhaustCoroutine(damageCoroutine); } } yield break; }
private IEnumerator EndOfTurnReponse(PhaseChangeAction pca) { List <SelectCardDecision> storedResult = new List <SelectCardDecision>(); var coroutine = base.GameController.SelectCardAndStoreResults(this.DecisionMaker, SelectionType.ReduceDamageTaken, new LinqCardCriteria(c => c.IsHero && c.IsTarget && c.IsInPlayAndHasGameText, "hero target"), storedResult, false, cardSource: GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } if (DidSelectCard(storedResult)) { var card = GetSelectedCard(storedResult); ReduceDamageStatusEffect effect = new ReduceDamageStatusEffect(1); effect.TargetCriteria.IsSpecificCard = card; effect.UntilStartOfNextTurn(DecisionMaker.TurnTaker); effect.UntilTargetLeavesPlay(card); effect.CardSource = Card; coroutine = AddStatusEffect(effect); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } } yield break; }
private ReduceDamageStatusEffect GetExistingEffect(ReduceDamageStatusEffect newEffect) { var foundEffect = Game.StatusEffects.Where((StatusEffect se) => se is ReduceDamageStatusEffect && (se as ReduceDamageStatusEffect).IsSameAs(newEffect)).FirstOrDefault(); Log.Debug($"Found Status Effect: {foundEffect}"); return(foundEffect != null ? foundEffect as ReduceDamageStatusEffect : null); }
public IEnumerator ApplyStatusesResponse(DealDamageAction dda) { // "... reduce damage dealt by that target to {TheGoalieCharacter} by 1 and increase damage dealt by {TheGoalieCharacter} to that target by 1 until the end of your next turn." ReduceDamageStatusEffect reduction = new ReduceDamageStatusEffect(1); reduction.SourceCriteria.IsSpecificCard = dda.DamageSource.Card; reduction.TargetCriteria.IsSpecificCard = base.CharacterCard; reduction.UntilCardLeavesPlay(dda.DamageSource.Card); reduction.UntilCardLeavesPlay(base.CharacterCard); reduction.UntilEndOfNextTurn(base.TurnTaker); IncreaseDamageStatusEffect increase = new IncreaseDamageStatusEffect(1); increase.SourceCriteria.IsSpecificCard = base.CharacterCard; increase.TargetCriteria.IsSpecificCard = dda.DamageSource.Card; increase.UntilCardLeavesPlay(dda.DamageSource.Card); increase.UntilCardLeavesPlay(base.CharacterCard); increase.UntilEndOfNextTurn(base.TurnTaker); IEnumerator reduceCoroutine = AddStatusEffect(reduction); IEnumerator increaseCoroutine = AddStatusEffect(increase); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(reduceCoroutine)); yield return(base.GameController.StartCoroutine(increaseCoroutine)); } else { base.GameController.ExhaustCoroutine(reduceCoroutine); base.GameController.ExhaustCoroutine(increaseCoroutine); } yield break; }
public override IEnumerator UsePower(int index = 0) { int reduces = GetPowerNumeral(0, 1); var effect = new ReduceDamageStatusEffect(reduces); effect.CardSource = Card; effect.Identifier = Card.Title; effect.NumberOfUses = 1; effect.TargetCriteria.IsSpecificCard = CharacterCard; var coroutine = base.AddStatusEffect(effect, true); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } coroutine = base.DrawACardOrPlayACard(DecisionMaker, true); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } }
private IEnumerator DealtDamageResponse(DealDamageAction action) { var reduceDamageEffect = new ReduceDamageStatusEffect(1); reduceDamageEffect.UntilStartOfNextTurn(this.TurnTaker); reduceDamageEffect.TargetCriteria.IsSpecificCard = this.CharacterCard; reduceDamageEffect.CardSource = this.Card; IEnumerator coroutine; var maybeExistingEffect = GetExistingEffect(reduceDamageEffect); if (maybeExistingEffect != null) { maybeExistingEffect.CombineWithStatusEffect(reduceDamageEffect); coroutine = GameController.SendMessageAction($"{this.CharacterCard.Title}'s damage resistance from {this.Card.Title} increases to {maybeExistingEffect.Amount}.", Priority.Medium, GetCardSource()); } else { coroutine = AddStatusEffect(reduceDamageEffect, true); } if (UseUnityCoroutines) { yield return(GameController.StartCoroutine(coroutine)); } else { GameController.ExhaustCoroutine(coroutine); } yield break; }
public override IEnumerator UsePower(int index = 0) { // "Reduce the next damage dealt to {FractureCharacter} by 1. {FractureCharacter} deals 1 target 1 melee damage." int reduceDamage = GetPowerNumeral(0, 1); int numTargets = GetPowerNumeral(1, 1); int meleeDamage = GetPowerNumeral(2, 1); ReduceDamageStatusEffect toughness = new ReduceDamageStatusEffect(reduceDamage); toughness.TargetCriteria.IsSpecificCard = base.Card; toughness.NumberOfUses = 1; toughness.CardDestroyedExpiryCriteria.Card = base.Card; IEnumerator statusCoroutine = base.GameController.AddStatusEffect(toughness, true, GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(statusCoroutine)); } else { base.GameController.ExhaustCoroutine(statusCoroutine); } IEnumerator meleeCoroutine = base.GameController.SelectTargetsAndDealDamage(base.HeroTurnTakerController, new DamageSource(base.GameController, base.Card), (Card c) => meleeDamage, DamageType.Melee, () => numTargets, false, numTargets, cardSource: GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(meleeCoroutine)); } else { base.GameController.ExhaustCoroutine(meleeCoroutine); } yield break; }
protected IEnumerator ReduceDamageDealtByThatTargetIfDamagedUntilTheStartOfYourNextTurnResponse(DealDamageAction dd, int amount) { if (!dd.DidDealDamage) { yield break; } ReduceDamageStatusEffect reduceDamageStatusEffect = new ReduceDamageStatusEffect(amount); reduceDamageStatusEffect.SourceCriteria.IsSpecificCard = dd.Target; reduceDamageStatusEffect.UntilStartOfNextTurn(TurnTaker); reduceDamageStatusEffect.UntilTargetLeavesPlay(dd.Target); IEnumerator coroutine = AddStatusEffect(reduceDamageStatusEffect); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } }
private IEnumerator UseIncapOption1() { // "Select a target. Reduce the next damage dealt to that target by 2." List <SelectCardDecision> choices = new List <SelectCardDecision>(); IEnumerator chooseCoroutine = base.GameController.SelectCardAndStoreResults(base.HeroTurnTakerController, SelectionType.ReduceNextDamageTaken, new LinqCardCriteria((Card c) => c.IsInPlay && c.IsTarget, "target", useCardsSuffix: false), choices, false, cardSource: GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(chooseCoroutine)); } else { base.GameController.ExhaustCoroutine(chooseCoroutine); } SelectCardDecision choice = choices.FirstOrDefault(); if (choice != null && choice.SelectedCard != null) { ReduceDamageStatusEffect protectEffect = new ReduceDamageStatusEffect(2); protectEffect.NumberOfUses = 1; protectEffect.TargetCriteria.IsSpecificCard = choice.SelectedCard; IEnumerator statusCoroutine = base.GameController.AddStatusEffect(protectEffect, true, GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(statusCoroutine)); } else { base.GameController.ExhaustCoroutine(statusCoroutine); } } yield break; }
public override IEnumerator UsePower(int index = 0) { int reduces = GetPowerNumeral(0, 1); var card = GetCardThisCardIsNextTo(); ReduceDamageStatusEffect effect = new ReduceDamageStatusEffect(reduces); effect.CardSource = card; //TODO - PROMO - CardSource can be Malichae effect.UntilStartOfNextTurn(this.DecisionMaker.TurnTaker); effect.TargetCriteria.IsInPlayAndNotUnderCard = true; effect.TargetCriteria.IsHero = true; effect.TargetCriteria.IsTarget = true; var coroutine = GameController.AddStatusEffect(effect, true, GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } coroutine = DestroySelf(); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } yield break; }
protected void AddReduceDamageOfDamageTypeTrigger(HeroTurnTakerController httc, DamageType damageType, int amount) { ReduceDamageStatusEffect reduceDamageStatusEffect = new ReduceDamageStatusEffect(amount); reduceDamageStatusEffect.DamageTypeCriteria.AddType(damageType); reduceDamageStatusEffect.NumberOfUses = 1; this.RunCoroutine(this.GameController.AddStatusEffect(reduceDamageStatusEffect, true, new CardSource(httc.CharacterCardController))); }
public override IEnumerator UseIncapacitatedAbility(int index) { IEnumerator coroutine; switch (index) { case 0: { //"One player may play a card now.", coroutine = GameController.SelectHeroToPlayCard(DecisionMaker, cardSource: GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } break; } case 1: { //"One player may draw a card now.", coroutine = GameController.SelectHeroToDrawCard(DecisionMaker, cardSource: GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } break; } case 2: { //"Until the start of your next turn, reduce damage dealt by environment cards to hero targets by 2." ReduceDamageStatusEffect reduceDamage = new ReduceDamageStatusEffect(2); reduceDamage.SourceCriteria.IsEnvironment = true; reduceDamage.TargetCriteria.IsHero = true; reduceDamage.UntilStartOfNextTurn(this.TurnTaker); coroutine = GameController.AddStatusEffect(reduceDamage, true, GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } break; } } yield break; }
private IEnumerator ReduceNextDamageDealtByThatTargetResponse(DealDamageAction action, int amount) { ReduceDamageStatusEffect reduceDamageStatusEffect = new ReduceDamageStatusEffect(amount); reduceDamageStatusEffect.SourceCriteria.IsSpecificCard = action.Target; reduceDamageStatusEffect.NumberOfUses = 1; reduceDamageStatusEffect.UntilTargetLeavesPlay(action.Target); return(AddStatusEffect(reduceDamageStatusEffect)); }
protected void AddReduceDamageTrigger(TurnTakerController ttc, bool heroesReduce, bool villainsReduce, int amount) { ReduceDamageStatusEffect effect = new ReduceDamageStatusEffect(amount); effect.TargetCriteria.IsHero = new bool?(heroesReduce); effect.TargetCriteria.IsVillain = new bool?(villainsReduce); effect.UntilStartOfNextTurn(ttc.TurnTaker); this.RunCoroutine(this.GameController.AddStatusEffect(effect, true, new CardSource(ttc.CharacterCardController))); }
private IEnumerator EndOfTurnResponse() { List <SelectCardDecision> storedResults = new List <SelectCardDecision>(); IEnumerator coroutine = base.GameController.SelectTargetsAndDealDamage(base.HeroTurnTakerController, new DamageSource(base.GameController, base.CharacterCard), 1, DamageType.Projectile, 1, false, 1, false, false, false, null, storedResults, null, null, null, true, null, null, false, null, GetCardSource(null)); if (UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } Card target = storedResults.FirstOrDefault()?.SelectedCard; if ((base.GameController.IsCardInPlayAndNotUnderCard(base.PsionicTorrentIdentifier) || base.GameController.IsCardInPlayAndNotUnderCard(base.ToxicCloudIdentifier)) && target != null) { ReduceDamageStatusEffect rdse = new ReduceDamageStatusEffect(1); rdse.SourceCriteria.IsSpecificCard = target; rdse.UntilStartOfNextTurn(this.TurnTaker); rdse.UntilCardLeavesPlay(target); coroutine = AddStatusEffect(rdse, true); if (UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } } if (base.GameController.IsCardInPlayAndNotUnderCard(base.PsionicTorrentIdentifier) && base.GameController.IsCardInPlayAndNotUnderCard(base.ToxicCloudIdentifier)) { PreventPhaseActionStatusEffect ppase = new PreventPhaseActionStatusEffect(); ppase.ToTurnPhaseCriteria.Phase = new Phase?(Phase.PlayCard); ppase.ToTurnPhaseCriteria.TurnTaker = base.FindEnvironment(null).TurnTaker; ppase.UntilEndOfPhase(base.FindEnvironment(null).TurnTaker, Phase.PlayCard); coroutine = AddStatusEffect(ppase, true); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } coroutine = base.GameController.SendMessageAction("Skip the next environment play phase!", Priority.High, GetCardSource(null), null, false); if (UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } } }
public override IEnumerator Play() { //Find the hero with the most cards in hand List <TurnTaker> storedResults = new List <TurnTaker>(); IEnumerator coroutine = base.FindHeroWithMostCardsInHand(storedResults, 1, 1, null, null, false, false); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } TurnTaker turnTaker = storedResults.FirstOrDefault <TurnTaker>(); if (turnTaker != null) { //Anathema deals the Hero target with the most cards in hand {H-1} melee damage. HeroTurnTakerController hero = base.FindHeroTurnTakerController(turnTaker as HeroTurnTaker); IEnumerator coroutine2 = base.DealDamage(base.CharacterCard, hero.CharacterCard, base.H - 1, DamageType.Melee, false, false, false, null, null, null, false, base.GetCardSource(null)); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine2)); } else { base.GameController.ExhaustCoroutine(coroutine2); } } //Until the start of the next Villain Turn, increase damage dealt by Villain targets by 1 and reduce damage dealt to Villain targets by 1. ReduceDamageStatusEffect reduceDamageStatusEffect = new ReduceDamageStatusEffect(1); reduceDamageStatusEffect.TargetCriteria.IsVillain = true;; reduceDamageStatusEffect.UntilStartOfNextTurn(this.TurnTaker); IEnumerator reduceCoroutine = this.AddStatusEffect(reduceDamageStatusEffect, true); IncreaseDamageStatusEffect increaseDamageStatusEffect = new IncreaseDamageStatusEffect(1); increaseDamageStatusEffect.SourceCriteria.IsVillain = true;; increaseDamageStatusEffect.UntilStartOfNextTurn(this.TurnTaker); IEnumerator increaseCoroutine = this.AddStatusEffect(increaseDamageStatusEffect, true); if (this.UseUnityCoroutines) { yield return(this.GameController.StartCoroutine(reduceCoroutine)); yield return(this.GameController.StartCoroutine(increaseCoroutine)); } else { this.GameController.ExhaustCoroutine(reduceCoroutine); this.GameController.ExhaustCoroutine(increaseCoroutine); } yield break; }
public override IEnumerator UseIncapacitatedAbility(int index) { switch (index) { case 0: { //destroy an Ongoing or Device var destroy = this.GameController.SelectAndDestroyCard(HeroTurnTakerController, new LinqCardCriteria(c => c.IsOngoing || c.IsDevice), false, cardSource: GetCardSource()); if (UseUnityCoroutines) { yield return(this.GameController.StartCoroutine(destroy)); } else { this.GameController.ExhaustCoroutine(destroy); } break; } case 1: { //One player may play a card now var guide = SelectHeroToPlayCard(HeroTurnTakerController); if (UseUnityCoroutines) { yield return(this.GameController.StartCoroutine(guide)); } else { this.GameController.ExhaustCoroutine(guide); } break; } case 2: { //Reduce damage dealt to Hero characters ReduceDamageStatusEffect rdse = new ReduceDamageStatusEffect(1); rdse.TargetCriteria.IsHero = true; rdse.UntilStartOfNextTurn(TurnTaker); var protect = AddStatusEffect(rdse); if (UseUnityCoroutines) { yield return(this.GameController.StartCoroutine(protect)); } else { this.GameController.ExhaustCoroutine(protect); } break; } } }
public override IEnumerator UsePower(int index = 0) { // Reduce damage dealt to {MigrantCoder} by 1 until the start of your next turn. var damageReduceAmount = GetPowerNumeral(0, 1); var effect = new ReduceDamageStatusEffect(damageReduceAmount); effect.TargetCriteria.IsSpecificCard = this.CharacterCard; effect.TargetCriteria.OutputString = this.TurnTaker.Name; effect.UntilStartOfNextTurn(this.TurnTaker); return(AddStatusEffect(effect)); }
public override IEnumerator UsePower(int index = 0) { IEnumerator coroutine; ReduceDamageStatusEffect reduceDamageStatusEffect = new ReduceDamageStatusEffect(this.GetPowerNumeral(0, 1)); reduceDamageStatusEffect.SourceCriteria.IsSpecificCard = this.CharacterCard; reduceDamageStatusEffect.UntilThisTurnIsOver(this.Game); coroutine = base.AddStatusEffect(reduceDamageStatusEffect, true); if (this.UseUnityCoroutines) { yield return(this.GameController.StartCoroutine(coroutine)); } else { this.GameController.ExhaustCoroutine(coroutine); } if (this.HeroTurnTaker.Deck.IsEmpty) { coroutine = this.GameController.SendMessageAction(this.TurnTaker.Name + " cannot play the top card of their deck, so" + this.Card.AlternateTitleOrTitle + " has no effect.", Priority.Medium, this.GetCardSource()); if (this.UseUnityCoroutines) { yield return(this.GameController.StartCoroutine(coroutine)); } else { this.GameController.ExhaustCoroutine(coroutine); } } else { coroutine = this.GameController.PlayTopCard(this.DecisionMaker, this.TurnTakerController, numberOfCards: 1, cardSource: this.GetCardSource()); if (this.UseUnityCoroutines) { yield return(this.GameController.StartCoroutine(coroutine)); } else { this.GameController.ExhaustCoroutine(coroutine); } } coroutine = this.AdditionalPhaseActionThisTurn(this.HeroTurnTaker, Phase.UsePower, 1, true); if (this.UseUnityCoroutines) { yield return(this.GameController.StartCoroutine(coroutine)); } else { this.GameController.ExhaustCoroutine(coroutine); } }
public override IEnumerator Play() { int mana = ManaPool.CurrentValue; var pay = this.GameController.RemoveTokensFromPool(ManaPool, mana, cardSource: GetCardSource()); if (UseUnityCoroutines) { yield return(this.GameController.StartCoroutine(pay)); } else { this.GameController.ExhaustCoroutine(pay); } var damage = DealDamage(CharacterCard, c => c == CharacterCard || !c.IsHero, mana, DamageType.Energy); if (UseUnityCoroutines) { yield return(this.GameController.StartCoroutine(damage)); } else { this.GameController.ExhaustCoroutine(damage); } ReduceDamageStatusEffect rdse = new ReduceDamageStatusEffect(mana); rdse.SourceCriteria.IsSpecificCard = CharacterCard; rdse.UntilEndOfNextTurn(TurnTaker); var status = AddStatusEffect(rdse); if (UseUnityCoroutines) { yield return(this.GameController.StartCoroutine(status)); } else { this.GameController.ExhaustCoroutine(status); } //Prevent Tokens added to Mana Pool until End of Next Turn //tokenPrevent = new Trigger<AddTokensToPoolAction>(GameController, attp => attp.TokenPool == ManaPool, attp => CancelAction(attp, false, true, null, true), new List<TriggerType>() { TriggerType.CancelAction }, TriggerTiming.Before, GetCardSource()); //AddToTemporaryTriggerList(tokenPrevent); //OnPhaseChangeStatusEffect pcse = new OnPhaseChangeStatusEffect(Card, "RemoveTokenTrigger", "removed the restriction on Adding tokens to the Mana Pool", new TriggerType[1] { TriggerType.RemoveTrigger }, Card); //pcse.TurnPhaseCriteria.ExcludeRoundNumber = Game.TurnIndex; //pcse.TurnPhaseCriteria.Phase = Phase.End; //pcse.TurnPhaseCriteria.TurnTaker = TurnTaker; //pcse.UntilEndOfNextTurn(TurnTaker); //status = AddStatusEffect(pcse, false); //if (UseUnityCoroutines) { yield return this.GameController.StartCoroutine(status); } else { this.GameController.ExhaustCoroutine(status); } }
public override IEnumerator UsePower(int index = 0) { //{Rockstar} deals one target 2 melee damage. int powerNumeral = GetPowerNumeral(0, 2); int powerNumeral2 = GetPowerNumeral(1, 1); List <DealDamageAction> storedResults = new List <DealDamageAction>(); IEnumerator coroutine = GameController.SelectTargetsAndDealDamage(HeroTurnTakerController, new DamageSource(GameController, CharacterCard), powerNumeral, DamageType.Melee, 1, false, 1, storedResultsDamage: storedResults, cardSource: GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } if (DidDealDamage(storedResults)) { Card target = storedResults.First().Target; //If a target takes damage this way, redirect all damage dealt by that target to { Rockstar} and reduce damage dealt by that target by 1 until the start of your next turn. RedirectDamageStatusEffect redirectEffect = new RedirectDamageStatusEffect(); redirectEffect.SourceCriteria.IsSpecificCard = target; redirectEffect.UntilStartOfNextTurn(TurnTaker); redirectEffect.RedirectTarget = CharacterCard; redirectEffect.UntilCardLeavesPlay(target); redirectEffect.UntilTargetLeavesPlay(target); redirectEffect.TargetRemovedExpiryCriteria.Card = target; IEnumerator redirectCoroutine = AddStatusEffect(redirectEffect); ReduceDamageStatusEffect reduceEffect = new ReduceDamageStatusEffect(1); reduceEffect.SourceCriteria.IsSpecificCard = target; reduceEffect.UntilStartOfNextTurn(TurnTaker); reduceEffect.UntilCardLeavesPlay(target); reduceEffect.UntilTargetLeavesPlay(target); reduceEffect.TargetRemovedExpiryCriteria.Card = target; IEnumerator reduceCoroutine = AddStatusEffect(reduceEffect); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(redirectCoroutine)); yield return(base.GameController.StartCoroutine(reduceCoroutine)); } else { base.GameController.ExhaustCoroutine(redirectCoroutine); base.GameController.ExhaustCoroutine(reduceCoroutine); } } }
public override IEnumerator UseIncapacitatedAbility(int index) { switch (index) { case 0: { var heal = this.GameController.SelectAndGainHP(HeroTurnTakerController, 1, false, c => c.IsHeroCharacterCard, 1, 0, cardSource: GetCardSource()); if (UseUnityCoroutines) { yield return(this.GameController.StartCoroutine(heal)); } else { this.GameController.ExhaustCoroutine(heal); } break; } case 1: { var draw = this.GameController.SelectHeroToDrawCard(HeroTurnTakerController, numberOfCards: 1, cardSource: GetCardSource()); if (UseUnityCoroutines) { yield return(this.GameController.StartCoroutine(draw)); } else { this.GameController.ExhaustCoroutine(draw); } break; } case 2: { ReduceDamageStatusEffect rdse = new ReduceDamageStatusEffect(1); rdse.TargetCriteria.IsHero = true; rdse.UntilStartOfNextTurn(TurnTaker); var protect = AddStatusEffect(rdse); if (UseUnityCoroutines) { yield return(this.GameController.StartCoroutine(protect)); } else { this.GameController.ExhaustCoroutine(protect); } break; } } }
public override IEnumerator Play() { //"Search your deck for a copy of “Plate Mail” or “Plate Helm” and put it into play. Shuffle your deck.", //"Select a hero target. Until the start of your next turn, reduce damage dealt to that target by 1." var criteria = new LinqCardCriteria(c => c.Identifier == "PlateHelm" || c.Identifier == "PlateMail", "armor"); var coroutine = base.SearchForCards(this.DecisionMaker, true, false, 1, 1, criteria, true, false, false, shuffleAfterwards: true); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } var storedResult = new List <SelectCardDecision>(); criteria = new LinqCardCriteria(c => c.IsHero && c.IsTarget && c.IsInPlayAndHasGameText, "hero target"); coroutine = base.GameController.SelectCardAndStoreResults(this.DecisionMaker, SelectionType.ReduceDamageTaken, criteria, storedResult, false, cardSource: base.GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } if (DidSelectCard(storedResult)) { Card card = GetSelectedCard(storedResult); ReduceDamageStatusEffect reduceDamageStatusEffect = new ReduceDamageStatusEffect(1); reduceDamageStatusEffect.TargetCriteria.IsSpecificCard = card; reduceDamageStatusEffect.UntilStartOfNextTurn(base.TurnTaker); reduceDamageStatusEffect.UntilTargetLeavesPlay(card); coroutine = base.AddStatusEffect(reduceDamageStatusEffect, true); 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 draw 3 cards. { List <DrawCardAction> storedResults = new List <DrawCardAction>(); IEnumerator coroutine = base.GameController.SelectHeroToDrawCards(base.HeroTurnTakerController, 3, true, false, null, true, null); //If they do, they must discard 1 card. if (base.DidDrawCards(storedResults, new int?(1))) { IEnumerator coroutine2 = base.GameController.SelectAndDiscardCard(HeroTurnTakerController, false, null, null, SelectionType.DiscardCard, null, null, false, null, base.GetCardSource(null)); } } break; } case 1: { //One hero deals 1 target 3 melee damage. IEnumerator coroutine = base.GameController.SelectHeroToSelectTargetAndDealDamage(this.DecisionMaker, 3, DamageType.Melee, false, false, true, false, null, base.GetCardSource(null)); break; } case 2: { //Choose a Target. Reduce damage dealt by that target by 2 until the start of your turn. List <SelectCardDecision> storedResults = new List <SelectCardDecision>(); IEnumerator coroutine = base.GameController.SelectCardAndStoreResults(this.DecisionMaker, SelectionType.SelectTargetNoDamage, new LinqCardCriteria((Card c) => c.IsInPlay && c.IsTarget, "target", false, false, null, "targets", false), storedResults, false, false, null, true, base.GetCardSource(null)); SelectCardDecision selected = storedResults.FirstOrDefault <SelectCardDecision>(); if (selected != null && selected.SelectedCard != null) { ReduceDamageStatusEffect reduceDamageStatusEffect = new ReduceDamageStatusEffect(1); reduceDamageStatusEffect.SourceCriteria.IsSpecificCard = selected.SelectedCard; reduceDamageStatusEffect.UntilStartOfNextTurn(base.TurnTaker); reduceDamageStatusEffect.UntilTargetLeavesPlay(selected.SelectedCard); coroutine = base.AddStatusEffect(reduceDamageStatusEffect, true); } break; } } return(base.UseIncapacitatedAbility(index)); }
public override IEnumerator UsePower(int index = 0) { int powerNumeral = this.GetPowerNumeral(0, 1); List <PlayCardAction> storedResults = new List <PlayCardAction>(); IEnumerator coroutine; // Reduce Nightmist's damage to hero targets. ReduceDamageStatusEffect statusEffect = new ReduceDamageStatusEffect(powerNumeral); statusEffect.UntilThisTurnIsOver(this.Game); statusEffect.TargetCriteria.IsHero = true; statusEffect.SourceCriteria.IsSpecificCard = this.CharacterCard; coroutine = this.AddStatusEffect(statusEffect, true); if (this.UseUnityCoroutines) { yield return(this.GameController.StartCoroutine(coroutine)); } else { this.GameController.ExhaustCoroutine(coroutine); } // Play a card coroutine = this.GameController.SelectAndPlayCardFromHand(this.HeroTurnTakerController, true, storedResults: storedResults, cardSource: this.GetCardSource()); if (this.UseUnityCoroutines) { yield return(this.GameController.StartCoroutine(coroutine)); } else { this.GameController.ExhaustCoroutine(coroutine); } if (storedResults.Count == 0 || !storedResults.FirstOrDefault().WasCardPlayed) { // If you didn't, draw a card. coroutine = this.DrawCards(this.DecisionMaker, 1); if (this.UseUnityCoroutines) { yield return(this.GameController.StartCoroutine(coroutine)); } else { this.GameController.ExhaustCoroutine(coroutine); } } }
public override IEnumerator UsePower(int index = 0) { int powerNumeral = base.GetPowerNumeral(0, 1); int powerNumeral2 = base.GetPowerNumeral(1, 1); List <SelectCardDecision> storedResults = new List <SelectCardDecision>(); IEnumerator coroutine = base.GameController.SelectCardAndStoreResults(this.DecisionMaker, SelectionType.SelectTargetFriendly, new LinqCardCriteria((Card c) => c.IsInPlayAndHasGameText && c.IsTarget, "hero target in play", false, false, null, null, false), storedResults, true, false, null, true, base.GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } Card selectedCard = base.GetSelectedCard(storedResults); ReduceDamageStatusEffect rdse = new ReduceDamageStatusEffect(powerNumeral); rdse.TargetCriteria.IsSpecificCard = selectedCard; rdse.UntilStartOfNextTurn(base.TurnTaker); rdse.UntilCardLeavesPlay(selectedCard); coroutine = base.AddStatusEffect(rdse, true); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } ReduceDamageStatusEffect rdse2 = new ReduceDamageStatusEffect(powerNumeral2); rdse2.TargetCriteria.IsSpecificCard = selectedCard; rdse2.DamageTypeCriteria.AddType(DamageType.Projectile); rdse2.UntilStartOfNextTurn(base.TurnTaker); rdse2.UntilCardLeavesPlay(selectedCard); IEnumerator coroutine2 = base.AddStatusEffect(rdse2, true); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine2)); } else { base.GameController.ExhaustCoroutine(coroutine2); } }
public override IEnumerator UsePower(int index = 0) { ReduceDamageStatusEffect rdse = new ReduceDamageStatusEffect(1); rdse.TargetCriteria.IsOneOfTheseCards = (List <Card>)FindCardsWhere(c => c == CharacterCard || (c.DoKeywordsContain("dragon") && c.Owner == TurnTaker)); rdse.UntilStartOfNextTurn(TurnTaker); var dragons = AddStatusEffect(rdse); if (UseUnityCoroutines) { yield return(this.GameController.StartCoroutine(dragons)); } else { this.GameController.ExhaustCoroutine(dragons); } }
private IEnumerator Temper(DealDamageAction arg) { ReduceDamageStatusEffect rdse = new ReduceDamageStatusEffect(1); rdse.UntilStartOfNextTurn(TurnTaker); rdse.SourceCriteria.IsSpecificCard = arg.Target; var temper = AddStatusEffect(rdse); if (UseUnityCoroutines) { yield return(this.GameController.StartCoroutine(temper)); } else { this.GameController.ExhaustCoroutine(temper); } }