-
Notifications
You must be signed in to change notification settings - Fork 1
/
Consumable.h
39 lines (32 loc) · 933 Bytes
/
Consumable.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef _Consumable
#define _Consumable
#include "Item.h"
#include <ostream>
#include <string>
class Creature;
class Consumable : public Item
{
public:
//Constructor
Consumable();
//Getters
virtual int getHealth() const;
virtual int getNutrition() const;
virtual std::vector<std::string> getPropertyBenefits() const;
//Setters
virtual void setHealth(int iHealth);
virtual void setNutrition(int iNutrition);
virtual void setPropertyBenefits(std::vector<std::string> vPropertyBenefits);
//Other methods
virtual void used(Creature* usingCreature);
virtual void dumpObject();
virtual void dumpObjectData();
virtual void writeFragment(std::ostream & output, int iTabs);
virtual void writeDataAsFragment(std::ostream & output, int iTabs);
virtual void setElementData(std::string sElementName, std::string sValue);
private:
int m_iHealth;
int m_iNutrition;
std::vector<std::string> m_vPropertyBenefits;
};
#endif