diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-27 11:34:28 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-27 11:34:28 +0000 |
commit | b1441dfff0759a18f88f1f603663c6ed376acdcd (patch) | |
tree | 87efa61611046afd8084f7acf8d39fe1e815212e /crawl-ref/source/effects.cc | |
parent | b1de924190383f5bf1027c13963ef4357a5ddccd (diff) | |
download | crawl-ref-b1441dfff0759a18f88f1f603663c6ed376acdcd.tar.gz crawl-ref-b1441dfff0759a18f88f1f603663c6ed376acdcd.zip |
Okawaru and Trog gifts should not be negatively enchanted, where reasonable.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2623 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r-- | crawl-ref/source/effects.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 4a3368b944..1d1a31cdb3 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -1526,14 +1526,17 @@ bool acquirement(object_class_type class_wanted, int agent) { thing.plus -= plusmod; thing.plus2 += plusmod; + if (!is_random_artefact(thing)) + thing.plus = std::max(static_cast<int>(thing.plus), 0); } // more accuracy, less damage else if (agent == GOD_OKAWARU) { thing.plus += plusmod; thing.plus2 -= plusmod; + if (!is_random_artefact(thing)) + thing.plus2 = std::max(static_cast<int>(thing.plus2), 0); } - } else if (thing.base_type == OBJ_ARMOUR && !is_fixed_artefact( thing ) |