diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-04-09 15:30:30 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-04-09 15:30:30 +0000 |
commit | 1798905e716ab714da4ec70262532988b58356cd (patch) | |
tree | 12e1fa445562b6840492ae4f6acabed0199f3ab5 /crawl-ref/source/dungeon.cc | |
parent | 55826a15202764602ab3ad81cdeb3dd37ee9cb0b (diff) | |
download | crawl-ref-1798905e716ab714da4ec70262532988b58356cd.tar.gz crawl-ref-1798905e716ab714da4ec70262532988b58356cd.zip |
Added ice statues.
Monster spells now use spell_type instead of the old mon_spell_type.
Fixed buggy behaviour when banished from Labyrinth.
DGL_WHEREIS was not including current time, fixed.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1275 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/dungeon.cc')
-rw-r--r-- | crawl-ref/source/dungeon.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index a1aa225703..c7a780606e 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -6519,12 +6519,13 @@ static int newwave_weapon_colour(const item_def &item) int item_colour = BLACK; // fixed artefacts get predefined colours - char *itname = (char*) item_name( item, DESC_PLAIN ); - char *item_runed = strstr( strlwr(itname), strlwr((char*) "runed") ); - char *heav_runed = strstr( strlwr(itname), strlwr((char*) "heavily") ); + std::string itname = item_name( item, DESC_PLAIN ); + lowercase(itname); + + const bool item_runed = itname.find(" runed ") != std::string::npos; + const bool heav_runed = itname.find(" heavily ") != std::string::npos; - if ( is_random_artefact(item) && - (item_runed == NULL || heav_runed != NULL) ) + if ( is_random_artefact(item) && (!item_runed || heav_runed) ) return exciting_colour(); if (is_range_weapon( item )) |