summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/colour.cc37
-rw-r--r--crawl-ref/source/colour.h5
-rw-r--r--crawl-ref/source/makeitem.cc8
-rw-r--r--crawl-ref/source/mon-data.h3
-rw-r--r--crawl-ref/source/mon-util.cc15
-rw-r--r--crawl-ref/source/monplace.cc5
6 files changed, 35 insertions, 38 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);
diff --git a/crawl-ref/source/colour.h b/crawl-ref/source/colour.h
index 4a6e092279..8c896d9148 100644
--- a/crawl-ref/source/colour.h
+++ b/crawl-ref/source/colour.h
@@ -34,6 +34,9 @@ enum element_type
ETC_DWARVEN, // used for colouring dwarf fabric items
ETC_ORCISH, // used for colouring orc fabric items
ETC_GILA, // gila monster colours
+ ETC_KRAKEN, // kraken colours
+ ETC_UGLY, // random ugly thing colours
+ ETC_VERY_UGLY, // random very ugly thing colours
ETC_FLOOR, // colour of the area's floor
ETC_ROCK, // colour of the area's rock
ETC_STONE, // colour of the area's stone
@@ -44,8 +47,6 @@ enum element_type
ETC_GOLD, // colour of gold
ETC_IRON, // colour of iron
ETC_BONE, // colour of bone
- ETC_UGLY, // random ugly thing colour
- ETC_VERY_UGLY, // random very ugly thing colour
ETC_RANDOM // any colour (except BLACK)
};
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index 860c464539..b51cdb41a7 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -747,13 +747,15 @@ void item_colour(item_def &item)
break;
// This one is hardly unique, but colour isn't used for
- // stacking, so we don't have to worry too much about this. -- bwr
- case RUNE_DEMONIC: // random pandemonium demonlords
+ // stacking, so we don't have to worry too much about this.
+ // - bwr
+ case RUNE_DEMONIC: // random Pandemonium lords
{
element_type types[] =
{ETC_EARTH, ETC_ELECTRICITY, ETC_ENCHANT, ETC_HEAL,
ETC_BLOOD, ETC_DEATH, ETC_UNHOLY, ETC_VEHUMET, ETC_BEOGH,
- ETC_CRYSTAL, ETC_SMOKE, ETC_DWARVEN, ETC_ORCISH, ETC_GILA};
+ ETC_CRYSTAL, ETC_SMOKE, ETC_DWARVEN, ETC_ORCISH, ETC_GILA,
+ ETC_KRAKEN, ETC_UGLY, ETC_VERY_UGLY};
item.colour = RANDOM_ELEMENT(types);
break;
diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h
index 89f2bd35a9..a4fc64e11a 100644
--- a/crawl-ref/source/mon-data.h
+++ b/crawl-ref/source/mon-data.h
@@ -935,7 +935,8 @@ static monsterentry mondata[] = {
},
{
- // old colour: black (randomly lightmagenta, magenta, lightred, or yellow)
+ // Old gila monster colour: one of ETC_GILA (randomly lightmagenta,
+ // magenta, yellow, lightred or red).
MONS_GILA_MONSTER, 'l', MAGENTA, "gila monster",
M_COLD_BLOOD,
MR_NO_FLAGS,
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 630c80823a..1b1db5653d 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -1566,25 +1566,18 @@ void define_monster(monsters &mons)
(coinflip() ? MST_DEEP_ELF_CONJURER_I : MST_DEEP_ELF_CONJURER_II);
break;
- case MONS_BUTTERFLY:
- case MONS_SPATIAL_VORTEX:
- case MONS_KILLER_KLOWN:
+ case MONS_GILA_MONSTER:
if (col != BLACK) // May be overwritten by the mon_glyph option.
break;
- col = random_colour();
+ col = element_colour(ETC_GILA);
break;
- case MONS_GILA_MONSTER:
+ case MONS_KRAKEN:
if (col != BLACK) // May be overwritten by the mon_glyph option.
break;
- temp_rand = random2(7);
-
- col = (temp_rand >= 5 ? LIGHTRED : // 2/7
- temp_rand >= 3 ? LIGHTMAGENTA : // 2/7
- temp_rand >= 1 ? MAGENTA // 1/7
- : YELLOW); // 1/7
+ col = element_colour(ETC_KRAKEN);
break;
case MONS_DRACONIAN_CALLER:
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index 76adfa699b..4bee6dcc8f 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -1127,11 +1127,6 @@ static int _place_monster_aux(const mgen_data &mg,
// it now.
if (mg.colour != BLACK)
menv[id].colour = mg.colour;
- else if (mg.cls == MONS_KRAKEN)
- {
- menv[id].colour = random_choose(GREEN, LIGHTGREEN, LIGHTCYAN,
- LIGHTBLUE, RED, LIGHTRED, MAGENTA, -1);
- }
if (mg.mname != "")
menv[id].mname = mg.mname;