Skip to content
Snippets Groups Projects
Commit 629a8e49 authored by DarkGod's avatar DarkGod
Browse files

sanity for rng.avg

parent 63318bc2
No related branches found
No related tags found
No related merge requests found
......@@ -63,6 +63,13 @@ function rng.mbonus(max, level, max_level)
return val
end
local rngavg = rng.avg
function rng.avg(min, max, nb)
if max > min then return rngavg(min, max, nb)
else return rngavg(max, min, nb)
end
end
function rng.table(t)
local id = rng.range(1, #t)
return t[id], id
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment