Ejemplo n.º 1
0
 /// <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;
 }
Ejemplo n.º 2
0
 public ManaPotion(PotionStrength potionStrength)
 {
     Weight             = 1;
     ManaPotionStrength = potionStrength;
     Name       = GetPotionName();
     ManaAmount = GetPotionManaAmount();
     ItemValue  = ManaAmount / 2;
     Desc       = $"A {Name} that restores {ManaAmount} mana.";
 }
Ejemplo n.º 3
0
 public HealthPotion(PotionStrength potionStrength)
 {
     Weight = 1;
     HealthPotionStrength = potionStrength;
     Name         = GetPotionName();
     HealthAmount = GetPotionHealthAmount();
     ItemValue    = HealthAmount / 2;
     Desc         = $"A {Name} that restores {HealthAmount} health.";
 }
Ejemplo n.º 4
0
 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;
 }
Ejemplo n.º 5
0
 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");
     }
 }
Ejemplo n.º 6
0
 public ElixerOfStrength(PotionStrength aElixerStr)
     : base(aElixerStr)
 {
 }
Ejemplo n.º 7
0
 /// <summary>
 /// HealthPotion
 /// </summary>
 public HealthPotion(PotionStrength aPotionStrength)
     : base(PotionType.Healing, aPotionStrength, "", Colour.White)
 {
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Elixer
 /// </summary>
 public Elixer(PotionStrength aPotionStrength)
     : base(PotionType.Elixer, aPotionStrength, "", new Colour(ConsoleColor.Magenta))
 {
 }