Beispiel #1
0
 public void addMagicPotion(MagicPotion potion)
 {
     if (magicPotions.Count() < 5)
     {
         magicPotions.Add(potion);
     }
 }
Beispiel #2
0
 public int useMagicPotion()
 {
     if (magicPotions.Count() > 0)
     {
         MagicPotion mp = magicPotions.Last();
         magicPotions.RemoveAt(magicPotions.Count() - 1);
         return(mp.Use());
     }
     else
     {
         return(0);
     }
 }