diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-03 19:00:16 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-03 19:00:16 +0000 |
commit | 5a9dd985c931cb2ea24955d9cac145900a64ec9f (patch) | |
tree | 670c668e4a355d2dd0906343a90e136d1aa481a5 /crawl-ref | |
parent | 6ad2ff13db0746d82faad381d54127e6c8958190 (diff) | |
download | crawl-ref-5a9dd985c931cb2ea24955d9cac145900a64ec9f.tar.gz crawl-ref-5a9dd985c931cb2ea24955d9cac145900a64ec9f.zip |
Fixed sling bullets not being fired correctly.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1734 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/items.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/makeitem.cc | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 1cc99a4967..b055822f5d 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -2944,7 +2944,7 @@ bool item_def::launched_by(const item_def &launcher) const if (base_type != OBJ_MISSILES) return (false); const missile_type mt = fires_ammo_type(launcher); - return (sub_type == mt || (mt == MI_STONE && mt == MI_SLING_BULLET)); + return (sub_type == mt || (mt == MI_STONE && sub_type == MI_SLING_BULLET)); } int item_def::index() const diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc index 1244ed6144..614dfeb295 100644 --- a/crawl-ref/source/makeitem.cc +++ b/crawl-ref/source/makeitem.cc @@ -3667,7 +3667,10 @@ static void give_ammo(monsters *mon, int level, if (const item_def *launcher = mon->launcher()) { const object_class_type xitc = OBJ_MISSILES; - const int xitt = fires_ammo_type(*launcher); + int xitt = fires_ammo_type(*launcher); + + if (xitt == MI_STONE && one_chance_in(15)) + xitt = MI_SLING_BULLET; const int thing_created = items( 0, xitc, xitt, true, level, item_race ); |