srzk
This commit is contained in:
parent
6893f5f78a
commit
52fe529d4e
@ -20,34 +20,34 @@ function weightedRandom(weights) {
|
||||
================================ */
|
||||
function getWeights(playerLevel) {
|
||||
if (playerLevel < 10) return [
|
||||
{ rarity: 1, weight: 85 },
|
||||
{ rarity: 2, weight: 15 },
|
||||
{ rarity: 1, weight: 95 }, // 95%
|
||||
{ rarity: 2, weight: 5 }, // 5%
|
||||
];
|
||||
if (playerLevel < 20) return [
|
||||
{ rarity: 1, weight: 65 },
|
||||
{ rarity: 2, weight: 27 },
|
||||
{ rarity: 3, weight: 8 },
|
||||
{ rarity: 1, weight: 87 }, // 87%
|
||||
{ rarity: 2, weight: 11 }, // 11%
|
||||
{ rarity: 3, weight: 2 }, // 2%
|
||||
];
|
||||
if (playerLevel < 30) return [
|
||||
{ rarity: 1, weight: 55 },
|
||||
{ rarity: 2, weight: 26 },
|
||||
{ rarity: 3, weight: 13 },
|
||||
{ rarity: 4, weight: 6 },
|
||||
{ rarity: 1, weight: 80 }, // 80%
|
||||
{ rarity: 2, weight: 14 }, // 14%
|
||||
{ rarity: 3, weight: 4 }, // 4%
|
||||
{ rarity: 4, weight: 2 }, // 2%
|
||||
];
|
||||
if (playerLevel < 40) return [
|
||||
{ rarity: 1, weight: 50 },
|
||||
{ rarity: 2, weight: 25 },
|
||||
{ rarity: 3, weight: 14 },
|
||||
{ rarity: 4, weight: 7 },
|
||||
{ rarity: 5, weight: 4 },
|
||||
{ rarity: 1, weight: 75 }, // 75%
|
||||
{ rarity: 2, weight: 16 }, // 16%
|
||||
{ rarity: 3, weight: 5 }, // 5%
|
||||
{ rarity: 4, weight: 3 }, // 3%
|
||||
{ rarity: 5, weight: 1 }, // 1%
|
||||
];
|
||||
return [
|
||||
{ rarity: 1, weight: 47 },
|
||||
{ rarity: 2, weight: 25 },
|
||||
{ rarity: 3, weight: 15 },
|
||||
{ rarity: 4, weight: 8 },
|
||||
{ rarity: 5, weight: 4.5 },
|
||||
{ rarity: 6, weight: 0.5 },
|
||||
{ rarity: 1, weight: 70 }, // 70.0%
|
||||
{ rarity: 2, weight: 18 }, // 18.0%
|
||||
{ rarity: 3, weight: 7 }, // 7.0%
|
||||
{ rarity: 4, weight: 3 }, // 3.0%
|
||||
{ rarity: 5, weight: 1.5 }, // 1.5%
|
||||
{ rarity: 6, weight: 0.5 }, // 0.5%
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user