summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/invent.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-07 21:04:21 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-07 21:04:21 +0000
commitd68263bae2edfe29b3028ff90e9d44d35573ce72 (patch)
treefbadd6f0c757c88bc166bf92de2e47457f0d92e3 /crawl-ref/source/invent.cc
parent7b6908cbb53c4d9b105857e1fdf611596b9a6be4 (diff)
downloadcrawl-ref-d68263bae2edfe29b3028ff90e9d44d35573ce72.tar.gz
crawl-ref-d68263bae2edfe29b3028ff90e9d44d35573ce72.zip
When drawing cards from decks in your inventory, make sure only decks
are offered as choices. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4914 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/invent.cc')
-rw-r--r--crawl-ref/source/invent.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc
index 0674a06890..ad6665baf2 100644
--- a/crawl-ref/source/invent.cc
+++ b/crawl-ref/source/invent.cc
@@ -30,6 +30,7 @@
#include "externs.h"
#include "clua.h"
+#include "decks.h"
#include "describe.h"
#include "food.h"
#include "initfile.h"
@@ -781,6 +782,8 @@ static bool _item_class_selected(const item_def &i, int selector)
case OSEL_VAMP_EAT:
return (itype == OBJ_CORPSES && i.sub_type == CORPSE_BODY
&& !food_is_rotten(i) && mons_has_blood(i.plus));
+ case OSEL_DRAW_DECK:
+ return (is_deck(i));
case OSEL_EQUIP:
for (int eq = 0; eq < NUM_EQUIP; eq++)
{