From a56eea02ae7ce566af2baff5be396ddc15134735 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Thu, 19 Mar 2009 22:28:38 +0000 Subject: * For flavour, let Xom laugh himself silly whenever a follower dies. * Fix Xom being amused about rotten corpses being butchered. (As opposed to clean corpses becoming rotten while butchered, which is how it was originally intended.) * Xom no longer is amused if you deliberately hit yourself with a missile/wand/spell in safe surroundings. (Identifying wands that way or zapping /random effects is still considered amusing.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9519 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/ouch.cc | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) (limited to 'crawl-ref/source/ouch.cc') diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index 748c4c4443..c1338b0960 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -94,7 +94,10 @@ int check_your_resists(int hurted, beam_type flavour) if (hurted < original) canned_msg(MSG_YOU_RESIST); else if (hurted > original) + { mpr("It scalds you terribly!"); + xom_is_stimulated(200); + } break; case BEAM_FIRE: @@ -725,10 +728,16 @@ static void _xom_checks_damage(kill_method_type death_type, { if (death_type == KILLED_BY_TARGETTING || death_type == KILLED_BY_BOUNCE - || death_type == KILLED_BY_REFLECTION) + || death_type == KILLED_BY_REFLECTION + || death_type == KILLED_BY_SELF_AIMED + && player_in_a_dangerous_place()) { - // Xom thinks the player hurting him/herself is funny. - xom_is_stimulated(255 * dam / (dam + you.hp)); + // Xom thinks the player accidentally hurting him/herself is funny. + // Deliberate damage is only amusing if it's dangerous. + int amusement = 255 * dam / (dam + you.hp); + if (death_type == KILLED_BY_SELF_AIMED) + amusement /= 5; + xom_is_stimulated(amusement); return; } else if (death_type == KILLED_BY_FALLING_DOWN_STAIRS) @@ -738,8 +747,8 @@ static void _xom_checks_damage(kill_method_type death_type, return; } else if (death_type != KILLED_BY_MONSTER - && death_type != KILLED_BY_BEAM - || invalid_monster_index(death_source)) + && death_type != KILLED_BY_BEAM + || invalid_monster_index(death_source)) { return; } @@ -1083,9 +1092,9 @@ void end_game( scorefile_entry &se ) clrscr(); } - if (se.death_type == KILLED_BY_LEAVING || - se.death_type == KILLED_BY_QUITTING || - se.death_type == KILLED_BY_WINNING) + if (se.death_type == KILLED_BY_LEAVING + || se.death_type == KILLED_BY_QUITTING + || se.death_type == KILLED_BY_WINNING) { dead = false; } @@ -1138,6 +1147,8 @@ void end_game( scorefile_entry &se ) if (dead) { mpr("You die..."); // insert player name here? {dlb} + xom_death_message(); + flush_prev_message(); viewwindow(true, false); // don't do for leaving/winning characters if (Options.tutorial_left) @@ -1146,9 +1157,9 @@ void end_game( scorefile_entry &se ) #ifdef DGL_WHEREIS whereis_record( se.death_type == KILLED_BY_QUITTING? "quit" : - se.death_type == KILLED_BY_WINNING? "won" : - se.death_type == KILLED_BY_LEAVING? "bailed out" : - "dead" ); + se.death_type == KILLED_BY_WINNING ? "won" : + se.death_type == KILLED_BY_LEAVING ? "bailed out" + : "dead" ); #endif if (!crawl_state.seen_hups) -- cgit v1.2.3-54-g00ecf