public void ApplyPower(PowerType powerType) { Power power = GetPower(powerType); if (power == null) { Console.WriteLine("You don't have this power"); } else { if (Xp >= power.MinXp) { if (power.PowerType == PowerType.Healing) { Heal(); } else if (power.PowerType == PowerType.Invisible) { Hide(); } else if (power.PowerType == PowerType.Protect) { Protect = true; } else if (power.PowerType == PowerType.Sleepy) { Sprinkle(); } MyPowers.Remove(power); } } }
public void AddPower(Power newPower) { MyPowers.Add(newPower); }