From af50b39780da6717f5f9a597a66c0c97e01329e5 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Tue, 12 Jan 2010 09:40:24 +1000 Subject: 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. --- crawl-ref/source/effects.cc | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'crawl-ref/source/effects.cc') 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 -- cgit v1.2.3-54-g00ecf