Пример #1
0
        public void DistributeDamageToAttacker()
        {
            if (Attacker != null)
            {
                var damage = new DamageFromSource(
                    amount: Card.CalculateCombatDamageAmount(),
                    source: Card);

                Attacker.AssignDamage(damage);
            }
        }
Пример #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);
            }
        }
Пример #3
0
 public void AssignDamage(DamageFromSource damage)
 {
     _assignedDamage.Add(damage);
 }
Пример #4
0
 public void Assign(DamageFromSource damage)
 {
     _assigned.Add(damage);
 }
Пример #5
0
 public void AssignDamage(DamageFromSource damage)
 {
     _assignedDamage.Add(damage);
 }
Пример #6
0
        public void DistributeDamageToAttacker()
        {
            if (Attacker != null)
              {
            var damage = new DamageFromSource(
              amount: Card.CalculateCombatDamageAmount(),
              source: Card);

            Attacker.AssignDamage(damage);
              }
        }
Пример #7
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);
              }
        }
Пример #8
0
 public void Assign(DamageFromSource damage)
 {
     _assigned.Add(damage);
 }