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

                Attacker.AssignDamage(damage);
            }
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 4
0
 public void Assign(DamageFromSource damage)
 {
     _assigned.Add(damage);
 }