summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/makeitem.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-24 07:35:21 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-24 07:35:21 +0000
commit3f1477cd578fd1e5e1931351c8ea1b9ad18d4a5c (patch)
tree1f96f1cc676d4387d344ebce36a4f455e73d2f72 /crawl-ref/source/makeitem.cc
parent7b6e06e7dfb876a56c99e2216a6071e0a652caf9 (diff)
downloadcrawl-ref-3f1477cd578fd1e5e1931351c8ea1b9ad18d4a5c.tar.gz
crawl-ref-3f1477cd578fd1e5e1931351c8ea1b9ad18d4a5c.zip
Apply r6620, r6624, r6625, r6628 and r6632 to 0.4.
Save existing ghosts back to bones files even for undead players. Fix HP bar blanking out when wrapping. Fix TSO regarding attacks on evil creatures as unchivalric. Fix Twisted Resurrection abominations not counting as undead. Fix monsters being generated with stacks of returning weapons. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6666 c06c8d41-db1a-0410-9941-cceddc491573
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);
}