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