summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/chardump.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-11 17:36:10 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-11 17:36:10 +0000
commit605ad1a626360b651b73805372bf74453a6f2410 (patch)
tree2646e8daf9d0dd14a16eaf9efefd55975c56f79c /crawl-ref/source/chardump.cc
parent914104c2b2d2600c415caa321690708317a4db6c (diff)
downloadcrawl-ref-605ad1a626360b651b73805372bf74453a6f2410.tar.gz
crawl-ref-605ad1a626360b651b73805372bf74453a6f2410.zip
More streamlining, this time of code which shows power and spell failure.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@616 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/chardump.cc')
-rw-r--r--crawl-ref/source/chardump.cc28
1 files changed, 2 insertions, 26 deletions
diff --git a/crawl-ref/source/chardump.cc b/crawl-ref/source/chardump.cc
index 04b12201eb..51e2dc6d59 100644
--- a/crawl-ref/source/chardump.cc
+++ b/crawl-ref/source/chardump.cc
@@ -896,36 +896,12 @@ static void sdump_spells(const std::string &, std::string & text)
for (int i = spell_line.length(); i < 41; ++i )
spell_line += ' ';
- int spell_p = calc_spell_power( spell, true );
- spell_line += ( (spell_p > 100) ? "Enormous" :
- (spell_p > 90) ? "Huge" :
- (spell_p > 80) ? "Massive" :
- (spell_p > 70) ? "Major" :
- (spell_p > 60) ? "Impressive" :
- (spell_p > 50) ? "Reasonable" :
- (spell_p > 40) ? "Moderate" :
- (spell_p > 30) ? "Adequate" :
- (spell_p > 20) ? "Mediocre" :
- (spell_p > 10) ? "Minor"
- : "Negligible");
+ spell_line += spell_power_to_string(calc_spell_power(spell,true));
for (int i = spell_line.length(); i < 56; ++i )
spell_line += ' ';
- int fail_rate = spell_fail( spell );
-
- spell_line += (fail_rate == 100) ? "Useless" :
- (fail_rate > 90) ? "Terrible" :
- (fail_rate > 80) ? "Cruddy" :
- (fail_rate > 70) ? "Bad" :
- (fail_rate > 60) ? "Very Poor" :
- (fail_rate > 50) ? "Poor" :
- (fail_rate > 40) ? "Fair" :
- (fail_rate > 30) ? "Good" :
- (fail_rate > 20) ? "Very Good" :
- (fail_rate > 10) ? "Great" :
- (fail_rate > 0) ? "Excellent"
- : "Perfect";
+ spell_line += failure_rate_to_string(spell_fail(spell));
for (int i = spell_line.length(); i < 68; i++)
spell_line += ' ';