From 4a6887aa3e43e069943e860d82fa531f8b676281 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Fri, 26 Oct 2007 15:21:17 +0000 Subject: 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 --- crawl-ref/source/decks.cc | 2 +- crawl-ref/source/ouch.cc | 5 +++-- crawl-ref/source/ouch.h | 2 +- 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 ); -- cgit v1.2.3-54-g00ecf