From 4199cb903775df050465148d7ade49daf09fac39 Mon Sep 17 00:00:00 2001 From: dolorous Date: Sun, 23 Mar 2008 21:46:25 +0000 Subject: Add a weapon enchantment blessing that will enchant a monster's weapon by two points (either this or armor enchantment blessing can occur, with 5% rarity). Whether to-hit or to-damage is chosen is random. Split handling of weapon enchantment into enchant_weapon() for the generic item routines, and handle_enchant_weapon() for the player-specific routines. Furthermore, make enchant_weapon() and enchant_armour() more similar in terms of structure. Also, in bless_follower(), store the blessing description and monster name in std::strings instead of const char*'s. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3839 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/effects.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/effects.cc') diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index fddc3d2efd..257e58e237 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -1715,18 +1715,16 @@ bool recharge_wand(int item_slot) item_def &wand = you.inv[ item_slot ]; if (wand.base_type == OBJ_WEAPONS - && !is_random_artefact( wand ) - && !is_fixed_artefact( wand ) && get_weapon_brand( wand ) == SPWPN_ELECTROCUTION) { // might fail because of already high enchantment - if (enchant_weapon( ENCHANT_TO_DAM, false, item_slot )) + 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); - + return (true); } return (false); -- cgit v1.2.3-54-g00ecf