Tencent / LuaHelper

LuaHelper is a High-performance lua VSCode plugin, Language Server Protocol for lua.
Other
631 stars 94 forks source link

same if condition在条件中包含随机数时也会提示 #136

Open LuckyZone opened 2 years ago

LuckyZone commented 2 years ago
    if math.random() <= (difficulty_factor * 0.3) + 0.1 then
        return "meteor"
    elseif is_ocean_zone and math.random() <= (difficulty_factor * 0.3) + 0.1 then
        return "whirlpool"
    elseif math.random() <= (difficulty_factor * 0.3) + 0.1 then
        return "tsunami"
    elseif w.wind > 70 and math.random() <= (difficulty_factor * 0.9) + 0.1 then
        return "tornado"
    end

这段代码中会提示same if condition