public void DistributeDamageToAttacker() { if (Attacker != null) { var damage = new DamageFromSource( amount: Card.CalculateCombatDamageAmount(), source: Card); Attacker.AssignDamage(damage); } }
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); } }
public void AssignDamage(DamageFromSource damage) { _assignedDamage.Add(damage); }
public void Assign(DamageFromSource damage) { _assigned.Add(damage); }