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

@@ -38,7 +38,7 @@ des.non_diggable(selection.area(00,00,34,16))
-- Drawbridges; northern one opens from the south (portcullis) to further
-- north (lowered span), southern one from the north to further south
des.drawbridge({ x=17, y=02, dir="south", state="random" })
if math.random(0, 99) < 75 then
if percent(75) then
des.drawbridge({ x=17, y=14, dir="north", state="open" })
else
des.drawbridge({ x=17, y=14, dir="north", state="random" })