summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-27 12:51:16 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-27 12:51:16 +0000
commita9b46da56400c1f5d6bbb411a9e569706f49c248 (patch)
tree9935f3ffaffb510cb9edd8208d718df6962d510b /crawl-ref/source/beam.cc
parent79bbaa47cdd8caa7af8a9668be8d9287c9e34af7 (diff)
downloadcrawl-ref-a9b46da56400c1f5d6bbb411a9e569706f49c248.tar.gz
crawl-ref-a9b46da56400c1f5d6bbb411a9e569706f49c248.zip
Implemented 1708500, generate a message when an item is lost in the depths.
Shut up a compile-time warning in makeitem.cc. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1379 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r--crawl-ref/source/beam.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 188307de76..f3d16f8c68 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -2347,6 +2347,13 @@ static void beam_drop_object( struct bolt &beam, item_def *item, int x, int y )
if (beam.is_tracer || beam.flavour != BEAM_MISSILE)
return;
+ // maybe we can remove the YOU_KILL...
+ if ( grid_destroys_items(grd[x][y]) && YOU_KILL(beam.thrower) )
+ {
+ mprf(MSGCH_SOUND, grid_item_destruction_message(grd[x][y]));
+ return;
+ }
+
if (YOU_KILL(beam.thrower) // ie if you threw it.
&& (!grid_destroys_items(grd[x][y])))
{
@@ -2373,8 +2380,7 @@ static void beam_drop_object( struct bolt &beam, item_def *item, int x, int y )
if (item->base_type != OBJ_MISSILES || !one_chance_in(chance))
copy_item_to_grid( *item, x, y, 1 );
}
- else if (MON_KILL(beam.thrower) // monster threw it.
- && !grid_destroys_items(grd[x][y]) && coinflip())
+ else if (MON_KILL(beam.thrower) && coinflip()) // monster threw it.
{
copy_item_to_grid( *item, x, y, 1 );
} // if (thing_throw == 2) ...