diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-29 13:31:45 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-29 13:31:45 +0000 |
commit | 8c38a749feba7593d146377ac6e4b090f8228e64 (patch) | |
tree | 6669be5ff4f09369c112a9414601eed81edc9d25 /crawl-ref/source/newgame.cc | |
parent | d1a6e695915d4d649f3517f4c131f940c7aacc8f (diff) | |
download | crawl-ref-8c38a749feba7593d146377ac6e4b090f8228e64.tar.gz crawl-ref-8c38a749feba7593d146377ac6e4b090f8228e64.zip |
Fix good random secondary choices during character selection.
Re-enable quivering with '(' - still buggy, and I'm trying to work out
why, but at least it works for some ammo now.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6218 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/newgame.cc')
-rw-r--r-- | crawl-ref/source/newgame.cc | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc index 8d9f047682..9e97a0b439 100644 --- a/crawl-ref/source/newgame.cc +++ b/crawl-ref/source/newgame.cc @@ -2115,10 +2115,10 @@ static bool _choose_book( item_def& book, int firstbook, int numbooks ) } if (!good_choices) - keyin = random2(numbooks) + 'a'; + keyin = random2(numbooks); } - book.sub_type = firstbook + keyin - 'a'; + book.sub_type = firstbook + keyin; return (true); } @@ -2311,8 +2311,8 @@ static bool _choose_weapon() } } while (keyin != '*' && keyin != '+' - && (keyin < 'a' || keyin > ('a' + num_choices)) - || startwep_restrictions[keyin - 'a'] == CC_BANNED); + && (keyin < 'a' || keyin > ('a' + num_choices) + || startwep_restrictions[keyin - 'a'] == CC_BANNED)); if (keyin != '*' && keyin != '+' @@ -2323,8 +2323,8 @@ static bool _choose_weapon() } } - if (Options.random_pick || Options.weapon == WPN_RANDOM || keyin == '*' - || keyin == '+') + if (Options.random_pick || Options.weapon == WPN_RANDOM + || keyin == '*' || keyin == '+') { Options.weapon = WPN_RANDOM; ng_weapon = WPN_RANDOM; @@ -2334,7 +2334,7 @@ static bool _choose_weapon() { for (int i = 0; i < num_choices; i++) { - if (_weapon_restriction(startwep[keyin]) == CC_UNRESTRICTED + if (_weapon_restriction(startwep[i]) == CC_UNRESTRICTED && one_chance_in(++good_choices)) { keyin = i; @@ -2352,8 +2352,8 @@ static bool _choose_weapon() if (x > -2) break; } - keyin += 'a'; } + keyin += 'a'; } else ng_weapon = startwep[keyin - 'a']; @@ -4827,7 +4827,10 @@ bool _give_items_skills() // fall-through for random case '+': if (keyn == '+' && !_has_good_necromancy_apts()) + { choice = DK_YREDELEMNUL; + break; + } // fall-through for random case '*': choice = coinflip()? DK_NECROMANCY : DK_YREDELEMNUL; |