summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-03-10 17:17:45 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-03-10 17:17:45 +0000
commit1b2628a263abaac2a99f2a225a1b104a84093247 (patch)
tree9708bb1336d8e1bd9791302387864e76d3fc0f8e /crawl-ref/source/effects.cc
parentdf0686dc843b95138a388d2d1edeb16a96e6ca80 (diff)
downloadcrawl-ref-1b2628a263abaac2a99f2a225a1b104a84093247.tar.gz
crawl-ref-1b2628a263abaac2a99f2a225a1b104a84093247.zip
[1677717] Fixed acquirement of non-randarts crashing.
Also fixed Okie-Trog gift check that I'd broken inadvertently. Oops. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1011 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 1d6490e079..5031bdfb17 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -1166,9 +1166,8 @@ bool acquirement(unsigned char force_class, int agent)
// MT - Check: god-gifted weapons and armor shouldn't kill you.
// Except Xom.
- if (agent == GOD_TROG || agent == GOD_OKAWARU)
- break;
- else
+ if ((agent == GOD_TROG || agent == GOD_OKAWARU)
+ && is_random_artefact(mitm[thing_created]))
{
randart_wpn_properties( mitm[thing_created], proprt );
@@ -1181,10 +1180,10 @@ bool acquirement(unsigned char force_class, int agent)
// try again
destroy_item(thing_created);
thing_created = NON_ITEM;
+ continue;
}
- else
- break;
}
+ break;
}
if (thing_created == NON_ITEM)