public void heal(object obj) { wizard life = obj as wizard; if (life == null) { Console.WriteLine("No Health given"); } else { life.health += intelligence * 10; } }
public void fireball(object obj) { Random rand = new Random(); wizard fire = obj as wizard; if (fire == null) { Console.WriteLine("Failed Attack"); } else { fire.health -= health - rand.Next(20, 50); } }