diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-11-28 10:32:48 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-11-28 10:32:48 +0000 |
commit | 63ac65ab46e2c2bdde0c9875bcef6a98463913f7 (patch) | |
tree | 9be0673ddac5f3be35bfb1f504ffb1fb0f7d3e0a | |
parent | cca0fc06c3898393b7328041a07941a68d0d50d0 (diff) | |
download | crawl-ref-63ac65ab46e2c2bdde0c9875bcef6a98463913f7.tar.gz crawl-ref-63ac65ab46e2c2bdde0c9875bcef6a98463913f7.zip |
Gave boots, gloves and helmets specific colours instead of cyan
(magenta, red and green, specifically.) I'm no designer - speak
up if you want these colours changed.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@522 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r-- | crawl-ref/source/dungeon.cc | 18 | ||||
-rw-r--r-- | crawl-ref/source/stuff.cc | 10 | ||||
-rw-r--r-- | crawl-ref/source/stuff.h | 1 |
3 files changed, 20 insertions, 9 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index f819054e5d..40b4281d88 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -6012,16 +6012,12 @@ void item_colour( item_def &item ) switch (item.sub_type) { - case ARM_ROBE: - do { - item.colour = random_colour(); - } while ( item.colour == LIGHTCYAN ); - break; case ARM_CLOAK: + case ARM_ROBE: case ARM_NAGA_BARDING: case ARM_CENTAUR_BARDING: case ARM_CAP: - item.colour = random_colour(); + item.colour = random_uncommon_colour(); break; case ARM_HELMET: @@ -6029,14 +6025,18 @@ void item_colour( item_def &item ) if (get_helmet_type(item) == THELM_CAP || get_helmet_type(item) == THELM_WIZARD_HAT) { - item.colour = random_colour(); + item.colour = random_uncommon_colour(); } else - item.colour = LIGHTCYAN; + item.colour = GREEN; break; - case ARM_BOOTS: // maybe more interesting boot colours? + case ARM_BOOTS: + item.colour = RED; + break; case ARM_GLOVES: + item.colour = MAGENTA; + break; case ARM_LEATHER_ARMOUR: item.colour = BROWN; break; diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc index bb9c8214dd..9e25382662 100644 --- a/crawl-ref/source/stuff.cc +++ b/crawl-ref/source/stuff.cc @@ -920,6 +920,16 @@ unsigned char random_colour(void) return (1 + random2(15)); } // end random_colour() +unsigned char random_uncommon_colour() +{ + unsigned char result; + do { + result = random_colour(); + } while ( result == LIGHTCYAN || result == CYAN || result == BROWN ); + return result; +} + + // returns if a colour is one of the special element colours (ie not regular) bool is_element_colour( int col ) { diff --git a/crawl-ref/source/stuff.h b/crawl-ref/source/stuff.h index c05231ceb5..2356eeb5d4 100644 --- a/crawl-ref/source/stuff.h +++ b/crawl-ref/source/stuff.h @@ -78,6 +78,7 @@ bool silenced(char x, char y); bool player_can_hear(char x, char y); unsigned char random_colour(void); +unsigned char random_uncommon_colour(); bool is_element_colour( int col ); int element_colour( int element, bool no_random = false ); |