diff options
author | Neil Moore <neil@s-z.org> | 2013-06-10 17:56:41 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2013-06-10 18:12:07 -0400 |
commit | 5f25d29f6a41b7b9d66fb1568f33b2000f1b9231 (patch) | |
tree | e2abc814acab69fd5d523c4cc98282a56c4be319 /crawl-ref/source/newgame.cc | |
parent | d56ea2009174d8748078d6e12e7190202db448e6 (diff) | |
download | crawl-ref-5f25d29f6a41b7b9d66fb1568f33b2000f1b9231.tar.gz crawl-ref-5f25d29f6a41b7b9d66fb1568f33b2000f1b9231.zip |
Assert if we randomly choose a removed job.
Removed jobs should be marked as banned for all races. If they were not
banned, it would have been possible to get that job by choosing a race
and then requesting a random background, or by requesting a random
character.
Diffstat (limited to 'crawl-ref/source/newgame.cc')
-rw-r--r-- | crawl-ref/source/newgame.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc index 686fa49cbc..daefd44a0f 100644 --- a/crawl-ref/source/newgame.cc +++ b/crawl-ref/source/newgame.cc @@ -323,6 +323,7 @@ static void _resolve_job(newgame_def* ng, const newgame_def* ng_choice) if (is_good_combination(ng->species, job, false) && one_chance_in(++good_choices)) { + ASSERT(_is_job_valid_choice(job)); ng->job = job; } } |