From 4db1d75dca2405e186a3e9869a2aa9e058cbf71f Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Wed, 30 Dec 2009 00:57:03 -0800 Subject: Allow tiles to destroy only some items. --- crawl-ref/source/spells4.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'crawl-ref/source/spells4.cc') diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc index 7da3ee46af..9f3f03d736 100644 --- a/crawl-ref/source/spells4.cc +++ b/crawl-ref/source/spells4.cc @@ -1714,13 +1714,6 @@ bool cast_portal_projectile(int pow) bool cast_apportation(int pow, const coord_def& where) { - // Protect the player from destroying the item. - if (feat_destroys_items(grd(you.pos()))) - { - mpr( "That would be silly while over this terrain!" ); - return (false); - } - if (you.trans_wall_blocking(where)) { mpr("A translucent wall is in the way."); @@ -1750,6 +1743,13 @@ bool cast_apportation(int pow, const coord_def& where) item_def& item = mitm[item_idx]; + // Protect the player from destroying the item. + if (feat_destroys_item(grd(you.pos()), item)) + { + mpr( "That would be silly while over this terrain!" ); + return (false); + } + // Mass of one unit. const int unit_mass = item_mass(item); const int max_mass = pow * 30 + random2(pow * 20); -- cgit v1.2.3-54-g00ecf