From b3361bc9a07683bd473c8a83ed7b9f5a078b411e Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 14 Jul 2008 16:20:59 +0000 Subject: Apply inscription and random selection fixes to 0.4 trunk. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6544 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/describe.cc | 22 +++++++++++++--------- crawl-ref/source/newgame.cc | 11 +++++++---- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 9a130252d5..9799d95d9f 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -2095,18 +2095,22 @@ void inscribe_item(item_def &item, bool proper_prompt) int keyin = tolower(c_getch()); switch (keyin) { - case 'a': - // Remove previous randart inscription - _trim_randart_inscrip(item); - - if (!item.inscription.empty()) - item.inscription += ", "; - - item.inscription += ainscrip; - break; case 'c': item.inscription.clear(); break; + case 'a': + if (need_autoinscribe) + { + // Remove previous randart inscription. + _trim_randart_inscrip(item); + + if (!item.inscription.empty()) + item.inscription += ", "; + + item.inscription += ainscrip; + break; + } + // If autoinscription is impossible, prompt for an inscription instead. case 'y': { prompt = (is_inscribed ? "Add what to inscription? " diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc index d74301e19f..93fc552356 100644 --- a/crawl-ref/source/newgame.cc +++ b/crawl-ref/source/newgame.cc @@ -3852,15 +3852,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); } @@ -3996,7 +3999,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); } -- cgit v1.2.3-54-g00ecf