for the underlying patch.
Only vampires can turn into vampire bats, other species transform into normal bats, so can't draw blood.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1966 c06c8d41-db1a-0410-9941-cceddc491573
DMRXDEKHHBQNY37NPGZFAGUQPALWFANGGK4CUWIOQUPSLM2JBNFQC
BZ74AXEIQHNOCNQ7WSV4SLQW2BNAMSKDWEUKEZKNUIUUBDPMQMEQC
LECIKTCYNIZX557PIJWPY73WM652RHZDIAY4J7OXIK7NY4LZ2ZJAC
3EFDG4W2ZURQDU6I3AFVW4ETTD3ZHSCLQ7MOK5FK7VQCDQDUXIGQC
JK3HFJG76OOQHJMXJUSZRTR5CX5ZMS52LRVBLOR7E2NBI6PRSHHAC
2VOD7XONHR3G2JGZGXOPHNR2AN7WUQZFR5KJH5ZY4P4G67H3RCSQC
P2ZCF3BBG523ZEOD6XQA4X5YEHBTWH3IM33YVHXP2SQ5POXZIH4QC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
JXOE7KJIEAJHPLMZAJ6O4YHDTRB6BGNP6XT3ZSEFYGSIUMHR77KQC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
R22TTMI6WXWULC7ODKFF3QCB7MOTETQQ6IR4BUCUPOCQKQNCTT5AC
QDTVLBRGHDTRUVT7I3O72K6TMOYAUSAJBZUHGOEFU2RKJNUPWZSQC
case MONS_HUMAN:
food_value = mass + random2avg(you.experience_level * 10, 2);
mpr( "This warm blood tastes really delicious!" );
inc_hp(1 + random2(1 + you.experience_level), false);
break;
case MONS_HUMAN:
food_value = mass + random2avg(you.experience_level * 10, 2);
mpr( "This warm blood tastes really delicious!" );
inc_hp(1 + random2(1 + you.experience_level), false);
break;
case MONS_ELF:
food_value = mass + random2avg(you.experience_level * 10, 2);
mpr( "This warm blood tastes magically delicious!" );
inc_mp(1 + random2(3), false);
break;
case MONS_ELF:
food_value = mass + random2avg(you.experience_level * 10, 2);
mpr( "This warm blood tastes magically delicious!" );
inc_mp(1 + random2(3), false);
break;
// normal vampiric biting attack
if (damage_brand == SPWPN_VAMPIRICISM && mons_holiness(def) == MH_NATURAL)
{
const int chunk_type = mons_corpse_effect( def->type );
// don't drink poisonous or mutagenic blood
if (chunk_type == CE_CLEAN || chunk_type == CE_CONTAMINATED)
{
mprf( "You draw %s's blood!",
def->name(DESC_NOCAP_THE, true).c_str() );
if (you.hp < you.hp_max)
{
int heal = 1 + random2(damage_done);
if (heal > you.experience_level)
heal = you.experience_level;
if (chunk_type == CE_CLEAN)
heal += 1 + random2(damage_done);
inc_hp(heal, false);
mpr("You feel better.");
}
if (you.hunger_state < HS_ENGORGED) // always the case
{
int food_value = 0;
if (chunk_type == CE_CLEAN)
food_value = 45 + random2avg(59, 2);
else if (chunk_type == CE_CONTAMINATED)
food_value = 22 + random2avg(29, 2);
if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
food_value -= 5 + random2(16);
lessen_hunger(food_value, true);
}
did_god_conduct(DID_DRINK_BLOOD, 5 + random2(4));
}
}
if (you.species == SP_VAMPIRE && damage_brand == SPWPN_VAMPIRICISM)
{
if (defender->holiness() == MH_NATURAL
&& damage_done > 0 && !one_chance_in(5))
{
const int chunk_type = mons_corpse_effect( def->type );
// don't drink poisonous or mutagenic blood
if (chunk_type == CE_CLEAN || chunk_type == CE_CONTAMINATED)
{
mprf( "You draw %s's blood!",
def->name(DESC_NOCAP_THE, true).c_str() );
if (you.hp < you.hp_max)
{
int heal = 1 + random2(damage_done);
if (heal > you.experience_level)
heal = you.experience_level;
if (chunk_type == CE_CLEAN)
heal += 1 + random2(damage_done);
inc_hp(heal, false);
mpr("You feel better.");
}
if (you.hunger_state < HS_ENGORGED) // always the case
{
int food_value = 0;
if (chunk_type == CE_CLEAN)
food_value = 45 + random2avg(59, 2);
else if (chunk_type == CE_CONTAMINATED)
food_value = 22 + random2avg(29, 2);
if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
food_value -= 5 + random2(16);
lessen_hunger(food_value, true);
}
did_god_conduct(DID_DRINK_BLOOD, 5 + random2(4));
}
}
}
else if (mondied && damage_brand == SPWPN_VAMPIRICISM)
{
if (mons_holiness(def) == MH_NATURAL
&& damage_done > 0 && you.hp < you.hp_max
&& !one_chance_in(5))
{
mpr("You feel better.");
// more than if not killed
int heal = 1 + random2(damage_done);
inc_hp(heal, false);
if (you.hunger_state != HS_ENGORGED)
lessen_hunger(30 + random2avg(59, 2), true);
did_god_conduct(DID_NECROMANCY, 2);
}
}
if (defender->atype() == ACT_PLAYER)
mprf("%s draws strength from your injuries!",
attacker->name(DESC_CAP_THE).c_str());
else
mprf("%s is healed.",
attacker->name(DESC_CAP_THE).c_str());
const int chunk_type = mons_corpse_effect( def->type );
// don't drink poisonous or mutagenic blood
if (chunk_type == CE_CLEAN || chunk_type == CE_CONTAMINATED)
{
mprf( "You draw %s's blood!",
def->name(DESC_NOCAP_THE, true).c_str() );
if (you.hp < you.hp_max)
{
int heal = 1 + random2(damage_done);
if (heal > you.experience_level)
heal = you.experience_level;
if (chunk_type == CE_CLEAN)
heal += 1 + random2(damage_done);
inc_hp(heal, false);
mpr("You feel better.");
}
if (you.hunger_state < HS_ENGORGED) // always the case
{
int food_value = 0;
if (chunk_type == CE_CLEAN)
food_value = 30 + random2avg(59, 2);
else if (chunk_type == CE_CONTAMINATED)
food_value = 15 + random2avg(29, 2);
lessen_hunger(food_value, true);
}
did_god_conduct(DID_DRINK_BLOOD, 5 + random2(4));
}
{
if (attacker->atype() == ACT_PLAYER)
mpr("You feel better.");
else if (attacker_visible)
{
if (defender->atype() == ACT_PLAYER)
mprf("%s draws strength from your injuries!",
attacker->name(DESC_CAP_THE).c_str());
else
mprf("%s is healed.",
attacker->name(DESC_CAP_THE).c_str());
}