summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorjohnny shelley <jwshelley@shell-21008.(none)>2009-11-19 12:21:17 +0000
committerAdam Borowski <kilobyte@angband.pl>2009-11-19 13:59:09 +0100
commit8e6eafaca2199054b556624fcc1be2a4b6494c66 (patch)
tree3a8ab16a61e78c176df621a89e33769f33223e65 /crawl-ref/source/item_use.cc
parent117cfdbc3934adfed89079b242e47c350aa7808d (diff)
downloadcrawl-ref-8e6eafaca2199054b556624fcc1be2a4b6494c66.tar.gz
crawl-ref-8e6eafaca2199054b556624fcc1be2a4b6494c66.zip
Make confusion actually confuse ranged weapon users.
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index f430e1ade7..abe8b20aaf 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -2388,7 +2388,9 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus,
bool did_return = false; // Returning item actually does return to pack.
int slayDam = 0;
- if (target)
+ if (you.confused())
+ thr.target = you.pos() + coord_def(random2(13)-6, random2(13)-6);
+ else if (target)
thr = *target;
else
{
@@ -2532,12 +2534,6 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus,
init_stack_blood_potions(item, val);
}
- if (you.confused())
- {
- thr.isTarget = true;
- thr.target = you.pos() + coord_def(random2(13)-6, random2(13)-6);
- }
-
// Even though direction is allowed, we're throwing so we
// want to use tx, ty to make the missile fly to map edge.
if (!teleport)