Ejemplo n.º 1
0
 /// <summary>
 /// Uses the potion to heal the player
 /// </summary>
 /// <returns>true if the potion was consumed</returns>
 public override Boolean Use(Human human)
 {
     // The human must be damaged in order to use a potion
     if (human.IsDamaged && quantity > 0)
     {
         if (human.battling > 0)
             human.Damage(-battleHealAmount);
         else
             human.Damage(-fieldHealAmount);
         human.LimitHp();
         quantity--;
         return true;
     }
     else
         return false;
 }