summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/colour.cc
diff options
context:
space:
mode:
authorDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-10-31 09:12:59 -0500
committerDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-10-31 09:12:59 -0500
commitd7c6fd9aec5ddd130a171adfaede50666f31a326 (patch)
tree65e4c561b113f607b1fa58a841a4162e64ec3a52 /crawl-ref/source/colour.cc
parentebd817b97aee46e383185f99d022fb9c559033d9 (diff)
downloadcrawl-ref-d7c6fd9aec5ddd130a171adfaede50666f31a326.tar.gz
crawl-ref-d7c6fd9aec5ddd130a171adfaede50666f31a326.zip
Ensure that ugly things' colors are always low, just in case, and use
random_colour() for ETC_RANDOM.
Diffstat (limited to 'crawl-ref/source/colour.cc')
-rw-r--r--crawl-ref/source/colour.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/colour.cc b/crawl-ref/source/colour.cc
index cbdd536886..5f09388af8 100644
--- a/crawl-ref/source/colour.cc
+++ b/crawl-ref/source/colour.cc
@@ -258,12 +258,12 @@ int element_colour( int element, bool no_random )
case ETC_UGLY:
case ETC_VERY_UGLY:
ret = ugly_thing_random_colour();
- if (element == ETC_VERY_UGLY)
- ret = make_high_colour(ret);
+ ret = (element == ETC_VERY_UGLY) ? make_high_colour(ret)
+ : make_low_colour(ret);
break;
case ETC_RANDOM:
- ret = 1 + random2(15); // always random
+ ret = random_colour(); // always random
break;
case ETC_FLOOR: // should already be handled