summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells4.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/spells4.cc')
-rw-r--r--crawl-ref/source/spells4.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc
index a2cf1ee5e6..3004edbfe8 100644
--- a/crawl-ref/source/spells4.cc
+++ b/crawl-ref/source/spells4.cc
@@ -2636,21 +2636,24 @@ int cast_apportation(int pow)
return (done);
}
-void cast_sandblast(int pow, bolt &beam)
+bool cast_sandblast(int pow, bolt &beam)
{
bool big = false;
if (you.weapon())
{
const item_def& wpn(*you.weapon());
- big = (wpn.base_type == OBJ_MISSILES)
- && (wpn.sub_type == MI_STONE || wpn.sub_type == MI_LARGE_ROCK);
+ big = (wpn.base_type == OBJ_MISSILES
+ && (wpn.sub_type == MI_STONE || wpn.sub_type == MI_LARGE_ROCK));
}
- if (big)
+ bool success = zapping(big ? ZAP_SANDBLAST
+ : ZAP_SMALL_SANDBLAST, pow, beam, true);
+
+ if (big && success)
dec_inv_item_quantity( you.equip[EQ_WEAPON], 1 );
- zapping(big ? ZAP_SANDBLAST : ZAP_SMALL_SANDBLAST, pow, beam);
+ return (success);
}
void cast_condensation_shield(int pow)