00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifdef __cplusplus
00024
00025 # ifndef OGS_FEATS_SINGLE_WEAPON_H
00026 # define OGS_FEATS_SINGLE_WEAPON_H
00027
00028 # include <ogs/feats/Namespace.h>
00029 # include <ogs/feats/WeaponProficiency.h>
00030 # include <ogs/items/Weapon.h>
00031
00032 OGS_BEGIN_FEATS_NAMESPACE
00033
00040 template <class _WeaponType>
00041 class SingleWeapon: public WeaponProficiency {
00042 public:
00044 typedef _WeaponType WeaponType;
00045
00046 SingleWeapon ();
00047
00048 Feat::Compatibility getCompatibility () const;
00049 ogs::items::Weapon::Proficiency getProficiency () const;
00050 bool isProficient (const ogs::items::Weapon& weapon) const;
00051
00052 private:
00053 bool canAttach (const Object& object) const;
00054 };
00055
00063 template <class _WeaponType>
00064 inline ogs::core::Feat::Compatibility
00065 SingleWeapon<_WeaponType>::getCompatibility () const {
00066 return (Feat::REPEATABLE);
00067 }
00068
00074 template <class _WeaponType>
00075 inline ogs::items::Weapon::Proficiency
00076 SingleWeapon<_WeaponType>::getProficiency () const {
00077 WeaponType weapon;
00078 return (weapon.getProficiency ());
00079 }
00080
00081 OGS_END_FEATS_NAMESPACE
00082
00083 # endif
00084
00085 #endif
00086