diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-24 11:30:19 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-24 11:30:19 +0000 |
commit | 39caa17307d47a3f0eb96a1987649685f4a40686 (patch) | |
tree | f312c6c251e19baa4d056b4165749ffb7a640a77 /crawl-ref | |
parent | 111787503763e9d3eeb4eef2248926bf4a4eeb98 (diff) | |
download | crawl-ref-39caa17307d47a3f0eb96a1987649685f4a40686.tar.gz crawl-ref-39caa17307d47a3f0eb96a1987649685f4a40686.zip |
Don't allow switching to autocurse weapons for butchery. [2026147]
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6670 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/food.cc | 21 | ||||
-rw-r--r-- | crawl-ref/source/traps.cc | 2 |
2 files changed, 14 insertions, 9 deletions
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index 15418e0032..487a1763f8 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -47,6 +47,7 @@ #include "mutation.h" #include "output.h" #include "player.h" +#include "randart.h" #include "religion.h" #include "skills2.h" #include "spells2.h" @@ -208,17 +209,21 @@ static int _find_butchering_implement(int &butcher_tool) // Look for a butchering implement in your pack. for (int i = 0; i < ENDOFPACK; ++i) { - if (is_valid_item( you.inv[i] ) - && you.inv[i].base_type == OBJ_WEAPONS - && can_cut_meat( you.inv[i] ) - && can_wield( &you.inv[i] )) + const item_def& tool(you.inv[i]); + if (is_valid_item( tool ) + && tool.base_type == OBJ_WEAPONS + && can_cut_meat( tool ) + && can_wield( &tool ) + // Don't even suggest autocursing items. + && (!is_random_artefact(tool) + || !randart_known_wpn_property(tool, RAP_CURSED))) { if (Options.easy_butcher - && item_known_uncursed(you.inv[i]) - && item_type_known(you.inv[i]) - && get_weapon_brand(you.inv[i]) != SPWPN_DISTORTION + && item_known_uncursed(tool) + && item_type_known(tool) + && get_weapon_brand(tool) != SPWPN_DISTORTION // Don't even ask! - && !has_warning_inscription(you.inv[i], OPER_WIELD)) + && !has_warning_inscription(tool, OPER_WIELD)) { butcher_tool = i; return (true); diff --git a/crawl-ref/source/traps.cc b/crawl-ref/source/traps.cc index 6eea6729fd..b154f9fdf2 100644 --- a/crawl-ref/source/traps.cc +++ b/crawl-ref/source/traps.cc @@ -522,7 +522,7 @@ void destroy_trap( const coord_def& pos ) } } -void disarm_trap( struct dist &disa ) +void disarm_trap( dist &disa ) { if (you.duration[DUR_BERSERKER]) { |