diff options
Diffstat (limited to 'crawl-ref/source/mapdef.cc')
-rw-r--r-- | crawl-ref/source/mapdef.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc index 8dadc81c8f..c446f6d969 100644 --- a/crawl-ref/source/mapdef.cc +++ b/crawl-ref/source/mapdef.cc @@ -1907,6 +1907,18 @@ mons_list::mons_spec_slot mons_list::parse_mons_spec(std::string spec) mspec.fix_mons = strip_tag(s, "fix_mons"); mspec.generate_awake = strip_tag(s, "generate_awake"); + std::string colour = strip_tag_prefix(s, "col:"); + if (!colour.empty()) + { + mspec.colour = str_to_colour(colour, BLACK); + if (mspec.colour == BLACK) + { + error = make_stringf("bad monster colour \"%s\" in \"%s\"", + colour.c_str(), specs[i].c_str()); + return (slot); + } + } + trim_string(s); if (s == "8") |