diff options
-rw-r--r-- | engines/xeen/combat.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/dialogs/dialogs_items.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/item.cpp | 12 | ||||
-rw-r--r-- | engines/xeen/item.h | 2 |
4 files changed, 10 insertions, 8 deletions
diff --git a/engines/xeen/combat.cpp b/engines/xeen/combat.cpp index 2c87018613..bec9942767 100644 --- a/engines/xeen/combat.cpp +++ b/engines/xeen/combat.cpp @@ -1408,7 +1408,7 @@ void Combat::attack2(int damage, RangeType rangeType) { if (monster._damageType == DT_SLEEP || monster._damageType == DT_DRAGONSLEEP) monster._damageType = DT_PHYSICAL; - if ((rangeType == RT_SINGLE || _damageType == DT_PHYSICAL) && _attackWeaponId != 34) { + if ((rangeType == RT_SINGLE || _damageType == DT_PHYSICAL) && _attackWeaponId < XEEN_SLAYER_SWORD) { if (monsterData._phsyicalResistence != 0) { if (monsterData._phsyicalResistence == 100) { // Completely immune to the damage diff --git a/engines/xeen/dialogs/dialogs_items.cpp b/engines/xeen/dialogs/dialogs_items.cpp index 41233c9946..f844964396 100644 --- a/engines/xeen/dialogs/dialogs_items.cpp +++ b/engines/xeen/dialogs/dialogs_items.cpp @@ -61,6 +61,8 @@ Character *ItemsDialog::execute(Character *c, ItemsMode mode) { c = &_itemsCharacter; party._blacksmithWares.blackData2CharData(_itemsCharacter); setEquipmentIcons(); + } else if (mode == ITEMMODE_ENCHANT) { + _oldCharacter = c; } events.setCursor(0); diff --git a/engines/xeen/item.cpp b/engines/xeen/item.cpp index 091afb31f6..3fe2896583 100644 --- a/engines/xeen/item.cpp +++ b/engines/xeen/item.cpp @@ -339,7 +339,7 @@ Common::String WeaponItems::getFullDescription(int itemIndex, int displayNum) { Resources &res = *getVm()->_resources; Common::String desc = Common::String::format("\f%02u%s%s%s\f%02u%s%s%s", displayNum, - !i._state._cursed && !i._state._broken ? "" : res._maeNames[i._material].c_str(), + i._state._cursed || i._state._broken ? "" : res._maeNames[i._material].c_str(), i._state._broken ? Res.ITEM_BROKEN : "", i._state._cursed ? Res.ITEM_CURSED : "", displayNum, @@ -356,7 +356,7 @@ void WeaponItems::enchantItem(int itemIndex, int amount) { XeenItem &item = operator[](itemIndex); Character tempCharacter; - if (item._material == 0 && item._state.empty() && item._id != 34) { + if (item._material == 0 && item._state.empty() && item._id < XEEN_SLAYER_SWORD) { tempCharacter.makeItem(amount, 0, 1); XeenItem &tempItem = tempCharacter._weapons[0]; @@ -507,7 +507,7 @@ Common::String ArmorItems::getFullDescription(int itemIndex, int displayNum) { Resources &res = *getVm()->_resources; Common::String desc = Common::String::format("\f%02u%s%s%s\f%02u%s%s", displayNum, - !i._state._cursed && !i._state._broken ? "" : res._maeNames[i._material].c_str(), + i._state._cursed || i._state._broken ? "" : res._maeNames[i._material].c_str(), i._state._broken ? Res.ITEM_BROKEN : "", i._state._cursed ? Res.ITEM_CURSED : "", displayNum, @@ -620,7 +620,7 @@ Common::String AccessoryItems::getFullDescription(int itemIndex, int displayNum) Resources &res = *getVm()->_resources; Common::String desc = Common::String::format("\f%02u%s%s%s\f%02u%s%s", displayNum, - !i._state._cursed && !i._state._broken ? "" : res._maeNames[i._material].c_str(), + i._state._cursed || i._state._broken ? "" : res._maeNames[i._material].c_str(), i._state._broken ? Res.ITEM_BROKEN : "", i._state._cursed ? Res.ITEM_CURSED : "", displayNum, @@ -667,7 +667,7 @@ Common::String MiscItems::getFullDescription(int itemIndex, int displayNum) { Resources &res = *getVm()->_resources; Common::String desc = Common::String::format("\f%02u%s%s%s\f%02u%s%s", displayNum, - !i._state._cursed && !i._state._broken ? "" : res._maeNames[i._material].c_str(), + i._state._cursed || i._state._broken ? "" : res._maeNames[i._material].c_str(), i._state._broken ? Res.ITEM_BROKEN : "", i._state._cursed ? Res.ITEM_CURSED : "", displayNum, @@ -720,7 +720,7 @@ const InventoryItems &InventoryItemsGroup::operator[](ItemCategory category) con void InventoryItemsGroup::breakAllItems() { for (int idx = 0; idx < INV_ITEMS_TOTAL; ++idx) { - if (_owner->_weapons[idx]._id != 34) { + if (_owner->_weapons[idx]._id < XEEN_SLAYER_SWORD) { _owner->_weapons[idx]._state._broken = true; _owner->_weapons[idx]._frame = 0; } diff --git a/engines/xeen/item.h b/engines/xeen/item.h index 9bd70c71da..df13456cd7 100644 --- a/engines/xeen/item.h +++ b/engines/xeen/item.h @@ -52,7 +52,7 @@ enum ElementalCategory { ELEM_ENERGY = 4, ELEM_MAGIC = 5 }; -enum ItemId { +enum WeaponId { XEEN_SLAYER_SWORD = 34 }; |