diff options
Diffstat (limited to 'src/game/base/weapon.h')
-rw-r--r-- | src/game/base/weapon.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/game/base/weapon.h b/src/game/base/weapon.h index 01a135b..ba28810 100644 --- a/src/game/base/weapon.h +++ b/src/game/base/weapon.h @@ -19,6 +19,8 @@ public: Weapon(); ~Weapon(); + /* --- inspectors ------------------------------------------ */ + inline SubType subtype() const { return weapon_subtype; } @@ -29,6 +31,24 @@ public: inline int level() const { return weapon_level; } + + /** + * @brief the amount of damage this weapon inflicts + * */ + inline const float damage() const + { + return weapon_damage; + } + + /* --- mutators -------------------------------------------- */ + + /** + * @brief set the amount of damage this weapon inflicts + * */ + inline void set_damage(const float damage) + { + weapon_damage = damage; + } void set_stackable(bool stackable); @@ -53,11 +73,13 @@ public: private: static core::InfoType *weapon_infotype; + SubType weapon_subtype; + int weapon_level; bool weapon_stackable; - SubType weapon_subtype; + float weapon_damage; }; } // namespace game |