summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-30 12:58:15 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-30 12:58:15 +0000
commita93986dd689d32f36eba42418ae0ef0fe2f9c1bf (patch)
tree4c4117a7305fd65c7e7cbf245a90e2beed97bf56 /crawl-ref
parent3aa8f2c3c6a065779bdb64db863fbb4fcf8102c8 (diff)
downloadcrawl-ref-a93986dd689d32f36eba42418ae0ef0fe2f9c1bf.tar.gz
crawl-ref-a93986dd689d32f36eba42418ae0ef0fe2f9c1bf.zip
Correct max armour enchantment to 8 (was 5). Sorry about that!
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8031 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/defines.h2
-rw-r--r--crawl-ref/source/item_use.cc3
2 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/defines.h b/crawl-ref/source/defines.h
index a2e960c0ce..8b1d09cb80 100644
--- a/crawl-ref/source/defines.h
+++ b/crawl-ref/source/defines.h
@@ -200,7 +200,7 @@ const int LABYRINTH_BORDER = 4;
#define MAX_WPN_ENCHANT 9
// Note: use armour_max_enchant(item) to get the correct limit for item
-#define MAX_ARM_ENCHANT 5
+#define MAX_ARM_ENCHANT 8
#define MAX_SEC_ENCHANT 2
// some shortcuts:
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index e503e5b4a2..7ee41d7e46 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -4093,7 +4093,8 @@ bool enchant_armour(int &ac_change, bool quiet, item_def &arm)
// Even if not affected, it may be uncursed.
if (!is_enchantable_armour(arm, false)
- || arm.plus >= 3 && x_chance_in_y(arm.plus, 8))
+ || arm.plus > MAX_SEC_ENCHANT
+ && x_chance_in_y(arm.plus, MAX_ARM_ENCHANT))
{
if (is_cursed)
{