打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

用户:RedDragon/Test2:修订间差异

来自Rizline中文维基
第139行: 第139行:
     function generateRandomRestrictions() {
     function generateRandomRestrictions() {
         const speeds = [...Array(20).fill("无限制"), ...Array.from({ length: 91 }, (_, i) => (i + 10) / 10)]
         const speeds = [...Array(20).fill("无限制"), ...Array.from({ length: 91 }, (_, i) => (i + 10) / 10)]
         const mods = ["无MOD"]
         const mods = ["无MOD", "镜像模式", "保护模式", "Bad保护模式", "隐藏计量条"]
         const others = ["无限制"]
         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 = mods[Math.floor(Math.random() * mods.length)]
 
         document.getElementById('other-data').textContent = others[Math.floor(Math.random() * others.length)]
         let selectedMods = []
        if (Math.random() < 0.7) {
            selectedMods = [mods[Math.floor(Math.random() * mods.length)]]
        } else {
            const count = Math.floor(Math.random() * 3) + 2 // 2-4个
            const shuffled = [...mods].sort(() => Math.random() - 0.5)
            selectedMods = shuffled.slice(0, count)
 
            if (selectedMods.includes("无MOD")) {
                selectedMods = ["无MOD"]
            }
 
            if (selectedMods.includes("特殊计量条")) {
                const specialRates = ["特殊计量条100%", "特殊计量条110%", "特殊计量条120%"]
                selectedMods = selectedMods.filter(m => m !== "特殊计量条")
                selectedMods.push(specialRates[Math.floor(Math.random() * specialRates.length)])
            }
        }
         document.getElementById('mod-data').textContent = selectedMods.join(" + ")
 
        let selectedOthers = []
        if (Math.random() < 0.8) {
            selectedOthers = [others[Math.floor(Math.random() * others.length)]]
        } else {
            const count = Math.floor(Math.random() * 2) + 2
            const shuffled = [...others].sort(() => Math.random() - 0.5)
            selectedOthers = shuffled.slice(0, count)
 
            if (selectedOthers.includes("无限制")) {
                selectedOthers = ["无限制"]
            }
        }
        document.getElementById('other-data').textContent = selectedOthers.join(" + ")
     }
     }



2025年10月19日 (日) 18:09的版本

曲目
限制
难度 a
流速 b
MOD c
其他 d

神秘的随机挑战!


User:RedDragon/Test User:RedDragon/Test1 User:RedDragon/Test2