Beispiel #1
0
        public static int CalculateGainAttackerWouldGetIfPowerAndThoughnessWouldIncrease(Card attacker,
          IEnumerable<Card> blockers, int powerIncrease, int toughnessIncrease)
        {
            if ((blockers.None()) && powerIncrease > 0)
            {
                return CalculateDefendingPlayerLifeloss(attacker, blockers) > 0 ? 2 : 0;
            }

            if (toughnessIncrease < 1 && !attacker.Has().Charge)
                return 0;

            var p = new AttackerEvaluationParameters(attacker, blockers);

            var canBeDealtLeathalDamageWithoutBoost = CanAttackerBeDealtLeathalDamage(p);

            if (canBeDealtLeathalDamageWithoutBoost == false)
                return 0;

            p.AttackerPowerIncrease = powerIncrease;
            p.AttackerToughnessIncrease = toughnessIncrease;

            var canBeDealtLeathalDamageWithBoost = CanAttackerBeDealtLeathalDamage(p);

            return canBeDealtLeathalDamageWithBoost ? 0 : attacker.Score;
        }