aboutsummaryrefslogtreecommitdiffstats
path: root/include/inventory.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/inventory.hpp')
-rw-r--r--include/inventory.hpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/inventory.hpp b/include/inventory.hpp
index bee2fbd..6712c26 100644
--- a/include/inventory.hpp
+++ b/include/inventory.hpp
@@ -112,6 +112,24 @@ public:
Sword* clone();
};
+class Arrow : public Item {
+private:
+ // same as sword
+ float damage;
+public:
+
+ // see sword
+ float getDamage();
+
+ // sets amount of damage
+ void setDamage(float d);
+
+ // uses item
+ int useItem();
+
+ Arrow *clone();
+};
+
/**
* Bow class. We use this for shooting bow and arrows
*/
@@ -123,6 +141,9 @@ public:
// returns the amount of damage, see sword
float getDamage();
+ // sets the amount of damages
+ void setDamage(float d);
+
// handles shooting and arrow curving
int useItem();