summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/ouch.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/ouch.cc')
-rw-r--r--crawl-ref/source/ouch.cc33
1 files changed, 22 insertions, 11 deletions
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)