From abb05b183332d7314a2d767017193642cda8e899 Mon Sep 17 00:00:00 2001 From: haranp Date: Mon, 25 Sep 2006 20:12:20 +0000 Subject: Fix bug 1565262 - polymorph naming bug when player has see invisible. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup@112 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/monstuff.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index d306f3a745..bc3e8094b6 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -979,8 +979,9 @@ bool monster_polymorph( struct monsters *monster, int targetc, int power ) } // messaging: {dlb} - bool invis = mons_class_flag( targetc, M_INVIS ) - || mons_has_ench( monster, ENCH_INVIS ); + bool invis = (mons_class_flag( targetc, M_INVIS ) + || mons_has_ench( monster, ENCH_INVIS )) && + (!player_see_invis()); if (mons_has_ench( monster, ENCH_GLOWING_SHAPESHIFTER, ENCH_SHAPESHIFTER )) strcat( str_polymon, " changes into " ); @@ -989,11 +990,11 @@ bool monster_polymorph( struct monsters *monster, int targetc, int power ) else strcat( str_polymon, " evaporates and reforms as " ); - if (invis && !player_see_invis()) + if (invis) strcat( str_polymon, "something you cannot see!" ); else { - strcat( str_polymon, monam( 250, targetc, !invis, DESC_NOCAP_A ) ); + strcat( str_polymon, monam( 250, targetc, true, DESC_NOCAP_A ) ); if (targetc == MONS_PULSATING_LUMP) strcat( str_polymon, " of flesh" ); -- cgit v1.2.3-54-g00ecf