aboutsummaryrefslogtreecommitdiff
path: root/src/objects.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/objects.hh')
-rw-r--r--src/objects.hh11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/objects.hh b/src/objects.hh
index 3d312ac..05b094d 100644
--- a/src/objects.hh
+++ b/src/objects.hh
@@ -62,6 +62,17 @@ struct ObjectType {
|| this->getFlag(WAND);
}
+ bool isCloseWeapon(void){
+ if(!this->getFlag(WEAPON)){
+ return false;
+ }
+
+ int WeaponType = this->getAttribute(WEAPONTYPE);
+ return WeaponType == WEAPON_SWORD
+ || WeaponType == WEAPON_CLUB
+ || WeaponType == WEAPON_AXE;
+ }
+
ObjectType getDisguise(void){
if(this->getFlag(DISGUISE)){
return (int)this->getAttribute(DISGUISETARGET);