diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-09-18 06:52:42 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-09-18 06:52:42 +0000 |
commit | 9f751c796fa4ca1c22e66d4f31f293c0ea1955b6 (patch) | |
tree | 4d300ceda8beba72814a2de26bc723a911e67391 /crawl-ref/source/stuff.cc | |
parent | a06edf5979429958d25705d9ea9a93e8a97da45d (diff) | |
download | crawl-ref-9f751c796fa4ca1c22e66d4f31f293c0ea1955b6.tar.gz crawl-ref-9f751c796fa4ca1c22e66d4f31f293c0ea1955b6.zip |
Implement part of [2837033]: Randomize colors, resistances, and attack
types/flavors for ugly things. They now use the ghost_demon struct,
expanded to account for these characteristics.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10709 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/stuff.cc')
-rw-r--r-- | crawl-ref/source/stuff.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc index b9b55300eb..89ac13703f 100644 --- a/crawl-ref/source/stuff.cc +++ b/crawl-ref/source/stuff.cc @@ -1340,6 +1340,22 @@ unsigned char random_uncommon_colour() return (result); } +unsigned char make_low_colour(unsigned char colour) +{ + if (colour >= 8 && colour <= 15) + return (colour - 8); + + return (colour); +} + +unsigned char make_high_colour(unsigned char colour) +{ + if (colour >= 0 && colour <= 7) + return (colour + 8); + + return (colour); +} + // returns if a colour is one of the special element colours (ie not regular) bool is_element_colour( int col ) { |