summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/decks.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-14 22:35:30 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-14 22:35:30 +0000
commit7174df31ccdefa625bfa1f4f4b658f68396fe8e8 (patch)
treebd4d93ae5902a1d48e71242c5d4628325c4361f3 /crawl-ref/source/decks.cc
parent83b6e96fdef99158fa6889b8c60429f8432b6163 (diff)
downloadcrawl-ref-7174df31ccdefa625bfa1f4f4b658f68396fe8e8.tar.gz
crawl-ref-7174df31ccdefa625bfa1f4f4b658f68396fe8e8.zip
High Evocations give you a chance at identifying decks you draw from.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1868 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/decks.cc')
-rw-r--r--crawl-ref/source/decks.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index 0e24924765..4cb97f373d 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -392,6 +392,7 @@ void evoke_deck( item_def& deck )
{
int brownie_points = 0;
mpr("You draw a card...");
+ bool allow_id = in_inventory(deck) && !item_ident(deck, ISFLAG_KNOW_TYPE);
if ( deck.plus2 == 0 )
{
card_effect( choose_one_card(deck, true), deck_rarity(deck) );
@@ -406,6 +407,9 @@ void evoke_deck( item_def& deck )
}
else
{
+ // You can't ID off a marked card
+ allow_id = false;
+
// draw the marked card
card_effect(static_cast<card_type>(deck.plus2 - 1),
deck_rarity(deck));
@@ -434,6 +438,13 @@ void evoke_deck( item_def& deck )
// was marked or stacked.
brownie_points++;
}
+ else if (allow_id && (you.skills[SK_EVOCATIONS] > 5 + random2(35)))
+ {
+ mpr("Your skill with magical items lets you identify the deck.");
+ set_ident_flags( deck, ISFLAG_KNOW_TYPE );
+ msg::streams(MSGCH_EQUIPMENT) << deck.name(DESC_INVENTORY)
+ << std::endl;
+ }
did_god_conduct(DID_CARDS, brownie_points);
}