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

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

来自Rizline中文维基
第138行: 第138行:


     function generateRandomRestrictions() {
     function generateRandomRestrictions() {
         const speeds = [...Array(30).fill("无限制"), ...Array.from({ length: 91 }, (_, i) => (i + 10) / 10)]
         const speeds = [...Array(40).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 {
             const count = Math.floor(Math.random() * 3) + 2 // 2-4个
             const count = Math.floor(Math.random() * 3) + 2
             const shuffled = [...mods].sort(() => Math.random() - 0.5)
            const availableMods = mods.filter(m => m !== "无MOD")
             selectedMods = shuffled.slice(0, count)
             const shuffled = [...availableMods].sort(() => Math.random() - 0.5)
             selectedMods = shuffled.slice(0, Math.min(count, availableMods.length))


             if (selectedMods.includes("无MOD")) {
             const hasSpecial = selectedMods.includes("特殊计量条")
                selectedMods = ["无MOD"]
             if (hasSpecial) {
            }
 
             if (selectedMods.includes("特殊计量条")) {
                 const specialRates = ["特殊计量条100%", "特殊计量条110%", "特殊计量条120%"]
                 const specialRates = ["特殊计量条100%", "特殊计量条110%", "特殊计量条120%"]
                 selectedMods = selectedMods.filter(m => m !== "特殊计量条")
                 selectedMods = selectedMods.filter(m => m !== "特殊计量条")
第164行: 第162行:
             }
             }
         }
         }
         document.getElementById('mod-data').textContent = selectedMods.join(" + ")
 
         const modElement = document.getElementById('mod-data')
        if (selectedMods.length === 1) {
            modElement.textContent = selectedMods[0]
        } else {
            modElement.innerHTML = selectedMods.map(mod => `<p>${mod}</p>`).join('')
        }


         let selectedOthers = []
         let selectedOthers = []
         if (Math.random() < 0.8) {
         if (Math.random() < 0.5) {
             selectedOthers = [others[Math.floor(Math.random() * others.length)]]
             selectedOthers = [others[Math.floor(Math.random() * others.length)]]
         } else {
         } else {
             const count = Math.floor(Math.random() * 2) + 2
             const count = Math.floor(Math.random() * 2) + 2
             const shuffled = [...others].sort(() => Math.random() - 0.5)
            const availableOthers = others.filter(o => o !== "无限制")
             selectedOthers = shuffled.slice(0, count)
             const shuffled = [...availableOthers].sort(() => Math.random() - 0.5)
             selectedOthers = shuffled.slice(0, Math.min(count, availableOthers.length))
        }


            if (selectedOthers.includes("无限制")) {
        const otherElement = document.getElementById('other-data')
                selectedOthers = ["无限制"]
        if (selectedOthers.length === 1) {
             }
            otherElement.textContent = selectedOthers[0]
        } else {
             otherElement.innerHTML = selectedOthers.map(other => `<p>${other}</p>`).join('')
         }
         }
        document.getElementById('other-data').textContent = selectedOthers.join(" + ")
     }
     }



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

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

神秘的随机挑战!


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