diff options
author | Neil Moore <neil@s-z.org> | 2014-07-04 14:47:25 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2014-07-04 14:50:17 -0400 |
commit | cd56c43f5f521a65129bce5d809650d16fa37553 (patch) | |
tree | d491831eba780956bd49cedd46c7e8af3b80457d /crawl-ref/source/items.cc | |
parent | 9f6866c02e9a87294b6d9e8d2179736c080ff7f3 (diff) | |
download | crawl-ref-cd56c43f5f521a65129bce5d809650d16fa37553.tar.gz crawl-ref-cd56c43f5f521a65129bce5d809650d16fa37553.zip |
Refactor bernoulli a bit.
Implement bernoulli in terms of decimal_chance, and change one trivial
bernoulli call (ntrials = 1.0) into a direct decimal_chance call.
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r-- | crawl-ref/source/items.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 2a3e0f5d8d..949206e20e 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -1752,7 +1752,7 @@ int move_item_to_player(int obj, int quant_got, bool quiet) int goldify = 0; for (int i = 0; i < quant_got; i++) - if (bernoulli(1.0, prob)) + if (decimal_chance(prob)) goldify++; if (goldify > 0) |