From 31d23a40fe1ac90e0e319ce9bab1fa3bb0a08bf3 Mon Sep 17 00:00:00 2001 From: haranp Date: Mon, 23 Apr 2007 10:19:28 +0000 Subject: Cleaned up a lot of code which was using info[] to use mprf() directly instead. Fixed a bug with affix_weapon_enchantment messaging (mea culpa.) Fixed shatter() messages getting surpressed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1347 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/skills.cc | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'crawl-ref/source/skills.cc') diff --git a/crawl-ref/source/skills.cc b/crawl-ref/source/skills.cc index 239dba8259..50c3007374 100644 --- a/crawl-ref/source/skills.cc +++ b/crawl-ref/source/skills.cc @@ -388,10 +388,10 @@ static int exercise2( int exsk ) exercised and how much you spent on it. Too irritating to be a regular WIZARD feature. + #if DEBUG_DIAGNOSTICS - snprintf( info, INFO_SIZE, "Exercised %s * %d for %d xp.", - skill_name(exsk), skill_inc, skill_change ); - mpr( info, MSGCH_DIAGNOSTICS ); + mprf( MSGCH_DIAGNOSTICS, "Exercised %s * %d for %d xp.", + skill_name(exsk), skill_inc, skill_change ); #endif */ @@ -403,20 +403,22 @@ static int exercise2( int exsk ) you.skills[exsk]++; take_note(Note(NOTE_GAIN_SKILL, exsk, you.skills[exsk])); - if (you.skills[exsk] == 27) { - snprintf( info, INFO_SIZE, "You have mastered %s!", - skill_name( exsk ) ); + if (you.skills[exsk] == 27) + { + mprf(MSGCH_INTRINSIC_GAIN, + "You have mastered %s!", skill_name( exsk ) ); } - else if (you.skills[exsk] == 1) { - snprintf( info, INFO_SIZE, "You have gained %s skill!", - skill_name( exsk ) ); + else if (you.skills[exsk] == 1) + { + mprf(MSGCH_INTRINSIC_GAIN, + "You have gained %s skill!", skill_name( exsk ) ); } - else { - snprintf( info, INFO_SIZE, "Your %s skill increases to level %d!", - skill_name( exsk ), you.skills[exsk] ); + else + { + mprf(MSGCH_INTRINSIC_GAIN, "Your %s skill increases to level %d!", + skill_name( exsk ), you.skills[exsk] ); } - mpr( info, MSGCH_INTRINSIC_GAIN ); learned_something_new(TUT_SKILL_RAISE); // Recalculate this skill's order for tie breaking skills -- cgit v1.2.3-54-g00ecf