summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/decks.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-03 09:49:19 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-03 09:49:19 +0000
commit1e6c29fcdad466fe9bbae6326ef19bcad8e73707 (patch)
treed4600a8098234fc850c34323ac212e403e31a4b8 /crawl-ref/source/decks.cc
parentbc72da21789d32c6c7cce104f51c50348997b58a (diff)
downloadcrawl-ref-1e6c29fcdad466fe9bbae6326ef19bcad8e73707.tar.gz
crawl-ref-1e6c29fcdad466fe9bbae6326ef19bcad8e73707.zip
Bug/FR 1947001: For damaging cards add "You draw card xy" to the prompt,
so you can reread it while targetting, and add a targetting subcommand "show prompt" that'll do just that. (Though you can already do that by looking at the help.) Fix plain coloured items highlighted in grey in prompts, and add two new colouring prefixes: evil_item (/draining, necromancy books, etc.) and evil_eating (cannibalism, intelligent being) that only apply for the good gods. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5455 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/decks.cc')
-rw-r--r--crawl-ref/source/decks.cc31
1 files changed, 24 insertions, 7 deletions
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index db45b50fdb..34cf168221 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -1583,7 +1583,7 @@ static bool _damaging_card(card_type card, int power, deck_rarity_type rarity)
ZAP_ORB_OF_ELECTRICITY };
const zap_type painzaps[2] = { ZAP_AGONY, ZAP_NEGATIVE_ENERGY };
- switch ( card )
+ switch (card)
{
case CARD_VITRIOL:
ztype = (one_chance_in(3) ? ZAP_DEGENERATION : ZAP_BREATHE_ACID);
@@ -1612,8 +1612,9 @@ static bool _damaging_card(card_type card, int power, deck_rarity_type rarity)
case CARD_PAIN:
if (power_level == 2)
{
+ mprf("You have drawn %s.", card_name(card));
_mass_drain(power);
- return true;
+ return (true);
}
else
ztype = painzaps[power_level];
@@ -1623,12 +1624,18 @@ static bool _damaging_card(card_type card, int power, deck_rarity_type rarity)
break;
}
- if (spell_direction(target, beam) && player_tracer(ztype, power/4, beam))
+ snprintf(info, INFO_SIZE, "You have drawn %s. Aim where? ",
+ card_name(card));
+
+ if (spell_direction(target, beam, DIR_NONE, TARG_ENEMY, true, info)
+ && player_tracer(ztype, power/4, beam))
+ {
zapping(ztype, random2(power/4), beam);
+ }
else
rc = false;
- return rc;
+ return (rc);
}
static void _elixir_card(int power, deck_rarity_type rarity)
@@ -2712,8 +2719,15 @@ bool card_effect(card_type which_card, deck_rarity_type rarity,
if (tell_card)
{
- msg::stream << "You have drawn " << card_name( which_card )
- << '.' << std::endl;
+ // These card types will usually give this message in the targetting
+ // prompt, and the cases where they don't are handled specially.
+ if (which_card != CARD_VITRIOL && which_card != CARD_FLAME
+ && which_card != CARD_FROST && which_card != CARD_HAMMER
+ && which_card != CARD_SPARK && which_card != CARD_PAIN
+ && which_card != CARD_VENOM)
+ {
+ mprf("You have drawn %s.", card_name(which_card));
+ }
}
if (which_card == CARD_XOM && !crawl_state.is_god_acting())
@@ -2776,7 +2790,10 @@ bool card_effect(card_type which_card, deck_rarity_type rarity,
case CARD_VENOM:
if ( coinflip() )
+ {
+ mprf("You have drawn %s.", card_name(which_card));
your_spells(SPELL_OLGREBS_TOXIC_RADIANCE,random2(power/4), false);
+ }
else
rc = _damaging_card(which_card, power, rarity);
break;
@@ -2800,7 +2817,7 @@ bool card_effect(card_type which_card, deck_rarity_type rarity,
break;
case CARD_WILD_MAGIC:
- // yes, high power is bad here
+ // Yes, high power is bad here.
miscast_effect( SPTYP_RANDOM, random2(power/15) + 5,
random2(power), 0, "a card of wild magic" );
break;