pickup_butcher_tool.txt now takes claws mutation and whether or not your god likes butchery into account.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5692 c06c8d41-db1a-0410-9941-cceddc491573
ALHRVZZEWK6YGOVB422CRLBKHV6ANAWMPP2EIWURXLKEWSHPHXCAC 6DNB4AIWKSKXWFY7XYHZMSDBEPGQLMIMU4YB2XTTCLN6ZXWKYOKQC JLCSPMTVGUYTGZNCWPMFITEZZ2CDHL2JF67FFODO5L44OVAW4WWAC GCDBSJXJCPEK4NCX5CVGDBK3432PFCU5OCO2F3DA32332ALI2ZYQC SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC RN2DSYJRJ55J7S2VBEYCOAINFU4VDBMWDJIYJG326BSLYOFDNHGAC BLAUMDRDEVFYDCBHIHX72IEZ35K3B426MUL6SBAZCRWZQMYOFAGAC SCZCQPNBQG2GXZ76LCEYOMB4QMZGI6YV7LJEC7ZVBUG27KLO564AC NVSFIV2ZKP44XHCSCXG6OZVGL67OIFINC34J2EMKTA4KULCERUEAC TDAVD56MGLFSMJLPLSYLEVW7MBRMT7V5BNII4TRWVDIHH47CD2OAC local skill = item.weap_skill(it)-- have to handle polearms separately, since only some of them can butcherif skill == "Polearms" or skill == "Staves" thenlocal butcherable_polearms = {"scythe", "lajatang", "halberd", "bardiche", "glaive"}for _, weap in ipairs(butcherable_polearms) doif item.name(it):find(weap, 0, true) then return true endend
if item.cursed(it) thenreturn falseendif name:find("distort", 0, true) then
function pickup_butcher(it)if item.class(it, true) == "weapon" thenlocal need_blade = true-- Trolls and Ghouls don't need weapons to butcher things, and Mummies-- and Spriggans can't eat chunks. Ideally, we could detect a player-- with the claws mutation here too, but that's not currently possibleif you.race() == "Troll" oryou.race() == "Ghoul" oryou.race() == "Mummy" oryou.race() == "Spriggan" thenneed_blade = falseelsefor _, inv_it in pairs(item.inventory()) doif item.class(inv_it, true) == "weapon" andcan_butcher(inv_it) thenneed_blade = falseendendendreturn need_blade and not item.cursed(it) and can_butcher(it)else
function pickup_butcher(it, name)if you.has_claws() > 0 thenreturn falseendif not you.can_consume_corpses() and not you.god_likes_butchery() thenreturn falseendif not can_butcher(it, name) then