summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2007-12-08 20:52:48 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2007-12-08 20:52:48 +0000
commit6af0738c8730e4a831f10259ebb9a24e8beea48d (patch)
tree6761c9b700f8f22d84926422a4b4092b7db79d14 /crawl-ref/source
parent60bdc5258f24366aa9031738183841edafc8572b (diff)
downloadcrawl-ref-6af0738c8730e4a831f10259ebb9a24e8beea48d.tar.gz
crawl-ref-6af0738c8730e4a831f10259ebb9a24e8beea48d.zip
Allow javelins of returning. Since these are powerful, make them as
rare as distortion weapons (4%), not counting the fallthrough for orcish ones' being poisoned. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3025 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/makeitem.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index d54e0bd810..0ac50bf823 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -1694,6 +1694,10 @@ static special_missile_type determine_missile_brand(const item_def& item,
rc = SPMSL_NORMAL;
}
+ // Javelins can be returning.
+ if (item.sub_type == MI_JAVELIN && one_chance_in(25))
+ rc = SPMSL_RETURNING;
+
// orcish ammo gets poisoned a lot more often -- in the original
// code it was poisoned every time!?
if (get_equip_race(item) == ISFLAG_ORCISH && one_chance_in(3))
@@ -1747,8 +1751,12 @@ static void generate_missile_item(item_def& item, int force_type,
determine_missile_brand(item, item_level) );
// reduced quantity if special
- if (item.sub_type == MI_JAVELIN || get_ammo_brand( item ) == SPMSL_CURARE)
+ if (item.sub_type == MI_JAVELIN ||
+ get_ammo_brand( item ) == SPMSL_CURARE ||
+ get_ammo_brand( item ) == SPMSL_RETURNING)
+ {
item.quantity = random_range(2, 8);
+ }
else if (get_ammo_brand( item ) != SPMSL_NORMAL)
item.quantity = 1+random2(9) + random2(12) + random2(12);
else