From 7174df31ccdefa625bfa1f4f4b658f68396fe8e8 Mon Sep 17 00:00:00 2001 From: haranp Date: Sat, 14 Jul 2007 22:35:30 +0000 Subject: 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 --- crawl-ref/source/decks.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'crawl-ref/source/decks.cc') 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(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); } -- cgit v1.2.3-54-g00ecf