From 005372e15f4b5f69be47cdf5328899c195f54584 Mon Sep 17 00:00:00 2001 From: haranp Date: Fri, 11 May 2007 14:24:01 +0000 Subject: Implemented Nemelex's 'sneak peek' ability. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1453 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/itemname.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'crawl-ref/source/itemname.cc') diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc index 7a547d3847..1605a8fd04 100644 --- a/crawl-ref/source/itemname.cc +++ b/crawl-ref/source/itemname.cc @@ -27,6 +27,7 @@ #include "externs.h" +#include "decks.h" #include "invent.h" #include "itemprop.h" #include "macro.h" @@ -1331,6 +1332,14 @@ std::string item_def::name_aux( bool terse, bool ident ) const else { buff << misc_type_name(item_typ, know_type); + if ( subtype_to_decktype(item_typ) != DECK_OF_PUNISHMENT && + this->special != 0 ) + { + // an inscribed deck! + buff << " {" + << card_name(static_cast(this->special - 1)) + << "}"; + } } break; -- cgit v1.2.3-54-g00ecf