class Potion

Represents a potion. More...

Contains pure virtuals
Definition#include <potion.h>
InheritsInventoryItem
Inherited byHealingPotion
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Members

Protected Members


Detailed Description

Represents a potion. Is abstract.

Potion (char *Aname)

Creates new potion with name AName and one charge

Potion (char *Aname,int charges)

Creates new potion with name AName and charges charges.

void drink (int charges)
[pure virtual]

'Drinks' charges portions of the potion

int checkCharge ()

Returns number of portions left

int sip ()
[pure virtual]

Returns type of potion.

const int RESTORATION

The constant that represents a restoration potion (generally a HealingPotion object)