summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-26 15:21:17 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-26 15:21:17 +0000
commit4a6887aa3e43e069943e860d82fa531f8b676281 (patch)
tree9cfa7f29208c19d0effccd4c093a81a5d45adb1a
parent8a6b1c9c6b539f8b27f16e27898bc7af485a1f0f (diff)
downloadcrawl-ref-4a6887aa3e43e069943e860d82fa531f8b676281.tar.gz
crawl-ref-4a6887aa3e43e069943e860d82fa531f8b676281.zip
Trunk->0.3 merge (2554): No unnecessary double messaging when drawing the Wraith.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.3@2597 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/decks.cc2
-rw-r--r--crawl-ref/source/ouch.cc5
-rw-r--r--crawl-ref/source/ouch.h2
3 files changed, 5 insertions, 4 deletions
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index 8e34582998..42686771aa 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -1333,7 +1333,7 @@ bool card_effect(card_type which_card, deck_rarity_type rarity)
case CARD_CURSE: curse_card(power, rarity); break;
case CARD_WARPWRIGHT: warpwright_card(power, rarity); break;
case CARD_TOMB: entomb(power/2); break;
- case CARD_WRAITH: drain_exp(); lose_level(); break;
+ case CARD_WRAITH: drain_exp(false); lose_level(); break;
case CARD_WRATH: godly_wrath(); break;
case CARD_SUMMON_DEMON: summon_demon_card(power, rarity); break;
case CARD_SUMMON_ANIMAL: summon_animals(random2(power/3)); break;
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index ebfb0d2b7a..a8759320ec 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -616,7 +616,7 @@ void lose_level()
xom_is_stimulated(255);
} // end lose_level()
-void drain_exp(void)
+void drain_exp(bool announce_full)
{
int protection = player_prot_life();
@@ -630,7 +630,8 @@ void drain_exp(void)
if (protection >= 3 || you.is_undead)
{
- mpr("You fully resist.");
+ if ( announce_full )
+ mpr("You fully resist.");
return;
}
diff --git a/crawl-ref/source/ouch.h b/crawl-ref/source/ouch.h
index c1c063bdfb..6036f3f584 100644
--- a/crawl-ref/source/ouch.h
+++ b/crawl-ref/source/ouch.h
@@ -110,7 +110,7 @@ void lose_level(void);
/* ***********************************************************************
* called from: decks - fight - item_use - ouch - religion - spells
* *********************************************************************** */
-void drain_exp(void);
+void drain_exp(bool announce_full = true);
void expose_player_to_element( beam_type flavour, int strength = 0 );