summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemname.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-17 20:43:18 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-17 20:43:18 +0000
commit44f56edce815f5ff8fb4124829523439f1cc8ad2 (patch)
treedc7be3b6e516b32ca8130786b35ebecf43abbabd /crawl-ref/source/itemname.cc
parentb7516d279965cc139c24507688047172bb7a0f7f (diff)
downloadcrawl-ref-44f56edce815f5ff8fb4124829523439f1cc8ad2.tar.gz
crawl-ref-44f56edce815f5ff8fb4124829523439f1cc8ad2.zip
Complete revamp of cards and decks, following David's ideas.
Many of the cards don't work yet (e.g., all Summoning cards); this will be fixed in the near future. Deck rarity, by the way, is encoded in its colour. Yuck - but I was out of bits in the item_def struct. Better ideas welcome. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1594 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/itemname.cc')
-rw-r--r--crawl-ref/source/itemname.cc38
1 files changed, 32 insertions, 6 deletions
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index 44b7095f7c..69dc3ae52b 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -677,16 +677,33 @@ static const char* rune_type_name(int p)
}
}
+static const char* deck_rarity_name(deck_rarity_type rarity)
+{
+ switch (rarity)
+ {
+ case DECK_RARITY_COMMON: return "common";
+ case DECK_RARITY_RARE: return "rare";
+ case DECK_RARITY_LEGENDARY: return "legendary";
+ }
+ return "buggy rarity";
+}
+
static const char* misc_type_name(int type, bool known)
{
if (known)
{
switch ( static_cast<misc_item_type>(type) )
{
- case MISC_DECK_OF_POWER: return "deck of power";
- case MISC_DECK_OF_SUMMONINGS: return "deck of summonings";
- case MISC_DECK_OF_TRICKS: return "deck of tricks";
+ case MISC_DECK_OF_ESCAPE: return "deck of escape";
+ case MISC_DECK_OF_DESTRUCTION: return "deck of destruction";
+ case MISC_DECK_OF_DUNGEONS: return "deck of dungeons";
+ case MISC_DECK_OF_SUMMONING: return "deck of summonings";
case MISC_DECK_OF_WONDERS: return "deck of wonders";
+ case MISC_DECK_OF_PUNISHMENT: return "deck of punishment";
+ case MISC_DECK_OF_WAR: return "deck of war";
+ case MISC_DECK_OF_CHANGES: return "deck of changes";
+ case MISC_DECK_OF_DEFENSE: return "deck of defense";
+
case MISC_CRYSTAL_BALL_OF_ENERGY: return "crystal ball of energy";
case MISC_CRYSTAL_BALL_OF_FIXATION: return "crystal ball of fixation";
case MISC_CRYSTAL_BALL_OF_SEEING: return "crystal ball of seeing";
@@ -710,10 +727,15 @@ static const char* misc_type_name(int type, bool known)
{
switch ( static_cast<misc_item_type>(type) )
{
- case MISC_DECK_OF_POWER:
- case MISC_DECK_OF_SUMMONINGS:
- case MISC_DECK_OF_TRICKS:
+ case MISC_DECK_OF_ESCAPE:
+ case MISC_DECK_OF_DESTRUCTION:
+ case MISC_DECK_OF_DUNGEONS:
+ case MISC_DECK_OF_SUMMONING:
case MISC_DECK_OF_WONDERS:
+ case MISC_DECK_OF_PUNISHMENT:
+ case MISC_DECK_OF_WAR:
+ case MISC_DECK_OF_CHANGES:
+ case MISC_DECK_OF_DEFENSE:
return "deck of cards";
case MISC_CRYSTAL_BALL_OF_ENERGY:
case MISC_CRYSTAL_BALL_OF_FIXATION:
@@ -1314,6 +1336,10 @@ std::string item_def::name_aux( description_level_type desc,
}
else
{
+ if ( is_deck(*this) )
+ {
+ buff << deck_rarity_name(deck_rarity(*this)) << ' ';
+ }
buff << misc_type_name(item_typ, know_type);
if ( is_deck(*this) && item_plus2 != 0 )
{