public void Attack(ITargets target) { this.weapon.Attack(target); if (target.IsDead()) { this.experience += target.GiveExperience(); } }
public void Attack(ITargets target) { if (this.durabilityPoints <= 0) { throw new InvalidOperationException("Weapon is broken."); } target.TakeAttack(this.attackPoints); this.durabilityPoints -= 1; }
public bool TargetExists(IEntity source, ITargets targets) { foreach (Player p in GameManager.players) { if (targets.CanTarget(p)) { return(true); } foreach (Card c in p.field.cards) { if (targets.CanTarget(c)) { return(true); } } } return(false); }