drops are randomly selected, not based on user values fixes #7929

This commit is contained in:
Thomas Gamble
2016-09-10 10:37:15 -07:00
committed by Blade Barringer
parent b54441a637
commit 4d5b6992be
3 changed files with 46 additions and 104 deletions

View File

@@ -3,7 +3,6 @@ import content from '../content/index';
import i18n from '../i18n';
import { daysSince } from '../cron';
import { diminishingReturns } from '../statHelpers';
import _predictableRandom from './predictableRandom';
import randomVal from './randomVal';
// Clone a drop object maintaining its functions so that we can change it without affecting the original item
@@ -21,7 +20,7 @@ module.exports = function randomDrop (user, options, req = {}) {
let rarity;
let task;
let predictableRandom = options.predictableRandom || _predictableRandom;
let predictableRandom = options.predictableRandom || Math.random;
task = options.task;
chance = _.min([Math.abs(task.value - 21.27), 37.5]) / 150 + 0.02;