末日危机2修改物品爆率
F12,在控制台直接复制进去回车即可,所有物品爆率平均(function setAllEven() { if (!Array.isArray(window.Vv) || Vv.length < 5) return console.log('未找到 Vv'); window.__Vv_backup = window.__Vv_ba...
F12,在控制台直接复制进去回车即可,
所有物品爆率平均
(function setAllEven() {
if (!Array.isArray(window.Vv) || Vv.length < 5) return console.log('未找到 Vv');
window.__Vv_backup = window.__Vv_backup || Vv.slice();
for (let i = 0; i < 5; i++) Vv[i] = 1/5;
console.log('✅ 已设置:五档平均 20%:', Vv);
})();
远古固定 30%,其余前四档平均分(各 17.5%)
(function setAncient30_evenOthers() {
if (!Array.isArray(window.Vv) || Vv.length < 5) {
console.log('未找到稀有度分布数组 Vv(长度须≥5)');
return;
}
window.__Vv_backup = window.__Vv_backup || Vv.slice();
const target = 0.30; // 第5档:远古
const othersCount = 4; // 前四档
const each = (1 - target) / othersCount; // 0.175
for (let i = 0; i < othersCount; i++) Vv[i] = each;
Vv[4] = target;
// 归一(仅当刚好 5 档)
if (Vv.length === 5) {
const sum = Vv.reduce((a, b) => a + b, 0);
for (let i = 0; i < 5; i++) Vv[i] /= sum;
}
console.log(`✅ 已设置:前四档各≈ ${(each*100).toFixed(2)}%,远古≈ ${(target*100).toFixed(2)}%`, '当前分布 =', Vv);
})();