diff options
author | Nicholas Feinberg <pleasingfung@gmail.com> | 2014-04-11 08:29:44 -0700 |
---|---|---|
committer | Nicholas Feinberg <pleasingfung@gmail.com> | 2014-05-25 20:27:48 -0700 |
commit | 6f959b73ab6b07a742e45870b540a2038e405253 (patch) | |
tree | f2145783a10e15c457d8a9031eacdaee6991eed4 /crawl-ref/source/spl-util.cc | |
parent | f6d44216f86f13f3ce9a7e7ee174ecb80f4248e5 (diff) | |
download | crawl-ref-6f959b73ab6b07a742e45870b540a2038e405253.tar.gz crawl-ref-6f959b73ab6b07a742e45870b540a2038e405253.zip |
Add the Majin-Bo, a new fixedart that offers power at
a terrible price. (It's not that terrible!)
Diffstat (limited to 'crawl-ref/source/spl-util.cc')
-rw-r--r-- | crawl-ref/source/spl-util.cc | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc index 3ff9ffb7fd..e812ef0533 100644 --- a/crawl-ref/source/spl-util.cc +++ b/crawl-ref/source/spl-util.cc @@ -1190,16 +1190,25 @@ bool spell_is_useless(spell_type spell, bool transient) return false; } -// This function takes a spell, and determines what color it should be -// highlighted with. You shouldn't have to touch this unless you want -// to add new highlighting options. +/** + * Determines what color a spell should be highlighted with. + * + * @param spell The type of spell to be colored. + * @param default_color Color to be used if the spell is unremarkable. + * @param transient If true, check if spell is temporarily useless. + * @param rod_spell If the spell being evoked from a rod. + * @return The color to highlight the spell. + */ int spell_highlight_by_utility(spell_type spell, int default_color, bool transient, bool rod_spell) { // If your god hates the spell, that // overrides all other concerns - if (god_hates_spell(spell, you.religion, rod_spell)) + if (god_hates_spell(spell, you.religion, rod_spell) + || is_good_god(you.religion) && you.spellcasting_unholy()) + { return COL_FORBIDDEN; + } if (_spell_is_empowered(spell) && !rod_spell) default_color = COL_EMPOWERED; |