用户:RedDragon/Test2:修订间差异
来自Rizline中文维基
更多操作
小 |
小 |
||
| 第138行: | 第138行: | ||
function generateRandomRestrictions() { | function generateRandomRestrictions() { | ||
const speeds = [...Array( | const speeds = [...Array(20).fill("无限制"), ...Array.from({ length: 91 }, (_, i) => (i + 10) / 10)] | ||
const mods = ["无MOD", "镜像模式", "保护模式", "Bad保护模式", "特殊计量条", "隐藏计量条"] | const mods = ["无MOD", "镜像模式", "保护模式", "Bad保护模式", "特殊计量条", "隐藏计量条"] | ||
const others = ["无限制"] | const others = ["无限制"] | ||
| 第147行: | 第147行: | ||
let selectedMods = [] | let selectedMods = [] | ||
if (Math.random() < 0.3) { | if (Math.random() < 0.3) { | ||
selectedMods = [mods[Math.floor(Math.random() * mods.length)]] | selectedMods = [mods[Math.floor(Math.random() * mods.length)]] | ||
} else { | } else { | ||
| 第167行: | 第167行: | ||
modElement.textContent = selectedMods[0] | modElement.textContent = selectedMods[0] | ||
} else { | } else { | ||
modElement.innerHTML = | modElement.innerHTML = `<p>${selectedMods.join('<br>')}</p>` | ||
} | } | ||
| 第184行: | 第184行: | ||
otherElement.textContent = selectedOthers[0] | otherElement.textContent = selectedOthers[0] | ||
} else { | } else { | ||
otherElement.innerHTML = | otherElement.innerHTML = `<p>${selectedOthers.join('<br>')}</p>` | ||
} | } | ||
} | } | ||