summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2010-01-12 09:40:24 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2010-01-12 12:18:32 +1000
commitaf50b39780da6717f5f9a597a66c0c97e01329e5 (patch)
tree0a8b6beb80c06b539da9c0eed21c79762e671adb /crawl-ref/source/effects.cc
parentb1b883e344e68dca92abafbdbcb4aea891bcfd8d (diff)
downloadcrawl-ref-af50b39780da6717f5f9a597a66c0c97e01329e5.tar.gz
crawl-ref-af50b39780da6717f5f9a597a66c0c97e01329e5.zip
A start at fixing missile acquirement (Vandal).
Vandal points out that SK_SLINGS was returning MI_STONE instead of sling bullet, and also had some legacy code around for SK_CROSSBOWS, darts and hand crossbows. This commit fixes that, but does not fix the issue of being unable to (I believe) acquire hand axes, dagger, javelins, throwing nets or large rocks for people with throwing skill.
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc14
1 files changed, 3 insertions, 11 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 6b5d86f580..9f18a9d5b8 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -1482,17 +1482,9 @@ static missile_type _acquirement_missile_subtype()
switch (skill)
{
- case SK_SLINGS: result = MI_STONE; break;
- case SK_BOWS: result = MI_ARROW; break;
-
- case SK_CROSSBOWS:
- // Assuming that crossbow in inventory means that they
- // want bolts for it (not darts for a hand crossbow)...
- // perhaps we should check for both and compare ammo
- // amounts on hand?
- result = (_have_item_with_types(OBJ_WEAPONS, WPN_CROSSBOW) ? MI_BOLT
- : MI_DART);
- break;
+ case SK_SLINGS: result = MI_SLING_BULLET; break;
+ case SK_BOWS: result = MI_ARROW; break;
+ case SK_CROSSBOWS: result = MI_BOLT; break;
case SK_THROWING:
// Assuming that blowgun in inventory means that they