summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monster.cc
diff options
context:
space:
mode:
authorNicholas Feinberg <pleasingfung@gmail.com>2014-06-24 20:39:15 -0700
committerNicholas Feinberg <pleasingfung@gmail.com>2014-06-24 21:41:22 -0700
commit42ddfa208c630b2990b8ea407c6bd00b3dbd031a (patch)
tree899174c394c8874bdc800a10baf42727f1866523 /crawl-ref/source/monster.cc
parent1db180b6d3a013644c41d1d1c75be81477a69ba1 (diff)
downloadcrawl-ref-42ddfa208c630b2990b8ea407c6bd00b3dbd031a.tar.gz
crawl-ref-42ddfa208c630b2990b8ea407c6bd00b3dbd031a.zip
Cleanup some monster throwing weapon pickup code
They probably don't need to be checking for plusses on darts. Or, at all.
Diffstat (limited to 'crawl-ref/source/monster.cc')
-rw-r--r--crawl-ref/source/monster.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index dd8e64fccf..2bc212a56b 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -2103,13 +2103,11 @@ bool monster::pickup_missile(item_def &item, int near, bool force)
}
}
- // Darts don't absolutely need a launcher - still allow upgrading.
+ // Allow upgrading throwing weapon brands (XXX: improve this!)
if (item.sub_type == miss->sub_type
- && item.sub_type == MI_TOMAHAWK
- && (item.plus > miss->plus
- || item.plus == miss->plus
- && get_ammo_brand(*miss) == SPMSL_NORMAL
- && get_ammo_brand(item) != SPMSL_NORMAL))
+ && (item.sub_type == MI_TOMAHAWK || item.sub_type == MI_JAVELIN)
+ && get_ammo_brand(*miss) == SPMSL_NORMAL
+ && get_ammo_brand(item) != SPMSL_NORMAL)
{
if (!drop_item(MSLOT_MISSILE, near))
return false;