Example #1
0
        public static bool CanBlockerBeDealtLeathalCombatDamage(BlockerEvaluationParameters p)
        {
            var blockerEvaluation = new BlockerEvaluation(p);
            var results           = blockerEvaluation.Evaluate();

            return(results.ReceivesLeathalDamage);
        }
Example #2
0
        public static int CalculateGainBlockerWouldGetIfPowerAndThougnessWouldIncrease(Card attacker,
                                                                                       Card blocker, int powerIncrease, int toughnessIncrease)
        {
            if (attacker == null)
            {
                return(0);
            }

            var p = new BlockerEvaluationParameters
            {
                Attacker = attacker,
                Blocker  = blocker,
            };

            var canBeDealtLeathalDamageWithoutBoost = CanBlockerBeDealtLeathalCombatDamage(p);

            if (canBeDealtLeathalDamageWithoutBoost == false)
            {
                return(0);
            }

            p.BlockerPowerIncrease     += powerIncrease;
            p.BlockerToughnessIncrease += toughnessIncrease;

            var canBeDealtLeathalDamageWithBoost = CanBlockerBeDealtLeathalCombatDamage(p);

            return(canBeDealtLeathalDamageWithBoost == false ? blocker.Score : 1);
        }
Example #3
0
        public static int CalculateGainBlockerWouldGetIfPowerAndThougnessWouldIncrease(Card attacker,
      Card blocker, int powerIncrease, int toughnessIncrease)
        {
            if (attacker == null)
            return 0;

              var p = new BlockerEvaluationParameters
            {
              Attacker = attacker,
              Blocker = blocker,
            };

              var canBeDealtLeathalDamageWithoutBoost = CanBlockerBeDealtLeathalCombatDamage(p);

              if (canBeDealtLeathalDamageWithoutBoost == false)
            return 0;

              p.BlockerPowerIncrease += powerIncrease;
              p.BlockerToughnessIncrease += toughnessIncrease;

              var canBeDealtLeathalDamageWithBoost = CanBlockerBeDealtLeathalCombatDamage(p);
              return canBeDealtLeathalDamageWithBoost == false ? blocker.Score : 1;
        }
Example #4
0
        public static bool CanBlockerBeDealtLeathalCombatDamage(BlockerEvaluationParameters p)
        {
            var blockerEvaluation = new BlockerEvaluation(p);
              var results = blockerEvaluation.Evaluate();

              return results.ReceivesLeathalDamage;
        }