/// <summary> /// Creates a (base) instance of Potion/ /// </summary> /// <param name="aType">The type of potion</param> /// <param name="aName">The name of the potion.</param> /// <param name="aColor">The color of the potion.</param> public Potion(PotionType aPotionType, PotionStrength aPotionStrength, string aName, Colour aColor) : base(ItemType.Potion, aName, '!', aColor) { PotionType = aPotionType; PotionStrength = aPotionStrength; }
public ManaPotion(PotionStrength potionStrength) { Weight = 1; ManaPotionStrength = potionStrength; Name = GetPotionName(); ManaAmount = GetPotionManaAmount(); ItemValue = ManaAmount / 2; Desc = $"A {Name} that restores {ManaAmount} mana."; }
public HealthPotion(PotionStrength potionStrength) { Weight = 1; HealthPotionStrength = potionStrength; Name = GetPotionName(); HealthAmount = GetPotionHealthAmount(); ItemValue = HealthAmount / 2; Desc = $"A {Name} that restores {HealthAmount} health."; }
public StatPotion(PotionStrength potionStrength, StatType statType) { Weight = 1; PotionStrength = potionStrength; StatPotionType = statType; Name = GetPotionName(); StatAmount = GetStatPotionAmount(); ItemValue = StatAmount * 10 / 2; Desc = $"A {Name} that increases {StatPotionType.ToString().ToLower()} by {StatAmount}."; _statEffectDurationInSeconds = 600; }
public string GetPotionName() { // Potion naming format is "<potion type> potion" for normal potion if (PotionStrength == PotionStrength.Normal) { return($"{StatPotionType.ToString().ToLower()} potion"); } else { // Potion naming format is "<potion strength> <potion type> potion" for minor or greater potions return($"{PotionStrength.ToString().ToLower()} {StatPotionType.ToString().ToLower()} potion"); } }
public ElixerOfStrength(PotionStrength aElixerStr) : base(aElixerStr) { }
/// <summary> /// HealthPotion /// </summary> public HealthPotion(PotionStrength aPotionStrength) : base(PotionType.Healing, aPotionStrength, "", Colour.White) { }
/// <summary> /// Elixer /// </summary> public Elixer(PotionStrength aPotionStrength) : base(PotionType.Elixer, aPotionStrength, "", new Colour(ConsoleColor.Magenta)) { }