shop: make "Block ... damages" coherent with damage_pc.

This commit is contained in:
Laurent Alonso(fr)
2020-05-12 19:34:05 +02:00
committed by Celtic Minstrel
parent 6c89214505
commit cfbc66f1de

View File

@@ -864,8 +864,13 @@ std::string get_item_interesting_string(cItem item) {
case eItemType::HELM:
case eItemType::GLOVES:
case eItemType::SHIELD_2:
case eItemType::BOOTS: // TODO: Verify that this is displayed correctly
sout << "Blocks " << item.item_level + ((item.protection > 0) ? 1 : 0) << '-' << item.item_level + item.protection << " damage";
case eItemType::BOOTS: // coherent with damage_pc
sout << "Blocks "
<< 1 + (item.bonus>0 ? 1 : item.bonus) + (item.protection > 0 ? 1 : item.protection)
<< '-'
<< item.item_level + (item.bonus>=0 ? item.bonus : -1) +
(item.protection>=0 ? item.protection : -1)
<< " damage";
break;
case eItemType::BOW:
case eItemType::CROSSBOW: