summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monster.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-06-12 20:18:37 -0400
committerNeil Moore <neil@s-z.org>2014-06-12 20:18:38 -0400
commite5469503fe2e9f48d90f7efe88b079569eb5f9d4 (patch)
tree7d839e6b725e3d932b9030a6e54ffa57e6c257ee /crawl-ref/source/monster.cc
parent7d01089b83dd1c6cfa6508ad6124461e55ba9daa (diff)
downloadcrawl-ref-e5469503fe2e9f48d90f7efe88b079569eb5f9d4.tar.gz
crawl-ref-e5469503fe2e9f48d90f7efe88b079569eb5f9d4.zip
Allow giving misc/books to monsters (#8678)
They still won't pick them up, but they can now be explicitly given via monspecs or mon-gear.cc; in particular, Geryon and Roxanne will once again get their horn and book, respectively.
Diffstat (limited to 'crawl-ref/source/monster.cc')
-rw-r--r--crawl-ref/source/monster.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index a882b5395e..f0f974e9b0 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -2199,12 +2199,7 @@ bool monster::pickup_gold(item_def &item, int near)
bool monster::pickup_misc(item_def &item, int near)
{
- if (mons_is_item_mimic(type))
- return pickup(item, MSLOT_MISCELLANY, near);
-
- // Monsters can't use any miscellaneous items right now, so don't
- // let them pick them up.
- return false;
+ return pickup(item, MSLOT_MISCELLANY, near);
}
// Eaten items are handled elsewhere, in _handle_pickup() in mon-stuff.cc.
@@ -2266,8 +2261,6 @@ bool monster::pickup_item(item_def &item, int near, bool force)
// Pickup some stuff only if WANDERING.
case OBJ_ARMOUR:
return pickup_armour(item, near, force);
- case OBJ_MISCELLANY:
- return pickup_misc(item, near);
case OBJ_GOLD:
return pickup_gold(item, near);
case OBJ_JEWELLERY:
@@ -2289,6 +2282,9 @@ bool monster::pickup_item(item_def &item, int near, bool force)
case OBJ_POTIONS:
return pickup_potion(item, near);
case OBJ_BOOKS:
+ case OBJ_MISCELLANY:
+ // Monsters can't use any miscellaneous items right now, so don't
+ // let them pick them up unless explicitly given.
if (force)
return pickup_misc(item, near);
// else fall through