From 8d408bcec276c6900302ddb079f17da88456acd3 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sun, 16 Sep 2007 21:51:20 +0000 Subject: 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 --- crawl-ref/source/food.cc | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) (limited to 'crawl-ref/source/food.cc') 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(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) { -- cgit v1.2.3-54-g00ecf