summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-07 20:27:45 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-07 20:27:45 +0000
commit5fa864a78e4ebd44189a31827edeead3f0c12597 (patch)
tree103a4942b363bcf3a5b021d831f572f439ceca09 /crawl-ref/source/player.cc
parent4a27714410c3f8f0f5113421a77e21a43242a0c2 (diff)
downloadcrawl-ref-5fa864a78e4ebd44189a31827edeead3f0c12597.tar.gz
crawl-ref-5fa864a78e4ebd44189a31827edeead3f0c12597.zip
Implemented Erik's invisibility proposal:
- M_SENSE_INVIS for perceptive monsters; split existing monsters with see invisible into M_SEE_INVIS and M_SENSE_INVIS. - Monsters that can't see invisible get to-hit penalties vs invisible players and monsters in both melee and at range. - Monsters that sense where you are know where to shoot and attack, but still get to-hit penalties because they don't know exactly where you are. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1260 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 724ccfa21c..fe79c5dff7 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -5250,3 +5250,13 @@ void player::sicken(int amount)
disease = (tmp > 210) ? 210 : tmp;
learned_something_new(TUT_YOU_SICK);
}
+
+bool player::can_see_invisible() const
+{
+ return (player_see_invis() > 0);
+}
+
+bool player::invisible() const
+{
+ return (invis);
+}