git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5196 c06c8d41-db1a-0410-9941-cceddc491573
SFWCESFCUEVKJ6ZQQX3Y5YTIQD5BC6MCVSLVZFRGRTU46BFLKKWAC
GRIODTWHFS4UV4ZKPP4RDHMPYYRUWX3H3JA3ZBINCKADKVEP5U3QC
3EUPIYJNWOMOQBP2Z5SGSMWK453BXJD6KL2WFTR3NM565MEBYASAC
VJDLV4PF2ZJ46NERO4LZUX5JE2CD5XBOBQCYYPTFWTHLUEYDUOYAC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
2E4RV454MTTCKYLKMSHEEAFPNAFVUXXPBZV3XP6V7QMF4BBWE7TAC
CGYTZT5QWIEGYKUOLOK7MFXSLJKLYRZONER5ZCDZO5XYWSLG475QC
DK362IHKSDADMUPD35NOTKM4WESQM37KG2PNOJRV2FGELDWULYPQC
BBQWA33DPXWEDYOOPO45VAYD4JQDZQVMZSEJ4RUI5LLC733IMIIQC
LJK4ZQATLSB4MKZG3ARZX5V6RFGTN3NLCN6GTCUGJQKU26SOXMUAC
NVSFIV2ZKP44XHCSCXG6OZVGL67OIFINC34J2EMKTA4KULCERUEAC
4UXFU3FZOCBSLDQ4S7MJKAE2H7VUHCNRDQMIY6NJ3PHYXWNGISDQC
XIDD2TZUOXG6DAMK7OQU5MUKVIEHQWJIJL5BVOTCVY33EPWJNX4QC
PM65H4V4GNPVIJFUQW57DC3VDB7TRUUNXKVZONQKEFZSK3AXX5GQC
LOEVXFCKSHE3TCQSUSHOIHHVDJT3RFLE6U3VDI6JXAQTQI5KCJ4AC
F7Q5PX44SLPANIZXCY67TG2W5JTRVJMHGQW54VJLGB4XRH7R6JBQC
FLAGBNUNSIQNFDN53CDWABJRTTFWDL4PG34AI474ZKPXDEPYHOAQC
// Well, I guess you could allow it if the player is torment
// resistant, but there's a very good reason torment resistant
// players can't cast Torment themselves, and allowing your
// allies to cast it would just introduce harmless Torment
// through the backdoor. Thus, shouldn't happen. (jpeg)
snprintf(info, INFO_SIZE, "Really fire through this "
"%s%s%screature?",
// listed in the form: "your rat", "Blork"
snprintf(info, INFO_SIZE, "Really fire through %s?",
mon->name(DESC_NOCAP_THE).c_str());
if (!yesno(info, true, 'n'))
return (true);
}
else if (wontAttack
|| is_good_god(you.religion) && (isNeutral || isHoly)
|| you.religion == GOD_SHINING_ONE && isUnchivalric)
{
// "Really fire through the helpless neutral holy Daeva?"
// was: "Really fire through this helpless neutral holy creature?"
snprintf(info, INFO_SIZE, "Really fire through the "
"%s%s%s%s?",
if (_stop_unchivalric_attack(mon))
{
beam.fr_count = 1;
return (BEAM_STOP);
}
}
else
{
beam.foe_count += 1;
beam.foe_power += mons_power(mons_type);
beam.fr_count = 1;
return (BEAM_STOP);
if (beam.thrower == KILL_YOU_MISSILE)
{
if (!_beam_is_harmless(beam, mon))
{
snprintf(info, INFO_SIZE, "Really fire through %s?",
mon->name(DESC_NOCAP_THE).c_str());
if (!yesno(info, true, 'n'))
{
beam.fr_count = 1;
return (BEAM_STOP);
}
}
// Don't count friends we don't want counted.
}
else
{
beam.fr_count += 1;
beam.fr_power += mons_power(mons_type);
}
beam.fr_count += 1;
beam.fr_power += mons_power(mons_type);
// Check only if actual damage, but always count friends for player.
if (hurt_final > 0 || beam.thrower == KILL_YOU_MISSILE)
if (beam.thrower == KILL_YOU_MISSILE)
{
if (!_beam_is_harmless(beam, mon)
&& _stop_unchivalric_attack(mon))
{
beam.fr_count = 1;
return (BEAM_STOP);
}
}
// Check only if actual damage.
else if (hurt_final > 0)
if (beam.thrower == KILL_YOU_MISSILE)
{
if (_stop_unchivalric_attack(mon))
{
beam.fr_count = 1;
return (BEAM_STOP);
}
}
else
{
// Counting foes is only important for monster tracers.
beam.foe_count += 1;
beam.foe_power += 2 * hurt_final * mons_power(mons_type)
/ hurt;
}
// Counting foes is only important for monster tracers.
beam.foe_count += 1;
beam.foe_power += 2 * hurt_final * mons_power(mons_type)
/ hurt;
if (beam.thrower == KILL_YOU_MISSILE)
{
if (!_beam_is_harmless(beam, mon))
{
snprintf(info, INFO_SIZE, "Really fire through %s?",
mon->name(DESC_NOCAP_THE).c_str());
if (!yesno(info, true, 'n'))
{
beam.fr_count = 1;
return (BEAM_STOP);
}
}
// Don't count friends we don't want counted.
}
else
{
beam.fr_count += 1;
beam.fr_power += 2 * hurt_final * mons_power(mons_type)
/ hurt;
}
beam.fr_count += 1;
beam.fr_power += 2 * hurt_final * mons_power(mons_type)
/ hurt;