Ejemplo n.º 1
0
 public void Execute()
 {
     defender.Defend();
 }
Ejemplo n.º 2
0
 public void Defend(int power)
 {
     power   = defenseBehavior.Defend(power);
     Health -= power;
     Console.WriteLine($"{power} damage done to {this.Name}");
 }
Ejemplo n.º 3
0
 // calculates the damage done andupdates the health stat
 public void Defend(int damage, Character defendingPlayer)
 {
     damage  = defendBehavior.Defend(damage, defendingPlayer);
     Health -= damage;
     Console.WriteLine($"{damage} damage was done to {this.Name}!");
 }