Exemplo n.º 1
0
        public void DistributeDamageToAttacker()
        {
            if (Attacker != null)
            {
                var damage = new DamageFromSource(
                    amount: Card.CalculateCombatDamageAmount(),
                    source: Card);

                Attacker.AssignDamage(damage);
            }
        }
Exemplo n.º 2
0
        public void DistributeDamageToBlockers(DamageDistribution distribution)
        {
            foreach (var blocker in _blockers)
            {
                var damage = new DamageFromSource(
                    distribution[blocker], source: Card);

                blocker.AssignDamage(damage);
            }

            var defender = Players.GetOpponent(_card.Controller);

            if (HasTrample || AssignsDamageAsThoughItWasntBlocked || _isBlocked == false)
            {
                var unassignedDamage = new DamageFromSource(
                    amount: Card.CalculateCombatDamageAmount() - distribution.Total,
                    source: _card);

                defender.AssignDamage(unassignedDamage);
            }
        }