Multiple changes:
- Adjust giant tree spawns. - Remove dragon from dungeons. - Adjust all abms. - Allow giant trees to grow back damage. - Revamp ice trap. - Fix iron moonstone and coral teleporters.
This commit is contained in:
parent
fa86013731
commit
6c764f0c3b
11 changed files with 210 additions and 68 deletions
25
goblin.lua
25
goblin.lua
|
@ -26,6 +26,7 @@ local function goblin_do(self)
|
|||
return
|
||||
end
|
||||
|
||||
local cold_natured = false
|
||||
local pos = self.object:getpos()
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
|
@ -51,7 +52,8 @@ local function goblin_do(self)
|
|||
-- place a trap
|
||||
local trap = 'fun_caves:mossycobble_trap'
|
||||
if self.name == 'fun_caves:goblin_ice' then
|
||||
trap = 'fun_caves:stone_with_ice_trap'
|
||||
cold_natured = true
|
||||
trap = 'fun_caves:ice_trap'
|
||||
fun_caves.search_replace(pos, trap_freq, {"default:ice"}, trap)
|
||||
else
|
||||
if self.name == 'fun_caves:goblin_coal' then
|
||||
|
@ -73,7 +75,7 @@ local function goblin_do(self)
|
|||
fun_caves.search_replace(pos, trap_freq, {"group:stone", "default:sandstone"}, trap)
|
||||
end
|
||||
|
||||
fun_caves.surface_damage(self)
|
||||
fun_caves.surface_damage(self, cold_natured)
|
||||
end
|
||||
|
||||
|
||||
|
@ -513,7 +515,7 @@ minetest.register_abm({
|
|||
|
||||
minetest.register_node("fun_caves:ice_trap", {
|
||||
description = "Ice Trap",
|
||||
tiles = {"default_ice.png^default_mineral_coal.png"},
|
||||
tiles = {"default_ice.png^fun_caves_mineral_moonstone.png"},
|
||||
groups = {cracky = 3},
|
||||
drop = 'default:ice',
|
||||
is_ground_content = false,
|
||||
|
@ -527,9 +529,20 @@ minetest.register_abm({
|
|||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
for _,object in ipairs(minetest.env:get_objects_inside_radius(pos, 2)) do
|
||||
if object:is_player() then
|
||||
minetest.set_node(pos, {name="fire:basic_flame"})
|
||||
if object:get_hp() > 0 then
|
||||
object:set_hp(object:get_hp()-2)
|
||||
local ppos = object:getpos()
|
||||
if ppos then
|
||||
ppos.y = ppos.y + 1
|
||||
local p1 = vector.subtract(ppos, 2)
|
||||
local p2 = vector.add(ppos, 2)
|
||||
local nodes = minetest.find_nodes_in_area(p1, p2, 'air')
|
||||
for _, npos in pairs(nodes) do
|
||||
minetest.set_node(npos, {name="default:ice"})
|
||||
minetest.set_node(pos, {name="default:ice"})
|
||||
end
|
||||
|
||||
if object:get_hp() > 0 then
|
||||
object:set_hp(object:get_hp()-2)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue