summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/abl-show.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-21 18:26:58 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-21 18:26:58 +0000
commitddba1bc505be4ae692233285e785642d6aa4f0b1 (patch)
treeb95dd27669892198de16a5d3afb8e17fd57739ac /crawl-ref/source/abl-show.cc
parent9c3ecfbada5e9797f91e418a550ecf6fb02a66e3 (diff)
downloadcrawl-ref-ddba1bc505be4ae692233285e785642d6aa4f0b1.tar.gz
crawl-ref-ddba1bc505be4ae692233285e785642d6aa4f0b1.zip
Added a Draw Card invocation for Nemelex, which lets you draw a card
from a deck in inventory. Using Peek Deck now loses 1d2 cards from the peeked deck. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1901 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/abl-show.cc')
-rw-r--r--crawl-ref/source/abl-show.cc28
1 files changed, 21 insertions, 7 deletions
diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc
index 2d962bc3a3..fa9eb29504 100644
--- a/crawl-ref/source/abl-show.cc
+++ b/crawl-ref/source/abl-show.cc
@@ -128,8 +128,9 @@ ability_type god_abilities[MAX_NUM_GODS][MAX_GOD_ABILITIES] =
{ ABIL_TROG_BERSERK, ABIL_TROG_MIGHT, ABIL_NON_ABILITY,
ABIL_TROG_HASTE_SELF, ABIL_NON_ABILITY },
// Nemelex
- { ABIL_NEMELEX_PEEK, ABIL_NEMELEX_TRIPLE_DRAW, ABIL_NON_ABILITY,
- ABIL_NON_ABILITY, ABIL_NEMELEX_STACK_DECK },
+ { ABIL_NEMELEX_PEEK_DECK, ABIL_NEMELEX_DRAW_CARD,
+ ABIL_NEMELEX_TRIPLE_DRAW, ABIL_NON_ABILITY,
+ ABIL_NEMELEX_STACK_DECK },
// Elyvilon
{ ABIL_ELYVILON_LESSER_HEALING, ABIL_ELYVILON_PURIFICATION,
ABIL_ELYVILON_HEALING, ABIL_ELYVILON_RESTORATION,
@@ -276,8 +277,9 @@ static const ability_def Ability_List[] =
{ ABIL_LUGONU_ABYSS_ENTER, "Enter the Abyss", 9, 0, 200, 40, ABFLAG_NONE },
// Nemelex
+ { ABIL_NEMELEX_PEEK_DECK, "Deck Peek", 3, 0, 0, 1, ABFLAG_INSTANT },
+ { ABIL_NEMELEX_DRAW_CARD, "Draw Card", 1, 0, 0, 1, ABFLAG_NONE },
{ ABIL_NEMELEX_TRIPLE_DRAW, "Triple Draw", 2, 0, 100, 2, ABFLAG_NONE },
- { ABIL_NEMELEX_PEEK, "Deck Peek", 3, 0, 0, 1, ABFLAG_INSTANT },
{ ABIL_NEMELEX_STACK_DECK, "Stack Deck", 5, 0, 150, 6, ABFLAG_NONE },
// Beogh
@@ -699,7 +701,7 @@ static talent get_talent(ability_type ability, bool check_confused)
failure = 80 - (you.piety / 25) - (4 * you.skills[SK_EVOCATIONS]);
break;
- case ABIL_NEMELEX_PEEK:
+ case ABIL_NEMELEX_PEEK_DECK:
invoc = true;
failure = 40 - (you.piety / 20) - (5 * you.skills[SK_EVOCATIONS]);
break;
@@ -709,6 +711,12 @@ static talent get_talent(ability_type ability, bool check_confused)
failure = 60 - (you.piety / 20) - (5 * you.skills[SK_EVOCATIONS]);
break;
+ case ABIL_NEMELEX_DRAW_CARD:
+ invoc = true;
+ perfect = true; // Tactically important to allow perfection
+ failure = 50 - (you.piety / 20) - (5 * you.skills[SK_EVOCATIONS]);
+ break;
+
//jmf: following for to-be-created gods
case ABIL_CHARM_SNAKE:
invoc = true;
@@ -742,8 +750,8 @@ static talent get_talent(ability_type ability, bool check_confused)
break;
}
- // Perfect abilities are things like "renounce religion", which
- // shouldn't have a failure rate ever. -- bwr
+ // Perfect abilities are things which can go down to a 0%
+ // failure rate (e.g., Renounce Religion.)
if (failure <= 0 && !perfect)
failure = 1;
@@ -1586,13 +1594,19 @@ static bool do_ability(const ability_def& abil)
activate_notes(true);
break;
+ case ABIL_NEMELEX_DRAW_CARD:
+ if ( !choose_deck_and_draw() )
+ return false;
+ exercise(SK_EVOCATIONS, 1 + random2(2));
+ break;
+
case ABIL_NEMELEX_TRIPLE_DRAW:
if ( !deck_triple_draw() )
return false;
exercise(SK_EVOCATIONS, 3 + random2(3));
break;
- case ABIL_NEMELEX_PEEK:
+ case ABIL_NEMELEX_PEEK_DECK:
if ( !deck_peek() )
return false;
exercise(SK_EVOCATIONS, 2 + random2(2));