git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2271 c06c8d41-db1a-0410-9941-cceddc491573
S3RNWZ2RPHNTLEPNYRJPQ3PIAP5PW5S3YAQAYQQ5INWLKDKS7XNAC
// Did the shuffling kill the player?
kill_method_type kill_types[3] = {
KILLED_BY_WEAKNESS,
KILLED_BY_CLUMSINESS,
KILLED_BY_STUPIDITY
};
std::string cause = "drawing a card";
if (crawl_state.is_god_acting())
{
god_type which_god = crawl_state.which_god_acting();
if (crawl_state.is_god_retribution()) {
cause = "the wrath of ";
cause += god_name(which_god);
}
else
{
if (which_god == GOD_XOM)
cause = "the capriciousness of Xom";
else
{
cause = "the 'helpfullness' of ";
cause += god_name(which_god);
}
}
}
for ( int i = 0; i < 3; ++i )
if (new_base[i] < 1 || new_max[i] < 1)
ouch(INSTANT_DEATH, 0, kill_types[i], cause.c_str(), true);
// The player survived!