Ejemplo n.º 1
0
        private IEnumerator DealDamageResponse(GainHPAction hp)
        {
            //you may select a target that has not been dealt damage this turn- LadyOfTheWood deals that target 1 cold damage.

            IEnumerator coroutine = base.GameController.SelectTargetsAndDealDamage(this.DecisionMaker, new DamageSource(base.GameController, base.CharacterCard), 1, DamageType.Cold, new int?(1), true, new int?(1), additionalCriteria: (Card c) => !base.HasBeenDealtDamageThisTurn(c), cardSource: base.GetCardSource());

            if (base.UseUnityCoroutines)
            {
                yield return(base.GameController.StartCoroutine(coroutine));
            }
            else
            {
                base.GameController.ExhaustCoroutine(coroutine);
            }
            yield break;
        }
Ejemplo n.º 2
0
        private IEnumerator DealDamageResponse(GainHPAction hp)
        {
            //you may select a target that has not been dealt damage this turn- LadyOfTheWood deals that target 1 cold damage.
            int         powerNumeral = base.GetPowerNumeral(0, 1);
            IEnumerator coroutine    = base.GameController.SelectTargetsAndDealDamage(this.DecisionMaker, new DamageSource(base.GameController, base.CharacterCard), powerNumeral, DamageType.Cold, new int?(powerNumeral), false, new int?(powerNumeral), false, false, false, (Card c) => !base.HasBeenDealtDamageThisTurn(c), 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 CheckHpResponse(GainHPAction gha)
        {
            if (this.Card.HitPoints != this.Card.MaximumHitPoints)
            {
                yield break;
            }

            // Reached maximum HP, game over
            IEnumerator routine = base.GameController.GameOver(EndingResult.AlternateDefeat, EndingMessage, cardSource: GetCardSource());

            if (base.UseUnityCoroutines)
            {
                yield return(base.GameController.StartCoroutine(routine));
            }
            else
            {
                base.GameController.ExhaustCoroutine(routine);
            }
        }
        private IEnumerator DestroyCardResponse(GainHPAction action)
        {
            IEnumerator coroutine = base.GameController.SendMessageAction("Teryx has gained 10 or more HP in a single round.", Priority.Medium, base.GetCardSource());

            Log.Debug("Teryx has gained 10 or more HP in a single round");
            IEnumerator destroy = base.GameController.DestroyCard(this.DecisionMaker, base.Card, cardSource: base.GetCardSource());

            if (base.UseUnityCoroutines)
            {
                yield return(base.GameController.StartCoroutine(coroutine));

                yield return(base.GameController.StartCoroutine(destroy));
            }
            else
            {
                base.GameController.ExhaustCoroutine(coroutine);
                base.GameController.ExhaustCoroutine(destroy);
            }
            yield break;
        }
Ejemplo n.º 5
0
 public IEnumerator BreakawayHPCheckResponse(GainHPAction gha)
 {
     // "When {Breakaway}'s current HP is equal to his maximum HP, he escapes with the loot! [b]GAME OVER.[/b]"
     if (this.Card.HitPoints != this.Card.MaximumHitPoints)
     {
         yield break;
     }
     else
     {
         // Reached maximum HP? Game over!
         IEnumerator escapeCoroutine = base.GameController.GameOver(EndingResult.AlternateDefeat, EscapeMessage(), cardSource: GetCardSource());
         if (base.UseUnityCoroutines)
         {
             yield return(this.GameController.StartCoroutine(escapeCoroutine));
         }
         else
         {
             this.GameController.ExhaustCoroutine(escapeCoroutine);
         }
     }
     yield break;
 }
Ejemplo n.º 6
0
        public IEnumerator HealMoveResponse(GameAction ga)
        {
            // "... the X hero targets with the lowest HP regain 2 HP each, where X is 1 plus the number of Livestock in play."
            List <Card>  lowestHeroes  = new List <Card>();
            GainHPAction gameAction    = new GainHPAction(GetCardSource(), null, 2, null);
            IEnumerator  findCoroutine = base.GameController.FindTargetsWithLowestHitPoints(1, base.GameController.FindCardsWhere(new LinqCardCriteria((Card c) => c.IsInPlayAndHasGameText && c.DoKeywordsContain("livestock"), "Livestock")).Count() + 1, (Card c) => c.IsHero, lowestHeroes, gameAction: gameAction, evenIfCannotDealDamage: true, cardSource: GetCardSource());

            if (base.UseUnityCoroutines)
            {
                yield return(base.GameController.StartCoroutine(findCoroutine));
            }
            else
            {
                base.GameController.ExhaustCoroutine(findCoroutine);
            }
            IEnumerator healCoroutine = base.GameController.GainHP(DecisionMaker, (Card c) => lowestHeroes.Contains(c), 2, cardSource: GetCardSource());

            if (base.UseUnityCoroutines)
            {
                yield return(base.GameController.StartCoroutine(healCoroutine));
            }
            else
            {
                base.GameController.ExhaustCoroutine(healCoroutine);
            }
            // "Then, X players each put a card from their trash on the bottom of their deck."
            IEnumerator massMoveCoroutine = base.GameController.SelectTurnTakersAndDoAction(DecisionMaker, new LinqTurnTakerCriteria((TurnTaker tt) => tt.IsHero), SelectionType.MoveCard, MoveFromTrashToDeckResponse, numberOfTurnTakers: base.GameController.FindCardsWhere(new LinqCardCriteria((Card c) => c.IsInPlayAndHasGameText && c.DoKeywordsContain("livestock"), "Livestock")).Count() + 1, requiredDecisions: base.GameController.FindCardsWhere(new LinqCardCriteria((Card c) => c.IsInPlayAndHasGameText && c.DoKeywordsContain("livestock"), "Livestock")).Count() + 1, allowAutoDecide: base.GameController.FindCardsWhere(new LinqCardCriteria((Card c) => c.IsInPlayAndHasGameText && c.DoKeywordsContain("livestock"), "Livestock")).Count() + 1 >= H, cardSource: GetCardSource());

            if (base.UseUnityCoroutines)
            {
                yield return(base.GameController.StartCoroutine(massMoveCoroutine));
            }
            else
            {
                base.GameController.ExhaustCoroutine(massMoveCoroutine);
            }
            yield break;
        }
Ejemplo n.º 7
0
        public IEnumerator MomentumHPCheckResponse(GainHPAction gha)
        {
            // "Whenever {Momentum}'s current HP becomes equal to its maximum HP, {Breakaway} deals each target 1 melee damage."
            Card momentum = base.TurnTaker.FindCard("MomentumCharacter");

            if (momentum.HitPoints != momentum.MaximumHitPoints)
            {
                yield break;
            }
            else
            {
                IEnumerator damageCoroutine = DealDamage(base.Card, (Card c) => true, 1, DamageType.Melee);
                if (base.UseUnityCoroutines)
                {
                    yield return(this.GameController.StartCoroutine(damageCoroutine));
                }
                else
                {
                    this.GameController.ExhaustCoroutine(damageCoroutine);
                }
            }
            yield break;
        }
Ejemplo n.º 8
0
        private IEnumerator IncreaseHPRecoveryResponse(GainHPAction ghp)
        {
            IncreaseHPGainAction hpGainAction = new IncreaseHPGainAction(GetCardSource(), ghp, 1);

            return(DoAction(hpGainAction));
        }