diff options
author | MarvinPA <chriscampbell89@gmail.com> | 2013-08-21 01:41:27 +0100 |
---|---|---|
committer | MarvinPA <chriscampbell89@gmail.com> | 2013-08-21 01:41:27 +0100 |
commit | 6dfddf1c4dda47c3b7828f5f6ab826bae9eeb012 (patch) | |
tree | bd7fedeaf5fc4f32f15a55f293ba9c40bb0fc842 /crawl-ref/source/spl-wpnench.cc | |
parent | 440019e6197fa31346d30a2a0634359b89c9a06c (diff) | |
download | crawl-ref-6dfddf1c4dda47c3b7828f5f6ab826bae9eeb012.tar.gz crawl-ref-6dfddf1c4dda47c3b7828f5f6ab826bae9eeb012.zip |
Make scrolls of vorpalise weapon target a weapon without having to wield it
Makes it more easily and obviously cancellable, and allows cancelling the
scroll without spending a turn and losing it (if it was already
identified). Doesn't use the same selection menus as enchant armour,
identify and recharging - since it tends to show up much later it'd almost
always be known anyway (and the point here is to make it harder to
accidentally remove a brand you want).
Diffstat (limited to 'crawl-ref/source/spl-wpnench.cc')
-rw-r--r-- | crawl-ref/source/spl-wpnench.cc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/crawl-ref/source/spl-wpnench.cc b/crawl-ref/source/spl-wpnench.cc index b309eab830..16a48b3ea9 100644 --- a/crawl-ref/source/spl-wpnench.cc +++ b/crawl-ref/source/spl-wpnench.cc @@ -78,16 +78,12 @@ spret_type brand_weapon(brand_type which_brand, int power, bool fail) bool temp_brand = you.duration[DUR_WEAPON_BRAND]; item_def& weapon = *you.weapon(); - // Can't brand non-weapons, but can brand some launchers (see later). - if (weapon.base_type != OBJ_WEAPONS) + if (!is_brandable_weapon(weapon, true)) { - mpr("This isn't a weapon."); - return SPRET_ABORT; - } - - if (weapon.sub_type == WPN_BLOWGUN || is_artefact(weapon)) - { - mpr("You cannot enchant this weapon."); + if (weapon.base_type != OBJ_WEAPONS) + mpr("This isn't a weapon."); + else + mpr("You cannot enchant this weapon."); return SPRET_ABORT; } |