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/skills2.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/skills2.cc')
-rw-r--r-- | crawl-ref/source/skills2.cc | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/crawl-ref/source/skills2.cc b/crawl-ref/source/skills2.cc index 948847c26f..39106b0d28 100644 --- a/crawl-ref/source/skills2.cc +++ b/crawl-ref/source/skills2.cc @@ -2352,27 +2352,21 @@ void wield_warning(bool newWeapon) if (you.strength < you.dex) { if (you.strength < 11) - snprintf( info, INFO_SIZE, "You have %strouble swinging %s.", + mprf(MSGCH_WARN, "You have %strouble swinging %s.", (you.strength < 7)?"":"a little ", wepstr); else - snprintf( info, INFO_SIZE, "You'd be more effective with " + mprf(MSGCH_WARN, "You'd be more effective with " "%s if you were stronger.", wepstr); } else { if (you.dex < 11) - { - snprintf( info, INFO_SIZE, "Wielding %s is %s awkward.", - wepstr, (you.dex < 7) ? "fairly" : "a little" ); - } + mprf(MSGCH_WARN, "Wielding %s is %s awkward.", + wepstr, (you.dex < 7) ? "fairly" : "a little" ); else - { - snprintf( info, INFO_SIZE, "You'd be more effective with " + mprf(MSGCH_WARN, "You'd be more effective with " "%s if you were nimbler.", wepstr ); - } } - - mpr( info, MSGCH_WARN ); } #endif return; @@ -2406,9 +2400,9 @@ void wield_warning(bool newWeapon) if (shoot_skill > effSkill) { - strcpy( info, "Your low throwing skill limits the effectiveness of "); - strcat( info, wepstr ); - mpr( info, MSGCH_WARN ); + mprf(MSGCH_WARN, + "Your low throwing skill limits the effectiveness of %s.", + wepstr); } #endif } |