Shrink fortresses and add non-maze levels.

This commit is contained in:
Duane 2016-07-01 01:54:08 -05:00
parent 955d4db7ad
commit f44735e032
3 changed files with 159 additions and 76 deletions

View file

@ -52,8 +52,7 @@ fun_caves.is_fortress = function(pos, cs)
local y = math.floor((pos.y + offset) / cs.y)
-- Fortresses show up below ground.
-- Calls from the first dungeon level should return false.
if y > fortress_depth or (pos.y + offset) % cs.y > cs.y - 5 then
if y > fortress_depth then
return false
end
@ -61,9 +60,7 @@ fun_caves.is_fortress = function(pos, cs)
local z = math.floor((pos.z + offset) / cs.z)
local n = minetest.get_perlin(fortress_noise):get3d({x=x, y=y, z=z})
if fun_caves.DEBUG and math.floor((n * 10000) % 4) == 1 then
return true
elseif math.floor((n * 10000) % 19) == 1 then
if math.floor((n * 10000) % (fun_caves.DEBUG and 4 or 19)) == 1 then
return true
end