diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-06-15 17:35:06 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-06-15 17:35:06 -0300 |
| commit | 3cc587ab8df80d42d9dab1a73a37701f565a3499 (patch) | |
| tree | ea10cae94a9ef7a3c9b4080746a9697287e8991b /src/objects.hh | |
| parent | 33464579f6b8b079597617593d2bb733e982db8f (diff) | |
| download | game-3cc587ab8df80d42d9dab1a73a37701f565a3499.tar.gz game-3cc587ab8df80d42d9dab1a73a37701f565a3499.zip | |
more work on `operate.cc`
Diffstat (limited to 'src/objects.hh')
| -rw-r--r-- | src/objects.hh | 11 |
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); |
