Rework black zone.
This commit is contained in:
parent
1a9afc9ede
commit
7f031350a9
7 changed files with 79 additions and 10 deletions
|
@ -21,8 +21,8 @@ mobs:register_mob("fun_caves:dangler", {
|
||||||
attacks_monsters = true,
|
attacks_monsters = true,
|
||||||
reach = 2,
|
reach = 2,
|
||||||
damage = 1,
|
damage = 1,
|
||||||
hp_min = 5,
|
hp_min = 10,
|
||||||
hp_max = 10,
|
hp_max = 20,
|
||||||
armor = 200,
|
armor = 200,
|
||||||
collisionbox = {-0.32, -0.0, -0.25, 0.25, 0.25, 0.25},
|
collisionbox = {-0.32, -0.0, -0.25, 0.25, 0.25, 0.25},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
|
|
|
@ -13,11 +13,11 @@ function fun_caves.decorate_cave(node, data, area, minp, y, ivm, biome_val_in)
|
||||||
local stone_type = node("default:stone")
|
local stone_type = node("default:stone")
|
||||||
local stone_depth = 1
|
local stone_depth = 1
|
||||||
|
|
||||||
--if y > -500 then
|
if y > -200 then
|
||||||
-- biome_val = biome_val / math.max(1, math.log(500 + y))
|
biome_val = biome_val / math.max(1, math.log(200 + y))
|
||||||
--end
|
end
|
||||||
-------------------
|
-------------------
|
||||||
--biome_val = 0.7
|
--biome_val = 0.55
|
||||||
-------------------
|
-------------------
|
||||||
if biome_val < -0.65 then
|
if biome_val < -0.65 then
|
||||||
stone_type = node("default:ice")
|
stone_type = node("default:ice")
|
||||||
|
@ -40,7 +40,7 @@ function fun_caves.decorate_cave(node, data, area, minp, y, ivm, biome_val_in)
|
||||||
stone_type = node("default:sand")
|
stone_type = node("default:sand")
|
||||||
stone_depth = 2
|
stone_depth = 2
|
||||||
elseif biome_val < 0.6 then
|
elseif biome_val < 0.6 then
|
||||||
stone_type = node("default:coalblock")
|
stone_type = node("fun_caves:black_sand")
|
||||||
stone_depth = 2
|
stone_depth = 2
|
||||||
else
|
else
|
||||||
stone_type = node("fun_caves:hot_cobble")
|
stone_type = node("fun_caves:hot_cobble")
|
||||||
|
@ -68,6 +68,8 @@ function fun_caves.decorate_cave(node, data, area, minp, y, ivm, biome_val_in)
|
||||||
if air_above then
|
if air_above then
|
||||||
if stone_type == node("fun_caves:stone_with_salt") and math.random(500) == 1 then
|
if stone_type == node("fun_caves:stone_with_salt") and math.random(500) == 1 then
|
||||||
return node("fun_caves:radioactive_ore")
|
return node("fun_caves:radioactive_ore")
|
||||||
|
elseif stone_type == node("fun_caves:black_sand") and math.random(100) == 1 then
|
||||||
|
return node("default:coalblock")
|
||||||
elseif node_above == node("air") and stone_type == node("fun_caves:stone_with_moss") and math.random(50) == 1 then
|
elseif node_above == node("air") and stone_type == node("fun_caves:stone_with_moss") and math.random(50) == 1 then
|
||||||
return node("fun_caves:glowing_fungal_stone")
|
return node("fun_caves:glowing_fungal_stone")
|
||||||
else
|
else
|
||||||
|
@ -85,6 +87,8 @@ function fun_caves.decorate_cave(node, data, area, minp, y, ivm, biome_val_in)
|
||||||
if data[ivm] == node("default:stone") and air_below then
|
if data[ivm] == node("default:stone") and air_below then
|
||||||
if stone_type == node("fun_caves:stone_with_salt") and math.random(500) == 1 then
|
if stone_type == node("fun_caves:stone_with_salt") and math.random(500) == 1 then
|
||||||
return node("fun_caves:radioactive_ore")
|
return node("fun_caves:radioactive_ore")
|
||||||
|
elseif stone_type == node("fun_caves:black_sand") and math.random(100) == 1 then
|
||||||
|
return node("default:coalblock")
|
||||||
elseif node_below == node("air") and (stone_type == node("fun_caves:stone_with_lichen") or stone_type == node("fun_caves:stone_with_moss")) and math.random(50) == 1 then
|
elseif node_below == node("air") and (stone_type == node("fun_caves:stone_with_lichen") or stone_type == node("fun_caves:stone_with_moss")) and math.random(50) == 1 then
|
||||||
return node("fun_caves:glowing_fungal_stone")
|
return node("fun_caves:glowing_fungal_stone")
|
||||||
else
|
else
|
||||||
|
@ -112,9 +116,9 @@ function fun_caves.decorate_cave(node, data, area, minp, y, ivm, biome_val_in)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- fluids
|
-- fluids
|
||||||
if y > minp.y and y < -100 and (node_below == node("default:stone") or node_below == node("fun_caves:hot_cobble")) and sr < 3 then
|
if y > minp.y and (node_below == node("default:stone") or node_below == node("fun_caves:hot_cobble")) and sr < 3 then
|
||||||
return node("default:lava_source")
|
return node("default:lava_source")
|
||||||
elseif y < -100 and node_below == node("fun_caves:stone_with_moss") and sr < 3 then
|
elseif node_below == node("fun_caves:stone_with_moss") and sr < 3 then
|
||||||
return node("default:water_source")
|
return node("default:water_source")
|
||||||
|
|
||||||
-- standing up
|
-- standing up
|
||||||
|
@ -134,7 +138,7 @@ function fun_caves.decorate_cave(node, data, area, minp, y, ivm, biome_val_in)
|
||||||
else
|
else
|
||||||
return node("fun_caves:hot_spike_"..math.ceil(sr / 20))
|
return node("fun_caves:hot_spike_"..math.ceil(sr / 20))
|
||||||
end
|
end
|
||||||
elseif node_below == node("default:coalblock") and sr < 20 then
|
elseif node_below == node("fun_caves:black_sand") and sr < 20 then
|
||||||
return node("fun_caves:constant_flame")
|
return node("fun_caves:constant_flame")
|
||||||
|
|
||||||
-- vegetation
|
-- vegetation
|
||||||
|
|
1
mobs.lua
1
mobs.lua
|
@ -55,6 +55,7 @@ dofile(path .. "/tarantula.lua")
|
||||||
dofile(path .. "/spider_ice.lua")
|
dofile(path .. "/spider_ice.lua")
|
||||||
--dofile(path .. "/dirt_monster.lua")
|
--dofile(path .. "/dirt_monster.lua")
|
||||||
dofile(path .. "/sand_monster.lua")
|
dofile(path .. "/sand_monster.lua")
|
||||||
|
dofile(path .. "/tar_monster.lua")
|
||||||
|
|
||||||
if minetest.registered_entities["mobs_monster:dirt_monster"] then
|
if minetest.registered_entities["mobs_monster:dirt_monster"] then
|
||||||
-- check this
|
-- check this
|
||||||
|
|
|
@ -668,3 +668,9 @@ minetest.register_abm({
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local newnode = fun_caves.clone_node("default:sand")
|
||||||
|
newnode.description = "Black Sand"
|
||||||
|
newnode.tiles = {"fun_caves_black_sand.png"}
|
||||||
|
newnode.groups['falling_node'] = 0
|
||||||
|
minetest.register_node("fun_caves:black_sand", newnode)
|
||||||
|
|
||||||
|
|
58
tar_monster.lua
Normal file
58
tar_monster.lua
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
|
||||||
|
-- Sand Monster by PilzAdam
|
||||||
|
|
||||||
|
mobs:register_mob("fun_caves:tar_monster", {
|
||||||
|
type = "monster",
|
||||||
|
passive = false,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
pathfinding = true,
|
||||||
|
reach = 2,
|
||||||
|
damage = 2,
|
||||||
|
hp_min = 15,
|
||||||
|
hp_max = 40,
|
||||||
|
armor = 100,
|
||||||
|
collisionbox = {-0.4, -1, -0.4, 0.4, 0.8, 0.4},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "mobs_sand_monster.b3d",
|
||||||
|
textures = {
|
||||||
|
{"fun_caves_tar_monster.png"},
|
||||||
|
},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
sounds = {
|
||||||
|
random = "mobs_sandmonster",
|
||||||
|
},
|
||||||
|
walk_velocity = 1.5,
|
||||||
|
run_velocity = 4,
|
||||||
|
view_range = 15,
|
||||||
|
jump = true,
|
||||||
|
floats = 0,
|
||||||
|
drops = {
|
||||||
|
{name = "default:coal_lump", chance = 1, min = 3, max = 5},
|
||||||
|
},
|
||||||
|
water_damage = 1,
|
||||||
|
lava_damage = 2,
|
||||||
|
light_damage = 1,
|
||||||
|
fear_height = 4,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 15,
|
||||||
|
speed_run = 15,
|
||||||
|
stand_start = 0,
|
||||||
|
stand_end = 39,
|
||||||
|
walk_start = 41,
|
||||||
|
walk_end = 72,
|
||||||
|
run_start = 74,
|
||||||
|
run_end = 105,
|
||||||
|
punch_start = 74,
|
||||||
|
punch_end = 105,
|
||||||
|
},
|
||||||
|
--[[
|
||||||
|
custom_attack = function(self, p)
|
||||||
|
local pos = self.object:getpos()
|
||||||
|
minetest.add_item(pos, "default:sand")
|
||||||
|
end,
|
||||||
|
]]
|
||||||
|
})
|
||||||
|
|
||||||
|
mobs:register_spawn("fun_caves:tar_monster", {"fun_caves:black_sand"}, 20, 0, 4000, 1, 31000)
|
||||||
|
|
||||||
|
mobs:register_egg("fun_caves:tar_monster", "Tar Monster", "fun_caves_black_sand.png", 1)
|
BIN
textures/fun_caves_black_sand.png
Normal file
BIN
textures/fun_caves_black_sand.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 321 B |
BIN
textures/fun_caves_tar_monster.png
Normal file
BIN
textures/fun_caves_tar_monster.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
Loading…
Add table
Add a link
Reference in a new issue