summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-02 19:25:19 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-02 19:25:19 +0000
commitb9b92f995250e412eee9dbfcd529927a526a6e8e (patch)
tree2693ff76b5b0e03d555480a8c88f57c4af2ddc84 /crawl-ref/source/player.cc
parent9acf2085c7953fad9b11962b16168f3a2d078f5f (diff)
downloadcrawl-ref-b9b92f995250e412eee9dbfcd529927a526a6e8e.tar.gz
crawl-ref-b9b92f995250e412eee9dbfcd529927a526a6e8e.zip
Allow AF_DISEASE attacks to sicken monsters.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1195 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc21
1 files changed, 13 insertions, 8 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 22f3339a03..abf7f089e0 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -4424,14 +4424,7 @@ void dec_haste_player( void )
void disease_player( int amount )
{
- if (you.is_undead || amount <= 0)
- return;
-
- mpr( "You feel ill." );
-
- const int tmp = you.disease + amount;
- you.disease = (tmp > 210) ? 210 : tmp;
- learned_something_new(TUT_YOU_SICK);
+ you.sicken(amount);
}
void dec_disease_player( void )
@@ -5214,3 +5207,15 @@ kill_category player::kill_alignment() const
{
return (KC_YOU);
}
+
+void player::sicken(int amount)
+{
+ if (is_undead || amount <= 0)
+ return;
+
+ mpr( "You feel ill." );
+
+ const int tmp = disease + amount;
+ disease = (tmp > 210) ? 210 : tmp;
+ learned_something_new(TUT_YOU_SICK);
+}