]> jfr.im git - irc/gameservirc.git/blame - gameserv/pouch.h
Fixed the forest event from setting to 14 manually. (I was testing).
[irc/gameservirc.git] / gameserv / pouch.h
CommitLineData
3662210f 1#ifndef POUCH_H
2#define POUCH_H
3
4class Pouch {
5 public:
6
7 Pouch(int h = 0, int s = 0, int d = 0); // Default constructor
8
9 // Access functions to get the number of each potion in inventory
10 int Healing() { return healing; };
11 int Strength() { return strength; };
12 int Defense() { return defense; };
13
14 // Modifiers to set the number of potions
15 int setHealing (int h = 0) { healing = h; return Healing();};
16 int setStrength (int s = 0) { strength = s; return Strength(); };
17 int setDefense (int d = 0) { defense = d; return Defense();};
18
19 // Add one healing potion
20 int incHealing() { return setHealing(Healing() + 1); };
21
22 // Add one Strength potion
23 int incStrength() { return setStrength(Strength() + 1); };
24
25 // Add one Defense potion
26 int incDefense() { return setDefense(Defense() + 1); };
27
28 // Reset all potions to 0
29 void reset() { setHealing(0); setStrength(0); setDefense(0); };
30
31 private:
32 // Potions
33 int healing;
34 int strength;
35 int defense;
36};
37
38#endif