diff options
author | Neil Moore <neil@s-z.org> | 2014-07-26 20:11:32 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2014-07-26 21:30:59 -0400 |
commit | 132b3f91c569fbedad1107a5a8cc586a9a051fc2 (patch) | |
tree | 4c7f147d03b1de78a062660cad841ebe783413d4 /crawl-ref/source/potion.cc | |
parent | 2d7ccdc89dce672052a7a32b8a5f4e18b89a3a74 (diff) | |
download | crawl-ref-132b3f91c569fbedad1107a5a8cc586a9a051fc2.tar.gz crawl-ref-132b3f91c569fbedad1107a5a8cc586a9a051fc2.zip |
Correct !curing no-device heal rot check.
you.hp_max_temp only equals you.hp_max when the player is rotted down to
zero. Also, ignore rot when we aren't at max, since the potion can't
push us up to max in this situation.
Diffstat (limited to 'crawl-ref/source/potion.cc')
-rw-r--r-- | crawl-ref/source/potion.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/potion.cc b/crawl-ref/source/potion.cc index 01b52be2e5..fbe8fb94cb 100644 --- a/crawl-ref/source/potion.cc +++ b/crawl-ref/source/potion.cc @@ -83,7 +83,8 @@ bool potion_effect(potion_type pot_eff, int pow, item_def *potion, bool was_know && you.duration[DUR_POISONING] == 0 && you.rotting == 0 && you.disease == 0 - && (you.hp_max_temp == you.hp_max)) + // The potion won't heal us, so don't count rot unless at max HP. + && (you.hp_max_temp >= 0 || you.hp != you.hp_max)) { mpr("You have no ailments to cure."); return false; |