From cf5a7d069c6c1e8980beb9e1132a4178417a7d38 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 29 Dec 2008 19:38:30 +0000 Subject: Actually use MAX_WPN_ENCHANT instead of hardcoding +9 everywhere. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8022 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/itemprop.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/itemprop.cc') diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index 1ee5c195f9..9d79151650 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -1373,13 +1373,16 @@ bool is_enchantable_weapon(const item_def &wpn, bool uncurse) // only uncursed. if (wpn.base_type == OBJ_WEAPONS) { - if (is_artefact(wpn) || wpn.plus >= 9 && wpn.plus2 >= 9) + if (is_artefact(wpn) + || wpn.plus >= MAX_WPN_ENCHANT && wpn.plus2 >= MAX_WPN_ENCHANT) + { return (uncurse && item_cursed(wpn)); + } } // Highly enchanted missiles, which have only one stat, cannot be // enchanted or uncursed, since missiles cannot be artefacts or // cursed. - else if (wpn.plus >= 9) + else if (wpn.plus >= MAX_WPN_ENCHANT) return (false); return (true); -- cgit v1.2.3-54-g00ecf