diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-19 23:13:26 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-19 23:13:26 +0000 |
commit | 9ba57ee3a6f72308ff01263dfe143cf23c1cf321 (patch) | |
tree | 968cb123684f700f4a612804f8670b0e8e049a93 /crawl-ref/source/decks.cc | |
parent | 003c3dc779fbd0ba44bc4fafadafb45db537fda7 (diff) | |
download | crawl-ref-9ba57ee3a6f72308ff01263dfe143cf23c1cf321.tar.gz crawl-ref-9ba57ee3a6f72308ff01263dfe143cf23c1cf321.zip |
Fixes to compile with Visual C++. Moved direct.cc and direct.h to directn.* to avoid conflict with VC++ direct.h header.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4390 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/decks.cc')
-rw-r--r-- | crawl-ref/source/decks.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc index a22534197a..3d7740277e 100644 --- a/crawl-ref/source/decks.cc +++ b/crawl-ref/source/decks.cc @@ -819,7 +819,7 @@ bool deck_peek() already_seen++; // always increase if seen 2, 50% increase if seen 1 - if ( coinflip() < already_seen) + if ( already_seen && random2(2) < already_seen ) deck.props["non_brownie_draws"]++; mprf("You draw two cards from the deck. They are: %s and %s.", @@ -2004,7 +2004,7 @@ const mutation_type bad_mutations[] = { bool _has_bad_mutation() { - for ( unsigned int i = 0; i < ARRAYSIZE(bad_mutations); ++i ) + for ( unsigned int i = 0; i < ARRAYSZ(bad_mutations); ++i ) if (you.mutation[bad_mutations[i]] > you.demon_pow[bad_mutations[i]]) return true; @@ -2015,7 +2015,7 @@ static void _remove_bad_mutation() { mutation_type which_mut = NUM_MUTATIONS; int numfound = 0; - for ( unsigned int i = 0; i < ARRAYSIZE(bad_mutations); ++i ) + for ( unsigned int i = 0; i < ARRAYSZ(bad_mutations); ++i ) if (you.mutation[bad_mutations[i]] > you.demon_pow[bad_mutations[i]]) { if ( one_chance_in(++numfound) ) |