summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/food.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-16 21:51:20 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-16 21:51:20 +0000
commit8d408bcec276c6900302ddb079f17da88456acd3 (patch)
treec8ee030ed6d180a4f197da7782ebc5b811a64b08 /crawl-ref/source/food.cc
parent1179b3508f5782efb790562af87fde58859792ee (diff)
downloadcrawl-ref-8d408bcec276c6900302ddb079f17da88456acd3.tar.gz
crawl-ref-8d408bcec276c6900302ddb079f17da88456acd3.zip
Applying patches by dolorous:
1794789: Move "Xom is BORED" message into god channel 1795785: remove redundant check for potions of blood 1795673: claw-related clean-ups and enforcing consistency in transformations and claws (Lich and Statue retain claws, Ice Beast doesn't). I also added a check for hooves and claws mutation for the % and [ you_can_wear output. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2114 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/food.cc')
-rw-r--r--crawl-ref/source/food.cc28
1 files changed, 10 insertions, 18 deletions
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index 0bd634dc44..f72ef2cf80 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -195,31 +195,23 @@ bool butchery(void)
bool wpn_switch = false;
bool new_cursed = false;
int old_weapon = you.equip[EQ_WEAPON];
+ int old_gloves = you.equip[EQ_GLOVES];
const transformation_type transform =
static_cast<transformation_type>(you.attribute[ATTR_TRANSFORMATION]);
// Xom probably likes this, occasionally
bool teeth_butcher = (you.mutation[MUT_FANGS] == 3);
-
- bool barehand_butcher =
- (you.equip[ EQ_GLOVES ] == -1
- && (transform_can_butcher_barehanded(transform)
- || (transform == TRAN_NONE
- && (you.species == SP_TROLL
- || you.species == SP_GHOUL
- || you.mutation[MUT_CLAWS]))));
-
- bool gloved_butcher = (you.species == SP_TROLL ||
- you.species == SP_GHOUL ||
- you.mutation[MUT_CLAWS]) &&
- (you.equip[EQ_GLOVES] != -1 &&
- !item_cursed(you.inv[you.equip[EQ_GLOVES]]));
- int old_gloves = you.equip[EQ_GLOVES];
- bool can_butcher = teeth_butcher || barehand_butcher ||
- (you.equip[EQ_WEAPON] != -1 &&
- can_cut_meat(you.inv[you.equip[EQ_WEAPON]]));
+ bool barehand_butcher = (transform_can_butcher_barehanded(transform)
+ || you.has_claws()) && you.equip[EQ_GLOVES] == -1;
+
+ bool gloved_butcher = you.has_claws() && (you.equip[EQ_GLOVES] != -1
+ && !item_cursed(you.inv[you.equip[EQ_GLOVES]]));
+
+ bool can_butcher = teeth_butcher || barehand_butcher
+ || you.equip[EQ_WEAPON] != -1
+ && can_cut_meat(you.inv[you.equip[EQ_WEAPON]]);
if (igrd[you.x_pos][you.y_pos] == NON_ITEM)
{