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

@@ -64,16 +64,16 @@ local px, py = place:rndcoord(1);
des.object({ id="statue",x=px, y=py, buc="uncursed",
montype="knight", historic=1, male=1,name="Perseus",
contents = function()
if math.random(0,99) < 75 then
if percent(75) then
des.object({ id = "shield of reflection", buc="cursed", spe=0 })
end
if math.random(0,99) < 25 then
if percent(25) then
des.object({ id = "levitation boots", spe=0 })
end
if math.random(0,99) < 50 then
if percent(50) then
des.object({ id = "scimitar", buc="blessed", spe=2 })
end
if math.random(0,99) < 50 then
if percent(50) then
des.object("sack")
end
end