Add fortress designs.
This commit is contained in:
parent
f44735e032
commit
396d149ab4
1 changed files with 44 additions and 2 deletions
46
fortress.lua
46
fortress.lua
|
@ -204,6 +204,48 @@ end
|
|||
|
||||
|
||||
local designs = {
|
||||
{
|
||||
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
||||
{0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
|
||||
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
||||
{0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
|
||||
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
||||
{0,1,0,1,0,1,1,1,1,1,1,1,1,1,0,1,0,1,0},
|
||||
{0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0},
|
||||
{0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0},
|
||||
{0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
||||
{0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0},
|
||||
{0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
||||
{0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0},
|
||||
{0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0},
|
||||
{0,1,0,1,0,1,1,1,1,1,1,1,1,1,0,1,0,1,0},
|
||||
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
||||
{0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
|
||||
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
||||
{0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
|
||||
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
||||
},
|
||||
{
|
||||
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
||||
{0,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,0},
|
||||
{0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0},
|
||||
{0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0},
|
||||
{0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0},
|
||||
{0,1,0,1,0,1,1,1,1,1,0,0,0,1,0,1,0,1,0},
|
||||
{0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0},
|
||||
{0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0},
|
||||
{0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0},
|
||||
{0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0},
|
||||
{0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0},
|
||||
{0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0},
|
||||
{0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,0},
|
||||
{0,1,0,1,0,1,1,1,1,1,1,1,1,1,0,1,0,1,0},
|
||||
{0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0},
|
||||
{0,1,0,1,1,1,0,0,0,1,1,1,1,1,1,1,0,1,0},
|
||||
{0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0},
|
||||
{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0},
|
||||
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
||||
},
|
||||
{
|
||||
{0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0},
|
||||
{0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0},
|
||||
|
@ -321,7 +363,7 @@ fun_caves.fortress = function(minp_in, maxp_in, data, area, node)
|
|||
data[ivm] = inner_wall
|
||||
end
|
||||
else
|
||||
if y2 == 0 and y == minp.y + y2 * cell_size + 1 and data[ivm - area.ystride] ~= node['air'] and math.random(300) == 1 then
|
||||
if y2 == 0 and y == minp.y + y2 * cell_size + 1 and data[ivm - area.ystride] ~= node['air'] and math.random(700) == 1 then
|
||||
treasure_count = treasure_count + 1
|
||||
data[ivm] = node['fun_caves:coffer']
|
||||
else
|
||||
|
@ -334,7 +376,7 @@ fun_caves.fortress = function(minp_in, maxp_in, data, area, node)
|
|||
end
|
||||
|
||||
if floor_type ~= 3 then
|
||||
local wall_type = math.random(2)
|
||||
local wall_type = math.random(4)
|
||||
|
||||
if wall_type == 1 then
|
||||
maze_floor(y2, minp, maxp, data, area, node)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue