diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-09-25 20:12:20 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-09-25 20:12:20 +0000 |
commit | abb05b183332d7314a2d767017193642cda8e899 (patch) | |
tree | 73e4bfa333b5571a514e090bd2cf92f944b8723d | |
parent | 93e5fe6078c850e8b53a5a761426b2212d1b11ad (diff) | |
download | crawl-ref-abb05b183332d7314a2d767017193642cda8e899.tar.gz crawl-ref-abb05b183332d7314a2d767017193642cda8e899.zip |
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
-rw-r--r-- | crawl-ref/source/monstuff.cc | 9 |
1 files changed, 5 insertions, 4 deletions
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" ); |