summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-05-11 14:14:10 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-05-11 14:14:10 +0000
commit18dac1924da21380570eb193e6a363e0c813c9de (patch)
treedd9659e0a9a5b3127d4736aa3ca6b411ce9f2d90 /crawl-ref/source/player.cc
parentf95c27c96c4fa900e334d269619503410b5d1f78 (diff)
downloadcrawl-ref-18dac1924da21380570eb193e6a363e0c813c9de.tar.gz
crawl-ref-18dac1924da21380570eb193e6a363e0c813c9de.zip
Merged trunk fixes back to 0.2:
- Moth of wrath rage attack. - Pulsating lump mutation attack. - Combat messages for out-of-view monsters fighting monsters in LOS. - Waypoint deletion. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.2@1449 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc47
1 files changed, 47 insertions, 0 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index e3aee03759..eb2c4767a4 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -4935,6 +4935,40 @@ void player::go_berserk(bool intentional)
::go_berserk(intentional);
}
+bool player::can_go_berserk() const
+{
+ return can_go_berserk(false);
+}
+
+bool player::can_go_berserk(bool verbose) const
+{
+ if (you.berserker)
+ {
+ if (verbose)
+ mpr("You're already berserk!");
+ // or else you won't notice -- no message here.
+ return (false);
+ }
+
+ if (you.exhausted)
+ {
+ if (verbose)
+ mpr("You're too exhausted to go berserk.");
+ // or else they won't notice -- no message here
+ return (false);
+ }
+
+ if (you.is_undead)
+ {
+ if (verbose)
+ mpr("You cannot raise a blood rage in your lifeless body.");
+ // or else you won't notice -- no message here
+ return (false);
+ }
+
+ return (true);
+}
+
void player::god_conduct(int thing_done, int level)
{
::did_god_conduct(thing_done, level);
@@ -5220,3 +5254,16 @@ void player::sicken(int amount)
disease = (tmp > 210) ? 210 : tmp;
learned_something_new(TUT_YOU_SICK);
}
+
+void player::mutate()
+{
+ if (one_chance_in(5))
+ ::mutate(100);
+ else
+ give_bad_mutation();
+}
+
+bool player::is_icy() const
+{
+ return (attribute[ATTR_TRANSFORMATION] == TRAN_ICE_BEAST);
+}