Add traps to dungeons.
This commit is contained in:
parent
cbf8994755
commit
2f9d41c11e
3 changed files with 19 additions and 8 deletions
13
dungeon.lua
13
dungeon.lua
|
@ -390,7 +390,18 @@ fun_caves.dungeon = function(minp_in, maxp_in, data, p2data, area, node, heightm
|
|||
if not leave_alone[data[ivm]] then
|
||||
if ry == 0 and (cy > 0 or not centered_in) then
|
||||
if content[cx][cy][cz] == 'room' then
|
||||
data[ivm] = node['fun_caves:dungeon_floor_1']
|
||||
local r = math.random(5000)
|
||||
if r == 1 then
|
||||
data[ivm] = node['fun_caves:stone_with_gold_trap']
|
||||
elseif r == 2 then
|
||||
data[ivm] = node['fun_caves:stone_with_coal_trap']
|
||||
elseif r == 3 then
|
||||
data[ivm] = node['fun_caves:stone_with_iron_trap']
|
||||
elseif r == 4 then
|
||||
data[ivm] = node['fun_caves:stone_with_diamond_trap']
|
||||
else
|
||||
data[ivm] = node['fun_caves:dungeon_floor_1']
|
||||
end
|
||||
else
|
||||
data[ivm] = node['fun_caves:dungeon_floor_2']
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue