summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/debug.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/debug.cc')
-rw-r--r--crawl-ref/source/debug.cc17
1 files changed, 14 insertions, 3 deletions
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc
index c493ed5d81..a0c4ed14d4 100644
--- a/crawl-ref/source/debug.cc
+++ b/crawl-ref/source/debug.cc
@@ -822,7 +822,7 @@ static void deck_from_specs(const char* _specs, item_def &item)
NUM_MISCELLANY
};
- item.colour = BLACK;
+ item.special = DECK_RARITY_COMMON;
item.sub_type = NUM_MISCELLANY;
if (type_str != "")
@@ -920,9 +920,20 @@ static void deck_from_specs(const char* _specs, item_def &item)
int base = static_cast<int>(DECK_RARITY_COMMON);
deck_rarity_type rarity =
static_cast<deck_rarity_type>(base + rarity_val);
- item.colour = deck_rarity_to_color(rarity);
+ item.special = rarity;
- item.plus = 4 + random2(10);
+ int num = debug_prompt_for_int("How many cards? ", false);
+
+ if (num <= 0)
+ {
+ canned_msg( MSG_OK );
+ item.base_type = OBJ_UNASSIGNED;
+ return;
+ }
+
+ item.plus = num;
+
+ init_deck(item);
}
static void rune_or_deck_from_specs(const char* specs, item_def &item)