Most dungeon features working.
This commit is contained in:
parent
5abe211fb6
commit
61c3cb0edd
7 changed files with 570 additions and 710 deletions
|
@ -1,7 +1,7 @@
|
|||
local max_depth = 31000
|
||||
|
||||
local function teleporter(user, area, power)
|
||||
if not (user and area and power and type(power) == 'number' and fun_caves.world and fun_caves.db and fun_caves.db.teleport_data and fun_caves.underzones and fun_caves.is_fortress and fun_caves.cave_noise_1 and fun_caves.cave_noise_2 and fun_caves.cave_width) then
|
||||
if not (user and area and power and type(power) == 'number' and fun_caves.world and fun_caves.db and fun_caves.db.teleport_data and fun_caves.underzones and fun_caves.cave_noise_1 and fun_caves.cave_noise_2 and fun_caves.cave_width) then
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -43,32 +43,6 @@ local function teleporter(user, area, power)
|
|||
y = ({4368, 8768, 13168, 4368, 4368, 4368})[power+1]+76,
|
||||
z = pos.z + (math.random(5) - math.random(5)) * 80,
|
||||
}
|
||||
elseif area == 'dungeon' then
|
||||
newpos = {}
|
||||
local base_pos = table.copy(pos)
|
||||
base_pos.x = base_pos.x - (base_pos.x + 32) % 80 + 12
|
||||
base_pos.z = base_pos.z - (base_pos.z + 32) % 80 + 12
|
||||
if power > 0 then
|
||||
base_pos.y = fun_caves.underzones[({'Caina','Phlegethos','Dis','Minauros', 'Phlegethos','Styx'})[power]].lower_bound
|
||||
end
|
||||
|
||||
base_pos.y = base_pos.y - (base_pos.y + 32) % 80 - 15
|
||||
|
||||
for i = 1, 8000 do
|
||||
newpos = {
|
||||
x = base_pos.x + (math.random(5) - math.random(5)) * 80,
|
||||
y = base_pos.y - math.random(50) * 80,
|
||||
z = base_pos.z + (math.random(5) - math.random(5)) * 80,
|
||||
}
|
||||
|
||||
if fun_caves.is_fortress(newpos) then
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if not fun_caves.is_fortress(newpos) then
|
||||
return
|
||||
end
|
||||
elseif area == 'underworld' then
|
||||
local good = false
|
||||
local base_pos = table.copy(pos)
|
||||
|
@ -128,7 +102,7 @@ local gems = {
|
|||
{gem = 'Moonstone', teleport = 'sky', ore = true},
|
||||
{gem = 'Garnet', teleport = 'underworld', ore = true},
|
||||
{gem = 'Coral Gem', teleport = 'hell'},
|
||||
{gem = 'Zoisite', teleport = 'dungeon', ore = true},
|
||||
--{gem = 'Zoisite', teleport = 'dungeon', ore = true},
|
||||
{gem = 'Aquamarine', teleport = 'overworld', ore = true},
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue