summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/newgame.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-14 16:14:41 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-14 16:14:41 +0000
commite0b40c1af2042d933632a3534fea29f8c1243abb (patch)
tree9c330b80057b42ff169a97e334a6a7dc2766cd28 /crawl-ref/source/newgame.cc
parentd0fa191c0aefba806831fd1bc30f85f904b90b42 (diff)
downloadcrawl-ref-e0b40c1af2042d933632a3534fea29f8c1243abb.tar.gz
crawl-ref-e0b40c1af2042d933632a3534fea29f8c1243abb.zip
Fix 2018066: Crash when "autoinscribing" non-artefacts.
Fix 2017743: Game hanging for "good random choices" for Thieves/Wanderers git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6543 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/newgame.cc')
-rw-r--r--crawl-ref/source/newgame.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index 56ca66ae1f..e3bca59230 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -3851,15 +3851,18 @@ spec_query:
bool randrace = (good_randrace || keyn == '*');
if (randrace)
{
+ if (you.char_class == JOB_THIEF || you.char_class == JOB_WANDERER)
+ good_randrace = false;
+
int index;
do
{
index = random2(num_species);
}
while (!_is_species_valid_choice(_get_species(index), false)
- || (you.char_class != JOB_UNKNOWN
- && !_is_good_combination(_get_species(index), you.char_class,
- good_randrace)));
+ || you.char_class != JOB_UNKNOWN
+ && !_is_good_combination(_get_species(index), you.char_class,
+ good_randrace));
keyn = index_to_letter(index);
}
@@ -3995,7 +3998,7 @@ job_query:
{
cprintf(EOL
"Space - Choose species first; * - Random class; "
- "+ - Good random" EOL
+ "+ - Good random class" EOL
"! - Random character; # - Good random character; X - Quit"
EOL);
}