From f5edb6c16557b698e2bcd532a61ee08976dd857c Mon Sep 17 00:00:00 2001 From: haranp Date: Sat, 23 Sep 2006 10:26:51 +0000 Subject: Fixes bug 1563819, items dropped on lava/water now disintegrate. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup@91 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/items.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 4d2b08a548..bb744be701 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -1824,9 +1824,11 @@ bool drop_item( int item_dropped, int quant_drop ) { canned_msg( MSG_EMPTY_HANDED ); } - if (!copy_item_to_grid( you.inv[item_dropped], - you.x_pos, you.y_pos, quant_drop, true )) - { + const unsigned char my_grid = grd[you.x_pos][you.y_pos]; + + if ( my_grid != DNGN_DEEP_WATER && my_grid != DNGN_LAVA && + !copy_item_to_grid( you.inv[item_dropped], + you.x_pos, you.y_pos, quant_drop, true )) { mpr( "Too many items on this level, not dropping the item." ); return (false); } @@ -1835,6 +1837,11 @@ bool drop_item( int item_dropped, int quant_drop ) { quant_name( you.inv[item_dropped], quant_drop, DESC_NOCAP_A, str_pass ); snprintf( info, INFO_SIZE, "You drop %s.", str_pass ); mpr(info); + + if ( my_grid == DNGN_DEEP_WATER ) + mpr("It sinks quickly."); + else if ( my_grid == DNGN_DEEP_WATER ) + mpr("It burns up!"); dec_inv_item_quantity( item_dropped, quant_drop ); you.turn_is_over = 1; -- cgit v1.2.3-54-g00ecf