diff options
author | Johanna Ploog <j-p-e-g@users.sourceforge.net> | 2009-12-09 21:28:06 +0100 |
---|---|---|
committer | Johanna Ploog <j-p-e-g@users.sourceforge.net> | 2009-12-09 21:29:11 +0100 |
commit | f4efe0a7c1422dede865ea5f9d8e2d96978b2f9f (patch) | |
tree | 194ec7107f8dc9b69850f6d4fd40c7ad042306ad /crawl-ref/source/beam.cc | |
parent | 111f97cd88164b2fc01c3f28aeb94b6f464aad62 (diff) | |
download | crawl-ref-f4efe0a7c1422dede865ea5f9d8e2d96978b2f9f.tar.gz crawl-ref-f4efe0a7c1422dede865ea5f9d8e2d96978b2f9f.zip |
Large rocks mulch into a pile of stones and make noise when they do so.
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r-- | crawl-ref/source/beam.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index b33169f852..f531c50491 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -3105,6 +3105,26 @@ void bolt::drop_object() } copy_item_to_grid(*item, pos(), 1); } + else if (item->sub_type == MI_LARGE_ROCK + && !feat_destroys_items(grd(pos()))) + { + // Large rocks mulch to stone. + std::string sound_msg = "You hear a cracking sound!"; + if (you.see_cell(pos())) + { + mprf("%s shatters into pieces!", + item->name(DESC_CAP_THE).c_str()); + sound_msg = ""; + } + noisy(12, pos(), sound_msg.c_str()); + + item->sub_type = MI_STONE; + item->quantity = 10 + random2(41); + // Remove thrown flag: we might not want to pick up the stones. + item->flags &= ~ISFLAG_THROWN; + + copy_item_to_grid(*item, pos(), item->quantity); + } } // Returns true if the beam hits the player, fuzzing the beam if necessary |