corpses in your pack the game will tell you to drop them so they can be butchered. And if when you butcher a corpse on the ground there's also one in your pack the game will remind you about it, suggesting that you might want to also butcher the corpse in your pack.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5290 c06c8d41-db1a-0410-9941-cceddc491573
U6Q43EFKHJIDBBWN6RUTOYRHHX4IT73OPBR4CWIOKUDGTCYQE5PAC
UET576SVCGS2TXEDRTO7BUTOTLJ77MYHIVZJCDWGH2BAXYMKG6DAC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
PUFMMCAH4X5Z25VMUNTWJLRG4NSUGNK45WY4I7NJ2GQXBGBK6SAAC
7Q4H6B62UZACQOUDHCHPMPBYEBXM5GVQINIHVHM4KLRENSH6VGTAC
Q3XHNSHW6FI4JCXSEABATRFBJPMCF7PXNG2K6ZQTRRPVMIZFHUBQC
JCWJWGMQIKQGSSFJUQRKNIWW3HBOJSHYDTOPPE5BWOJTIJTDYUTAC
}
static bool _have_corpses_in_pack(bool remind)
{
int num = 0;
for (int i = 0; i < ENDOFPACK; i++)
{
item_def &obj(you.inv[i]);
if (!is_valid_item( obj ))
continue;
if (obj.base_type == OBJ_CORPSES)
num++;
}
if (num == 0)
return false;
std::string verb = (you.species == SP_VAMPIRE
&& you.experience_level > 5) ? "bottle" : "butcher";
std::string noun, pronoun;
if (num == 1)
{
noun = "corpse";
pronoun = "it";
}
else
{
noun = "corpses";
pronoun = "them";
}
std::ostringstream text;
if (remind)
text << "You might want to also " << verb << " the " << noun
<< " in your pack.";
else
text << "If you dropped the " << noun << " in your pack on solid "
<< "ground or into shallow water then you could " << verb
<< " " << pronoun << ".";
mpr(text.str().c_str());
return true;
mprf("There isn't anything to %s here.",
you.species == SP_VAMPIRE && you.experience_level > 5 ? "bottle"
: "butcher");
if (!_have_corpses_in_pack(false))
mprf("There isn't anything to %s here.",
(you.species == SP_VAMPIRE
&& you.experience_level > 5) ? "bottle" : "butcher");