summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-06 19:36:52 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-06 19:36:52 +0000
commit1f949e4b0f972867e6274a8a4fc3db8d5fe924e8 (patch)
treea0668ece3d80e4b2409e8cff04e3351b406c20b1 /crawl-ref/source/effects.cc
parentc5887300c0f938671c78fc4a59f74ea98ac5bd04 (diff)
downloadcrawl-ref-1f949e4b0f972867e6274a8a4fc3db8d5fe924e8.tar.gz
crawl-ref-1f949e4b0f972867e6274a8a4fc3db8d5fe924e8.zip
* After some thought, remove the description toggle from the spell menu as
the double toggle makes everything much more complicated, and you can easily access the spell descriptions from the very similar 'I' menu. * Don't offer weapons of unknown brand types for ?recharging. I tested a few combination cases, but I might have overlooked something. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9589 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc22
1 files changed, 13 insertions, 9 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 241a1e909f..509fc8c2c8 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -1903,20 +1903,24 @@ bool recharge_wand(int item_slot)
}
// Weapons of electrocution can be "charged", i.e. gain +1 damage.
- if (wand.base_type == OBJ_WEAPONS
- && get_weapon_brand(wand) == SPWPN_ELECTROCUTION)
+ if (wand.base_type == OBJ_WEAPONS)
{
- // Might fail because of already high enchantment.
- if (enchant_weapon( ENCHANT_TO_DAM, false, wand ))
+ if (get_weapon_brand(wand) == SPWPN_ELECTROCUTION)
{
- you.wield_change = true;
+ // Might fail because of already high enchantment.
+ if (enchant_weapon( ENCHANT_TO_DAM, false, wand ))
+ {
+ you.wield_change = true;
- if (!item_ident(wand, ISFLAG_KNOW_TYPE))
- set_ident_flags(wand, ISFLAG_KNOW_TYPE);
+ if (!item_ident(wand, ISFLAG_KNOW_TYPE))
+ set_ident_flags(wand, ISFLAG_KNOW_TYPE);
- return (true);
+ return (true);
+ }
+ return (false);
}
- return (false);
+ else
+ canned_msg( MSG_NOTHING_HAPPENS );
}
if (wand.base_type != OBJ_WANDS && !item_is_rod(wand))