summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-15 10:57:23 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-15 10:57:23 +0000
commit79282d0e5bbed27cc5df50413bfd2d9db0874fd3 (patch)
tree89e21722bdc18717d02adcb409076ea6ddee7619 /crawl-ref/source/beam.cc
parent4140d2abd9dfcd9cdda476fc4722067beefe0426 (diff)
downloadcrawl-ref-79282d0e5bbed27cc5df50413bfd2d9db0874fd3.tar.gz
crawl-ref-79282d0e5bbed27cc5df50413bfd2d9db0874fd3.zip
FR #2424917: holy monsters should drop non-summoned items when they die rather
than taking their entire inventory with them. If a monster drops/fires/throws a summoned item the item will vanish (assuming it's not a fired/thrown item which returns to the monster). Don't generate summoned monsters with throwing nets since the net will disappear as soon as it hits the target. If a monster drops an item onto a item destroying grid the item will be destroyed, accompanied by the approriate sound. This should never happen, since monsters only drop items in order to pick up another one, and they can't pick up items off of item destroying grids since there won't be any items there, but maybe in the future confused monsters will spontaneously drop items or something. Don't let orcs use orc-slaying weapons or draconians use dragon-slaying weapons. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7836 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r--crawl-ref/source/beam.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 2bf23be891..da31322807 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -3003,6 +3003,22 @@ void beam_drop_object( bolt &beam, item_def *item, const coord_def& _p )
if (!in_bounds(p))
p = beam.pos;
+ if (item->flags & ISFLAG_SUMMONED)
+ {
+ if (see_grid(p))
+ {
+ mprf("%s %s!",
+ item->name(DESC_CAP_THE).c_str(),
+ summoned_poof_msg(beam.beam_source, *item).c_str());
+ }
+ item_was_destroyed(*item, beam.beam_source);
+
+ beam.dropped_item = true;
+ beam.item_pos = p;
+ beam.item_index = NON_ITEM;
+ return;
+ }
+
// Conditions: beam is missile and not tracer.
if (YOU_KILL(beam.thrower)
&& !thrown_object_destroyed(item, p, false)