diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-03 22:07:11 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-03 22:07:11 +0000 |
commit | 19283b0b952522d1d019f22fcbd35294c13c235c (patch) | |
tree | b3218c8154e017f930b11303b30f4ac5652904ff /crawl-ref/source/monplace.cc | |
parent | a32a2ae31db4aca7df3ea969b0c1ef456c0ba159 (diff) | |
download | crawl-ref-19283b0b952522d1d019f22fcbd35294c13c235c.tar.gz crawl-ref-19283b0b952522d1d019f22fcbd35294c13c235c.zip |
Fix 2008767: "random" not working for book choice option
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6375 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monplace.cc')
-rw-r--r-- | crawl-ref/source/monplace.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc index 71b2e3b58a..b25274a9aa 100644 --- a/crawl-ref/source/monplace.cc +++ b/crawl-ref/source/monplace.cc @@ -205,7 +205,7 @@ static void _hell_spawn_random_monsters() if (env.turns_on_level > taper_off_turn) { genodds += (env.turns_on_level - taper_off_turn); - genodds = (genodds < 0? 20000 : std::min(genodds, 20000)); + genodds = (genodds < 0 ? 20000 : std::min(genodds, 20000)); } if (one_chance_in(genodds)) @@ -517,7 +517,6 @@ static int _is_near_stairs(coord_def &p) int result = 0; for (int i = -1; i <= 1; ++i) - { for (int j = -1; j <= 1; ++j) { if (!in_bounds(p)) @@ -536,9 +535,8 @@ static int _is_near_stairs(coord_def &p) result = (p == you.pos()) ? 2 : 1; } } - } - return result; + return (result); } int place_monster(mgen_data mg, bool force_pos) |