// add a public "getter" property to access health // Add a constructor that takes a value to set Name, and set the remaining fields to default values // Add a constructor to assign custom values to all fields // Build Attack method public int Attack(Human target) { target.Health -= 5 * this.Strength; return(target.Health); }
public override void Attack(Human player) { player.health = player.health - (strength * intelligence); System.Console.WriteLine($"{player.name} lost {(strength * intelligence)} health and was poisoned! {player.health} hp remaining."); player.poisoned += 3; }
public void Steal(Human target) { target.Health -= 5; Health += 5; Console.WriteLine("You stole 5 health form " + target.Name); }
public void Heal(Human target) { target.Health += 10; Console.WriteLine("You healed " + target.Name); }
public void Steal(Human target) { target.Health -= 5; this.Health += 5; }