Beispiel #1
0
 public void AssignDamage(DamageFromSource damage)
 {
     _assignedDamage.Add(damage);
 }
Beispiel #2
0
        public void DistributeDamageToAttacker()
        {
            if (Attacker != null)
            {
                var damage = new DamageFromSource(
                  amount: Card.CalculateCombatDamageAmount(),
                  source: Card);

                Attacker.AssignDamage(damage);
            }
        }
Beispiel #3
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 (_isBlocked == false) //HasTrample || AssignsDamageAsThoughItWasntBlocked ||
            {
                var unassignedDamage = new DamageFromSource(
                  amount: Card.CalculateCombatDamageAmount() - distribution.Total,
                  source: _card);

                defender.AssignDamage(unassignedDamage);
            }
        }
Beispiel #4
0
 public void Assign(DamageFromSource damage)
 {
     _assigned.Add(damage);
 }