summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/makeitem.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/makeitem.cc')
-rw-r--r--crawl-ref/source/makeitem.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index 07da7fbef3..c1343719c8 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -3829,7 +3829,16 @@ static void _give_ammo(monsters *mon, int level,
if (thing_created != NON_ITEM)
{
- mitm[thing_created].quantity = qty;
+ item_def& w(mitm[thing_created]);
+
+ // Limit returning brand to only one.
+ if (weap_type == OBJ_WEAPONS
+ && get_weapon_brand(w) == SPWPN_RETURNING)
+ {
+ qty = 1;
+ }
+
+ w.quantity = qty;
_give_monster_item(mon, thing_created, false,
&monsters::pickup_throwable_weapon);
}