|
|
/*************************************************************************** potion.h - description ------------------- begin : Mon Feb 7 2000 copyright : (C) 2000 by Daniel Roberge email : droberge@uvic.ca ***************************************************************************/ #ifndef POTION_H #define POTION_H #include "invitem.h" /**Represents a potion. Is abstract. *@author Daniel Roberge */ class Potion : public InventoryItem { protected: int amount; public: /**Creates new potion with name AName and one charge*/ Potion(char *Aname); /**Creates new potion with name AName and charges charges.*/ Potion(char *Aname,int charges); virtual ~Potion(); /**'Drinks' charges portions of the potion*/ virtual void drink(int charges) = 0; /**Returns number of portions left*/ int checkCharge(); /**Returns type of potion.*/ virtual int sip() = 0; public: // Public attributes /** The constant that represents a restoration potion (generally a HealingPotion object) */ const static int RESTORATION = 1; }; #endif
Generated by: droberge@magebook.localdomain on Mon Jul 3 13:20:08 200. |