diff options
author | Neil Moore <neil@s-z.org> | 2012-12-18 23:15:54 -0500 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2012-12-18 23:15:54 -0500 |
commit | fbab18d99fc648b866ed0b86a8be20abb9827783 (patch) | |
tree | 6b2beda0906bacbb7ae3218a7943c871f6cc3bc4 /crawl-ref/source/skill_menu.cc | |
parent | dd46fde7bb0cebaa6a3023034597f1026e44f6da (diff) | |
download | crawl-ref-fbab18d99fc648b866ed0b86a8be20abb9827783.tar.gz crawl-ref-fbab18d99fc648b866ed0b86a8be20abb9827783.zip |
Show manual bonus even alongside antitraining '*'.
Fixes #6457. (Or at least the visual part)
Diffstat (limited to 'crawl-ref/source/skill_menu.cc')
-rw-r--r-- | crawl-ref/source/skill_menu.cc | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/crawl-ref/source/skill_menu.cc b/crawl-ref/source/skill_menu.cc index 1cd546d35c..417537ce0a 100644 --- a/crawl-ref/source/skill_menu.cc +++ b/crawl-ref/source/skill_menu.cc @@ -348,30 +348,34 @@ void SkillMenuEntry::set_aptitude() text += "</white>"; - if (antitrain_other(m_sk, show_all) || is_antitrained(m_sk)) + if (antitrain_other(m_sk, show_all)) { skm.set_flag(SKMF_ANTITRAIN); - text += "<red>"; - text += antitrain_other(m_sk, show_all) ? "*" : " "; - if (is_antitrained(m_sk)) - text += make_stringf("%d", ct_bonus - 4); + text += "<red>*</red>"; + } + else if (crosstrain_other(m_sk, show_all)) + { + skm.set_flag(SKMF_CROSSTRAIN); + text += "<green>*</green>"; + } + else + text += " "; - text += "</red>"; + if (is_antitrained(m_sk)) + { + skm.set_flag(SKMF_ANTITRAIN); + text += make_stringf("<red>%d</red>", ct_bonus - 4); } - else if (crosstrain_other(m_sk, show_all) || ct_bonus) + else if (ct_bonus) { skm.set_flag(SKMF_CROSSTRAIN); text += manual ? "<lightgreen>" : "<green>"; - text += crosstrain_other(m_sk, show_all) ? "*" : " "; - if (ct_bonus) - { - // Only room for two characters. - if (ct_bonus < 10) - text += make_stringf("+%d", ct_bonus); - else - text += make_stringf("%d", ct_bonus); - } + // Only room for two characters. + if (ct_bonus < 10) + text += make_stringf("+%d", ct_bonus); + else + text += make_stringf("%d", ct_bonus); text += manual ? "</lightgreen>" : "</green>"; } |