From 5fa864a78e4ebd44189a31827edeead3f0c12597 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Sat, 7 Apr 2007 20:27:45 +0000 Subject: 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 --- crawl-ref/source/player.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'crawl-ref/source/player.cc') 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); +} -- cgit v1.2.3-54-g00ecf