diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-05-11 23:21:30 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-05-11 23:21:30 +0000 |
commit | 8b9d48402b36f994893ab627cf9cf7b0be632d20 (patch) | |
tree | ab580bf6017087c5c5ff8b8648e4d8aed4e92d11 /crawl-ref/source/describe.cc | |
parent | a81a0b436a4e8664c76d9e74e462fc2690880851 (diff) | |
download | crawl-ref-8b9d48402b36f994893ab627cf9cf7b0be632d20.tar.gz crawl-ref-8b9d48402b36f994893ab627cf9cf7b0be632d20.zip |
Deck stacking implemented. Five cards (or less, if there are less) are
drawn, you get to stack them in any order, and the rest of the deck is
discarded. The next card is inscribed on the deck; the remainder
can be seen with 'v'.
This is now Nemelex's top ability.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1467 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/describe.cc')
-rw-r--r-- | crawl-ref/source/describe.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index e6b330cf1f..510d3c5441 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -35,6 +35,7 @@ #include "abl-show.h" #include "debug.h" +#include "decks.h" #include "fight.h" #include "itemname.h" #include "itemprop.h" @@ -3055,6 +3056,20 @@ static std::string describe_misc_item( const item_def &item ) description += "$"; + if ( is_deck(item) && item.plus2 != 0 ) + { + description += "$Next card(s): "; + description += card_name(static_cast<card_type>(item.plus2 - 1)); + long spec = item.special; + while ( spec ) + { + description += ", "; + description += card_name(static_cast<card_type>((spec & 0xFF)-1)); + spec >>= 8; + } + description += "$"; + } + return (description); } |