Convert math.random percentage computations into percent()

This commit is contained in:
copperwater
2020-02-29 17:04:26 -05:00
committed by Pasi Kallinen
parent c4bb3c904f
commit 35a2f6e3ed
21 changed files with 76 additions and 76 deletions

View File

@@ -24,7 +24,7 @@ des.map([[
----------------------------------------------
]]);
if math.random(0,99) < 40 then
if percent(40) then
local terrain = { "L", "}", "T", ".", "-", "C" };
local tidx = math.random(1, #terrain);
des.replace_terrain({ region={00,00, 74,17}, fromterrain="F", toterrain=terrain[tidx] });