summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-util.h
diff options
context:
space:
mode:
authorDMBrownrigg <netsdanita@hotmail.com>2010-02-20 10:32:50 +1100
committerCharles Otto <ottochar@gmail.com>2010-02-19 22:31:41 -0500
commit174b6723e39cc15591dd720ad206145d822627af (patch)
tree696549f298b1d807e8042de56c56e3e94f5f9e93 /crawl-ref/source/spl-util.h
parentccdfe1ebcd64611cb3153f655833bdeca9fd6dd8 (diff)
downloadcrawl-ref-174b6723e39cc15591dd720ad206145d822627af.tar.gz
crawl-ref-174b6723e39cc15591dd720ad206145d822627af.zip
amend spell highlights
Amends and corrects spell highlighting brands. more brands are now recognised internally, which should both improve the correctness of branding, and make it more flexible wrt future changes. branding colors have been changed to be more consistant with colors used elsewhere in the interface, hopefully making the highlights more intuative to the player.
Diffstat (limited to 'crawl-ref/source/spl-util.h')
-rw-r--r--crawl-ref/source/spl-util.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/crawl-ref/source/spl-util.h b/crawl-ref/source/spl-util.h
index 6cc9cf057f..f084be215a 100644
--- a/crawl-ref/source/spl-util.h
+++ b/crawl-ref/source/spl-util.h
@@ -36,13 +36,17 @@ class dist;
enum spell_highlight_colours
{
- COL_USELESS = DARKGRAY, // ability would have no useful effect
- COL_INAPPLICABLE = DARKGRAY, // ability cannot be meanifully applied (eg, no targets)
- COL_USEFUL = LIGHTBLUE, // the palyers status makes this ability notably more useful
- COL_EMPOWERED = LIGHTBLUE, // The ability is made stronger by the player's status (unused)
- COL_FORBIDDEN = LIGHTRED, // The player's god hates this abilty
- COL_FAVORED = YELLOW, // the player's god likes this ability
- COL_KNOWN = LIGHTGRAY // the spell is known (use for spellbook_contents)
+ COL_UNKNOWN = LIGHTGRAY, // spells for which no known brand applies.
+ COL_KNOWN = LIGHTBLUE, // the spell is known (use for spellbook_contents)
+ COL_USELESS = DARKGRAY, // ability would have no useful effect
+ COL_INAPPLICABLE = COL_USELESS, // ability cannot be meanifully applied (eg, no targets)
+ COL_USEFUL = YELLOW, // the players status makes this ability notably more useful
+ COL_RISKY = MAGENTA, // The Ability is inherently risky
+ COL_FORBIDDEN = LIGHTRED, // The player's god hates this abilty
+
+ COL_EMPOWERED = LIGHTGREEN, // The ability is made stronger by the player's status
+ COL_FAVORED = GREEN // the player's god likes this ability
+
};
bool is_valid_spell(spell_type spell);
@@ -135,9 +139,15 @@ int spell_type2skill (unsigned int which_spelltype);
spell_type zap_type_to_spell(zap_type zap);
bool spell_is_useless(spell_type spell, bool transient = false);
+bool spell_is_empowered(spell_type spell);
bool spell_is_useful(spell_type spell);
+bool spell_is_known(spell_type spell);
+bool spell_is_risky(spell_type spell);
-int spell_highlight_by_utility(spell_type spell, int default_color = COL_KNOWN, bool transient = false);
+int spell_highlight_by_utility( spell_type spell,
+ int default_color = COL_UNKNOWN,
+ bool transient = false,
+ bool force_known_brand = false);
bool spell_no_hostile_in_range(spell_type spell, int minRange);
#endif