summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/maps.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/maps.cc')
-rw-r--r--crawl-ref/source/maps.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/maps.cc b/crawl-ref/source/maps.cc
index 426136969b..1eb3685d0a 100644
--- a/crawl-ref/source/maps.cc
+++ b/crawl-ref/source/maps.cc
@@ -376,7 +376,7 @@ int random_map_for_place(const level_id &place, bool want_minivault)
{
rollsize += vdefs[i].chance;
- if (rollsize && random2(rollsize) < vdefs[i].chance)
+ if (rollsize && x_chance_in_y(vdefs[i].chance, rollsize))
mapindex = i;
}
}
@@ -417,7 +417,7 @@ int random_map_in_depth(const level_id &place, bool want_minivault)
{
rollsize += vdefs[i].chance;
- if (rollsize && random2(rollsize) < vdefs[i].chance)
+ if (rollsize && x_chance_in_y(vdefs[i].chance, rollsize))
mapindex = i;
}
@@ -444,7 +444,7 @@ int random_map_for_tag(const std::string &tag,
{
rollsize += vdefs[i].chance;
- if (rollsize && random2(rollsize) < vdefs[i].chance)
+ if (rollsize && x_chance_in_y(vdefs[i].chance, rollsize))
mapindex = i;
}
}