diff options
author | Michael Gagno <evilmike@gmail.com> | 2012-01-12 12:02:24 -0800 |
---|---|---|
committer | Michael Gagno <evilmike@gmail.com> | 2012-01-12 13:35:08 -0800 |
commit | 8caa010adc6c684ba827a465653602ef7185e3ee (patch) | |
tree | feff3ea8738bb1812f91c256e4ff17540b7dbce4 /crawl-ref/source/tilereg-mem.cc | |
parent | 126d714ca34eb8afe950a8ca147d9ee23190b8c3 (diff) | |
download | crawl-ref-8caa010adc6c684ba827a465653602ef7185e3ee.tar.gz crawl-ref-8caa010adc6c684ba827a465653602ef7185e3ee.zip |
Replace success adjectives with failure rate percentages. (dtsund)
This is slightly modified from the patch submitted here:
https://crawl.develz.org/mantis/view.php?id=5179
The original patch uses fractions instead of percentages, but I found this
to be quite visually cluttered and unhelpful.
After much fretting about the best way to implement this, I settled on
rounding up to 1% if your failure rate is below 1% but above 0. I tried some
alternatives, but I find this way to be the easiest for me to visually parse
at a quick glance at my spell list. If this is unideal, it's very easy to
change.
Diffstat (limited to 'crawl-ref/source/tilereg-mem.cc')
-rw-r--r-- | crawl-ref/source/tilereg-mem.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crawl-ref/source/tilereg-mem.cc b/crawl-ref/source/tilereg-mem.cc index 31e92a4c40..8840b8d6e0 100644 --- a/crawl-ref/source/tilereg-mem.cc +++ b/crawl-ref/source/tilereg-mem.cc @@ -40,12 +40,14 @@ void MemoriseRegion::draw_tag() return; const spell_type spell = (spell_type) idx; + char* failure = failure_rate_to_string(spell_fail(spell)); std::string desc = make_stringf("%s (%s) %d/%d spell slot%s", spell_title(spell), - failure_rate_to_string(spell_fail(spell)), + failure, spell_levels_required(spell), player_spell_levels(), spell_levels_required(spell) > 1 ? "s" : ""); + free(failure); draw_desc(desc.c_str()); } |