From e2cbc98a162d37386b3191ccf16c0d64ad7bb1b2 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sun, 18 May 2008 09:40:53 +0000 Subject: Pull code from mon->can_see(target) into a new function mon->see_grid() and use it in the checks for monster/monster visibility. I didn't have the time to test it but it should at least solve part of the problem of monsters firing through walls (if monster visibility is even checked there, which I don't know). Also (as usually), more code cleanup. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5117 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/items.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/items.cc') diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index fa1daf4aae..f9f75c581d 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -722,7 +722,7 @@ static int item_name_specialness(const item_def& item) return ( branded ? 1 : 0 ); } - if ( item.base_type == OBJ_MISSILES ) + if (item.base_type == OBJ_MISSILES) return 0; // missiles don't get name descriptors std::string itname = item.name(DESC_PLAIN, false, false, false); @@ -733,14 +733,14 @@ static int item_name_specialness(const item_def& item) const bool heav_runed = itname.find("heavily ") != std::string::npos; const bool item_glows = itname.find("glowing") != std::string::npos; - if ( item_glows || (item_runed && !heav_runed) || - get_equip_desc(item) == ISFLAG_EMBROIDERED_SHINY ) + if (item_glows || item_runed && !heav_runed + || get_equip_desc(item) == ISFLAG_EMBROIDERED_SHINY) { return 1; } - // You can tell artefacts, because they'll have a description which - // rules out anything else. + // You can tell something is an artefacts, because they'll have a + // description which rules out anything else. // XXX Fixedarts and unrandarts might upset the apple-cart, though. if ( is_artefact(item) ) return 2; -- cgit v1.2.3-54-g00ecf