Since this only leaves them with 1 hp, they'll soon be dead anyway, so I consider it as a mixture of flavour and a warning to the player to heal the ally in question. Make the retribution healing hostiles effect only happen if you worship an evil god, as is done for the other retribution effects.
Allow healing to choose a target rather than a direction, but allow Revitalisation (Zin!) to only work on the player. (That's how it was intended, I think.)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3817 c06c8d41-db1a-0410-9941-cceddc491573
MPQIZUHUAHOF2CKNTLSYCGMR7FIC3EPA2RHZIY6JOQKAS6H6YY4AC
F7QFSXE22UPQTBLYJLY26HJ3QPHFNBJMUOFJRV35R5YCHSGKTBYQC
QDBILCQHREAKSVXBJJGE2EPNR4ATTQWUZMV7BLJYZWWUI737TSKQC
KAOE5HB3THUKVGFZRO5EZESHEB3Q34WUO5DFMLWIKOBF47LZTIYAC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
CGYTZT5QWIEGYKUOLOK7MFXSLJKLYRZONER5ZCDZO5XYWSLG475QC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
EOJPYR3QD5GGS7GB2P7SBLMOP7YC57YMIVR7VKCOMWNCKNBPESBQC
NLQNXH3SVJ52CWXEV35FSSZP32VHC4QFGN3HINF4KO5GZHZMOBKQC
AZSA7IMTRJG2X76NDDU3AP53VS4RQYIDVGJZR7SPWZ75G7ZJYRUAC
4PBRMB7TK2TXL7VSDKMUQMT4QFK3SGRU4TUVMEM7V2VS7KKKILAQC
// Elyvilon will occasionally (5% chance) protect the life of
// one of your allies.
static bool _ely_protects_ally(monsters *monster)
{
ASSERT(you.religion == GOD_ELYVILON);
if (mons_holiness(monster) != MH_NATURAL
|| !mons_friendly(monster)
|| !one_chance_in(20))
{
return (false);
}
if (player_monster_visible(monster) && mons_near(monster))
{
monster->hit_points = 1;
snprintf(info, INFO_SIZE, " protects %s%s from harm!%s",
mons_is_unique(monster->type) ? "" : "your ",
monster->name(DESC_PLAIN).c_str(),
coinflip() ? "" : " You feel responsible.");
simple_god_message(info);
}
lose_piety(1);
return (true);
}
// Elyvilon retribution effect: heal hostile monsters that were about to
// be killed by you or one of your friends
if (you.religion != GOD_ELYVILON && you.penance[GOD_ELYVILON]
&& _ely_heals_monster(monster, killer, i))
{
// Elyvilon specials
if (you.religion == GOD_ELYVILON && _ely_protects_ally(monster))
return (true);
if (you.religion != GOD_ELYVILON && _ely_heals_monster(monster, killer, i))