public Swordbeard(HumanWarrior humanWarrior) { Attack = 40 + humanWarrior.Attack; Defence = 40 + humanWarrior.Defence; Speed = humanWarrior.Speed - 10; Hp = 50 + humanWarrior.Hp; }
public Archer(HumanWarrior humanWarrior) { Attack = 20 + humanWarrior.Attack; Defence = 10 + humanWarrior.Defence; Speed = humanWarrior.Speed + 20; Hp = 50 + humanWarrior.Hp; }
static void Main(string[] args) { Human h = new Human(); HumanWarrior hw = new HumanWarrior(h); Swordbeard sb = new Swordbeard(hw); HumanWarrior hw2 = new HumanWarrior(h); Swordbeard sb2 = new Swordbeard(hw2); h.Operation(); }