summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/colour.cc
diff options
context:
space:
mode:
authorDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-01 11:50:21 -0600
committerDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-01 11:51:07 -0600
commitfde948014517c0486207e6b369e777502f2e5511 (patch)
tree9bc5586a4b158cc316692f337b9f25cb76bc586a /crawl-ref/source/colour.cc
parent1fb4a8139f535478e97e7b2fda9c81208b586804 (diff)
downloadcrawl-ref-fde948014517c0486207e6b369e777502f2e5511.tar.gz
crawl-ref-fde948014517c0486207e6b369e777502f2e5511.zip
Add various color-related fixes.
Diffstat (limited to 'crawl-ref/source/colour.cc')
-rw-r--r--crawl-ref/source/colour.cc37
1 files changed, 21 insertions, 16 deletions
diff --git a/crawl-ref/source/colour.cc b/crawl-ref/source/colour.cc
index 5f09388af8..896075b8d4 100644
--- a/crawl-ref/source/colour.cc
+++ b/crawl-ref/source/colour.cc
@@ -218,15 +218,27 @@ int element_colour( int element, bool no_random )
: RED;
break;
+ case ETC_KRAKEN:
+ ret = random_choose(GREEN, LIGHTGREEN, LIGHTCYAN, LIGHTBLUE, RED,
+ LIGHTRED, MAGENTA, -1);
+ break;
+
+ case ETC_UGLY:
+ case ETC_VERY_UGLY:
+ ret = ugly_thing_random_colour();
+ ret = (element == ETC_VERY_UGLY) ? make_high_colour(ret)
+ : make_low_colour(ret);
+ break;
+
case ETC_STONE:
- if (player_in_branch( BRANCH_HALL_OF_ZOT ))
+ if (player_in_branch(BRANCH_HALL_OF_ZOT))
ret = env.rock_colour;
else
ret = LIGHTGREY;
break;
case ETC_MIST:
- ret = tmp_rand < 100? CYAN : BLUE;
+ ret = (tmp_rand < 100) ? CYAN : BLUE;
break;
case ETC_SHIMMER_BLUE:
@@ -255,13 +267,6 @@ int element_colour( int element, bool no_random )
ret = (tmp_rand < 90) ? WHITE : LIGHTGREY;
break;
- case ETC_UGLY:
- case ETC_VERY_UGLY:
- ret = ugly_thing_random_colour();
- ret = (element == ETC_VERY_UGLY) ? make_high_colour(ret)
- : make_low_colour(ret);
- break;
-
case ETC_RANDOM:
ret = random_colour(); // always random
break;
@@ -335,13 +340,13 @@ int str_to_colour( const std::string &str, int default_colour,
static const std::string element_cols[] =
{
- "fire", "ice", "earth", "electricity", "air", "poison",
- "water", "magic", "mutagenic", "warp", "enchant", "heal",
- "holy", "dark", "death", "necro", "unholy", "vehumet",
- "beogh", "crystal", "blood", "smoke", "slime", "jewel",
- "elven", "dwarven", "orcish", "gila", "floor", "rock",
- "stone", "mist", "shimmer_blue", "decay", "silver", "gold",
- "iron", "bone", "ugly", "very_ugly", "random"
+ "fire", "ice", "earth", "electricity", "air", "poison", "water",
+ "magic", "mutagenic", "warp", "enchant", "heal", "holy", "dark",
+ "death", "necro", "unholy", "vehumet", "beogh", "crystal",
+ "blood", "smoke", "slime", "jewel", "elven", "dwarven",
+ "orcish", "gila", "kraken", "ugly", "very_ugly", "floor",
+ "rock", "stone", "mist", "shimmer_blue", "decay", "silver",
+ "gold", "iron", "bone", "random"
};
ASSERT(ARRAYSZ(element_cols) == (ETC_RANDOM - ETC_FIRE) + 1);