diff options
author | Roderic Morris <roderic@ccs.neu.edu> | 2008-10-25 01:40:36 +0000 |
---|---|---|
committer | Roderic Morris <roderic@ccs.neu.edu> | 2008-10-25 01:40:36 +0000 |
commit | 796c2addfb17b57992d304667248873ee26088dc (patch) | |
tree | 8d3aaab2dd6abbc304eb9f8b70551b210894a7e2 /src/resources/iteminfo.h | |
parent | f8f3e17f72d1216bacd5aaa975789b0b790068f6 (diff) | |
download | mana-796c2addfb17b57992d304667248873ee26088dc.tar.gz mana-796c2addfb17b57992d304667248873ee26088dc.tar.bz2 mana-796c2addfb17b57992d304667248873ee26088dc.tar.xz mana-796c2addfb17b57992d304667248873ee26088dc.zip |
attack range fixes, highlight monsters in range (by Chuck Miller)
Diffstat (limited to 'src/resources/iteminfo.h')
-rw-r--r-- | src/resources/iteminfo.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index 43047094..a8e9f2e4 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -38,6 +38,36 @@ enum EquipmentSoundEvent EQUIP_EVENT_HIT }; +enum EquipmentSlot +{ + // Equipment rules: + // 1 Brest equipment + EQUIP_TORSO_SLOT = 0, + // 1 arms equipment + EQUIP_ARMS_SLOT = 1, + // 1 head equipment + EQUIP_HEAD_SLOT = 2, + // 1 legs equipment + EQUIP_LEGS_SLOT = 3, + // 1 feet equipment + EQUIP_FEET_SLOT = 4, + // 2 rings + EQUIP_RING1_SLOT = 5, + EQUIP_RING2_SLOT = 6, + // 1 necklace + EQUIP_NECKLACE_SLOT = 7, + // Fight: + // 2 one-handed weapons + // or 1 two-handed weapon + // or 1 one-handed weapon + 1 shield. + EQUIP_FIGHT1_SLOT = 8, + EQUIP_FIGHT2_SLOT = 9, + // Projectile: + // this item does not amount to one, it only indicates the chosen projectile. + EQUIP_PROJECTILE_SLOT = 10, +}; + + /** * Enumeration of available Item types. */ @@ -143,6 +173,12 @@ class ItemInfo SpriteAction getAttackType() const { return mAttackType; } + int getAttackRange() const + { return mAttackRange; } + + void setAttackRange(int r) + { mAttackRange = r; } + void addSound(EquipmentSoundEvent event, const std::string &filename); const std::string& getSound(EquipmentSoundEvent event) const; @@ -158,6 +194,7 @@ class ItemInfo // Equipment related members SpriteAction mAttackType; /**< Attack type, in case of weapon. */ + int mAttackRange; /**< Attack range, will be zero if non weapon. */ /** Maps gender to sprite filenames. */ std::map<int, std::string> mAnimationFiles; |