barehanded (effectively ghouls + those with MUT_CLAWS.) The takeoff/puton armour messages will appear out of sequence, but this is a bug in the delay process; you can see it now by taking off armour while wearing a cloak. This could be fixed by having the delay start message only trigger when the delay actually starts (as opposed to when it's pushed onto the queue) but I'm not doing that because I'm not sure where the code assumes the current behaviour.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1713 c06c8d41-db1a-0410-9941-cceddc491573
ARVJY7XPMCHI4IAQMD2VUWTAXQLCRNVSM2MK3YT4S4WHQYFTLEMAC
5R4WV4H5SNIM5WU2X33JJ63HIEGKCXN2HELZ6FRRKKANPLMRLF3QC
77H4BWWPPGLM3PLZH4QTAJRXIZTSDVNCOKZE223I437FN2UJ34RQC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
74LQ7JXVLAFSHLI7LCBKFX47CNTYSKGUQSXNX5FCIUIGCC2JTR3QC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
MBBPLL4SZUB3JUUYQYLZW7S5OXRCEGJX3WWADOQXGHWQ7BIKCY5QC
// look for a butchering implement, prompting user if no obvious
// options exist. Returns whether a weapon was switched.
static bool find_butchering_implement()
// look for a butchering implement. If fallback is true,
// prompt the user if no obvious options exist.
// Returns whether a weapon was switched.
static bool find_butchering_implement( bool fallback )
can_butcher = barehand_butcher ||
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 = barehand_butcher ||
// try to find a butchering implement
wpn_switch = find_butchering_implement();
// Try to find a butchering implement.
// If you can butcher by taking off your gloves, don't prompt.
wpn_switch = find_butchering_implement(!gloved_butcher);
removed_gloves = gloved_butcher && !wpn_switch;
if ( removed_gloves )
{
// Actually take off the gloves; this creates a
// delay. We assume later on that gloves have a 1-turn
// takeoff delay!
takeoff_armour(old_gloves);
barehand_butcher = true;
}