diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-09-25 17:30:31 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-09-25 17:30:31 +0000 |
commit | 57f3e71ae59d5e4830bdf787d9f2d5e9d5fe8fc8 (patch) | |
tree | 835d7e23d1c0d27e935015288effd8115a949cf0 /crawl-ref/source/acr.cc | |
parent | 1f9e38751c81744f2e8d4ffb1aea7f3870ba9d5b (diff) | |
download | crawl-ref-57f3e71ae59d5e4830bdf787d9f2d5e9d5fe8fc8.tar.gz crawl-ref-57f3e71ae59d5e4830bdf787d9f2d5e9d5fe8fc8.zip |
In ouch(), use NON_MONSTER instead of 0 as the index for non-monster
attacks, so as to avoid overlap with the first monster on the level.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6985 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/acr.cc')
-rw-r--r-- | crawl-ref/source/acr.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 4c790d439d..e7a82f98ff 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -2406,7 +2406,7 @@ void process_command( command_type cmd ) case CMD_QUIT: if (yes_or_no("Are you sure you want to quit")) - ouch(INSTANT_DEATH, 0, KILLED_BY_QUITTING); + ouch(INSTANT_DEATH, NON_MONSTER, KILLED_BY_QUITTING); else canned_msg(MSG_OK); break; @@ -2514,8 +2514,9 @@ static void _decrement_durations() if (res_fire > 0) { - ouch( (((random2avg(9, 2) + 1) * you.time_taken) / - (1 + (res_fire * res_fire))) / 10, 0, KILLED_BY_BURNING ); + ouch((((random2avg(9, 2) + 1) * you.time_taken) / + (1 + (res_fire * res_fire))) / 10, NON_MONSTER, + KILLED_BY_BURNING); } if (res_fire <= 0) @@ -2703,7 +2704,7 @@ static void _decrement_durations() if (you.duration[DUR_CONDENSATION_SHIELD] > 0 && player_res_cold() < 0) { mpr( "You feel very cold." ); - ouch( 2 + random2avg(13, 2), 0, KILLED_BY_FREEZING ); + ouch(2 + random2avg(13, 2), NON_MONSTER, KILLED_BY_FREEZING); } if ( _decrement_a_duration(DUR_MAGIC_SHIELD, @@ -2907,7 +2908,7 @@ static void _decrement_durations() else if (x_chance_in_y(you.rotting, 20)) { mpr("You feel your flesh rotting away.", MSGCH_WARN); - ouch(1, 0, KILLED_BY_ROTTING); + ouch(1, NON_MONSTER, KILLED_BY_ROTTING); rot_hp(1); you.rotting--; } @@ -2923,7 +2924,7 @@ static void _decrement_durations() if (one_chance_in(400)) { mpr("You feel your flesh rotting away.", MSGCH_WARN); - ouch(1, 0, KILLED_BY_ROTTING); + ouch(1, NON_MONSTER, KILLED_BY_ROTTING); rot_hp(1); if (you.rotting > 0) @@ -2939,18 +2940,18 @@ static void _decrement_durations() { if (you.duration[DUR_POISONING] > 10 && random2(you.duration[DUR_POISONING]) >= 8) { - ouch(random2(10) + 5, 0, KILLED_BY_POISON); + ouch(random2(10) + 5, NON_MONSTER, KILLED_BY_POISON); mpr("You feel extremely sick.", MSGCH_DANGER); } else if (you.duration[DUR_POISONING] > 5 && coinflip()) { - ouch((coinflip()? 3 : 2), 0, KILLED_BY_POISON); + ouch((coinflip() ? 3 : 2), NON_MONSTER, KILLED_BY_POISON); mpr("You feel very sick.", MSGCH_WARN); } else { // the poison running through your veins."); - ouch(1, 0, KILLED_BY_POISON); + ouch(1, NON_MONSTER, KILLED_BY_POISON); mpr("You feel sick."); } @@ -3188,7 +3189,7 @@ static void _world_reacts() if (you.hunger <= 100) { mpr( "You have starved to death.", MSGCH_FOOD ); - ouch( INSTANT_DEATH, 0, KILLED_BY_STARVATION ); + ouch(INSTANT_DEATH, NON_MONSTER, KILLED_BY_STARVATION); } } |