25 #include "common/scummsys.h" 26 #include "common/array.h" 27 #include "common/rect.h" 28 #include "common/serializer.h" 29 #include "xeen/sprites.h" 33 #define INV_ITEMS_TOTAL 9 39 CATEGORY_WEAPON = 0, CATEGORY_ARMOR = 1, CATEGORY_ACCESSORY = 2, CATEGORY_MISC = 3,
40 NUM_ITEM_CATEGORIES = 4
43 enum AttributeCategory {
44 ATTR_MIGHT = 0, ATTR_INTELLECT = 1, ATTR_PERSONALITY = 2, ATTR_SPEED = 3,
45 ATTR_ACCURACY = 4, ATTR_LUCK = 5, ATTR_HIT_POINTS = 6, ATTR_SPELL_POINTS = 7,
46 ATTR_ARMOR_CLASS = 8, ATTR_THIEVERY = 9
49 enum ElementalCategory {
50 ELEM_FIRE = 0, ELEM_ELECTRICITY = 1, ELEM_COLD = 2, ELEM_ACID_POISON = 3,
51 ELEM_ENERGY = 4, ELEM_MAGIC = 5
55 XEEN_SLAYER_SWORD = 34
59 EFFECTIVE_NONE = 0, EFFECTIVE_DRAGON = 1, EFFECTIVE_UNDEAD = 2, EFFECTIVE_GOLEM = 3,
60 EFFECTIVE_INSECT = 4, EFFEctIVE_MONSTERS = 5, EFFECTIVE_ANIMAL = 6
71 ItemState() : _counter(0), _cursed(false), _broken(false) {}
78 _cursed = _broken =
false;
84 bool empty()
const {
return !_counter && !_cursed && !_broken; }
107 static const char *getItemName(ItemCategory category, uint
id);
122 bool empty()
const {
return _id == 0; }
127 bool isBad()
const {
return _state._cursed || _state._broken; }
142 ElementalCategory getElementalCategory()
const;
147 static ElementalCategory getElementalCategory(
int material);
152 AttributeCategory getAttributeCategory()
const;
158 ItemCategory _category;
162 void equipError(
int itemIndex1, ItemCategory category1,
int itemIndex2,
163 ItemCategory category2);
178 const char *getMaeName(
int material);
199 bool passRestrictions(
int itemId,
bool suppressError =
false)
const;
206 virtual Common::String getFullDescription(
int itemIndex,
int displayNum = 15) = 0;
216 bool discardItem(
int itemIndex);
226 void removeItem(
int itemIndex);
236 virtual void enchantItem(
int itemIndex,
int amount);
257 void equipItem(
int itemIndex)
override;
263 Common::String getFullDescription(
int itemIndex,
int displayNum)
override;
268 void enchantItem(
int itemIndex,
int amount)
override;
273 bool hasElderWeapon()
const;
289 void equipItem(
int itemIndex)
override;
295 Common::String getFullDescription(
int itemIndex,
int displayNum)
override;
300 void enchantItem(
int itemIndex,
int amount)
override;
315 void equipItem(
int itemIndex)
override;
321 Common::String getFullDescription(
int itemIndex,
int displayNum)
override;
338 Common::String getFullDescription(
int itemIndex,
int displayNum)
override;
360 void breakAllItems();
365 void curseUncurse(
bool curse);
370 bool hasCursedItems()
const;
bool isBad() const
Definition: item.h:127
ItemState()
Definition: item.h:71
virtual void equipItem(int itemIndex)
Definition: item.h:221
void synchronize(Common::Serializer &s)
Definition: serializer.h:79
void clear()
Definition: item.h:76
bool isEquipped() const
Definition: item.h:132
bool empty() const
Definition: item.h:122
Definition: character.h:101
bool empty() const
Definition: item.h:84
void sort(T first, T last, StrictWeakOrdering comp)
Definition: algorithm.h:286
Definition: character.h:33