git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7081 c06c8d41-db1a-0410-9941-cceddc491573
VVVOUK7QZU3NNYAI6SJNWM5ZK7362HIXXSQI5BKVMHHL2CXMYXMQC
JN7EPOAE37MRXCQ5KO4LCMX76PFMZD6BHWJSQ3VHAVGRMJX6WKIQC
27JI3J23EXDY2G4X7NHTFTSHSEUDGDPFOYPG6P53UNSSJP3DDQTAC
KFULGQQOHWUTXOM3BXCCYPGGVGGY4Z6265XUFRCBPNLTZAEHJZSQC
5BJPWUPLJFS34FUTFJVKA4A52YMIGV6EWDXLNSDCWBJWBGVSQFGQC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
M4DJQJHLPTFQNOI6S5TDLCTGNQK5SW7H5PTG5M7YWHRGWZGJ72QQC
HAM54HXIO2245W6REO4RZDY2QMIH476AWWJSMYAMSYYNEBBJSHWAC
RWCCZ64BG3HSOTM54ANIGENC3F3AIR42LJFRYSAKMCPCIUSOZY5QC
K6S3LX4GPSVHOVIZVVGJDOMT6GXENOTXD6FM3ZHBN5GO4JA5E6YAC
SJP5BHX6MFWF3OSQPEF4WUWZWPUGMOVURTT2CUVT6H3A66LETXUAC
// Xom thinks the player hurting him/herself is funny.
xom_is_stimulated(255 * dam / (dam + you.hp));
return;
}
else if (death_type == KILLED_BY_FALLING_DOWN_STAIRS)
{
// Xom thinks falling down the stairs is hilarious.
xom_is_stimulated(255);
return;
}
else if (death_type != KILLED_BY_MONSTER && death_type != KILLED_BY_BEAM
|| invalid_monster_index(death_source))
{
return;
}
if (death_type == KILLED_BY_TARGETTING)
{
// Xom thinks the player hurting him/herself is funny.
xom_is_stimulated(255 * dam / (dam + you.hp));
return;
}
else if (death_type == KILLED_BY_FALLING_DOWN_STAIRS)
{
// Xom thinks falling down the stairs is hilarious.
xom_is_stimulated(255);
return;
}
else if (death_type != KILLED_BY_MONSTER
&& death_type != KILLED_BY_BEAM
|| invalid_monster_index(death_source))
{
return;
}
if (mons_wont_attack(monster))
{
// Xom thinks collateral damage is funny.
xom_is_stimulated(255 * dam / (dam + you.hp));
return;
}
int leveldif = monster->hit_dice - you.experience_level;
if (leveldif == 0)
leveldif = 1;
int leveldif = monster->hit_dice - you.experience_level;
// Note that Xom is amused when you are significantly hurt by a
// creature of higher level than yourself, as well as by a
// creature of lower level than yourself.
amusementvalue += leveldif * leveldif * dam;
// Note that Xom is amused when you are significantly hurt by a
// creature of higher level than yourself, as well as by a creature
// of lower level than yourself.
amusementvalue += leveldif * leveldif * dam;
if (monster->speed < (int)player_movement_speed())
amusementvalue += 8;
if (!player_monster_visible(monster))
amusementvalue += 10;
if (monster->speed < (int) player_movement_speed())
amusementvalue += 8;
if (death_type != KILLED_BY_BEAM)
{
if (you.skills[SK_THROWING] <= (you.experience_level / 4))
if (death_type != KILLED_BY_BEAM
&& you.skills[SK_THROWING] <= (you.experience_level / 4))
{