diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-20 22:41:19 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-20 22:41:19 +0000 |
commit | 7fc58697c391e1baa71d3e3b660f177da5af0b5e (patch) | |
tree | f1341a4eeaf09564aba647b1963c948f371ab881 /crawl-ref/source/player.cc | |
parent | 86707b300cc88644cd9149d71282703c436ba5a3 (diff) | |
download | crawl-ref-7fc58697c391e1baa71d3e3b660f177da5af0b5e.tar.gz crawl-ref-7fc58697c391e1baa71d3e3b660f177da5af0b5e.zip |
And fix rotting players' becoming diseased.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8634 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 19e0869812..57f011c52e 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -7000,13 +7000,14 @@ void player::rot(actor *who, int amount, int immediate) if (res_rotting() > 0 || amount <= 0) return; - rot_player(amount); - if (immediate > 0) rot_hp(immediate); - if (one_chance_in(4)) - disease_player(50 + random2(100)); + if (rot_player(amount)) + { + if (one_chance_in(4)) + disease_player(50 + random2(100)); + } } bool player::drain_exp(actor *who, bool quiet) |