From dc9818f51f12decc30475d7d616f5ae4313e509d Mon Sep 17 00:00:00 2001 From: dolorous Date: Sat, 14 Mar 2009 22:28:47 +0000 Subject: Add miscellaneous minor fixes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9482 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spells3.cc | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/spells3.cc') 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; -- cgit v1.2.3-54-g00ecf