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

@@ -31,23 +31,23 @@ des.map([[
---------------------------------------------------------------------------
]]);
if math.random(0, 99) < 50 then
if percent(50) then
des.terrain({55,14},"-")
des.terrain({56,14},"-")
des.terrain({61,15},"|")
des.terrain({52,5}, "S")
des.door("locked", 52,5)
end
if math.random(0, 99) < 50 then
if percent(50) then
des.terrain({18,1}, "|")
des.terrain(selection.area(7,12, 8,13), ".")
end
if math.random(0, 99) < 50 then
if percent(50) then
des.terrain({49,4}, "|")
des.terrain({21,5}, ".")
end
if math.random(0, 99) < 50 then
if math.random(0, 99) < 50 then
if percent(50) then
if percent(50) then
des.terrain({22,1}, "|")
else
des.terrain({50,7}, "-")