summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 3057aedbbf..4ded8c08f8 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -5954,10 +5954,10 @@ bool player::alive() const
bool player::fumbles_attack(bool verbose)
{
- // fumbling in shallow water <early return>:
+ // Fumbling in shallow water.
if (floundering())
{
- if (random2(dex) < 4 || one_chance_in(5))
+ if (x_chance_in_y(4, dex) || one_chance_in(5))
{
if (verbose)
mpr("Unstable footing causes you to fumble your attack.");
@@ -6008,9 +6008,9 @@ void player::attacking(actor *other)
pet_target = monster_index(mon);
}
- if (mutation[MUT_BERSERK]
- && (random2(100) < (mutation[MUT_BERSERK] * 10) - 5)
- || _equipment_make_berserk())
+ if (player_mutation_level(MUT_BERSERK)
+ && x_chance_in_y(player_mutation_level(MUT_BERSERK) * 10 - 5, 100)
+ || _equipment_make_berserk())
{
go_berserk(false);
}