summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorChris Campbell <chriscampbell89@gmail.com>2014-06-15 15:56:48 +0100
committerChris Campbell <chriscampbell89@gmail.com>2014-06-15 23:09:55 +0100
commit62a6f3cdfa5ad65f65e63a75b7843a6963eaf94e (patch)
treedec213cfa02d88703051c60529926db63eda5b49 /crawl-ref/source/item_use.cc
parenta506aeea435f951e3dd76694bc8bd508ddae3095 (diff)
downloadcrawl-ref-62a6f3cdfa5ad65f65e63a75b7843a6963eaf94e.tar.gz
crawl-ref-62a6f3cdfa5ad65f65e63a75b7843a6963eaf94e.zip
Make enchant weapon scrolls always succeed, reduce generation
For consistency with enchant armour, and to remove the breakpoint at +4.
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index fcc5f344ec..1d0cea94f9 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -2329,14 +2329,13 @@ bool enchant_weapon(item_def &wpn)
if (is_weapon(wpn))
{
- if (!is_artefact(wpn) && wpn.base_type == OBJ_WEAPONS)
+ if (!is_artefact(wpn)
+ && wpn.base_type == OBJ_WEAPONS
+ && wpn.plus < MAX_WPN_ENCHANT)
{
- if (wpn.plus < 4 || !x_chance_in_y(wpn.plus, MAX_WPN_ENCHANT))
- {
- wpn.plus++;
- success = true;
- mprf("%s glows red for a moment.", iname.c_str());
- }
+ wpn.plus++;
+ success = true;
+ mprf("%s glows red for a moment.", iname.c_str());
}
if (wpn.cursed())