用户:RedDragon/Test2:修订间差异
来自Rizline中文维基
更多操作
小 |
小 |
||
| 第138行: | 第138行: | ||
function generateRandomRestrictions() { | function generateRandomRestrictions() { | ||
const speeds = ["无限制" | const speeds = [...Array(20).fill("无限制"), ...Array.from({ length: 91 }, (_, i) => (i + 10) / 10)] | ||
const mods = ["无MOD"] | |||
const others = ["无限制"] | |||
document.getElementById('difficulty-data').innerHTML = window.difficultyArray[Math.floor(Math.random() * window.difficultyArray.length)] | document.getElementById('difficulty-data').innerHTML = window.difficultyArray[Math.floor(Math.random() * window.difficultyArray.length)] | ||
document.getElementById('speed-data').textContent = speeds[Math.floor(Math.random() * speeds.length)] | document.getElementById('speed-data').textContent = speeds[Math.floor(Math.random() * speeds.length)] | ||
document.getElementById('mod-data').textContent = | document.getElementById('mod-data').textContent = mods[Math.floor(Math.random() * mods.length)] | ||
document.getElementById('other-data').textContent = | document.getElementById('other-data').textContent = others[Math.floor(Math.random() * others.length)] | ||
} | } | ||