aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/headers/Weapon.hpp
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2018-02-25 21:11:43 +0100
committerNao Pross <naopross@thearcway.org>2018-02-25 21:11:43 +0100
commit20b958c69451dd8251a8899cf7264d5c92ed7c60 (patch)
tree440ec68a189efdf42a21a9d621b6de2c04305fb5 /src/main/headers/Weapon.hpp
parentUpdate CMakeLists and Makefile (diff)
downloadSubconscious-old-20b958c69451dd8251a8899cf7264d5c92ed7c60.tar.gz
Subconscious-old-20b958c69451dd8251a8899cf7264d5c92ed7c60.zip
Better management of stats and skill of actors and items
Diffstat (limited to '')
-rw-r--r--src/main/headers/Weapon.hpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/main/headers/Weapon.hpp b/src/main/headers/Weapon.hpp
index 40eb7a3..f59fe4d 100644
--- a/src/main/headers/Weapon.hpp
+++ b/src/main/headers/Weapon.hpp
@@ -2,17 +2,26 @@
#define WEAPON_HPP
#include "Item.hpp"
-#include "Actor.hpp"
#include <string>
+class Actor;
+
class Weapon : public Item
{
+public:
+ enum class Class
+ {
+ SWORD, AXE, LANCE, RANGED
+ };
+
+ const Class weaponClass;
+
protected:
unsigned _damage;
unsigned _requiredLevel;
- Weapon(Item::Type t, const std::string &name) : Item(t, name) {}
+ Weapon(Item::Type t, Class _weaponClass, const std::string &name) : Item(t, name), weaponClass(_weaponClass) {}
};
#endif