示例#1
0
        public static int CalculateDefendingPlayerLifeloss(Card attacker, IEnumerable<Card> blockers)
        {
            var total = 0;

            if (blockers.None())
            {
                total = attacker.CalculateCombatDamageAmount(singleDamageStep: false);
            }
            //else if (attacker.Has().Trample)
            //{
            //    total = CalculateTrampleDamage(attacker, blockers);
            //}

            var prevented = attacker.Controller.Opponent.CalculatePreventedReceivedDamageAmount(total, attacker,
              isCombat: true);
            return total - prevented;
        }
示例#2
0
        public static int GetAmountOfDamageCreature1WillDealToCreature2(Card creature1, Card creature2,
          int powerIncrease = 0)
        {
            var amountDealt = creature1.CalculateCombatDamageAmount(powerIncrease: powerIncrease);
            var preventedReceived = creature2.CalculatePreventedDamageAmount(amountDealt, creature1, isCombat: true);

            return amountDealt - preventedReceived;
        }