summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-01 12:29:07 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-01 12:29:07 +0000
commitf5e97453a4ac3af452849dd8b3b429ecc8c7389d (patch)
treeae4ebfa3f583fde4b04738b120e0575f65b45353 /crawl-ref/source/item_use.cc
parent04f5058cac8e12d3b85834bda4589239932f371a (diff)
downloadcrawl-ref-f5e97453a4ac3af452849dd8b3b429ecc8c7389d.tar.gz
crawl-ref-f5e97453a4ac3af452849dd8b3b429ecc8c7389d.zip
Added shields of reflection, though they're not randomly generated and have no
valuation is shopping.cc. It currently only reflects missiles that are blocked with the shield. They could also reflect the brand effects of blocked melee weapons, but I'm not sure if that's a good idea. drop_item and the item to be dropped have been moved from fire_beam()'s parameters into the bolt structure, along with the beam's remaining range. Seems to work fine, but it might still lead to some buggyness. The game now distinguishes between killing yourself by hitting yourself with a beam bounced off a wall versus other forms of self targeting. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7705 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 6f300fffd2..6c6eaaedf3 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -2032,6 +2032,8 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus,
item.quantity = 1;
item.slot = index_to_letter(item.link);
+ pbolt.item = &item;
+
// Now start real firing!
origin_set_unknown(item);
std::string ammo_name;
@@ -2712,7 +2714,8 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus,
Options.tut_throw_counter++;
// Dropping item copy, since the launched item might be different.
- fire_beam(pbolt, &item, !did_return);
+ pbolt.drop_item = !did_return;
+ fire_beam(pbolt);
// The item can be destroyed before returning.
if (did_return && thrown_object_destroyed(&item, pbolt.target, true))
@@ -2728,7 +2731,7 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus,
// Fire beam in reverse.
pbolt.setup_retrace();
viewwindow(true, false);
- fire_beam(pbolt, &item, false);
+ fire_beam(pbolt);
msg::stream << item.name(DESC_CAP_THE) << " returns to your pack!"
<< std::endl;