diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-15 14:12:39 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-15 14:12:39 +0000 |
commit | ed15698b38cd638552f6a0a12e0ddceef57c9e07 (patch) | |
tree | 6c5a7a7346f5083886859a4e8a552e8121b39c85 /crawl-ref/source/player.cc | |
parent | d3c9ed21e760065a2faad5b371efdccf5fdace78 (diff) | |
download | crawl-ref-ed15698b38cd638552f6a0a12e0ddceef57c9e07.tar.gz crawl-ref-ed15698b38cd638552f6a0a12e0ddceef57c9e07.zip |
Corona overrides invisibility. To check if something is *really* invisible, use
foo.invisible(), not foo.has_ench(ENCH_INVIS) or foo.duration[DUR_INVIS].
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1874 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index ee1e061ac2..93088eff46 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -262,7 +262,7 @@ bool move_player_to_grid( int x, int y, bool stepped, bool allow_shift, mpr("Moving in this stuff is going to be slow."); - if (you.duration[DUR_INVIS]) + if (you.invisible()) mpr( "... and don't expect to remain undetected." ); } } @@ -2178,7 +2178,7 @@ int player_see_invis(bool calc_unid) bool player_monster_visible( const monsters *mon ) { if (mon->has_ench(ENCH_SUBMERGED) - || (mon->has_ench(ENCH_INVIS) && !player_see_invis())) + || (mon->invisible() && !player_see_invis())) { return (false); } @@ -5498,7 +5498,7 @@ bool player::can_see_invisible() const bool player::invisible() const { - return (duration[DUR_INVIS]); + return (duration[DUR_INVIS] && !backlit()); } bool player::backlit() const |