diff options
author | DracoOmega <draco_omega@live.com> | 2014-03-01 11:16:08 -0330 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-03-06 09:58:16 -0700 |
commit | a396766fc4ca89915ee2a08f8ba137ba81d1c33b (patch) | |
tree | 0b3e2d15cf397ccc12327f0ed49d068630149971 /crawl-ref/source/misc.cc | |
parent | a0041117e710d6e1eb41807108dfb36a00ad2a09 (diff) | |
download | crawl-ref-a396766fc4ca89915ee2a08f8ba137ba81d1c33b.tar.gz crawl-ref-a396766fc4ca89915ee2a08f8ba137ba81d1c33b.zip |
Block autoexplore and such when lethally poisoned
(And print an appropriate message)
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r-- | crawl-ref/source/misc.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 4a5e225975..a40cc2d4e0 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -1591,6 +1591,14 @@ bool i_feel_safe(bool announce, bool want_move, bool just_monsters, // so presence of monsters won't matter -- until it starts shrinking... if (is_sanctuary(you.pos()) && env.sanctuary_time >= 5) return true; + + if (get_player_poisoning() >= you.hp) + { + if (announce) + mprf(MSGCH_WARN, "There is a lethal amount of poison in your body!"); + + return false; + } } // Monster check. |