diff options
author | Stefan O'Rear <stefanor@cox.net> | 2009-12-29 22:43:19 -0800 |
---|---|---|
committer | Stefan O'Rear <stefanor@cox.net> | 2009-12-29 22:44:54 -0800 |
commit | 8a504d20b9992fea2daac06faa6ca5559ca63ae0 (patch) | |
tree | 2e809b12b5e1020ebe4ee3237025081d5cd22816 /crawl-ref/source/beam.cc | |
parent | 75c0968931bf47f6f718b91ce3f589cd9f815298 (diff) | |
download | crawl-ref-8a504d20b9992fea2daac06faa6ca5559ca63ae0.tar.gz crawl-ref-8a504d20b9992fea2daac06faa6ca5559ca63ae0.zip |
Give move/copy_item_to_grid responsibility for hazardous terrain
We now have much less duplication of logic, yay.
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r-- | crawl-ref/source/beam.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index abe97ceb66..451cadd81d 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -3140,7 +3140,7 @@ void bolt::drop_object() return; } - if (!thrown_object_destroyed(item, pos(), false)) + if (!thrown_object_destroyed(item, pos())) { if (item->sub_type == MI_THROWING_NET) { @@ -3154,10 +3154,10 @@ void bolt::drop_object() set_item_stationary(*item); } } + copy_item_to_grid(*item, pos(), 1); } - else if (item->sub_type == MI_LARGE_ROCK - && !feat_destroys_items(grd(pos()))) + else if (item->sub_type == MI_LARGE_ROCK) { // Large rocks mulch to stone. std::string sound_msg = "You hear a cracking sound!"; @@ -3176,6 +3176,10 @@ void bolt::drop_object() copy_item_to_grid(*item, pos(), item->quantity); } + else + { + item_was_destroyed(*item, NON_MONSTER); + } } // Returns true if the beam hits the player, fuzzing the beam if necessary |