diff options
-rw-r--r-- | crawl-ref/source/dat/database/rand_all.txt | 54 | ||||
-rw-r--r-- | crawl-ref/source/misc.cc | 35 |
2 files changed, 56 insertions, 33 deletions
diff --git a/crawl-ref/source/dat/database/rand_all.txt b/crawl-ref/source/dat/database/rand_all.txt index 23b021e16c..19df759b83 100644 --- a/crawl-ref/source/dat/database/rand_all.txt +++ b/crawl-ref/source/dat/database/rand_all.txt @@ -189,14 +189,66 @@ Eternity %%%% colour_name +Aubergine + +Azure + +Beige + +Black + Blue -Red +Bronze + +Brown + +Charcoal + +Chartreuse + +Cyan + +Gold + +Green + +Grey + +Indigo + +Leaf Green + +Lime Green + +Magenta + +Marigold + +Mauve + +Ochre Orange +Pink + Purple +Red + +Rubric + +Scarlet + +Silver + +Umber + +White + +Yellow + %%%% sky_or_light diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index e7e8405c53..4f319c0721 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -44,6 +44,7 @@ #include "chardump.h" #include "clua.h" #include "cloud.h" +#include "database.h" #include "delay.h" #include "directn.h" #include "dgnevent.h" @@ -2375,39 +2376,9 @@ void new_level(void) static std::string weird_colour() { - int temp_rand; // for probability determinations {dlb} - std::string result; + std::string result = getRandNameString("colour_name"); - temp_rand = random2(27); - result = - (temp_rand == 0) ? "red" : - (temp_rand == 1) ? "purple" : - (temp_rand == 2) ? "orange" : - (temp_rand == 3) ? "green" : - (temp_rand == 4) ? "magenta" : - (temp_rand == 5) ? "black" : - (temp_rand == 6) ? "blue" : - (temp_rand == 7) ? "grey" : - (temp_rand == 8) ? "umber" : - (temp_rand == 9) ? "charcoal" : - (temp_rand == 10) ? "bronze" : - (temp_rand == 11) ? "silver" : - (temp_rand == 12) ? "gold" : - (temp_rand == 13) ? "pink" : - (temp_rand == 14) ? "yellow" : - (temp_rand == 15) ? "white" : - (temp_rand == 16) ? "brown" : - (temp_rand == 17) ? "cyan" : - (temp_rand == 18) ? "aubergine" : - (temp_rand == 19) ? "ochre" : - (temp_rand == 20) ? "leaf green" : - (temp_rand == 21) ? "mauve" : - (temp_rand == 22) ? "azure" : - (temp_rand == 23) ? "lime green" : - (temp_rand == 24) ? "scarlet" : - (temp_rand == 25) ? "chartreuse" : - (temp_rand == 26) ? "rubric" - : "colourless"; + lowercase(result); return result; } |