summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-26 21:12:57 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-26 21:12:57 +0000
commit4cad928d655daaef8b3d83de1a47cd3b7b92b4f0 (patch)
tree21db05fe45f3e45825f7e8cabd7f1092dd3a9980 /crawl-ref/source/misc.cc
parent04ad46b90c0282aba6a74397538c340b8a0d4d69 (diff)
downloadcrawl-ref-4cad928d655daaef8b3d83de1a47cd3b7b92b4f0.tar.gz
crawl-ref-4cad928d655daaef8b3d83de1a47cd3b7b92b4f0.zip
Outsource more miscellaneous names besides colors (glowing color types,
writing types for Tomes of Destruction), and move them into their own file. Also, tweak the message for glowing colors used by scrolls of random uselessness so that they no longer have to start with consonants. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5269 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r--crawl-ref/source/misc.cc67
1 files changed, 4 insertions, 63 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 4f319c0721..0d098adaed 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -2374,9 +2374,9 @@ void new_level(void)
#endif
}
-static std::string weird_colour()
+std::string weird_glowing_colour()
{
- std::string result = getRandNameString("colour_name");
+ std::string result = getRandNameString("glowing_colour_name");
lowercase(result);
@@ -2385,44 +2385,9 @@ static std::string weird_colour()
std::string weird_writing()
{
- int temp_rand; // for probability determinations {dlb}
- std::string result;
+ std::string result = getRandNameString("writing_name");
- temp_rand = random2(14);
- result =
- (temp_rand == 0) ? "writhing" :
- (temp_rand == 1) ? "bold" :
- (temp_rand == 2) ? "faint" :
- (temp_rand == 3) ? "spidery" :
- (temp_rand == 4) ? "blocky" :
- (temp_rand == 5) ? "angular" :
- (temp_rand == 6) ? "shimmering" :
- (temp_rand == 7) ? "glowing" :
- (temp_rand == 8) ? "pulsating" :
- (temp_rand == 9) ? "sinuous"
- : "";
-
- if (!result.empty())
- result += ' ';
-
- result += weird_colour();
-
- result += ' ';
-
- temp_rand = random2(14);
-
- result +=
- (temp_rand == 0) ? "writing" :
- (temp_rand == 1) ? "scrawl" :
- (temp_rand == 2) ? "sigils" :
- (temp_rand == 3) ? "runes" :
- (temp_rand == 4) ? "hieroglyphics" :
- (temp_rand == 5) ? "figures" :
- (temp_rand == 6) ? "print-out" :
- (temp_rand == 7) ? "binary code" :
- (temp_rand == 8) ? "glyphs" :
- (temp_rand == 9) ? "symbols"
- : "text";
+ lowercase(result);
return result;
}
@@ -2439,30 +2404,6 @@ bool scramble(void)
return true;
} // end scramble()
-std::string weird_glow_colour()
-{
- int temp_rand; // for probability determinations {dlb}
- std::string result;
-
- // Must start with a consonant!
- temp_rand = random2(8);
- result =
- (temp_rand == 0) ? "brilliant" :
- (temp_rand == 1) ? "pale" :
- (temp_rand == 2) ? "mottled" :
- (temp_rand == 3) ? "shimmering" :
- (temp_rand == 4) ? "bright" :
- (temp_rand == 5) ? "dark" :
- (temp_rand == 6) ? "shining"
- : "faint";
-
- result += ' ';
-
- result += weird_colour();
-
- return result;
-}
-
bool go_berserk(bool intentional)
{
if (!you.can_go_berserk(intentional))