summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemprop.cc
diff options
context:
space:
mode:
authorNicholas Feinberg <pleasingfung@gmail.com>2014-06-03 19:17:44 -0700
committerNicholas Feinberg <pleasingfung@gmail.com>2014-06-03 19:17:44 -0700
commitaec7b7d1218888efe06fb2c18bb9cefc34ac673e (patch)
tree26fbc560f5a739160d7b33ac9b95497cd3007422 /crawl-ref/source/itemprop.cc
parent6cfa8eec0c12ead60bd2c3fb50e672ee3310721f (diff)
downloadcrawl-ref-aec7b7d1218888efe06fb2c18bb9cefc34ac673e.tar.gz
crawl-ref-aec7b7d1218888efe06fb2c18bb9cefc34ac673e.zip
Increase shield enchantment limits
Now that shield enchantments are potentially meaningful. This may make shields & large shields slightly more attractive.
Diffstat (limited to 'crawl-ref/source/itemprop.cc')
-rw-r--r--crawl-ref/source/itemprop.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc
index c3e0de2bd0..ddf7f17c49 100644
--- a/crawl-ref/source/itemprop.cc
+++ b/crawl-ref/source/itemprop.cc
@@ -981,7 +981,12 @@ bool hide2armour(item_def &item)
return true;
}
-// Return the enchantment limit of a piece of armour.
+/**
+ * Return the enchantment limit of a piece of armour.
+ *
+ * @param item The item being considered.
+ * @return The maximum enchantment the item can hold.
+ */
int armour_max_enchant(const item_def &item)
{
ASSERT(item.base_type == OBJ_ARMOUR);
@@ -996,7 +1001,8 @@ int armour_max_enchant(const item_def &item)
max_plus = property(item, PARM_AC);
}
else if (eq_slot == EQ_SHIELD)
- max_plus = 3;
+ // 3 / 5 / 8 for bucklers/shields/lg. shields
+ max_plus = (property(item, PARM_AC) - 3)/2 + 3;
return max_plus;
}