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/spells4.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/spells4.cc')
-rw-r--r-- | crawl-ref/source/spells4.cc | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc index 15c749342e..6ad9864151 100644 --- a/crawl-ref/source/spells4.cc +++ b/crawl-ref/source/spells4.cc @@ -1840,11 +1840,6 @@ bool backlight_monsters(int x, int y, int pow, int garbage) switch (menv[mon].type) { - //case MONS_INSUBSTANTIAL_WISP: //jmf: I'm not sure if these glow or not - //case MONS_VAPOUR: - case MONS_UNSEEN_HORROR: // consider making this visible? probably not. - return (false); - case MONS_FIRE_VORTEX: case MONS_ANGEL: case MONS_FIEND: @@ -1871,7 +1866,21 @@ bool backlight_monsters(int x, int y, int pow, int garbage) } mon_enchant bklt = menv[mon].get_ench(ENCH_BACKLIGHT); - int lvl = bklt.degree; + const int lvl = bklt.degree; + + // this enchantment overrides invisibility (neat) + if (menv[mon].has_ench(ENCH_INVIS)) + { + if (!menv[mon].has_ench(ENCH_BACKLIGHT)) + { + menv[mon].add_ench( + mon_enchant(ENCH_BACKLIGHT, 1, KC_OTHER, random_range(30, 50))); + simple_monster_message( &menv[mon], " is limned in light." ); + } + return (true); + } + + menv[mon].add_ench(mon_enchant(ENCH_BACKLIGHT, 1)); if (lvl == 0) simple_monster_message( &menv[mon], " is outlined in light." ); @@ -1880,10 +1889,6 @@ bool backlight_monsters(int x, int y, int pow, int garbage) else simple_monster_message( &menv[mon], " glows brighter." ); - // this enchantment wipes out invisibility (neat) - menv[mon].del_ench(ENCH_INVIS); - menv[mon].add_ench(mon_enchant(ENCH_BACKLIGHT, 1)); - return (true); } // end backlight_monsters() |