From 8e6eafaca2199054b556624fcc1be2a4b6494c66 Mon Sep 17 00:00:00 2001 From: johnny shelley Date: Thu, 19 Nov 2009 12:21:17 +0000 Subject: Make confusion actually confuse ranged weapon users. --- crawl-ref/source/item_use.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'crawl-ref/source/item_use.cc') 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) -- cgit v1.2.3-54-g00ecf