Randomize roll duration more precisely
authorNicholas Feinberg <pleasingfung@gmail.com>
Thu, 22 Oct 2020 21:49:08 +0000 (14:49 -0700)
committerNicholas Feinberg <pleasingfung@gmail.com>
Thu, 22 Oct 2020 21:53:20 +0000 (14:53 -0700)
Don't round to integer player turns. (This mostly doesn't matter,
but it's nice.)

crawl-ref/source/mon-ench.cc

index ec815c7..ae68894 100644 (file)
@@ -2345,7 +2345,7 @@ int mon_enchant::calc_duration(const monster* mons,
     case ENCH_BERSERK:
         return (16 + random2avg(13, 2)) * 10;
     case ENCH_ROLLING:
-        return random_range(10, 15) * BASELINE_DELAY;
+        return random_range(10 * BASELINE_DELAY, 15 * BASELINE_DELAY);
     case ENCH_WRETCHED:
         cturn = (20 + roll_dice(3, 10)) * 10 / _mod_speed(10, mons->speed);
         break;