summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/acquire.cc
diff options
context:
space:
mode:
authorShmuale Mark <shm.mark@gmail.com>2014-08-03 13:59:36 -0400
committerShmuale Mark <shm.mark@gmail.com>2014-08-03 14:17:14 -0400
commit2e52a0c19d866a6a15b36163fa145a94bbf9721f (patch)
tree1ad40aea10861227400db415ab1c2adaef44252b /crawl-ref/source/acquire.cc
parent2091673ee858097442a1668a947626a489639ece (diff)
downloadcrawl-ref-2e52a0c19d866a6a15b36163fa145a94bbf9721f.tar.gz
crawl-ref-2e52a0c19d866a6a15b36163fa145a94bbf9721f.zip
Hide a hack better.
Ideally, we wouldn't be using special for unrands totally different from how items of the same type do, but that's less trivial than this commit. A centralised place to check for being an unrand should at least make such a change easier.
Diffstat (limited to 'crawl-ref/source/acquire.cc')
-rw-r--r--crawl-ref/source/acquire.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/crawl-ref/source/acquire.cc b/crawl-ref/source/acquire.cc
index b2912a4f95..49ab48658c 100644
--- a/crawl-ref/source/acquire.cc
+++ b/crawl-ref/source/acquire.cc
@@ -1256,9 +1256,8 @@ int acquirement_create_item(object_class_type class_wanted,
int brand = get_weapon_brand(acq_item);
if (brand == SPWPN_PAIN
- || is_unrandom_artefact(acq_item)
- && (acq_item.special == UNRAND_TROG
- || acq_item.special == UNRAND_WUCAD_MU))
+ || is_unrandom_artefact(acq_item, UNRAND_TROG)
+ || is_unrandom_artefact(acq_item, UNRAND_WUCAD_MU))
{
destroy_item(thing_created, true);
thing_created = NON_ITEM;