summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells3.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-14 22:28:47 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-14 22:28:47 +0000
commitdc9818f51f12decc30475d7d616f5ae4313e509d (patch)
treef6e90c8054778e7102c3ef95b2449841d9f73ebf /crawl-ref/source/spells3.cc
parentd1423a8d90ec1e344c2504890d8ce164ba101324 (diff)
downloadcrawl-ref-dc9818f51f12decc30475d7d616f5ae4313e509d.tar.gz
crawl-ref-dc9818f51f12decc30475d7d616f5ae4313e509d.zip
Add miscellaneous minor fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9482 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r--crawl-ref/source/spells3.cc21
1 files changed, 15 insertions, 6 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index f097b92073..f356f34e4c 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -283,25 +283,34 @@ int airstrike(int power, dist &beam)
bool cast_bone_shards(int power, bolt &beam)
{
- bool success = false;
-
if (!you.weapon() || you.weapon()->base_type != OBJ_CORPSES)
+ {
canned_msg(MSG_SPELL_FIZZLES);
- else if (you.weapon()->sub_type != CORPSE_SKELETON)
- mpr("The corpse collapses into a mass of pulpy flesh.");
+ return (false);
+ }
+
+ bool success = false;
+
+ if (you.weapon()->sub_type != CORPSE_SKELETON)
+ {
+ mpr("The corpse collapses into a pulpy mess.");
+
+ dec_inv_item_quantity(you.equip[EQ_WEAPON], 1);
+ }
else
{
// Practical max of 100 * 15 + 3000 = 4500.
// Actual max of 200 * 15 + 3000 = 6000.
power *= 15;
- power += mons_weight( you.weapon()->plus );
+ power += mons_weight(you.weapon()->plus);
if (!player_tracer(ZAP_BONE_SHARDS, power, beam))
return (false);
mpr("The skeleton explodes into sharp fragments of bone!");
- dec_inv_item_quantity( you.equip[EQ_WEAPON], 1 );
+ dec_inv_item_quantity(you.equip[EQ_WEAPON], 1);
+
zapping(ZAP_BONE_SHARDS, power, beam);
success = true;