diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-08 23:34:58 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-08 23:34:58 +0000 |
commit | f25770a09d5b82dedaf3cd21f93d797e4debf7cc (patch) | |
tree | 18d750e9b01be1fab2751d40ad2794157200fe24 /crawl-ref/source/player.cc | |
parent | 65fe4389269de4c14c9b9adbc6ef0308f2059dbd (diff) | |
download | crawl-ref-f25770a09d5b82dedaf3cd21f93d797e4debf7cc.tar.gz crawl-ref-f25770a09d5b82dedaf3cd21f93d797e4debf7cc.zip |
Clean up rotting routines again.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8341 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 866da1261e..e4f94a9a71 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -6871,18 +6871,15 @@ void player::drain_stat(int stat, int amount, actor* attacker) lose_stat(stat, amount, false, ""); } -void player::rot(actor *who, int rotlevel, int immed_rot) +void player::rot(actor *who, int amount, int immediate) { - if (res_rotting() > 0) + if (res_rotting() > 0 || amount <= 0) return; - if (rotlevel) - rot_player(rotlevel); + if (immediate) + rot_hp(immediate); - if (immed_rot) - rot_hp(immed_rot); - - if (rotlevel && one_chance_in(4)) + if (one_chance_in(4)) disease_player(50 + random2(100)); } |