Convert math.random percentage computations into percent()
This commit is contained in:
committed by
Pasi Kallinen
parent
c4bb3c904f
commit
35a2f6e3ed
@@ -40,7 +40,7 @@ for i=1,2 do
|
||||
-- 3.6.2: 60% twice == 36% chance that both sides open up, 24% left side
|
||||
-- only, 24% right side only, 16% that neither side opens up
|
||||
local hall;
|
||||
if math.random(0, 99) < 60 then
|
||||
if percent(60) then
|
||||
if i == 1 then
|
||||
des.terrain(selection.area(17,14, 30,18),".")
|
||||
des.wallify()
|
||||
@@ -60,7 +60,7 @@ for i=1,2 do
|
||||
-- extra monsters; was [6 + 3d4] when both wings were opened up at once
|
||||
for i=1,3 + math.random(2 - 1,2*3) do
|
||||
des.monster({ id="Angel", coord = { hall:rndcoord(1) }, align="noalign", peaceful=0 })
|
||||
if math.random(0,99) < 50 then
|
||||
if percent(50) then
|
||||
des.monster({ coord = { hall:rndcoord(1) }, peaceful=0 })
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user