Commit 6357ed68 authored by D00Med's avatar D00Med

friendly golems

parent 8b68519a
......@@ -212,7 +212,7 @@ mobs:register_mob("dmobs:golem", {
run_velocity = 2.5,
jump = true,
drops = {
{name = "default:stone", chance = 5, min = 3, max = 6},
{name = "dmobs:golemstone", chance = 30, min = 1, max = 1},
},
water_damage = 0,
lava_damage = 2,
......
......@@ -16,6 +16,69 @@ dmobs.destructive = false
dofile(minetest.get_modpath("dmobs").."/baddies.lua")
--golem
minetest.register_node("dmobs:golemstone", {
description = "golem stone",
tiles = {"dmobs_golem_stone.png",},
groups = {cracky=1},
on_construct = function(pos, node, _)
local node1 = minetest.env:get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
local node2 = minetest.env:get_node({x=pos.x, y=pos.y-2, z=pos.z}).name
local node3 = minetest.env:get_node({x=pos.x, y=pos.y+1, z=pos.z}).name
if node1 == "default:stone" and node2 == "default:stone" and node3 == "air" then
minetest.env:add_entity(pos, "dmobs:golem_friendly")
minetest.env:remove_node({x=pos.x, y=pos.y-1, z=pos.z})
minetest.env:remove_node({x=pos.x, y=pos.y-2, z=pos.z})
minetest.env:remove_node({x=pos.x, y=pos.y, z=pos.z})
end
end,
})
mobs:register_mob("dmobs:golem_friendly", {
type = "npc",
reach = 3,
damage = 2,
attack_type = "dogfight",
attacks_monsters = true,
hp_min = 62,
hp_max = 72,
armor = 100,
collisionbox = {-0.4, 0, -0.4, 0.4, 2.5, 0.4},
visual = "mesh",
mesh = "golem.b3d",
textures = {
{"dmobs_golem.png"},
},
follow = "default:cobble",
blood_texture = "default_stone.png",
visual_size = {x=1, y=1},
makes_footstep_sound = true,
walk_velocity = 1,
run_velocity = 2.5,
jump = true,
water_damage = 0,
lava_damage = 2,
light_damage = 0,
fall_damage = 0,
fear_height = 10,
view_range = 14,
animation = {
speed_normal = 10,
speed_run = 14,
walk_start = 46,
walk_end = 66,
stand_start = 1,
stand_end = 20,
run_start = 46,
run_end = 66,
punch_start = 20,
punch_end = 45,
},
})
mobs:register_egg("dmobs:golem_friendly", "Stone Golem (friendly)", "default_stone.png", 1)
--friendly mobs
mobs:register_mob("dmobs:panda", {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment