summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-09-24 05:39:14 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-09-24 05:39:14 +0000
commite64018ae71e39de8db326ceaf32eea44c73363c1 (patch)
treec28da9aa3aeaacfe64d2c503ffd370913482f644 /crawl-ref/source/item_use.cc
parent319a19300a717f47ebb88ebdee27000dfc3ff896 (diff)
downloadcrawl-ref-e64018ae71e39de8db326ceaf32eea44c73363c1.tar.gz
crawl-ref-e64018ae71e39de8db326ceaf32eea44c73363c1.zip
Fixed Lua macro weirdness.
Clear messages before each travel move so that accumulated messages don't interrupt travel. Refixed silly throwing penalty for needles. Finally put the code in the right place. :-) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup@96 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc27
1 files changed, 13 insertions, 14 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 65f7ee2d58..27031419f0 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -1698,20 +1698,6 @@ bool throw_it(struct bolt &pbolt, int throw_2, monsters *dummy_target)
exercise(SK_DARTS, 1 + random2avg(3, 2));
}
- if (wepClass == OBJ_MISSILES && wepType == MI_NEEDLE)
- {
- // Throwing needles is now seriously frowned upon; it's difficult
- // to grip a fiddly little needle, and not penalising it cheapens
- // blowguns. [ds] Increased the penalty further after rgrmisc
- // reports of being able to use thrown needles.
- exHitBonus -= (30 - you.skills[SK_DARTS]);
- baseHit -= (45 - you.skills[SK_DARTS]) / 2;
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Needle base hit = %d, exHitBonus = %d",
- baseHit, exHitBonus);
-#endif
- }
-
// exercise skill
if (coinflip())
exercise(SK_RANGED_COMBAT, 1);
@@ -1763,6 +1749,19 @@ bool throw_it(struct bolt &pbolt, int throw_2, monsters *dummy_target)
exercise(SK_RANGED_COMBAT, 1);
exHitBonus = you.dex / 4;
+
+ if (wepClass == OBJ_MISSILES && wepType == MI_NEEDLE)
+ {
+ // Throwing needles is now seriously frowned upon; it's difficult
+ // to grip a fiddly little needle, and not penalising it cheapens
+ // blowguns.
+ exHitBonus -= (30 - you.skills[SK_DARTS]) / 3;
+ baseHit -= (30 - you.skills[SK_DARTS]) / 3;
+#ifdef DEBUG_DIAGNOSTICS
+ mprf(MSGCH_DIAGNOSTICS, "Needle base hit = %d, exHitBonus = %d",
+ baseHit, exHitBonus);
+#endif
+ }
}
// FINALIZE tohit and damage