diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-04-23 10:19:28 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-04-23 10:19:28 +0000 |
commit | 31d23a40fe1ac90e0e319ce9bab1fa3bb0a08bf3 (patch) | |
tree | 3b981f5efc06e3a5e46cf9b1a395f7e35f2ddd9a /crawl-ref/source/skills.cc | |
parent | 00af6cae236018eae3c659ae02cd8c017549bd15 (diff) | |
download | crawl-ref-31d23a40fe1ac90e0e319ce9bab1fa3bb0a08bf3.tar.gz crawl-ref-31d23a40fe1ac90e0e319ce9bab1fa3bb0a08bf3.zip |
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
Diffstat (limited to 'crawl-ref/source/skills.cc')
-rw-r--r-- | crawl-ref/source/skills.cc | 28 |
1 files changed, 15 insertions, 13 deletions
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 |