From 91de8b0abffb916c31d437028e07a0032885cc20 Mon Sep 17 00:00:00 2001 From: Duane Date: Fri, 1 Jul 2016 16:18:30 -0500 Subject: [PATCH] Add another fortress design. --- fortress.lua | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/fortress.lua b/fortress.lua index 7986d5d..9975ca8 100644 --- a/fortress.lua +++ b/fortress.lua @@ -100,7 +100,7 @@ newnode.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) for i = 1, math.random(12) do inv:add_item('main', filler[math.random(#filler)]) end - if math.random(10) == 1 then + if math.random(20) == 1 then inv:add_item('main', trophies[level][math.random(#trophies[level])]) end end @@ -204,6 +204,27 @@ end local designs = { + { + {0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,0,0}, + {0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0}, + {0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,0,1,0}, + {1,1,1,1,0,1,1,1,1,1,0,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,1,0}, + {1,1,0,1,0,1,1,1,1,1,0,1,1,1,1,1,0,1,0}, + {0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0}, + {0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0}, + {0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,1,0,1,0}, + {1,1,1,1,0,1,0,1,1,1,0,1,1,1,1,1,0,1,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0}, + {1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,0,1,0}, + {0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0}, + {0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0}, + {0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,0,0,1,0}, + {0,1,1,1,0,1,1,1,0,1,0,1,1,1,1,1,0,1,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0}, + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0}, @@ -376,7 +397,7 @@ fun_caves.fortress = function(minp_in, maxp_in, data, area, node) end if floor_type ~= 3 then - local wall_type = math.random(4) + local wall_type = math.random(#designs + 1) if wall_type == 1 then maze_floor(y2, minp, maxp, data, area, node)