diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-09-10 21:34:21 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-09-10 21:34:21 +0000 |
commit | af7fe6ad37f466a8e926cc29765197f5b0e7224f (patch) | |
tree | f2362740ab56fec3d7f6018688c79221e9974615 /crawl-ref/source/spl-cast.cc | |
parent | 1d23ad9eae6203fcabc6b1f9a933174bc907f2a9 (diff) | |
download | crawl-ref-af7fe6ad37f466a8e926cc29765197f5b0e7224f.tar.gz crawl-ref-af7fe6ad37f466a8e926cc29765197f5b0e7224f.zip |
Display spell cost, success chance, schools, power, range, and hunger in
the new tiles display (in the title, quantity, mouse-over description, and
right-click description).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10649 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r-- | crawl-ref/source/spl-cast.cc | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index a58e66ff1f..ea184c8b49 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -2266,19 +2266,18 @@ void exercise_spell( spell_type spell, bool spc, bool success ) const char* failure_rate_to_string( int fail ) { - return - (fail == 100) ? "Useless" : // 0% success chance - (fail > 77) ? "Terrible" : // 0-5% - (fail > 71) ? "Cruddy" : // 5-10% - (fail > 64) ? "Bad" : // 10-20% - (fail > 59) ? "Very Poor" : // 20-30% - (fail > 50) ? "Poor" : // 30-50% - (fail > 40) ? "Fair" : // 50-70% - (fail > 35) ? "Good" : // 70-80% - (fail > 28) ? "Very Good" : // 80-90% - (fail > 22) ? "Great" : // 90-95% - (fail > 0) ? "Excellent" : // 95-100% - "Perfect"; // 100% + return (fail == 100) ? "Useless" : // 0% success chance + (fail > 77) ? "Terrible" : // 0-5% + (fail > 71) ? "Cruddy" : // 5-10% + (fail > 64) ? "Bad" : // 10-20% + (fail > 59) ? "Very Poor" : // 20-30% + (fail > 50) ? "Poor" : // 30-50% + (fail > 40) ? "Fair" : // 50-70% + (fail > 35) ? "Good" : // 70-80% + (fail > 28) ? "Very Good" : // 80-90% + (fail > 22) ? "Great" : // 90-95% + (fail > 0) ? "Excellent" // 95-100% + : "Perfect"; // 100% } static unsigned int _breakpoint_rank(int val, const int breakpoints[], |