00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 #ifdef __cplusplus
00023 
00024 #  ifndef OGS_ITEMS_WEAPON_H
00025 #    define OGS_ITEMS_WEAPON_H
00026 
00027 #    include <bitset>
00028 
00029 #    include <ogs/core/Die.h>
00030 #    include <ogs/core/Item.h>
00031 #    include <ogs/items/Namespace.h>
00032 
00033 OGS_BEGIN_ITEMS_NAMESPACE
00034 
00040 class Weapon: public ogs::core::Item {
00041   public:
00046     enum Proficiency {
00047 
00049       SIMPLE = 1,
00050 
00052       MARTIAL = 2,
00053 
00055       EXOTIC = 3
00056     };
00057 
00063     typedef std::bitset<3> Type;
00064 
00065     enum {
00067       BASHING = 0,
00068 
00070       PIERCING = 1,
00071 
00073       SLASHING = 2,
00074     };
00075 
00076     Weapon ();
00077     Weapon (Entity::Weight weight, ogs::core::Size::Type size,
00078             Item::Worth worth, Proficiency proficiency, Type type,
00079             const ogs::core::Die& damage, unsigned criticalMultiplier,
00080             ogs::core::Die::Value threatRange);
00081     virtual ~Weapon () { }
00082 
00083     Proficiency getProficiency () const;
00084     Type getType () const;
00085     ogs::core::Die getDamage () const;
00086     unsigned getCriticalMultiplier () const;
00087     ogs::core::Die::Value getThreatRange () const;
00088 
00089   private:
00090     Proficiency _proficiency;
00091     Type _type;
00092     ogs::core::Die _damage;
00093     unsigned _criticalMultiplier;
00094     ogs::core::Die::Value _threatRange;
00095 };
00096 
00102 inline Weapon::Proficiency
00103 Weapon::getProficiency () const {
00104   return (this->_proficiency);
00105 }
00106 
00112 inline Weapon::Type
00113 Weapon::getType () const {
00114   return (this->_type);
00115 }
00116 
00122 inline ogs::core::Die
00123 Weapon::getDamage () const {
00124   return (this->_damage);
00125 }
00126 
00132 inline unsigned
00133 Weapon::getCriticalMultiplier () const {
00134   return (this->_criticalMultiplier);
00135 }
00136 
00142 inline ogs::core::Die::Value
00143 Weapon::getThreatRange () const {
00144   return (this->_threatRange);
00145 }
00146 
00147 OGS_END_ITEMS_NAMESPACE
00148 
00149 #  endif 
00150 
00151 #endif 
00152