Add 'dmobs' mod for Mobs Redo
@ -59,6 +59,8 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
|||||||
* mobs/
|
* mobs/
|
||||||
* [kpgmobs][] ([MIT][lic.kpgmobs]) -- version: v6 *2015-01-31* ([patched][patch.kpgmobs])
|
* [kpgmobs][] ([MIT][lic.kpgmobs]) -- version: v6 *2015-01-31* ([patched][patch.kpgmobs])
|
||||||
* [mobs_redo][] ([MIT][lic.mobs_redo]) -- version: [7de8bc4 Git][ver.mobs_redo] *2017-05-12* ([patched][patch.mobs_redo])
|
* [mobs_redo][] ([MIT][lic.mobs_redo]) -- version: [7de8bc4 Git][ver.mobs_redo] *2017-05-12* ([patched][patch.mobs_redo])
|
||||||
|
* mobs/general/
|
||||||
|
* [dmobs][] ([LGPL][lic.lgpl2.1] / [CC BY-SA][lic.ccbysa3.0] / [WTFPL][lic.wtfpl]) -- version: [8955af2 Git][ver.dbmobs] *2017-01-16*
|
||||||
* mobs_aggressive/
|
* mobs_aggressive/
|
||||||
* [mobs_goblins][] ([CC-BY-SA / CC-BY / CC0][lic.mobs_goblins]) -- version: [a346f85 Git][ver.mobs_goblins] *2015-09-12* ([patched][patch.mobs_goblins])
|
* [mobs_goblins][] ([CC-BY-SA / CC-BY / CC0][lic.mobs_goblins]) -- version: [a346f85 Git][ver.mobs_goblins] *2015-09-12* ([patched][patch.mobs_goblins])
|
||||||
* [mobs_monster][] ([MIT][lic.mobs_monster]) -- version: [f6d0e01 Git][ver.mobs_monster] *2017-04-27*
|
* [mobs_monster][] ([MIT][lic.mobs_monster]) -- version: [f6d0e01 Git][ver.mobs_monster] *2017-04-27*
|
||||||
@ -261,6 +263,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
|||||||
[crops]: https://forum.minetest.net/viewtopic.php?t=11795
|
[crops]: https://forum.minetest.net/viewtopic.php?t=11795
|
||||||
[currency]: https://github.com/minetest-mods/currency
|
[currency]: https://github.com/minetest-mods/currency
|
||||||
[deploy_nodes]: https://cornernote.github.io/minetest-deploy_nodes/
|
[deploy_nodes]: https://cornernote.github.io/minetest-deploy_nodes/
|
||||||
|
[dmobs]: https://forum.minetest.net/viewtopic.php?t=14382
|
||||||
[drawers]: https://forum.minetest.net/viewtopic.php?t=17134
|
[drawers]: https://forum.minetest.net/viewtopic.php?t=17134
|
||||||
[elevator]: https://forum.minetest.net/viewtopic.php?t=12944
|
[elevator]: https://forum.minetest.net/viewtopic.php?t=12944
|
||||||
[enchanting]: https://forum.minetest.net/viewtopic.php?t=7354
|
[enchanting]: https://forum.minetest.net/viewtopic.php?t=7354
|
||||||
@ -463,6 +466,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
|||||||
[ver.crops]: https://github.com/minetest-mods/crops/tree/2b1bb37
|
[ver.crops]: https://github.com/minetest-mods/crops/tree/2b1bb37
|
||||||
[ver.currency]: https://github.com/minetest-mods/currency/tree/21f9811
|
[ver.currency]: https://github.com/minetest-mods/currency/tree/21f9811
|
||||||
[ver.deploy_nodes]: https://github.com/cornernote/minetest-deploy_nodes/tree/eb3d68c
|
[ver.deploy_nodes]: https://github.com/cornernote/minetest-deploy_nodes/tree/eb3d68c
|
||||||
|
[ver.dmobs]: https://github.com/D00Med/dmobs/tree/8955af2
|
||||||
[ver.drawers]: https://github.com/minetest-mods/drawers/tree/7b9a384
|
[ver.drawers]: https://github.com/minetest-mods/drawers/tree/7b9a384
|
||||||
[ver.enchanting]: https://github.com/minetest-mods/enchanting/tree/13ea31c
|
[ver.enchanting]: https://github.com/minetest-mods/enchanting/tree/13ea31c
|
||||||
[ver.ethereal]: https://github.com/tenplus1/ethereal/tree/2c24961
|
[ver.ethereal]: https://github.com/tenplus1/ethereal/tree/2c24961
|
||||||
|
4
mods/mobs/general/dmobs/README.md
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# D00Med's Mobs
|
||||||
|
|
||||||
|
Thanks to TenPlus1, blert2112, and taikedz
|
||||||
|
|
360
mods/mobs/general/dmobs/api.lua
Normal file
@ -0,0 +1,360 @@
|
|||||||
|
--vehicles/mounts api by D00Med, based on lib_mount(see below)
|
||||||
|
|
||||||
|
--License of lib_mount:
|
||||||
|
-- Minetest mod: lib_mount
|
||||||
|
-- =======================
|
||||||
|
-- by blert2112
|
||||||
|
|
||||||
|
-- Based on the Boats mod by PilzAdam.
|
||||||
|
|
||||||
|
|
||||||
|
-- -----------------------------------------------------------
|
||||||
|
-- -----------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
-- Minetest Game mod: boats
|
||||||
|
-- ========================
|
||||||
|
-- by PilzAdam
|
||||||
|
|
||||||
|
-- License of source code:
|
||||||
|
-- -----------------------
|
||||||
|
-- WTFPL
|
||||||
|
|
||||||
|
|
||||||
|
--from lib_mount (required by new functions)
|
||||||
|
|
||||||
|
|
||||||
|
local mobs_redo = false
|
||||||
|
if mobs.mod and mobs.mod == "redo" then
|
||||||
|
mobs_redo = true
|
||||||
|
end
|
||||||
|
|
||||||
|
local function is_group(pos, group)
|
||||||
|
local nn = minetest.get_node(pos).name
|
||||||
|
return minetest.get_item_group(nn, group) ~= 0
|
||||||
|
end
|
||||||
|
|
||||||
|
local function force_detach(player)
|
||||||
|
local attached_to = player:get_attach()
|
||||||
|
if attached_to and attached_to:get_luaentity() then
|
||||||
|
local entity = attached_to:get_luaentity()
|
||||||
|
if entity.driver then
|
||||||
|
entity.driver = nil
|
||||||
|
end
|
||||||
|
player:set_detach()
|
||||||
|
end
|
||||||
|
default.player_attached[player:get_player_name()] = false
|
||||||
|
player:set_eye_offset({x=0, y=0, z=0}, {x=0, y=0, z=0})
|
||||||
|
end
|
||||||
|
|
||||||
|
function object_attach(entity, player, attach_at, eye_offset)
|
||||||
|
eye_offset = eye_offset or {x=0, y=0, z=0}
|
||||||
|
force_detach(player)
|
||||||
|
entity.driver = player
|
||||||
|
player:set_attach(entity.object, "", attach_at, {x=0, y=0, z=0})
|
||||||
|
|
||||||
|
player:set_properties({visual_size = {x=1, y=1}})
|
||||||
|
|
||||||
|
player:set_eye_offset(eye_offset, {x=0, y=0, z=0})
|
||||||
|
default.player_attached[player:get_player_name()] = true
|
||||||
|
minetest.after(0.2, function()
|
||||||
|
default.player_set_animation(player, "sit" , 30)
|
||||||
|
end)
|
||||||
|
entity.object:setyaw(player:get_look_yaw() - math.pi / 2)
|
||||||
|
end
|
||||||
|
|
||||||
|
function object_detach(entity, player, offset)
|
||||||
|
entity.driver = nil
|
||||||
|
player:set_detach()
|
||||||
|
default.player_attached[player:get_player_name()] = false
|
||||||
|
default.player_set_animation(player, "stand" , 30)
|
||||||
|
player:set_eye_offset({x=0, y=0, z=0}, {x=0, y=0, z=0})
|
||||||
|
local pos = player:getpos()
|
||||||
|
pos = {x = pos.x + offset.x, y = pos.y + 0.2 + offset.y, z = pos.z + offset.z}
|
||||||
|
minetest.after(0.1, function()
|
||||||
|
player:setpos(pos)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_on_leaveplayer(function(player)
|
||||||
|
force_detach(player)
|
||||||
|
end)
|
||||||
|
|
||||||
|
minetest.register_on_shutdown(function()
|
||||||
|
local players = minetest.get_connected_players()
|
||||||
|
for i = 1,#players do
|
||||||
|
force_detach(players[i])
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
minetest.register_on_dieplayer(function(player)
|
||||||
|
force_detach(player)
|
||||||
|
return true
|
||||||
|
end)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
--mixed code(from this mod and lib_mount)
|
||||||
|
|
||||||
|
function object_drive(entity, dtime, speed, shoots, arrow, moving_anim, stand_anim, jumps)
|
||||||
|
local ctrl = entity.driver:get_player_control()
|
||||||
|
local dir = entity.driver:get_look_dir();
|
||||||
|
local vec_forward = {x=dir.x*speed,y=-2,z=dir.z*speed}
|
||||||
|
local vec_backward = {x=-dir.x*speed,y=-2,z=-dir.z*speed}
|
||||||
|
local vec_stop = {x=0,y=0,z=0}
|
||||||
|
local yaw = entity.driver:get_look_yaw();
|
||||||
|
if ctrl.up then
|
||||||
|
entity.object:setyaw(yaw+math.pi+math.pi/2)
|
||||||
|
entity.object:setvelocity(vec_forward)
|
||||||
|
elseif ctrl.down then
|
||||||
|
entity.object:setyaw(yaw+math.pi+math.pi/2)
|
||||||
|
entity.object:setvelocity(vec_backward)
|
||||||
|
elseif not ctrl.down or ctrl.up then
|
||||||
|
entity.object:setyaw(yaw+math.pi+math.pi/2)
|
||||||
|
entity.object:setvelocity(vec_stop)
|
||||||
|
end
|
||||||
|
if ctrl.sneak and ctrl.LMB and shoots then
|
||||||
|
local pos = entity.object:getpos()
|
||||||
|
local obj = minetest.env:add_entity({x=pos.x+0+dir.x*2,y=pos.y+1.5+dir.y,z=pos.z+0+dir.z*2}, arrow)
|
||||||
|
local vec = {x=dir.x*6,y=dir.y*6,z=dir.z*6}
|
||||||
|
local yaw = entity.driver:get_look_yaw();
|
||||||
|
obj:setyaw(yaw+math.pi/2)
|
||||||
|
obj:setvelocity(vec)
|
||||||
|
end
|
||||||
|
--lib_mount animation
|
||||||
|
local velo = entity.object:getvelocity()
|
||||||
|
if velo.x == 0 and velo.y == 0 and velo.z == 0 then
|
||||||
|
if stand_anim and stand_anim ~= nil and mobs_redo == true then
|
||||||
|
set_animation(entity, stand_anim)
|
||||||
|
end
|
||||||
|
entity.object:setpos(entity.object:getpos())
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if moving_anim and moving_anim ~= nil and mobs_redo == true then
|
||||||
|
set_animation(entity, moving_anim)
|
||||||
|
end
|
||||||
|
--jumping not working
|
||||||
|
-- local jumps = jumps or false
|
||||||
|
-- if jumps == true and ctrl.jump then
|
||||||
|
-- local xvel = entity.object:getvelocity().x
|
||||||
|
-- local zvel = entity.object:getvelocity().z
|
||||||
|
-- local yvel = entity.object:getvelocity().y
|
||||||
|
-- local vel = {x=xvel,y=10,z=zvel}
|
||||||
|
-- entity.object:setvelocity(vel)
|
||||||
|
-- minetest.after(1.5, function()
|
||||||
|
-- local xvel = entity.object:getvelocity().x
|
||||||
|
-- local zvel = entity.object:getvelocity().z
|
||||||
|
-- local yvel = entity.object:getvelocity().y
|
||||||
|
-- local vel = {x=xvel,y=-10,z=zvel}
|
||||||
|
-- entity.object:setvelocity(vel)
|
||||||
|
-- end)
|
||||||
|
-- end
|
||||||
|
end
|
||||||
|
|
||||||
|
function object_fly(entity, dtime, speed, shoots, arrow, moving_anim, stand_anim)
|
||||||
|
local ctrl = entity.driver:get_player_control()
|
||||||
|
local velo = entity.object:getvelocity()
|
||||||
|
local dir = entity.driver:get_look_dir();
|
||||||
|
local vec_forward = {x=dir.x*speed,y=dir.y*speed+2,z=dir.z*speed}
|
||||||
|
local vec_backward = {x=-dir.x*speed,y=dir.y*speed+2,z=-dir.z*speed}
|
||||||
|
local vec_rise = {x=velo.x,y=velo.y+0.2,z=velo.z}
|
||||||
|
local vec_stop = {x=0,y=-0.2,z=0}
|
||||||
|
local yaw = entity.driver:get_look_yaw();
|
||||||
|
local pos = entity.object:getpos()
|
||||||
|
local node = minetest.get_node(pos).name
|
||||||
|
if node == "default:water_source" or node == "default:river_water_source" or node == "default:river_water_flowing" or node == "default:water_flowing" then
|
||||||
|
entity.object:setvelocity({x=velo.x*0.9, y=-1, z=velo.z*0.9})
|
||||||
|
elseif ctrl.up then
|
||||||
|
entity.object:setyaw(yaw+math.pi+math.pi/2)
|
||||||
|
entity.object:setvelocity(vec_forward)
|
||||||
|
elseif ctrl.down then
|
||||||
|
entity.object:setyaw(yaw+math.pi+math.pi/2)
|
||||||
|
entity.object:setvelocity(vec_backward)
|
||||||
|
elseif ctrl.jump then
|
||||||
|
entity.object:setyaw(yaw+math.pi+math.pi/2)
|
||||||
|
entity.object:setvelocity(vec_rise)
|
||||||
|
elseif not ctrl.down or ctrl.up or ctrl.jump then
|
||||||
|
entity.object:setyaw(yaw+math.pi+math.pi/2)
|
||||||
|
entity.object:setvelocity(vec_stop)
|
||||||
|
end
|
||||||
|
if ctrl.aux1 and shoots and not entity.loaded then
|
||||||
|
local pos = entity.object:getpos()
|
||||||
|
local obj = minetest.env:add_entity({x=pos.x+0+dir.x*2.5,y=pos.y+1.5+dir.y,z=pos.z+0+dir.z*2.5}, arrow)
|
||||||
|
local vec = {x=dir.x*12,y=dir.y*12,z=dir.z*12}
|
||||||
|
local yaw = entity.driver:get_look_yaw();
|
||||||
|
entity.loaded = true
|
||||||
|
obj:setyaw(yaw+math.pi/2)
|
||||||
|
obj:setvelocity(vec)
|
||||||
|
local object = obj:get_luaentity()
|
||||||
|
object.launcher = entity.driver
|
||||||
|
minetest.after(1, function()
|
||||||
|
entity.loaded = false
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
--lib_mount animation
|
||||||
|
if velo.x == 0 and velo.y == 0 and velo.z == 0 then
|
||||||
|
if stand_anim and stand_anim ~= nil and mobs_redo == true then
|
||||||
|
set_animation(entity, stand_anim)
|
||||||
|
end
|
||||||
|
entity.object:setpos(entity.object:getpos())
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if moving_anim and moving_anim ~= nil and mobs_redo == true then
|
||||||
|
set_animation(entity, moving_anim)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--lib_mount (not required by new functions)
|
||||||
|
|
||||||
|
|
||||||
|
local function is_group(pos, group)
|
||||||
|
local nn = minetest.get_node(pos).name
|
||||||
|
return minetest.get_item_group(nn, group) ~= 0
|
||||||
|
end
|
||||||
|
|
||||||
|
local function get_sign(i)
|
||||||
|
i = i or 0
|
||||||
|
if i == 0 then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return i / math.abs(i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function get_velocity(v, yaw, y)
|
||||||
|
local x = -math.sin(yaw) * v
|
||||||
|
local z = math.cos(yaw) * v
|
||||||
|
return {x = x, y = y, z = z}
|
||||||
|
end
|
||||||
|
|
||||||
|
local function get_v(v)
|
||||||
|
return math.sqrt(v.x ^ 2 + v.z ^ 2)
|
||||||
|
end
|
||||||
|
|
||||||
|
lib_mount = {}
|
||||||
|
|
||||||
|
function lib_mount.attach(entity, player, attach_at, eye_offset)
|
||||||
|
eye_offset = eye_offset or {x=0, y=0, z=0}
|
||||||
|
force_detach(player)
|
||||||
|
entity.driver = player
|
||||||
|
player:set_attach(entity.object, "", attach_at, {x=0, y=0, z=0})
|
||||||
|
|
||||||
|
player:set_properties({visual_size = {x=1, y=1}})
|
||||||
|
|
||||||
|
player:set_eye_offset(eye_offset, {x=0, y=0, z=0})
|
||||||
|
default.player_attached[player:get_player_name()] = true
|
||||||
|
minetest.after(0.2, function()
|
||||||
|
default.player_set_animation(player, "sit" , 30)
|
||||||
|
end)
|
||||||
|
entity.object:setyaw(player:get_look_yaw() - math.pi / 2)
|
||||||
|
end
|
||||||
|
|
||||||
|
function lib_mount.detach(entity, player, offset)
|
||||||
|
if entity ~= nil then entity.driver = nil end
|
||||||
|
player:set_detach()
|
||||||
|
default.player_attached[player:get_player_name()] = false
|
||||||
|
default.player_set_animation(player, "stand" , 30)
|
||||||
|
player:set_eye_offset({x=0, y=0, z=0}, {x=0, y=0, z=0})
|
||||||
|
local pos = player:getpos()
|
||||||
|
pos = {x = pos.x + offset.x, y = pos.y + 0.2 + offset.y, z = pos.z + offset.z}
|
||||||
|
minetest.after(0.1, function()
|
||||||
|
player:setpos(pos)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
function lib_mount.drive(entity, dtime, moving_anim, stand_anim, can_fly)
|
||||||
|
entity.v = get_v(entity.object:getvelocity()) * get_sign(entity.v)
|
||||||
|
|
||||||
|
local ctrl = entity.driver:get_player_control()
|
||||||
|
local yaw = entity.object:getyaw()
|
||||||
|
if ctrl.up then
|
||||||
|
entity.v = entity.v + 0.1
|
||||||
|
elseif ctrl.down then
|
||||||
|
entity.v = entity.v - 0.1
|
||||||
|
end
|
||||||
|
if ctrl.left then
|
||||||
|
if entity.v < 0 then
|
||||||
|
entity.object:setyaw(yaw - (1 + dtime) * 0.03)
|
||||||
|
else
|
||||||
|
entity.object:setyaw(yaw + (1 + dtime) * 0.03)
|
||||||
|
end
|
||||||
|
elseif ctrl.right then
|
||||||
|
if entity.v < 0 then
|
||||||
|
entity.object:setyaw(yaw + (1 + dtime) * 0.03)
|
||||||
|
else
|
||||||
|
entity.object:setyaw(yaw - (1 + dtime) * 0.03)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local velo = entity.object:getvelocity()
|
||||||
|
if entity.v == 0 and velo.x == 0 and velo.y == 0 and velo.z == 0 then
|
||||||
|
if stand_anim and stand_anim ~= nil and mobs_redo == true then
|
||||||
|
set_animation(entity, stand_anim)
|
||||||
|
end
|
||||||
|
entity.object:setpos(entity.object:getpos())
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if moving_anim and moving_anim ~= nil and mobs_redo == true then
|
||||||
|
set_animation(entity, moving_anim)
|
||||||
|
end
|
||||||
|
local s = get_sign(entity.v)
|
||||||
|
entity.v = entity.v - 0.02 * s
|
||||||
|
if s ~= get_sign(entity.v) then
|
||||||
|
entity.object:setvelocity({x = 0, y = 0, z = 0})
|
||||||
|
entity.v = 0
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if math.abs(entity.v) > 5 then
|
||||||
|
entity.v = 5 * get_sign(entity.v)
|
||||||
|
end
|
||||||
|
|
||||||
|
local p = entity.object:getpos()
|
||||||
|
p.y = p.y - 0.5
|
||||||
|
local new_velo = {x = 0, y = 0, z = 0}
|
||||||
|
local new_acce = {x = 0, y = 0, z = 0}
|
||||||
|
if not is_group(p, "crumbly") then
|
||||||
|
local nodedef = minetest.registered_nodes[minetest.get_node(p).name]
|
||||||
|
if (not nodedef) or nodedef.walkable then
|
||||||
|
entity.v = 0
|
||||||
|
new_acce = {x = 0, y = 1, z = 0}
|
||||||
|
else
|
||||||
|
new_acce = {x = 0, y = -9.8, z = 0}
|
||||||
|
end
|
||||||
|
new_velo = get_velocity(entity.v, entity.object:getyaw(),
|
||||||
|
entity.object:getvelocity().y)
|
||||||
|
entity.object:setpos(entity.object:getpos())
|
||||||
|
else
|
||||||
|
p.y = p.y + 1
|
||||||
|
if is_group(p, "crumbly") then
|
||||||
|
local y = entity.object:getvelocity().y
|
||||||
|
if y >= 5 then
|
||||||
|
y = 5
|
||||||
|
elseif y < 0 then
|
||||||
|
new_acce = {x = 0, y = 20, z = 0}
|
||||||
|
else
|
||||||
|
new_acce = {x = 0, y = 5, z = 0}
|
||||||
|
end
|
||||||
|
new_velo = get_velocity(entity.v, entity.object:getyaw(), y)
|
||||||
|
entity.object:setpos(entity.object:getpos())
|
||||||
|
else
|
||||||
|
new_acce = {x = 0, y = 0, z = 0}
|
||||||
|
if math.abs(entity.object:getvelocity().y) < 1 then
|
||||||
|
local pos = entity.object:getpos()
|
||||||
|
pos.y = math.floor(pos.y) + 0.5
|
||||||
|
entity.object:setpos(pos)
|
||||||
|
new_velo = get_velocity(entity.v, entity.object:getyaw(), 0)
|
||||||
|
else
|
||||||
|
new_velo = get_velocity(entity.v, entity.object:getyaw(),
|
||||||
|
entity.object:getvelocity().y)
|
||||||
|
entity.object:setpos(entity.object:getpos())
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if can_fly and can_fly == true and ctrl.jump then
|
||||||
|
new_velo.y = new_velo.y + 0.75
|
||||||
|
end
|
||||||
|
entity.object:setvelocity(new_velo)
|
||||||
|
entity.object:setacceleration(new_acce)
|
||||||
|
end
|
30
mods/mobs/general/dmobs/arrows/dragonarrows.lua
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
local base_arrow = {
|
||||||
|
visual = "sprite",
|
||||||
|
visual_size = {x = 0.5, y = 0.5},
|
||||||
|
velocity = 8,
|
||||||
|
tail = 1, -- enable tail
|
||||||
|
tail_texture = "dmobs_ice.png",
|
||||||
|
|
||||||
|
hit_player = function(self, player)
|
||||||
|
player:punch(self.object, 1.0, {
|
||||||
|
full_punch_interval = 1.0,
|
||||||
|
damage_groups = {fleshy = 8},
|
||||||
|
}, nil)
|
||||||
|
end,
|
||||||
|
|
||||||
|
hit_mob = function(self, player)
|
||||||
|
player:punch(self.object, 1.0, {
|
||||||
|
full_punch_interval = 1.0,
|
||||||
|
damage_groups = {fleshy = 8},
|
||||||
|
}, nil)
|
||||||
|
end,
|
||||||
|
|
||||||
|
hit_node = function(self, pos, node)
|
||||||
|
self.object:remove()
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
for _,arrowtype in pairs( {"ice","lightning","poison"} ) do
|
||||||
|
base_arrow.textures = {"dmobs_"..arrowtype..".png"},
|
||||||
|
mobs:register_arrow("dmobs:"..arrowtype, dmobs.deepclone(base_arrow) )
|
||||||
|
end
|
71
mods/mobs/general/dmobs/arrows/dragonfire.lua
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
--function to register tamed dragon attacks
|
||||||
|
|
||||||
|
function dmobs.register_fire(fname, texture, dmg, replace_node, explode, ice, variance, size)
|
||||||
|
minetest.register_entity(fname, {
|
||||||
|
textures = {texture},
|
||||||
|
velocity = 0.1,
|
||||||
|
damage = dmg,
|
||||||
|
collisionbox = {0, 0, 0, 0, 0, 0},
|
||||||
|
on_step = function(self, obj, pos)
|
||||||
|
local remove = minetest.after(2, function()
|
||||||
|
self.object:remove()
|
||||||
|
end)
|
||||||
|
local pos = self.object:getpos()
|
||||||
|
local objs = minetest.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 2)
|
||||||
|
for k, obj in pairs(objs) do
|
||||||
|
if obj:get_luaentity() ~= nil then
|
||||||
|
if obj:get_luaentity().name ~= fname and obj:get_luaentity().name ~= "dmobs:dragon_red" and obj:get_luaentity().name ~= "dmobs:dragon_blue" and obj:get_luaentity().name ~= "dmobs:dragon_black" and obj:get_luaentity().name ~= "dmobs:dragon_green" and obj:get_luaentity().name ~= "dmobs:dragon_great_tame" and obj:get_luaentity().name ~= "__builtin:item" then
|
||||||
|
obj:punch(self.launcher, 1.0, {
|
||||||
|
full_punch_interval=1.0,
|
||||||
|
damage_groups={fleshy=3},
|
||||||
|
}, nil)
|
||||||
|
self.object:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for dx=0,1 do
|
||||||
|
for dy=0,1 do
|
||||||
|
for dz=0,1 do
|
||||||
|
local p = {x=pos.x+dx, y=pos.y, z=pos.z+dz}
|
||||||
|
local t = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
||||||
|
local n = minetest.env:get_node(p).name
|
||||||
|
if n ~= fname and n ~="default:dirt_with_grass" and n ~="default:dirt_with_dry_grass" and n ~="default:stone" then
|
||||||
|
if minetest.registered_nodes[n].groups.flammable --[[or math.random(1, 100) <= 1]] then
|
||||||
|
minetest.env:set_node(t, {name=replace_node})
|
||||||
|
self.object:remove()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if ice and n == "default:water_source" then
|
||||||
|
minetest.env:set_node(t, {name="default:ice"})
|
||||||
|
self.object:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local apos = self.object:getpos()
|
||||||
|
local part = minetest.add_particlespawner(
|
||||||
|
6, --amount
|
||||||
|
0.3, --time
|
||||||
|
{x=apos.x-variance, y=apos.y-variance, z=apos.z-variance}, --minpos
|
||||||
|
{x=apos.x+variance, y=apos.y+variance, z=apos.z+variance}, --maxpos
|
||||||
|
{x=-0, y=-0, z=-0}, --minvel
|
||||||
|
{x=0, y=0, z=0}, --maxvel
|
||||||
|
{x=variance,y=-0.5-variance,z=variance}, --minacc
|
||||||
|
{x=0.5+variance,y=0.5+variance,z=0.5+variance}, --maxacc
|
||||||
|
0.1, --minexptime
|
||||||
|
0.3, --maxexptime
|
||||||
|
size, --minsize
|
||||||
|
size+2, --maxsize
|
||||||
|
false, --collisiondetection
|
||||||
|
texture --texture
|
||||||
|
)
|
||||||
|
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
dmobs.register_fire("dmobs:fire_plyr", "dmobs_fire.png", 2, "fire:basic_flame", true, false, 0.3, 1)
|
||||||
|
dmobs.register_fire("dmobs:ice_plyr", "dmobs_ice.png", 2, "default:ice", false, true, 0.5, 10)
|
||||||
|
dmobs.register_fire("dmobs:poison_plyr", "dmobs_poison.png", 2, "air", false, false, 0.3, 1)
|
||||||
|
dmobs.register_fire("dmobs:lightning_plyr", "dmobs_lightning.png", 2, "air", true, false, 0, 0.5)
|
27
mods/mobs/general/dmobs/arrows/fire.lua
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
--Thanks to Tenplus1
|
||||||
|
mobs:register_arrow("dmobs:fire", {
|
||||||
|
visual = "sprite",
|
||||||
|
visual_size = {x = 0.5, y = 0.5},
|
||||||
|
textures = {"dmobs_fire.png"},
|
||||||
|
velocity = 8,
|
||||||
|
tail = 1, -- enable tail
|
||||||
|
tail_texture = "fire_basic_flame.png",
|
||||||
|
|
||||||
|
hit_player = function(self, player)
|
||||||
|
player:punch(self.object, 1.0, {
|
||||||
|
full_punch_interval = 1.0,
|
||||||
|
damage_groups = {fleshy = 8},
|
||||||
|
}, nil)
|
||||||
|
end,
|
||||||
|
|
||||||
|
hit_mob = function(self, player)
|
||||||
|
player:punch(self.object, 1.0, {
|
||||||
|
full_punch_interval = 1.0,
|
||||||
|
damage_groups = {fleshy = 8},
|
||||||
|
}, nil)
|
||||||
|
end,
|
||||||
|
|
||||||
|
hit_node = function(self, pos, node)
|
||||||
|
self.object:remove()
|
||||||
|
end,
|
||||||
|
})
|
27
mods/mobs/general/dmobs/arrows/fire_explosive.lua
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
|
||||||
|
mobs:register_arrow("dmobs:fire", {
|
||||||
|
visual = "sprite",
|
||||||
|
visual_size = {x = 0.5, y = 0.5},
|
||||||
|
textures = {"dmobs_fire.png"},
|
||||||
|
velocity = 8,
|
||||||
|
tail = 1, -- enable tail
|
||||||
|
tail_texture = "fire_basic_flame.png",
|
||||||
|
|
||||||
|
hit_player = function(self, player)
|
||||||
|
player:punch(self.object, 1.0, {
|
||||||
|
full_punch_interval = 1.0,
|
||||||
|
damage_groups = {fleshy = 8},
|
||||||
|
}, nil)
|
||||||
|
end,
|
||||||
|
|
||||||
|
hit_mob = function(self, player)
|
||||||
|
player:punch(self.object, 1.0, {
|
||||||
|
full_punch_interval = 1.0,
|
||||||
|
damage_groups = {fleshy = 8},
|
||||||
|
}, nil)
|
||||||
|
end,
|
||||||
|
|
||||||
|
hit_node = function(self, pos, node)
|
||||||
|
mobs:explosion(pos, 2, 1, 1)
|
||||||
|
end,
|
||||||
|
})
|
22
mods/mobs/general/dmobs/arrows/sting.lua
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
mobs:register_arrow("dmobs:sting", {
|
||||||
|
visual = "sprite",
|
||||||
|
visual_size = {x = 0.5, y = 0.5},
|
||||||
|
textures = {"dmobs_sting.png"},
|
||||||
|
velocity = 8,
|
||||||
|
tail = 0, -- enable tail
|
||||||
|
tail_texture = "fire_basic_flame.png",
|
||||||
|
|
||||||
|
hit_player = function(self, player)
|
||||||
|
player:punch(self.object, 1.0, {
|
||||||
|
full_punch_interval = 1.0,
|
||||||
|
damage_groups = {fleshy = 1},
|
||||||
|
}, nil)
|
||||||
|
end,
|
||||||
|
|
||||||
|
hit_mob = function(self, player)
|
||||||
|
end,
|
||||||
|
|
||||||
|
hit_node = function(self, pos, node)
|
||||||
|
self.object:remove()
|
||||||
|
end,
|
||||||
|
})
|
4
mods/mobs/general/dmobs/depends.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
default
|
||||||
|
mobs
|
||||||
|
wool
|
||||||
|
farming?
|
13
mods/mobs/general/dmobs/dragons.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
D00Med's Mobs
|
||||||
|
|
||||||
|
How to Dragon
|
||||||
|
|
||||||
|
By defeating dragons you will get eggs. Place them in their ideal environment and feed them a gem to create an elemental egg.
|
||||||
|
|
||||||
|
By defeating special dragons, you can obtain elemental gems.
|
||||||
|
|
||||||
|
Feed the right elemental gem to the elemental egg to hatch a dragon.
|
||||||
|
|
||||||
|
Use the Use key to shoot fireballs when riding your new pet dragon.
|
||||||
|
|
||||||
|
ENjoy
|
76
mods/mobs/general/dmobs/dragons/dragon1.lua
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
local dragondef = {
|
||||||
|
type = "monster",
|
||||||
|
passive = false,
|
||||||
|
attacks_monsters = true,
|
||||||
|
damage = 4,
|
||||||
|
reach = 3,
|
||||||
|
attack_type = "dogshoot",
|
||||||
|
shoot_interval = 2.5,
|
||||||
|
dogshoot_switch = 2,
|
||||||
|
dogshoot_count = 0,
|
||||||
|
dogshoot_count_max =5,
|
||||||
|
arrow = "dmobs:fire",
|
||||||
|
shoot_offset = 1,
|
||||||
|
hp_min = 70,
|
||||||
|
hp_max = 100,
|
||||||
|
armor = 100,
|
||||||
|
collisionbox = {-0.6, -1.2, -0.6, 0.6, 0.6, 0.6},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "dragon.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_dragon.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=2, y=2},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
runaway = false,
|
||||||
|
jump_chance = 30,
|
||||||
|
walk_chance = 80,
|
||||||
|
fall_speed = 0,
|
||||||
|
follow = {"dmobs:dragon_gem"},
|
||||||
|
pathfinding = true,
|
||||||
|
fall_damage = 0,
|
||||||
|
sounds = {
|
||||||
|
shoot_attack = "mobs_fireball",
|
||||||
|
},
|
||||||
|
walk_velocity = 3,
|
||||||
|
run_velocity = 5,
|
||||||
|
jump = true,
|
||||||
|
fly = true,
|
||||||
|
drops = {
|
||||||
|
{name = "dmobs:egg", chance = 1, min = 1, max = 1},
|
||||||
|
{name = "dmobs:dragon_gem", chance = 1, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
fall_speed = 0,
|
||||||
|
stepheight = 10,
|
||||||
|
water_damage = 2,
|
||||||
|
lava_damage = 0,
|
||||||
|
light_damage = 0,
|
||||||
|
view_range = 20,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 10,
|
||||||
|
speed_run = 20,
|
||||||
|
walk_start = 1,
|
||||||
|
walk_end = 22,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 22,
|
||||||
|
run_start = 1,
|
||||||
|
run_end = 22,
|
||||||
|
punch_start = 22,
|
||||||
|
punch_end = 47,
|
||||||
|
},
|
||||||
|
knock_back = 2,
|
||||||
|
do_custom = dmobs.dragon.step_custom,
|
||||||
|
on_rightclick = dmobs.dragon.on_rc
|
||||||
|
}
|
||||||
|
|
||||||
|
mobs:register_mob("dmobs:dragon", dmobs.deepclone(dragondef) )
|
||||||
|
|
||||||
|
dragondef.type = "npc"
|
||||||
|
dragondef.attacks_monsters = true
|
||||||
|
|
||||||
|
dragondef.on_rightclick = dmobs.dragon.ride
|
||||||
|
|
||||||
|
dragondef.do_custom = dmobs.dragon.do_custom
|
||||||
|
|
||||||
|
mobs:register_mob("dmobs:dragon_red", dmobs.deepclone(dragondef) )
|
77
mods/mobs/general/dmobs/dragons/dragon2.lua
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
local dragondef = {
|
||||||
|
type = "monster",
|
||||||
|
passive = false,
|
||||||
|
attacks_monsters = true,
|
||||||
|
damage = 4,
|
||||||
|
reach = 3,
|
||||||
|
attack_type = "dogshoot",
|
||||||
|
shoot_interval = 2.5,
|
||||||
|
dogshoot_switch = 2,
|
||||||
|
dogshoot_count = 0,
|
||||||
|
dogshoot_count_max =5,
|
||||||
|
arrow = "dmobs:lightning",
|
||||||
|
shoot_offset = 1,
|
||||||
|
hp_min = 70,
|
||||||
|
hp_max = 100,
|
||||||
|
armor = 100,
|
||||||
|
collisionbox = {-0.6, -1.2, -0.6, 0.6, 0.6, 0.6},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "dragon.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_dragon2.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=2, y=2},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
runaway = false,
|
||||||
|
jump_chance = 30,
|
||||||
|
walk_chance = 80,
|
||||||
|
fall_speed = 0,
|
||||||
|
follow = {"dmobs:dragon_gem"},
|
||||||
|
pathfinding = true,
|
||||||
|
fall_damage = 0,
|
||||||
|
sounds = {
|
||||||
|
shoot_attack = "mobs_fireball",
|
||||||
|
},
|
||||||
|
walk_velocity = 3,
|
||||||
|
run_velocity = 5,
|
||||||
|
jump = true,
|
||||||
|
fly = true,
|
||||||
|
drops = {
|
||||||
|
{name = "dmobs:egg", chance = 1, min = 1, max = 1},
|
||||||
|
{name = "dmobs:dragon_gem", chance = 1, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
fall_speed = 0,
|
||||||
|
stepheight = 10,
|
||||||
|
water_damage = 2,
|
||||||
|
lava_damage = 0,
|
||||||
|
light_damage = 0,
|
||||||
|
view_range = 20,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 10,
|
||||||
|
speed_run = 20,
|
||||||
|
walk_start = 1,
|
||||||
|
walk_end = 22,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 22,
|
||||||
|
run_start = 1,
|
||||||
|
run_end = 22,
|
||||||
|
punch_start = 22,
|
||||||
|
punch_end = 47,
|
||||||
|
},
|
||||||
|
knock_back = 2,
|
||||||
|
do_custom = dmobs.dragon.step_custom,
|
||||||
|
on_rightclick = dmobs.dragon.on_rc
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_mob("dmobs:dragon2", dmobs.deepclone(dragondef) )
|
||||||
|
|
||||||
|
dragondef.type = "npc"
|
||||||
|
dragondef.attacks_monsters = true
|
||||||
|
|
||||||
|
dragondef.on_rightclick = dmobs.dragon.ride
|
||||||
|
|
||||||
|
dragondef.do_custom = dmobs.dragon.do_custom
|
||||||
|
|
||||||
|
mobs:register_mob("dmobs:dragon_black", dmobs.deepclone(dragondef) )
|
77
mods/mobs/general/dmobs/dragons/dragon3.lua
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
local dragondef = {
|
||||||
|
type = "monster",
|
||||||
|
passive = false,
|
||||||
|
attacks_monsters = true,
|
||||||
|
damage = 4,
|
||||||
|
reach = 3,
|
||||||
|
attack_type = "dogshoot",
|
||||||
|
shoot_interval = 2.5,
|
||||||
|
dogshoot_switch = 2,
|
||||||
|
dogshoot_count = 0,
|
||||||
|
dogshoot_count_max =5,
|
||||||
|
arrow = "dmobs:poison",
|
||||||
|
shoot_offset = 1,
|
||||||
|
hp_min = 70,
|
||||||
|
hp_max = 100,
|
||||||
|
armor = 100,
|
||||||
|
collisionbox = {-0.6, -1.2, -0.6, 0.6, 0.6, 0.6},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "dragon.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_dragon3.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=2, y=2},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
runaway = false,
|
||||||
|
jump_chance = 30,
|
||||||
|
walk_chance = 80,
|
||||||
|
fall_speed = 0,
|
||||||
|
follow = {"dmobs:dragon_gem"},
|
||||||
|
pathfinding = true,
|
||||||
|
fall_damage = 0,
|
||||||
|
sounds = {
|
||||||
|
shoot_attack = "mobs_fireball",
|
||||||
|
},
|
||||||
|
walk_velocity = 3,
|
||||||
|
run_velocity = 5,
|
||||||
|
jump = true,
|
||||||
|
fly = true,
|
||||||
|
drops = {
|
||||||
|
{name = "dmobs:egg", chance = 1, min = 1, max = 1},
|
||||||
|
{name = "dmobs:dragon_gem", chance = 1, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
fall_speed = 0,
|
||||||
|
stepheight = 10,
|
||||||
|
water_damage = 2,
|
||||||
|
lava_damage = 0,
|
||||||
|
light_damage = 0,
|
||||||
|
view_range = 20,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 10,
|
||||||
|
speed_run = 20,
|
||||||
|
walk_start = 1,
|
||||||
|
walk_end = 22,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 22,
|
||||||
|
run_start = 1,
|
||||||
|
run_end = 22,
|
||||||
|
punch_start = 22,
|
||||||
|
punch_end = 47,
|
||||||
|
},
|
||||||
|
knock_back = 2,
|
||||||
|
do_custom = dmobs.dragon.step_custom,
|
||||||
|
on_rightclick = dmobs.dragon.on_rc
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_mob("dmobs:dragon3", dmobs.deepclone(dragondef) )
|
||||||
|
|
||||||
|
dragondef.type = "npc"
|
||||||
|
dragondef.attacks_monsters = true
|
||||||
|
|
||||||
|
dragondef.on_rightclick = dmobs.dragon.ride
|
||||||
|
|
||||||
|
dragondef.do_custom = dmobs.dragon.do_custom
|
||||||
|
|
||||||
|
mobs:register_mob("dmobs:dragon_green", dmobs.deepclone(dragondef) )
|
77
mods/mobs/general/dmobs/dragons/dragon4.lua
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
local dragondef = {
|
||||||
|
type = "monster",
|
||||||
|
passive = false,
|
||||||
|
attacks_monsters = true,
|
||||||
|
damage = 4,
|
||||||
|
reach = 3,
|
||||||
|
attack_type = "dogshoot",
|
||||||
|
shoot_interval = 2.5,
|
||||||
|
dogshoot_switch = 2,
|
||||||
|
dogshoot_count = 0,
|
||||||
|
dogshoot_count_max =5,
|
||||||
|
arrow = "dmobs:ice",
|
||||||
|
shoot_offset = 1,
|
||||||
|
hp_min = 70,
|
||||||
|
hp_max = 100,
|
||||||
|
armor = 100,
|
||||||
|
collisionbox = {-0.6, -1.2, -0.6, 0.6, 0.6, 0.6},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "dragon.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_dragon4.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=2, y=2},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
runaway = false,
|
||||||
|
jump_chance = 30,
|
||||||
|
walk_chance = 80,
|
||||||
|
fall_speed = 0,
|
||||||
|
follow = {"dmobs:dragon_gem"},
|
||||||
|
pathfinding = true,
|
||||||
|
fall_damage = 0,
|
||||||
|
sounds = {
|
||||||
|
shoot_attack = "mobs_fireball",
|
||||||
|
},
|
||||||
|
walk_velocity = 3,
|
||||||
|
run_velocity = 5,
|
||||||
|
jump = true,
|
||||||
|
fly = true,
|
||||||
|
drops = {
|
||||||
|
{name = "dmobs:egg", chance = 1, min = 1, max = 1},
|
||||||
|
{name = "dmobs:dragon_gem", chance = 1, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
fall_speed = 0,
|
||||||
|
stepheight = 10,
|
||||||
|
water_damage = 2,
|
||||||
|
lava_damage = 0,
|
||||||
|
light_damage = 0,
|
||||||
|
view_range = 20,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 10,
|
||||||
|
speed_run = 20,
|
||||||
|
walk_start = 1,
|
||||||
|
walk_end = 22,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 22,
|
||||||
|
run_start = 1,
|
||||||
|
run_end = 22,
|
||||||
|
punch_start = 22,
|
||||||
|
punch_end = 47,
|
||||||
|
},
|
||||||
|
knock_back = 2,
|
||||||
|
do_custom = dmobs.dragon.step_custom,
|
||||||
|
on_rightclick = dmobs.dragon.on_rc
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_mob("dmobs:dragon4", dmobs.deepclone(dragondef) )
|
||||||
|
|
||||||
|
dragondef.type = "npc"
|
||||||
|
dragondef.attacks_monsters = true
|
||||||
|
|
||||||
|
dragondef.on_rightclick = dmobs.dragon.ride
|
||||||
|
|
||||||
|
dragondef.do_custom = dmobs.dragon.do_custom
|
||||||
|
|
||||||
|
mobs:register_mob("dmobs:dragon_blue", dmobs.deepclone(dragondef) )
|
76
mods/mobs/general/dmobs/dragons/dragon_normal.lua
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
--dragon
|
||||||
|
|
||||||
|
dofile(minetest.get_modpath("dmobs").."/dragons/piloting.lua")
|
||||||
|
|
||||||
|
mobs:register_mob("dmobs:dragon", {
|
||||||
|
type = "monster",
|
||||||
|
passive = false,
|
||||||
|
attacks_monsters = true,
|
||||||
|
damage = 4,
|
||||||
|
reach = 3,
|
||||||
|
attack_type = "dogshoot",
|
||||||
|
shoot_interval = 2.5,
|
||||||
|
dogshoot_switch = 2,
|
||||||
|
dogshoot_count = 0,
|
||||||
|
dogshoot_count_max =5,
|
||||||
|
arrow = "dmobs:fire",
|
||||||
|
shoot_offset = 1,
|
||||||
|
hp_min = 70,
|
||||||
|
hp_max = 100,
|
||||||
|
armor = 100,
|
||||||
|
collisionbox = {-0.6, -1.2, -0.6, 0.6, 0.6, 0.6},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "dragon.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_dragon.png"},
|
||||||
|
{"dmobs_dragon2.png"},
|
||||||
|
{"dmobs_dragon3.png"},
|
||||||
|
{"dmobs_dragon4.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=2, y=2},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
runaway = false,
|
||||||
|
jump_chance = 30,
|
||||||
|
walk_chance = 80,
|
||||||
|
fall_speed = 0,
|
||||||
|
pathfinding = true,
|
||||||
|
fall_damage = 0,
|
||||||
|
sounds = {
|
||||||
|
shoot_attack = "mobs_fireball",
|
||||||
|
},
|
||||||
|
walk_velocity = 3,
|
||||||
|
run_velocity = 5,
|
||||||
|
jump = true,
|
||||||
|
fly = true,
|
||||||
|
drops = {
|
||||||
|
{name = "mobs:lava_orb", chance = 1, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
fall_speed = 0,
|
||||||
|
stepheight = 10,
|
||||||
|
water_damage = 2,
|
||||||
|
lava_damage = 0,
|
||||||
|
light_damage = 0,
|
||||||
|
view_range = 20,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 10,
|
||||||
|
speed_run = 20,
|
||||||
|
walk_start = 1,
|
||||||
|
walk_end = 22,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 22,
|
||||||
|
run_start = 1,
|
||||||
|
run_end = 22,
|
||||||
|
punch_start = 22,
|
||||||
|
punch_end = 47,
|
||||||
|
},
|
||||||
|
knock_back = 2,
|
||||||
|
do_custom = dmobs.dragon.step_custom,
|
||||||
|
on_rightclick = dmobs.dragon.on_rc
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
mobs:spawn_specific("dmobs:dragon", {"air"}, {"default:stone"}, 20, 10, 300, 15000, 2, -100, 11000)
|
||||||
|
|
||||||
|
mobs:register_egg("dmobs:dragon", "Dragon", "default_apple.png", 1)
|
137
mods/mobs/general/dmobs/dragons/eggs.lua
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
-- eggs from mobs_dragon --------------------------------------------------------------------------
|
||||||
|
|
||||||
|
local dragonpairs = {
|
||||||
|
fire = {colour="red",nest="default:lava_source"},
|
||||||
|
lightning = {colour="black",nest="default:obsidian"},
|
||||||
|
poison = {colour="green",nest="default:cactus"},
|
||||||
|
ice = {colour="black",nest="default:ice"},
|
||||||
|
great = {colour="great",nest=""},
|
||||||
|
}
|
||||||
|
|
||||||
|
local function egg_transform(pos, node, clicker, item, _)
|
||||||
|
local wield_item = clicker:get_wielded_item():get_name()
|
||||||
|
if wield_item == "dmobs:dragon_gem" then
|
||||||
|
|
||||||
|
local p = {x = pos.x, y = pos.y - 1, z = pos.z}
|
||||||
|
local corner_name
|
||||||
|
for x1 = -1,1 do
|
||||||
|
for z1 = -1,1 do
|
||||||
|
p.x = pos.x + x1
|
||||||
|
p.z = pos.z + z1
|
||||||
|
local nestfloor_name = minetest.get_node(p).name
|
||||||
|
|
||||||
|
if x1 == -1 and z1 == -1 then
|
||||||
|
corner_name = minetest.get_node(p).name
|
||||||
|
|
||||||
|
elseif x1 == 0 and z1 == 0 then -- special case in centre
|
||||||
|
-- must be obsidian
|
||||||
|
if nestfloor_name ~= "default:obsidian" then return end
|
||||||
|
|
||||||
|
else
|
||||||
|
-- else ring must all be of the same type
|
||||||
|
if nestfloor_name ~= corner_name then return end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local dragon_type
|
||||||
|
for element,details in pairs(dragonpairs) do
|
||||||
|
if corner_name == details.nest then
|
||||||
|
dragon_type = element
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.chat_send_player(clicker:get_player_name()," ... something seems to be happening .... come back later?")
|
||||||
|
|
||||||
|
minetest.after(dmobs.eggtimer,
|
||||||
|
function(pos, dragon, pname)
|
||||||
|
minetest.set_node(pos, {name="dmobs:dragon_egg_"..dragon_type})
|
||||||
|
end,
|
||||||
|
pos
|
||||||
|
)
|
||||||
|
|
||||||
|
item:take_item()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function egghatch(pos, node, clicker, item, _)
|
||||||
|
local wield_item = clicker:get_wielded_item():get_name()
|
||||||
|
local eggnode = minetest.get_node(pos).name
|
||||||
|
|
||||||
|
for nature,details in pairs(dragonpairs) do
|
||||||
|
if ( wield_item == "dmobs:dragon_gem_"..nature and eggnode:find(nature) ) or
|
||||||
|
( wield_item == "dmobs:dragon_gem" and eggnode == "dmobs:dragon_egg_great" ) then -- special case... because inconsiderate/inconsistent naming
|
||||||
|
|
||||||
|
minetest.chat_send_player(clicker:get_player_name(), " ... it ... swallowed the gem...")
|
||||||
|
|
||||||
|
minetest.after(dmobs.eggtimer,
|
||||||
|
function(pos, dragon, pname)
|
||||||
|
local neweggnode = minetest.get_node(pos).name
|
||||||
|
if eggnode ~= neweggnode then return end -- prevent infinite hatchings
|
||||||
|
|
||||||
|
minetest.remove_node(pos)
|
||||||
|
|
||||||
|
local thedragon = "dmobs:dragon_"..details.colour
|
||||||
|
if eggnode == "dmobs:dragon_egg_great" then
|
||||||
|
thedragon = "dmobs:dragon_great"
|
||||||
|
end
|
||||||
|
|
||||||
|
local ent = minetest.add_entity(pos, thedragon)
|
||||||
|
minetest.sound_play("dmobs_chirrup",{pos=pos,max_hear_distance=20})
|
||||||
|
|
||||||
|
local obj = ent:get_luaentity()
|
||||||
|
if eggnode ~= "dmobs:dragon_egg_great" then
|
||||||
|
ent:set_properties({
|
||||||
|
textures = {"dmobs_dragon_young.png"},
|
||||||
|
visual_size = {x=1, y=1},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
obj.tamed = true
|
||||||
|
obj.owner = clicker:get_player_name()
|
||||||
|
end,
|
||||||
|
pos, clicker:get_player_name()
|
||||||
|
)
|
||||||
|
item:take_item()
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end -- for loop
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Egg form dfinitions -----------------------------------------
|
||||||
|
|
||||||
|
local base_egg = { -- base template for all dragon eggs
|
||||||
|
description = "Dragon Egg",
|
||||||
|
drawtype = "mesh",
|
||||||
|
mesh = "egg.b3d",
|
||||||
|
tiles = {"dmobs_egg.png"},
|
||||||
|
paramtype = "light",
|
||||||
|
sunlight_propagates = true,
|
||||||
|
is_ground_content = false,
|
||||||
|
groups = {fleshy=3, dig_immediate=3},
|
||||||
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
on_rightclick = egg_transform,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_node("dmobs:egg", dmobs.deepclone(base_egg) ) -- clone, to not affect the base template
|
||||||
|
|
||||||
|
base_egg.groups.not_in_creative_inventory=1
|
||||||
|
base_egg.on_rightclick = egghatch
|
||||||
|
|
||||||
|
base_egg.tiles = {"dmobs_egg1.png"}
|
||||||
|
minetest.register_node("dmobs:dragon_egg_fire", dmobs.deepclone(base_egg) )
|
||||||
|
|
||||||
|
base_egg.tiles = {"dmobs_egg2.png"}
|
||||||
|
minetest.register_node("dmobs:dragon_egg_lightning", dmobs.deepclone(base_egg) )
|
||||||
|
|
||||||
|
base_egg.tiles = {"dmobs_egg3.png"}
|
||||||
|
minetest.register_node("dmobs:dragon_egg_poison", dmobs.deepclone(base_egg) )
|
||||||
|
|
||||||
|
base_egg.tiles = {"dmobs_egg4.png"}
|
||||||
|
minetest.register_node("dmobs:dragon_egg_ice", dmobs.deepclone(base_egg) )
|
||||||
|
|
||||||
|
base_egg.groups.not_in_creative_inventory=nil
|
||||||
|
base_egg.tiles = {"default_sandstone.png"}
|
||||||
|
base_egg.description = "Great Dragon Egg"
|
||||||
|
minetest.register_node("dmobs:dragon_egg_great", dmobs.deepclone(base_egg) )
|
77
mods/mobs/general/dmobs/dragons/great_dragon.lua
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
local gdragon_base = {
|
||||||
|
type = "monster",
|
||||||
|
passive = false,
|
||||||
|
attacks_monsters = false,
|
||||||
|
damage = 5,
|
||||||
|
reach = 4,
|
||||||
|
attack_type = "dogshoot",
|
||||||
|
shoot_interval = 2.5,
|
||||||
|
dogshoot_switch = 2,
|
||||||
|
dogshoot_count = 0,
|
||||||
|
dogshoot_count_max =5,
|
||||||
|
arrow = "dmobs:lightning",
|
||||||
|
shoot_offset = 1,
|
||||||
|
hp_min = 140,
|
||||||
|
hp_max = 180,
|
||||||
|
armor = 220,
|
||||||
|
collisionbox = {-0.6, -1.4, -0.6, 0.6, 0.6, 0.6},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "dragon.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_dragon_great.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=2.5, y=2.5},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
runaway = false,
|
||||||
|
jump_chance = 30,
|
||||||
|
walk_chance = 80,
|
||||||
|
fall_speed = 0,
|
||||||
|
pathfinding = true,
|
||||||
|
fall_damage = 0,
|
||||||
|
sounds = {
|
||||||
|
shoot_attack = "mobs_fireball",
|
||||||
|
random = "roar",
|
||||||
|
},
|
||||||
|
walk_velocity = 3,
|
||||||
|
run_velocity = 5,
|
||||||
|
jump = true,
|
||||||
|
fly = true,
|
||||||
|
drops = {
|
||||||
|
{name = "dmobs:dragon_egg_great", chance = 1, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
fall_speed = 0,
|
||||||
|
stepheight = 10,
|
||||||
|
water_damage = 2,
|
||||||
|
lava_damage = 0,
|
||||||
|
light_damage = 0,
|
||||||
|
view_range = 20,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 10,
|
||||||
|
speed_run = 20,
|
||||||
|
walk_start = 1,
|
||||||
|
walk_end = 22,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 22,
|
||||||
|
run_start = 1,
|
||||||
|
run_end = 22,
|
||||||
|
punch_start = 22,
|
||||||
|
punch_end = 47,
|
||||||
|
},
|
||||||
|
knock_back = 2,
|
||||||
|
}
|
||||||
|
|
||||||
|
mobs:register_mob("dmobs:dragon_great", dmobs.deepclone(gdragon_base) )
|
||||||
|
|
||||||
|
gdragon_base.type = "npc"
|
||||||
|
gdragon_base.attacks_monsters = true
|
||||||
|
|
||||||
|
gdragon_base.on_rightclick = dmobs.dragon.ride
|
||||||
|
|
||||||
|
gdragon_base.do_custom = dmobs.dragon.do_custom
|
||||||
|
|
||||||
|
mobs:register_mob("dmobs:dragon_great_tame", dmobs.deepclone(gdragon_base) )
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_egg("dmobs:dragon_great", "Boss Dragon", "dmobs_egg1.png", 1)
|
||||||
|
mobs:register_egg("dmobs:dragon_great_tame", "Great Dragon", "default_lava_source_animated.png", 1)
|
51
mods/mobs/general/dmobs/dragons/main.lua
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
--thanks to diriel, blert2112 and taikedz
|
||||||
|
|
||||||
|
dmobs.dragon = {}
|
||||||
|
|
||||||
|
dofile(minetest.get_modpath("dmobs").."/dragons/piloting.lua")
|
||||||
|
|
||||||
|
local tamed_dragons = {}
|
||||||
|
|
||||||
|
--items and tools
|
||||||
|
|
||||||
|
minetest.register_craftitem("dmobs:dragon_gem_lightning", {
|
||||||
|
description = "Lightning Gem",
|
||||||
|
inventory_image = "dmobs_gem_lightning.png"
|
||||||
|
})
|
||||||
|
minetest.register_craftitem("dmobs:dragon_gem_ice", {
|
||||||
|
description = "Ice Gem",
|
||||||
|
inventory_image = "dmobs_gem_ice.png"
|
||||||
|
})
|
||||||
|
minetest.register_craftitem("dmobs:dragon_gem_fire", {
|
||||||
|
description = "Fire Gem",
|
||||||
|
inventory_image = "dmobs_gem_fire.png"
|
||||||
|
})
|
||||||
|
minetest.register_craftitem("dmobs:dragon_gem_poison", {
|
||||||
|
description = "Poison Gem",
|
||||||
|
inventory_image = "dmobs_gem_poison.png"
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("dmobs:dragon_gem", {
|
||||||
|
description = "Dragon Gem",
|
||||||
|
inventory_image = "dmobs_gem.png"
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
--spawns and eggs
|
||||||
|
|
||||||
|
-- mobs:spawn_specific("dmobs:dragon", {"air"}, {"default:stone"}, 20, 10, 300, 15000, 2, -100, 11000)
|
||||||
|
-- mobs:spawn_specific("dmobs:dragon2", {"air"}, {"default:stone"}, 20, 10, 300, 15000, 2, -100, 11000)
|
||||||
|
-- mobs:spawn_specific("dmobs:dragon3", {"air"}, {"default:stone"}, 20, 10, 300, 15000, 2, -100, 11000)
|
||||||
|
-- mobs:spawn_specific("dmobs:dragon4", {"air"}, {"default:stone"}, 20, 10, 300, 15000, 2, -100, 11000)
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_egg("dmobs:dragon", "Wild Fire Dragon", "default_apple.png", 1)
|
||||||
|
mobs:register_egg("dmobs:dragon2", "Wild Lightning Dragon", "default_mese_crystal.png", 1)
|
||||||
|
mobs:register_egg("dmobs:dragon3", "Wild Poison Dragon", "dmobs_poison.png", 1)
|
||||||
|
mobs:register_egg("dmobs:dragon4", "Wild Ice Dragon", "default_ice.png", 1)
|
||||||
|
|
||||||
|
mobs:register_egg("dmobs:dragon_red", "Tame Fire Dragon", "default_apple.png", 1)
|
||||||
|
mobs:register_egg("dmobs:dragon_black", "Tame Lightning Dragon", "default_mese_crystal.png", 1)
|
||||||
|
mobs:register_egg("dmobs:dragon_green", "Tame Poison Dragon", "dmobs_poison.png", 1)
|
||||||
|
mobs:register_egg("dmobs:dragon_blue", "Tame Ice Dragon", "default_ice.png", 1)
|
||||||
|
|
61
mods/mobs/general/dmobs/dragons/piloting.lua
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
|
||||||
|
if not dmobs.dragon then
|
||||||
|
dmobs.dragon = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
dmobs.dragon.step_custom = function(self, dtime)
|
||||||
|
if self.driver then
|
||||||
|
object_fly(self, dtime, 10, true, "dmobs:fire_plyr", "walk", "stand")
|
||||||
|
if self.state == "attack" then
|
||||||
|
self.state = nil
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
dmobs.dragon.ride = function(self, clicker)
|
||||||
|
if self.tamed and self.owner == clicker:get_player_name() then
|
||||||
|
local inv = clicker:get_inventory()
|
||||||
|
|
||||||
|
if self.driver and clicker == self.driver then
|
||||||
|
object_detach(self, clicker, {x=1, y=0, z=1})
|
||||||
|
|
||||||
|
if inv:room_for_item("main", "mobs:saddle") then
|
||||||
|
inv:add_item("main", "mobs:saddle")
|
||||||
|
else
|
||||||
|
minetest.add_item(clicker.getpos(), "mobs:saddle")
|
||||||
|
end
|
||||||
|
|
||||||
|
elseif not self.driver then
|
||||||
|
if clicker:get_wielded_item():get_name() == "mobs:saddle" then
|
||||||
|
object_attach(self, clicker, {x=0, y=12, z=4}, {x=0, y=0, z=4})
|
||||||
|
inv:remove_item("main", "mobs:saddle")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
dmobs.dragon.on_rc = function(self, clicker)
|
||||||
|
if not clicker or not clicker:is_player() then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if mobs:feed_tame(self, clicker, 1, false, false) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
dmobs.dragon.ride(self, clicker)
|
||||||
|
end
|
||||||
|
|
||||||
|
dmobs.dragon.do_custom = function(self, dtime)
|
||||||
|
if self.driver then
|
||||||
|
object_fly(self, dtime, 10, true, "dmobs:fire_plyr", "walk", "stand")
|
||||||
|
|
||||||
|
if self.state == "attack" then
|
||||||
|
self.state = "idle"
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
135
mods/mobs/general/dmobs/dragons/water_dragon.lua
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
mobs:register_mob("dmobs:waterdragon", {
|
||||||
|
type = "monster",
|
||||||
|
passive = false,
|
||||||
|
attack_type = "dogshoot",
|
||||||
|
dogshoot_switch = 2,
|
||||||
|
dogshoot_count = 0,
|
||||||
|
dogshoot_count_max =5,
|
||||||
|
shoot_interval = 2.5,
|
||||||
|
arrow = "dmobs:ice",
|
||||||
|
shoot_offset = 0,
|
||||||
|
pathfinding = false,
|
||||||
|
reach = 5,
|
||||||
|
damage = 2,
|
||||||
|
hp_min = 100,
|
||||||
|
hp_max = 127,
|
||||||
|
armor = 100,
|
||||||
|
collisionbox = {-0.4, -0.5, -0.4, 0.4, 5, 0.4},
|
||||||
|
visual_size = {x=4, y=4},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "water_dragon.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_waterdragon.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
sounds = {
|
||||||
|
random = "mobs_dirtmonster",
|
||||||
|
},
|
||||||
|
view_range = 15,
|
||||||
|
rotate = 180,
|
||||||
|
walk_velocity = 0.01,
|
||||||
|
run_velocity = 0.01,
|
||||||
|
jump = false,
|
||||||
|
drops = {
|
||||||
|
{name = "dmobs:dragon_gem_ice", chance = 1, min = 1, max = 1},
|
||||||
|
{name = "dmobs:dragon_gem_fire", chance = 1, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
water_damage = 0,
|
||||||
|
lava_damage = 5,
|
||||||
|
light_damage = 0,
|
||||||
|
floats = 0,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 15,
|
||||||
|
speed_run = 15,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 20,
|
||||||
|
walk_start = 1,
|
||||||
|
walk_end = 20,
|
||||||
|
run_start = 1,
|
||||||
|
run_end = 20,
|
||||||
|
punch_start = 40,
|
||||||
|
punch_end = 60,
|
||||||
|
shoot_start = 20,
|
||||||
|
shoot_end = 40,
|
||||||
|
},
|
||||||
|
do_custom = function(self)
|
||||||
|
--follow thanks to TenPlus1 and Byakuren
|
||||||
|
if not self.hydra then
|
||||||
|
self.hydra = true -- flip switch so this part is done only once
|
||||||
|
|
||||||
|
-- get head position and define a few temp variables
|
||||||
|
local pos = self.object:getpos()
|
||||||
|
local obj, obj2, ent
|
||||||
|
|
||||||
|
-- add body and make it follow head
|
||||||
|
obj = minetest.add_entity({x=pos.x+1, y=pos.y, z=pos.z}, "dmobs:waterdragon_2")
|
||||||
|
ent = obj:get_luaentity()
|
||||||
|
ent.following = self.object
|
||||||
|
|
||||||
|
-- add body and make it follow previous body segment
|
||||||
|
obj2 = minetest.add_entity({x=pos.x-1, y=pos.y, z=pos.z}, "dmobs:waterdragon_2")
|
||||||
|
ent = obj2:get_luaentity()
|
||||||
|
ent.following = self.object
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_mob("dmobs:waterdragon_2", {
|
||||||
|
type = "monster",
|
||||||
|
passive = false,
|
||||||
|
attack_type = "shoot",
|
||||||
|
dogshoot_switch = 2,
|
||||||
|
dogshoot_count = 0,
|
||||||
|
dogshoot_count_max =5,
|
||||||
|
shoot_interval = 3,
|
||||||
|
arrow = "dmobs:ice",
|
||||||
|
shoot_offset = 0,
|
||||||
|
pathfinding = false,
|
||||||
|
reach = 5,
|
||||||
|
damage = 2,
|
||||||
|
hp_min = 50,
|
||||||
|
hp_max = 60,
|
||||||
|
armor = 50,
|
||||||
|
collisionbox = {-0.4, -0.2, -0.4, 0.4, 5, 0.4},
|
||||||
|
visual_size = {x=3, y=3},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "water_dragon.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_waterdragon.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
sounds = {
|
||||||
|
shoot_attack = "mobs_fireball",
|
||||||
|
random = "velociraptor",
|
||||||
|
},
|
||||||
|
view_range = 15,
|
||||||
|
rotate = 180,
|
||||||
|
floats = 0,
|
||||||
|
walk_velocity = 0.01,
|
||||||
|
run_velocity = 0.01,
|
||||||
|
jump = false,
|
||||||
|
water_damage = 0,
|
||||||
|
lava_damage = 5,
|
||||||
|
light_damage = 0,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 15,
|
||||||
|
speed_run = 15,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 20,
|
||||||
|
walk_start = 1,
|
||||||
|
walk_end = 20,
|
||||||
|
run_start = 1,
|
||||||
|
run_end = 20,
|
||||||
|
punch_start = 40,
|
||||||
|
punch_end = 60,
|
||||||
|
shoot_start = 20,
|
||||||
|
shoot_end = 40,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_egg("dmobs:waterdragon", "Boss Waterdragon", "dmobs_egg4.png", 1)
|
63
mods/mobs/general/dmobs/dragons/wyvern.lua
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
mobs:register_mob("dmobs:wyvern", {
|
||||||
|
type = "monster",
|
||||||
|
passive = false,
|
||||||
|
attacks_monsters = false,
|
||||||
|
damage = 4,
|
||||||
|
reach = 3,
|
||||||
|
attack_type = "dogshoot",
|
||||||
|
shoot_interval = 2.5,
|
||||||
|
dogshoot_switch = 2,
|
||||||
|
dogshoot_count = 0,
|
||||||
|
dogshoot_count_max =5,
|
||||||
|
arrow = "dmobs:poison",
|
||||||
|
shoot_offset = 0.5,
|
||||||
|
hp_min = 100,
|
||||||
|
hp_max = 150,
|
||||||
|
armor = 100,
|
||||||
|
collisionbox = {-0.6, -1.4, -0.6, 0.6, 0.6, 0.6},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "wyvern.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_wyvern.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=1, y=1},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
runaway = true,
|
||||||
|
jump_chance = 30,
|
||||||
|
walk_chance = 80,
|
||||||
|
pathfinding = true,
|
||||||
|
walk_velocity = 3,
|
||||||
|
run_velocity = 5,
|
||||||
|
fall_speed = -2,
|
||||||
|
jump = true,
|
||||||
|
fly = false,
|
||||||
|
drops = {
|
||||||
|
{name = "dmobs:dragon_gem_poison", chance = 1, min = 1, max = 1},
|
||||||
|
{name = "dmobs:dragon_gem_lightning", chance = 1, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
sounds = {
|
||||||
|
shoot_attack = "mobs_fireball",
|
||||||
|
random = "velociraptor",
|
||||||
|
},
|
||||||
|
water_damage = 0,
|
||||||
|
lava_damage = 2,
|
||||||
|
light_damage = 0,
|
||||||
|
view_range = 20,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 20,
|
||||||
|
speed_run = 30,
|
||||||
|
walk_start = 33,
|
||||||
|
walk_end = 68,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 30,
|
||||||
|
run_start = 33,
|
||||||
|
run_end = 68,
|
||||||
|
punch_start = 70,
|
||||||
|
punch_end = 89,
|
||||||
|
},
|
||||||
|
knock_back = 2,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_egg("dmobs:wyvern", "Boss Wyvern", "dmobs_egg3.png", 1)
|
120
mods/mobs/general/dmobs/init.lua
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
dmobs = {}
|
||||||
|
|
||||||
|
-- dmobs by D00Med
|
||||||
|
|
||||||
|
-- mounts api by D00Med and lib_mount api by blert2112
|
||||||
|
|
||||||
|
dofile(minetest.get_modpath("dmobs").."/api.lua")
|
||||||
|
|
||||||
|
-- Enable dragons (disable to remove tamed dragons and dragon bosses)
|
||||||
|
dmobs.dragons = minetest.setting_getbool("dmobs.dragons")
|
||||||
|
if dmobs.dragons == nil then
|
||||||
|
dmobs.dragons = true
|
||||||
|
end
|
||||||
|
dmobs.regulars = minetest.setting_getbool("dmobs.regulars")
|
||||||
|
if dmobs.regulars == nil then
|
||||||
|
dmobs.regulars = true
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- Enable fireballs/explosions
|
||||||
|
dmobs.destructive = minetest.setting_getbool("dmobs.destructive") or false
|
||||||
|
|
||||||
|
-- Timer for the egg mechanics
|
||||||
|
dmobs.eggtimer = tonumber(minetest.setting_get("dmobs.eggtimer") ) or 100
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- Table cloning to reduce code repetition
|
||||||
|
dmobs.deepclone = function(t) -- deep-copy a table -- from https://gist.github.com/MihailJP/3931841
|
||||||
|
if type(t) ~= "table" then return t end
|
||||||
|
|
||||||
|
local target = {}
|
||||||
|
|
||||||
|
for k, v in pairs(t) do
|
||||||
|
if k ~= "__index" and type(v) == "table" then -- omit circular reference
|
||||||
|
target[k] = dmobs.deepclone(v)
|
||||||
|
else
|
||||||
|
target[k] = v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return target
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Start loading ----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
local function loadmob(mobname,dir)
|
||||||
|
dir = dir or "/mobs/"
|
||||||
|
dofile(minetest.get_modpath("dmobs")..dir..mobname..".lua")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- regular mobs
|
||||||
|
|
||||||
|
local mobslist = {
|
||||||
|
-- friendlies
|
||||||
|
"pig",
|
||||||
|
"panda",
|
||||||
|
"tortoise",
|
||||||
|
"golem_friendly",
|
||||||
|
"nyan",
|
||||||
|
"gnorm",
|
||||||
|
"hedgehog",
|
||||||
|
"owl",
|
||||||
|
"whale",
|
||||||
|
"badger",
|
||||||
|
"butterfly",
|
||||||
|
"elephant",
|
||||||
|
|
||||||
|
-- baddies
|
||||||
|
"pig_evil",
|
||||||
|
"fox",
|
||||||
|
"rat",
|
||||||
|
"wasps",
|
||||||
|
"treeman",
|
||||||
|
"golem",
|
||||||
|
"skeleton",
|
||||||
|
"orc",
|
||||||
|
"ogre",
|
||||||
|
}
|
||||||
|
|
||||||
|
if dmobs.regulars then
|
||||||
|
for _,mobname in pairs(mobslist) do
|
||||||
|
loadmob(mobname)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- dragons!!
|
||||||
|
|
||||||
|
if not dmobs.dragons then
|
||||||
|
loadmob("dragon_normal","/dragons/")
|
||||||
|
else
|
||||||
|
loadmob("main","/dragons/")
|
||||||
|
loadmob("dragon1","/dragons/")
|
||||||
|
loadmob("dragon2","/dragons/")
|
||||||
|
loadmob("dragon3","/dragons/")
|
||||||
|
loadmob("dragon4","/dragons/")
|
||||||
|
loadmob("great_dragon","/dragons/")
|
||||||
|
loadmob("water_dragon","/dragons/")
|
||||||
|
loadmob("wyvern","/dragons/")
|
||||||
|
|
||||||
|
dofile(minetest.get_modpath("dmobs").."/dragons/eggs.lua")
|
||||||
|
end
|
||||||
|
dofile(minetest.get_modpath("dmobs").."/arrows/dragonfire.lua")
|
||||||
|
dofile(minetest.get_modpath("dmobs").."/arrows/dragonarrows.lua")
|
||||||
|
|
||||||
|
-- General arrow definitions
|
||||||
|
|
||||||
|
if dmobs.destructive == true then
|
||||||
|
dofile(minetest.get_modpath("dmobs").."/arrows/fire_explosive.lua")
|
||||||
|
else
|
||||||
|
dofile(minetest.get_modpath("dmobs").."/arrows/fire.lua")
|
||||||
|
end
|
||||||
|
|
||||||
|
dofile(minetest.get_modpath("dmobs").."/nodes.lua")
|
||||||
|
dofile(minetest.get_modpath("dmobs").."/arrows/sting.lua")
|
||||||
|
|
||||||
|
-- Spawning
|
||||||
|
|
||||||
|
|
||||||
|
dofile(minetest.get_modpath("dmobs").."/spawn.lua")
|
||||||
|
dofile(minetest.get_modpath("dmobs").."/saddle.lua")
|
52
mods/mobs/general/dmobs/license.txt
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
|
||||||
|
|
||||||
|
License for Code
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Copyright (C) 2016 D00Med <heiselong@gmx.com>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License along
|
||||||
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
|
License for Textures, Models
|
||||||
|
---------------------------------------
|
||||||
|
|
||||||
|
CC BY-SA 3.0 UNPORTED. Created by D00Med
|
||||||
|
|
||||||
|
Roar.ogg - CC BY 3.0 Mike Koenig - http://soundbible.com/1165-Dinosaur-Roar.html
|
||||||
|
Velociraptor.ogg - CC BY 3.0 snottyboi - http://soundbible.com/1373-Velociraptor-Call.html
|
||||||
|
whale_1.ogg - CC0 Public Domain - https://en.wikipedia.org/wiki/File:Humpbackwhale2.ogg
|
||||||
|
mobs_pig.ogg - from mobs_animal by TenPlus1 (MIT)
|
||||||
|
dmobs_chirrup.ogg - CC BY SA 3.0 taikedz
|
||||||
|
wasp.ogg - Public Domain
|
||||||
|
|
||||||
|
--License of lib_mount:
|
||||||
|
-- Minetest mod: lib_mount
|
||||||
|
-- =======================
|
||||||
|
-- by blert2112
|
||||||
|
|
||||||
|
-- Based on the Boats mod by PilzAdam.
|
||||||
|
|
||||||
|
|
||||||
|
-- -----------------------------------------------------------
|
||||||
|
-- -----------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
-- Minetest Game mod: boats
|
||||||
|
-- ========================
|
||||||
|
-- by PilzAdam
|
||||||
|
|
||||||
|
-- License of source code:
|
||||||
|
-- -----------------------
|
||||||
|
-- WTFPL
|
57
mods/mobs/general/dmobs/mobs/badger.lua
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
mobs:register_mob("dmobs:badger", {
|
||||||
|
type = "animal",
|
||||||
|
passive = false,
|
||||||
|
reach = 1,
|
||||||
|
damage = 2,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
hp_min = 12,
|
||||||
|
hp_max = 22,
|
||||||
|
armor = 130,
|
||||||
|
collisionbox = {-0.3, -0.15, -0.3, 0.3, 0.4, 0.3},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "badger.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_badger.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=2, y=2},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
walk_velocity = 0.7,
|
||||||
|
run_velocity = 1,
|
||||||
|
jump = true,
|
||||||
|
drops = {
|
||||||
|
{name = "mobs:meat_raw", chance = 1, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
water_damage = 0,
|
||||||
|
lava_damage = 2,
|
||||||
|
light_damage = 0,
|
||||||
|
fall_damage = 1,
|
||||||
|
fall_speed = -8,
|
||||||
|
fear_height = 4,
|
||||||
|
follow = {"mobs:meat_raw"},
|
||||||
|
view_range = 14,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 12,
|
||||||
|
speed_run = 18,
|
||||||
|
walk_start = 34,
|
||||||
|
walk_end = 58,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 30,
|
||||||
|
run_start = 34,
|
||||||
|
run_end = 58,
|
||||||
|
punch_start = 60,
|
||||||
|
punch_end = 80,
|
||||||
|
|
||||||
|
},
|
||||||
|
on_rightclick = function(self, clicker)
|
||||||
|
|
||||||
|
if mobs:feed_tame(self, clicker, 8, true, true) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
mobs:capture_mob(self, clicker, 0, 5, 50, false, nil)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_egg("dmobs:badger", "Badger", "default_obsidian.png", 1)
|
37
mods/mobs/general/dmobs/mobs/butterfly.lua
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
|
||||||
|
--butterflies
|
||||||
|
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = {"flowers:flower_rose", "flowers:flower_tulip", "flowers:flower_dandelion_yellow", "flowers:flower_viola", "flowers:flower_dandelion_white", "flowers:flower_geranium"},
|
||||||
|
interval = 10.0,
|
||||||
|
chance = 10,
|
||||||
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
|
minetest.env:add_entity({x=pos.x,y=pos.y+0.3,z=pos.z}, "dmobs:butterfly")
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_entity("dmobs:butterfly", {
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "butterfly.b3d",
|
||||||
|
physical = true,
|
||||||
|
textures = {"dmobs_butterfly.png",},
|
||||||
|
visual_size = {x=0.3, y=0.3},
|
||||||
|
on_activate = function(self)
|
||||||
|
num = math.random(1,4)
|
||||||
|
self.object:set_properties({textures = {"dmobs_butterfly"..num..".png",},})
|
||||||
|
self.object:set_animation({x=1, y=10}, 20, 0)
|
||||||
|
self.object:setyaw(math.pi+num)
|
||||||
|
minetest.after(10, function()
|
||||||
|
self.object:remove()
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
on_step = function(self)
|
||||||
|
local pos = self.object:getpos()
|
||||||
|
local vec = self.object:getvelocity()
|
||||||
|
local num = math.random(-math.pi, math.pi)
|
||||||
|
self.object:setyaw(math.pi+num)
|
||||||
|
self.object:setvelocity({x=-math.sin(12*pos.y), y=math.cos(12*pos.x), z=-math.sin(12*pos.y)})
|
||||||
|
self.object:setacceleration({x=-math.sin(6*vec.y), y=math.cos(6*vec.x), z=-math.sin(6*vec.y)})
|
||||||
|
end,
|
||||||
|
collisionbox = {0,0,0,0,0.1,0},
|
||||||
|
})
|
58
mods/mobs/general/dmobs/mobs/elephant.lua
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
mobs:register_mob("dmobs:elephant", {
|
||||||
|
type = "animal",
|
||||||
|
passive = false,
|
||||||
|
reach = 1,
|
||||||
|
damage = 2,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
hp_min = 12,
|
||||||
|
hp_max = 22,
|
||||||
|
armor = 130,
|
||||||
|
collisionbox = {-0.9, -1.2, -0.9, 0.9, 0.9, 0.9},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "elephant.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_elephant.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=2.5, y=2.5},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
walk_velocity = 0.5,
|
||||||
|
run_velocity = 1,
|
||||||
|
jump = false,
|
||||||
|
water_damage = 2,
|
||||||
|
lava_damage = 2,
|
||||||
|
light_damage = 0,
|
||||||
|
fall_damage = 1,
|
||||||
|
fall_speed = -20, -- extra heavy!
|
||||||
|
fear_height = 2,
|
||||||
|
replace_rate = 10,
|
||||||
|
replace_what = {"default:grass_3", "default:grass_4", "default:grass_5", "ethereal:bamboo"},
|
||||||
|
replace_with = "air",
|
||||||
|
follow = {"farming:wheat"},
|
||||||
|
view_range = 14,
|
||||||
|
drops = {
|
||||||
|
{name = "mobs:meat_raw", chance = 1, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
animation = {
|
||||||
|
speed_normal = 5,
|
||||||
|
speed_run = 10,
|
||||||
|
walk_start = 3,
|
||||||
|
walk_end = 19,
|
||||||
|
stand_start = 20,
|
||||||
|
stand_end = 30,
|
||||||
|
run_start = 3,
|
||||||
|
run_end = 19,
|
||||||
|
|
||||||
|
},
|
||||||
|
on_rightclick = function(self, clicker)
|
||||||
|
|
||||||
|
if mobs:feed_tame(self, clicker, 8, true, true) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
mobs:capture_mob(self, clicker, 0, 5, 50, false, nil)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_egg("dmobs:elephant", "Elephant", "default_dry_grass.png", 1)
|
66
mods/mobs/general/dmobs/mobs/fox.lua
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
-- Fox
|
||||||
|
mobs:register_mob("dmobs:fox", {
|
||||||
|
type = "monster",
|
||||||
|
attacks_monsters = true,
|
||||||
|
reach = 1,
|
||||||
|
damage = 2,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
hp_min = 42,
|
||||||
|
hp_max = 52,
|
||||||
|
armor = 130,
|
||||||
|
collisionbox = {-0.4, -0.6, -0.4, 0.3, 0.3, 0.3},
|
||||||
|
runaway = true,
|
||||||
|
pathfinding = true,
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "fox.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_fox.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=1.5, y=1.5},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
walk_velocity = 1,
|
||||||
|
run_velocity = 2.5,
|
||||||
|
jump = true,
|
||||||
|
drops = {
|
||||||
|
{name = "mobs:meat_raw", chance = 1, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
on_activate = function(self)
|
||||||
|
if math.random(1,5) == 1 then
|
||||||
|
self.type = "animal"
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
water_damage = 0,
|
||||||
|
lava_damage = 2,
|
||||||
|
light_damage = 0,
|
||||||
|
fall_damage = 1,
|
||||||
|
fear_height = 4,
|
||||||
|
replace_rate = 10,
|
||||||
|
replace_what = {"farming:wheat_5", "default:fence_wood", "default:grass_5", "default:dirt_with_grass"},
|
||||||
|
replace_with = "air",
|
||||||
|
follow = {"mobs:meat_raw"},
|
||||||
|
view_range = 14,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 6,
|
||||||
|
speed_run = 15,
|
||||||
|
walk_start = 25,
|
||||||
|
walk_end = 35,
|
||||||
|
stand_start = 51,
|
||||||
|
stand_end = 60,
|
||||||
|
run_start = 1,
|
||||||
|
run_end = 16,
|
||||||
|
punch_start = 36,
|
||||||
|
punch_end = 51,
|
||||||
|
},
|
||||||
|
on_rightclick = function(self, clicker)
|
||||||
|
|
||||||
|
if mobs:feed_tame(self, clicker, 8, true, true) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
mobs:capture_mob(self, clicker, 0, 5, 50, false, nil)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_egg("dmobs:fox", "Fox", "wool_orange.png", 1)
|
59
mods/mobs/general/dmobs/mobs/gnorm.lua
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
mobs:register_mob("dmobs:gnorm", {
|
||||||
|
type = "npc",
|
||||||
|
can_dig = true,
|
||||||
|
passive = true,
|
||||||
|
reach = 1,
|
||||||
|
damage = 1,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
hp_min = 32,
|
||||||
|
hp_max = 42,
|
||||||
|
armor = 130,
|
||||||
|
collisionbox = {-0.4, -0.3, -0.4, 0.4, 0.8, 0.4},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "gnorm.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_gnorm.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=1, y=1},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
runaway = true,
|
||||||
|
walk_velocity = 0.5,
|
||||||
|
run_velocity = 4,
|
||||||
|
jump = true,
|
||||||
|
water_damage = 0,
|
||||||
|
lava_damage = 2,
|
||||||
|
light_damage = 0,
|
||||||
|
fall_damage = 1,
|
||||||
|
fall_speed = -6,
|
||||||
|
fear_height = 4,
|
||||||
|
replace_rate = 10,
|
||||||
|
replace_what = {"default:apple", "default:stone", "default:stone_with_coal", "default:fence_wood"},
|
||||||
|
replace_with = "air",
|
||||||
|
follow = {"default:apple"},
|
||||||
|
view_range = 14,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 8,
|
||||||
|
speed_run = 30,
|
||||||
|
walk_start = 62,
|
||||||
|
walk_end = 81,
|
||||||
|
stand_start = 2,
|
||||||
|
stand_end = 9,
|
||||||
|
run_start = 62,
|
||||||
|
run_end = 81,
|
||||||
|
punch_start = 1,
|
||||||
|
punch_end = 1,
|
||||||
|
|
||||||
|
},
|
||||||
|
on_rightclick = function(self, clicker)
|
||||||
|
|
||||||
|
if mobs:feed_tame(self, clicker, 8, true, true) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
mobs:capture_mob(self, clicker, 0, 5, 50, false, nil)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_egg("dmobs:gnorm", "Gnorm", "default_dirt.png", 1)
|
48
mods/mobs/general/dmobs/mobs/golem.lua
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
--stone golem
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_mob("dmobs:golem", {
|
||||||
|
type = "monster",
|
||||||
|
reach = 3,
|
||||||
|
damage = 2,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
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"},
|
||||||
|
},
|
||||||
|
blood_texture = "default_stone.png",
|
||||||
|
visual_size = {x=1, y=1},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
walk_velocity = 1,
|
||||||
|
run_velocity = 2.5,
|
||||||
|
jump = true,
|
||||||
|
drops = {
|
||||||
|
{name = "dmobs:golemstone", chance = 30, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
water_damage = 0,
|
||||||
|
lava_damage = 2,
|
||||||
|
light_damage = 1,
|
||||||
|
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", "Stone Golem", "default_stone.png", 1)
|
44
mods/mobs/general/dmobs/mobs/golem_friendly.lua
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
|
||||||
|
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)
|
50
mods/mobs/general/dmobs/mobs/hedgehog.lua
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
mobs:register_mob("dmobs:hedgehog", {
|
||||||
|
type = "animal",
|
||||||
|
passive = true,
|
||||||
|
hp_min = 12,
|
||||||
|
hp_max = 22,
|
||||||
|
armor = 130,
|
||||||
|
collisionbox = {-0.1, -0.1, -0.2, 0.2, 0.2, 0.2},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "hedgehog.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_hedgehog.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=2, y=2},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
walk_velocity = 0.5,
|
||||||
|
run_velocity = 1,
|
||||||
|
jump = true,
|
||||||
|
jump_height = 0.6,
|
||||||
|
water_damage = 2,
|
||||||
|
lava_damage = 2,
|
||||||
|
light_damage = 0,
|
||||||
|
fall_damage = 1,
|
||||||
|
fall_speed = -6,
|
||||||
|
fear_height = 4,
|
||||||
|
view_range = 14,
|
||||||
|
follow = {"farming:bread"},
|
||||||
|
animation = {
|
||||||
|
speed_normal = 5,
|
||||||
|
speed_run = 10,
|
||||||
|
walk_start = 1,
|
||||||
|
walk_end = 10,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 10,
|
||||||
|
run_start = 1,
|
||||||
|
run_end = 10,
|
||||||
|
|
||||||
|
},
|
||||||
|
on_rightclick = function(self, clicker)
|
||||||
|
|
||||||
|
if mobs:feed_tame(self, clicker, 8, true, true) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
mobs:capture_mob(self, clicker, 0, 5, 50, false, nil)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_egg("dmobs:hedgehog", "Hedgehog", "wool_brown.png", 1)
|
77
mods/mobs/general/dmobs/mobs/nyan.lua
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
mobs:register_mob("dmobs:nyan", {
|
||||||
|
type = "animal",
|
||||||
|
passive = true,
|
||||||
|
reach = 4,
|
||||||
|
damage = 2,
|
||||||
|
hp_min = 12,
|
||||||
|
hp_max = 22,
|
||||||
|
armor = 130,
|
||||||
|
collisionbox = {-0.2, 0, -0.2, 0.2, 0.6, 0.2},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "nyancat.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_nyancat.png"},
|
||||||
|
},
|
||||||
|
jump = true,
|
||||||
|
fly = true,
|
||||||
|
fall_speed = 0,
|
||||||
|
stepheight = 1.5,
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=1, y=1},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
runaway = false,
|
||||||
|
walk_velocity = 2,
|
||||||
|
run_velocity = 3,
|
||||||
|
run_chance = 20,
|
||||||
|
jump = true,
|
||||||
|
drops = {
|
||||||
|
{name = "default:nyan_cat", chance = 2, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
water_damage = 0,
|
||||||
|
lava_damage = 2,
|
||||||
|
light_damage = 0,
|
||||||
|
follow = {"default:mese"},
|
||||||
|
view_range = 14,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 4,
|
||||||
|
speed_run = 5,
|
||||||
|
walk_start = 1,
|
||||||
|
walk_end = 7,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 7,
|
||||||
|
run_start = 1,
|
||||||
|
run_end = 7,
|
||||||
|
|
||||||
|
},
|
||||||
|
do_custom = function(self)
|
||||||
|
local apos = self.object:getpos()
|
||||||
|
local vec = self.object:getvelocity()
|
||||||
|
local part = minetest.add_particlespawner(
|
||||||
|
5, --amount
|
||||||
|
0.3, --time
|
||||||
|
{x=apos.x-0.1, y=apos.y+0.3, z=apos.z-0.1}, --minpos
|
||||||
|
{x=apos.x+0.1, y=apos.y+0.4, z=apos.z+0.1}, --maxpos
|
||||||
|
{x=-0, y=-0, z=-0}, --minvel
|
||||||
|
{x=0, y=0, z=0}, --maxvel
|
||||||
|
{x=0,y=0,z=0}, --minacc
|
||||||
|
{x=-vec.x,y=0,z=-vec.z}, --maxacc
|
||||||
|
0.5, --minexptime
|
||||||
|
1.5, --maxexptime
|
||||||
|
3, --minsize
|
||||||
|
5, --maxsize
|
||||||
|
false, --collisiondetection
|
||||||
|
"dmobs_rainbow.png" --texture
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
on_rightclick = function(self, clicker)
|
||||||
|
|
||||||
|
if mobs:feed_tame(self, clicker, 8, true, true) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
mobs:capture_mob(self, clicker, 0, 5, 50, false, nil)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_egg("dmobs:nyan", "Nyan Cat", "wool_pink.png", 1)
|
49
mods/mobs/general/dmobs/mobs/ogre.lua
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
-- Ogre
|
||||||
|
mobs:register_mob("dmobs:ogre", {
|
||||||
|
type = "monster",
|
||||||
|
passive = false,
|
||||||
|
reach = 2,
|
||||||
|
damage = 4,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
hp_min = 22,
|
||||||
|
hp_max = 32,
|
||||||
|
armor = 130,
|
||||||
|
collisionbox = {-0.6, -1.3, -0.6, 0.6, 1.5, 0.6},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "ogre.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_ogre.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=3.5, y=3.5},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
drops = {
|
||||||
|
{name = "mobs:meat_raw", chance = 1, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
walk_velocity = 1,
|
||||||
|
run_velocity = 2,
|
||||||
|
jump = true,
|
||||||
|
rotate = 180,
|
||||||
|
water_damage = 0,
|
||||||
|
lava_damage = 2,
|
||||||
|
light_damage = 0,
|
||||||
|
fall_damage = 1,
|
||||||
|
fall_speed = -14,
|
||||||
|
fear_height = 4,
|
||||||
|
view_range = 14,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 10,
|
||||||
|
speed_run = 20,
|
||||||
|
walk_start = 3,
|
||||||
|
walk_end = 38,
|
||||||
|
stand_start = 40,
|
||||||
|
stand_end = 70,
|
||||||
|
run_start = 3,
|
||||||
|
run_end = 38,
|
||||||
|
punch_start = 70,
|
||||||
|
punch_end = 100,
|
||||||
|
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
mobs:register_egg("dmobs:ogre", "Ogre", "default_desert_sand.png", 1)
|
98
mods/mobs/general/dmobs/mobs/orc.lua
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
|
||||||
|
-- Orc
|
||||||
|
mobs:register_mob("dmobs:orc", {
|
||||||
|
type = "monster",
|
||||||
|
passive = false,
|
||||||
|
reach = 1,
|
||||||
|
damage = 2,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
hp_min = 12,
|
||||||
|
hp_max = 22,
|
||||||
|
armor = 130,
|
||||||
|
collisionbox = {-0.4, -1.3, -0.4, 0.4, 1, 0.4},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "orc.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_orc.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=3, y=3},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
drops = {
|
||||||
|
{name = "mobs:meat_raw", chance = 1, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
walk_velocity = 1,
|
||||||
|
run_velocity = 2,
|
||||||
|
jump = true,
|
||||||
|
water_damage = 0,
|
||||||
|
lava_damage = 2,
|
||||||
|
light_damage = 0,
|
||||||
|
fall_damage = 1,
|
||||||
|
fall_speed = -13,
|
||||||
|
fear_height = 4,
|
||||||
|
view_range = 14,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 10,
|
||||||
|
speed_run = 20,
|
||||||
|
walk_start = 2,
|
||||||
|
walk_end = 18,
|
||||||
|
stand_start = 30,
|
||||||
|
stand_end = 40,
|
||||||
|
run_start = 2,
|
||||||
|
run_end = 18,
|
||||||
|
punch_start = 20,
|
||||||
|
punch_end = 30,
|
||||||
|
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Orc (Redesign)
|
||||||
|
mobs:register_mob("dmobs:orc2", {
|
||||||
|
type = "monster",
|
||||||
|
passive = false,
|
||||||
|
reach = 1,
|
||||||
|
damage = 2,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
hp_min = 12,
|
||||||
|
hp_max = 22,
|
||||||
|
armor = 130,
|
||||||
|
collisionbox = {-0.4, -0, -0.4, 0.4, 2, 0.4},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "orc_redesign.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_orc_redesign.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=1.5, y=1.5},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
drops = {
|
||||||
|
{name = "mobs:meat_raw", chance = 1, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
walk_velocity = 1,
|
||||||
|
run_velocity = 2,
|
||||||
|
jump = true,
|
||||||
|
water_damage = 0,
|
||||||
|
lava_damage = 2,
|
||||||
|
light_damage = 0,
|
||||||
|
fall_damage = 1,
|
||||||
|
fall_speed = -13,
|
||||||
|
fear_height = 4,
|
||||||
|
view_range = 14,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 12,
|
||||||
|
speed_run = 20,
|
||||||
|
walk_start = 20,
|
||||||
|
walk_end = 40,
|
||||||
|
stand_start = 60,
|
||||||
|
stand_end = 80,
|
||||||
|
run_start = 20,
|
||||||
|
run_end = 40,
|
||||||
|
punch_start = 1,
|
||||||
|
punch_end = 15,
|
||||||
|
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_egg("dmobs:orc2", "Morgul Orc", "default_desert_sand.png", 1) -- new and improved, hey
|
||||||
|
mobs:register_egg("dmobs:orc", "Orc", "default_desert_sand.png", 1)
|
46
mods/mobs/general/dmobs/mobs/owl.lua
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
mobs:register_mob("dmobs:owl", {
|
||||||
|
type = "animal",
|
||||||
|
passive = true,
|
||||||
|
hp_min = 12,
|
||||||
|
hp_max = 22,
|
||||||
|
armor = 130,
|
||||||
|
collisionbox = {-0.3, -0.5, -0.3, 0.2, 0.2, 0.2},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "owl.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_owl.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=2, y=2},
|
||||||
|
makes_footstep_sound = false,
|
||||||
|
walk_velocity = 0,
|
||||||
|
run_velocity = 0,
|
||||||
|
jump = false,
|
||||||
|
water_damage = 2,
|
||||||
|
lava_damage = 2,
|
||||||
|
light_damage = 0,
|
||||||
|
view_range = 1,
|
||||||
|
do_custom = function(self)
|
||||||
|
local daytime = minetest.get_timeofday()*24000
|
||||||
|
if daytime <=6000 then
|
||||||
|
self.object:set_properties({
|
||||||
|
textures = {"dmobs_owl_awake.png"},
|
||||||
|
mesh = "owl.b3d",
|
||||||
|
})
|
||||||
|
elseif daytime >=6000 then
|
||||||
|
self.object:set_properties({
|
||||||
|
textures = {"dmobs_owl.png"},
|
||||||
|
mesh = "owl.b3d",
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 1,
|
||||||
|
walk_start = 1,
|
||||||
|
walk_end = 50,
|
||||||
|
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_egg("dmobs:owl", "Owl", "default_tree.png", 1)
|
63
mods/mobs/general/dmobs/mobs/panda.lua
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
|
||||||
|
|
||||||
|
mobs:register_mob("dmobs:panda", {
|
||||||
|
type = "animal",
|
||||||
|
passive = false,
|
||||||
|
reach = 1,
|
||||||
|
damage = 2,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
hp_min = 12,
|
||||||
|
hp_max = 22,
|
||||||
|
armor = 130,
|
||||||
|
collisionbox = {-0.4, -0.5, -0.4, 0.4, 0.5, 0.4},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "panda.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_panda.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=1, y=1},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
walk_velocity = 0.5,
|
||||||
|
run_velocity = 1,
|
||||||
|
jump = true,
|
||||||
|
drops = {
|
||||||
|
{name = "mobs:meat_raw", chance = 1, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
water_damage = 0,
|
||||||
|
lava_damage = 2,
|
||||||
|
light_damage = 0,
|
||||||
|
fall_damage = 1,
|
||||||
|
fall_speed = -10,
|
||||||
|
fear_height = 4,
|
||||||
|
jump_height = 2,
|
||||||
|
replace_rate = 10,
|
||||||
|
replace_what = {"default:grass_3", "default:grass_4", "default:grass_5", "ethereal:bamboo"},
|
||||||
|
replace_with = "air",
|
||||||
|
follow = {"default:papyrus"},
|
||||||
|
view_range = 14,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 6,
|
||||||
|
speed_run = 10,
|
||||||
|
walk_start = 25,
|
||||||
|
walk_end = 45,
|
||||||
|
stand_start = 10,
|
||||||
|
stand_end = 10,
|
||||||
|
run_start = 25,
|
||||||
|
run_end = 45,
|
||||||
|
punch_start = 46,
|
||||||
|
punch_end = 57,
|
||||||
|
|
||||||
|
},
|
||||||
|
on_rightclick = function(self, clicker)
|
||||||
|
|
||||||
|
if mobs:feed_tame(self, clicker, 8, true, true) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
mobs:capture_mob(self, clicker, 0, 5, 50, false, nil)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_egg("dmobs:panda", "Panda", "default_papyrus.png", 1)
|
69
mods/mobs/general/dmobs/mobs/pig.lua
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
mobs:register_mob("dmobs:pig", {
|
||||||
|
type = "animal",
|
||||||
|
passive = true,
|
||||||
|
reach = 4,
|
||||||
|
damage = 2,
|
||||||
|
attack_type = "explode",
|
||||||
|
explosion_radius = 3,
|
||||||
|
hp_min = 12,
|
||||||
|
hp_max = 22,
|
||||||
|
armor = 130,
|
||||||
|
collisionbox = {-0.4, 0, -0.4, 0.4, 1, 0.4},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "flying_pig.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_flying_pig.png"},
|
||||||
|
},
|
||||||
|
jump = true,
|
||||||
|
fly = true,
|
||||||
|
fall_speed = 0,
|
||||||
|
stepheight = 1.5,
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=1, y=1},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
runaway = false,
|
||||||
|
walk_velocity = 2,
|
||||||
|
run_velocity = 3,
|
||||||
|
run_chance = 20,
|
||||||
|
jump = true,
|
||||||
|
drops = {
|
||||||
|
{name = "mobs:meat_raw", chance = 2, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
sounds = {
|
||||||
|
random = "mobs_pig",
|
||||||
|
explode = "tnt_explode",
|
||||||
|
},
|
||||||
|
do_custom = function(self)
|
||||||
|
if self.state == "attack" then
|
||||||
|
self.fly = false
|
||||||
|
self.fall_speed = -4
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
water_damage = 0,
|
||||||
|
lava_damage = 2,
|
||||||
|
light_damage = 0,
|
||||||
|
follow = {"default:apple"},
|
||||||
|
view_range = 14,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 10,
|
||||||
|
speed_run = 15,
|
||||||
|
walk_start = 1,
|
||||||
|
walk_end = 20,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 20,
|
||||||
|
run_start = 22,
|
||||||
|
run_end = 28,
|
||||||
|
|
||||||
|
},
|
||||||
|
on_rightclick = function(self, clicker)
|
||||||
|
|
||||||
|
if mobs:feed_tame(self, clicker, 8, true, true) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
mobs:capture_mob(self, clicker, 0, 5, 50, false, nil)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_egg("dmobs:pig", "flying Pig", "wool_pink.png", 1)
|
75
mods/mobs/general/dmobs/mobs/pig_evil.lua
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
local pigdef = {
|
||||||
|
type = "monster",
|
||||||
|
passive = true,
|
||||||
|
reach = 3,
|
||||||
|
damage = 2,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
explosion_radius = 2,
|
||||||
|
hp_min = 12,
|
||||||
|
hp_max = 22,
|
||||||
|
armor = 130,
|
||||||
|
collisionbox = {-0.4, 0, -0.4, 0.4, 1, 0.4},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "flying_pig.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_flying_pig_mean.png"},
|
||||||
|
},
|
||||||
|
jump = true,
|
||||||
|
fly = true,
|
||||||
|
fall_speed = 0,
|
||||||
|
stepheight = 1.5,
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=1, y=1},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
runaway = false,
|
||||||
|
walk_velocity = 2,
|
||||||
|
run_velocity = 3,
|
||||||
|
run_chance = 20,
|
||||||
|
jump = true,
|
||||||
|
drops = {
|
||||||
|
{name = "mobs:meat_raw", chance = 2, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
sounds = {
|
||||||
|
random = "mobs_pig",
|
||||||
|
},
|
||||||
|
do_custom = function(self)
|
||||||
|
if self.state == "attack" then
|
||||||
|
self.fly = false
|
||||||
|
self.fall_speed = -4
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
water_damage = 0,
|
||||||
|
lava_damage = 2,
|
||||||
|
light_damage = 0,
|
||||||
|
follow = {"default:apple"},
|
||||||
|
view_range = 14,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 10,
|
||||||
|
speed_run = 15,
|
||||||
|
walk_start = 1,
|
||||||
|
walk_end = 20,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 20,
|
||||||
|
run_start = 22,
|
||||||
|
run_end = 28,
|
||||||
|
|
||||||
|
},
|
||||||
|
on_rightclick = function(self, clicker)
|
||||||
|
|
||||||
|
if mobs:feed_tame(self, clicker, 8, true, true) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
mobs:capture_mob(self, clicker, 0, 5, 50, false, nil)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
if dmobs.destructive then
|
||||||
|
pigdef.sounds.explode = "tnt_explode"
|
||||||
|
pigdef.attack_type = "explode"
|
||||||
|
end
|
||||||
|
|
||||||
|
mobs:register_mob("dmobs:pig_evil", pigdef)
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_egg("dmobs:pig_evil", "Kamikaze Pig", "wool_pink.png", 1)
|
52
mods/mobs/general/dmobs/mobs/rat.lua
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
--Rat
|
||||||
|
|
||||||
|
mobs:register_mob("dmobs:rat", {
|
||||||
|
type = "monster",
|
||||||
|
reach = 2,
|
||||||
|
damage = 2,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
hp_min = 22,
|
||||||
|
hp_max = 42,
|
||||||
|
armor = 130,
|
||||||
|
collisionbox = {-0.4, 0, -0.4, 0.3, 1, 0.3},
|
||||||
|
runaway = true,
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "dmobs_rat.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_rat.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=1, y=1},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
walk_velocity = 1,
|
||||||
|
run_velocity = 2.5,
|
||||||
|
jump = true,
|
||||||
|
drops = {
|
||||||
|
{name = "mobs:meat_raw", chance = 1, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
water_damage = 0,
|
||||||
|
lava_damage = 2,
|
||||||
|
light_damage = 0,
|
||||||
|
fall_damage = 1,
|
||||||
|
fear_height = 5,
|
||||||
|
replace_rate = 10,
|
||||||
|
replace_what = {"farming:wheat_5", "farming:wheat_4", "farming:wheat_2", "farming:wheat_3"},
|
||||||
|
replace_with = "air",
|
||||||
|
follow = {"mobs_animal:cheese"},
|
||||||
|
view_range = 14,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 10,
|
||||||
|
speed_run = 18,
|
||||||
|
walk_start = 43,
|
||||||
|
walk_end = 63,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 20,
|
||||||
|
run_start = 43,
|
||||||
|
run_end = 63,
|
||||||
|
punch_start = 20,
|
||||||
|
punch_end = 40,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_egg("dmobs:rat", "Giant Rat", "wool_grey.png", 1)
|
48
mods/mobs/general/dmobs/mobs/skeleton.lua
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
--skeleton
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_mob("dmobs:skeleton", {
|
||||||
|
type = "monster",
|
||||||
|
reach = 3,
|
||||||
|
damage = 2,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
hp_min = 62,
|
||||||
|
hp_max = 72,
|
||||||
|
armor = 100,
|
||||||
|
collisionbox = {-0.4, 0, -0.4, 0.4, 2.5, 0.4},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "skeleton.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_skeleton.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "default_stone.png",
|
||||||
|
visual_size = {x=1, y=1},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
walk_velocity = 1,
|
||||||
|
run_velocity = 2.5,
|
||||||
|
jump = true,
|
||||||
|
drops = {
|
||||||
|
{name = "bones:bones", chance = 5, min = 3, max = 6},
|
||||||
|
},
|
||||||
|
water_damage = 0,
|
||||||
|
lava_damage = 2,
|
||||||
|
light_damage = 1,
|
||||||
|
fall_damage = 0,
|
||||||
|
fear_height = 10,
|
||||||
|
view_range = 14,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 15,
|
||||||
|
speed_run = 20,
|
||||||
|
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:skeleton", "Skeleton", "default_dirt.png", 1)
|
58
mods/mobs/general/dmobs/mobs/tortoise.lua
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
|
||||||
|
mobs:register_mob("dmobs:tortoise", {
|
||||||
|
type = "animal",
|
||||||
|
passive = false,
|
||||||
|
reach = 1,
|
||||||
|
damage = 2,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
hp_min = 6,
|
||||||
|
hp_max = 12,
|
||||||
|
armor = 130,
|
||||||
|
collisionbox = {-0.2, 0, -0.2, 0.2, 0.3, 0.2},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "tortoise.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_tortoise.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=1, y=1},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
walk_velocity = 0.5,
|
||||||
|
run_velocity = 1,
|
||||||
|
jump = false,
|
||||||
|
jump_height = 0.5,
|
||||||
|
floats = true,
|
||||||
|
drops = {
|
||||||
|
{name = "default:stick", chance = 1, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
water_damage = 0,
|
||||||
|
lava_damage = 2,
|
||||||
|
light_damage = 0,
|
||||||
|
fall_damage = 1,
|
||||||
|
fall_speed = -10,
|
||||||
|
fear_height = 4,
|
||||||
|
follow = {"default:papyrus"},
|
||||||
|
view_range = 14,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 6,
|
||||||
|
speed_run = 10,
|
||||||
|
walk_start = 23,
|
||||||
|
walk_end = 43,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 20,
|
||||||
|
run_start = 23,
|
||||||
|
run_end = 43,
|
||||||
|
|
||||||
|
},
|
||||||
|
on_rightclick = function(self, clicker)
|
||||||
|
|
||||||
|
if mobs:feed_tame(self, clicker, 8, true, true) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
mobs:capture_mob(self, clicker, 30, 50, 80, false, nil)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_egg("dmobs:tortoise", "Tortoise", "default_grass.png", 1)
|
48
mods/mobs/general/dmobs/mobs/treeman.lua
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
-- Treeman
|
||||||
|
|
||||||
|
mobs:register_mob("dmobs:treeman", {
|
||||||
|
type = "monster",
|
||||||
|
reach = 3,
|
||||||
|
damage = 2,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
hp_min = 62,
|
||||||
|
hp_max = 72,
|
||||||
|
armor = 130,
|
||||||
|
collisionbox = {-0.4, 0, -0.4, 0.4, 3, 0.4},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "treeman.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_treeman.png"},
|
||||||
|
{"dmobs_treeman2.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "default_tree.png",
|
||||||
|
visual_size = {x=1, y=1},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
walk_velocity = 1,
|
||||||
|
run_velocity = 2.5,
|
||||||
|
jump = true,
|
||||||
|
drops = {
|
||||||
|
{name = "default:tree", chance = 5, min = 3, max = 6},
|
||||||
|
},
|
||||||
|
water_damage = 0,
|
||||||
|
lava_damage = 2,
|
||||||
|
light_damage = 0,
|
||||||
|
fall_damage = 1,
|
||||||
|
fear_height = 10,
|
||||||
|
view_range = 14,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 10,
|
||||||
|
speed_run = 13,
|
||||||
|
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:treeman", "Treeman", "default_tree.png", 1)
|
110
mods/mobs/general/dmobs/mobs/wasps.lua
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
--Wasps!
|
||||||
|
mobs:register_mob("dmobs:wasp", {
|
||||||
|
type = "monster",
|
||||||
|
reach = 1,
|
||||||
|
damage = 2,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
hp_min = 2,
|
||||||
|
hp_max = 5,
|
||||||
|
armor = 100,
|
||||||
|
collisionbox = {-0.1, -0, -0.1, 0.1, 0.5, 0.1},
|
||||||
|
fly = true,
|
||||||
|
fall_speed = 0,
|
||||||
|
stepheight = 1.5,
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "wasp.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_wasp.png"},
|
||||||
|
},
|
||||||
|
sounds = {
|
||||||
|
random = "wasp",
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=0.6, y=0.6},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
walk_velocity = 2,
|
||||||
|
run_velocity = 3,
|
||||||
|
jump = true,
|
||||||
|
water_damage = 2,
|
||||||
|
lava_damage = 2,
|
||||||
|
light_damage = 0,
|
||||||
|
view_range = 14,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 15,
|
||||||
|
speed_run = 30,
|
||||||
|
walk_start = 1,
|
||||||
|
walk_end = 5,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 5,
|
||||||
|
run_start = 1,
|
||||||
|
run_end = 5,
|
||||||
|
punch_start = 6,
|
||||||
|
punch_end = 15,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_egg("dmobs:wasp", "Wasp", "dmobs_wasp_bg.png", 1)
|
||||||
|
|
||||||
|
mobs:register_mob("dmobs:wasp_leader", {
|
||||||
|
type = "monster",
|
||||||
|
reach = 1,
|
||||||
|
damage = 2,
|
||||||
|
attack_type = "shoot",
|
||||||
|
shoot_interval = 1,
|
||||||
|
arrow = "dmobs:sting",
|
||||||
|
shoot_offset = 0,
|
||||||
|
hp_min = 82,
|
||||||
|
hp_max = 122,
|
||||||
|
armor = 130,
|
||||||
|
collisionbox = {-0.4, -0, -0.4, 0.3, 2, 0.3},
|
||||||
|
pathfinding = true,
|
||||||
|
fly = true,
|
||||||
|
fall_speed = 0,
|
||||||
|
stepheight = 1.5,
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "wasp.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_wasp.png"},
|
||||||
|
},
|
||||||
|
sounds = {
|
||||||
|
random = "wasp",
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=3.5, y=3.5},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
walk_velocity = 1,
|
||||||
|
run_velocity = 2.5,
|
||||||
|
jump = true,
|
||||||
|
drops = {
|
||||||
|
{name = "default:gold_lump", chance = 1, min = 3, max = 5},
|
||||||
|
},
|
||||||
|
do_custom = function(self)
|
||||||
|
if math.random(1, 500) >= 500 then
|
||||||
|
local pos = self.object:getpos()
|
||||||
|
minetest.env:add_entity(pos, "dmobs:wasp")
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
replace_rate = 700,
|
||||||
|
replace_what = {"air"},
|
||||||
|
replace_with = "dmobs:hive",
|
||||||
|
water_damage = 2,
|
||||||
|
lava_damage = 2,
|
||||||
|
light_damage = 0,
|
||||||
|
view_range = 14,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 6,
|
||||||
|
speed_run = 15,
|
||||||
|
walk_start = 1,
|
||||||
|
walk_end = 5,
|
||||||
|
stand_start = 1,
|
||||||
|
stand_end = 5,
|
||||||
|
run_start = 1,
|
||||||
|
run_end = 5,
|
||||||
|
shoot_start = 6,
|
||||||
|
shoot_end = 15,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_egg("dmobs:wasp_leader", "King of Sting", "dmobs_wasp_bg.png", 1)
|
62
mods/mobs/general/dmobs/mobs/whale.lua
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
mobs:register_mob("dmobs:whale", {
|
||||||
|
type = "animal",
|
||||||
|
passive = false,
|
||||||
|
reach = 1,
|
||||||
|
damage = 2,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
hp_min = 52,
|
||||||
|
hp_max = 82,
|
||||||
|
armor = 230,
|
||||||
|
collisionbox = {-0.9, -1.2, -0.9, 0.9, 0.9, 0.9},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "whale.b3d",
|
||||||
|
textures = {
|
||||||
|
{"dmobs_whale.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
visual_size = {x=2.5, y=2.5},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
walk_velocity = 0.5,
|
||||||
|
run_velocity = 1,
|
||||||
|
jump = false,
|
||||||
|
stepheight = 1.5,
|
||||||
|
fall_damage = 0,
|
||||||
|
fall_speed = -6,
|
||||||
|
fly = true,
|
||||||
|
fly_in = "default:water_source",
|
||||||
|
water_damage = 0,
|
||||||
|
lava_damage = 2,
|
||||||
|
light_damage = 0,
|
||||||
|
follow = {"fishing:fish_cooked"},
|
||||||
|
view_range = 14,
|
||||||
|
drops = {
|
||||||
|
{name = "mobs:meat_raw", chance = 1, min = 1, max = 1},
|
||||||
|
},
|
||||||
|
sounds = {
|
||||||
|
random = "whale_1",
|
||||||
|
death = "whale_1",
|
||||||
|
distance = 128,
|
||||||
|
},
|
||||||
|
animation = {
|
||||||
|
speed_normal = 5,
|
||||||
|
speed_run = 10,
|
||||||
|
walk_start = 2,
|
||||||
|
walk_end = 39,
|
||||||
|
stand_start = 2,
|
||||||
|
stand_end = 39,
|
||||||
|
run_start = 2,
|
||||||
|
run_end = 39,
|
||||||
|
|
||||||
|
},
|
||||||
|
on_rightclick = function(self, clicker)
|
||||||
|
|
||||||
|
if mobs:feed_tame(self, clicker, 8, true, true) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
mobs:capture_mob(self, clicker, 0, 5, 50, false, nil)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_egg("dmobs:whale", "Whale", "default_water_source.png", 1)
|
BIN
mods/mobs/general/dmobs/models/badger.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/butterfly.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/dmobs_rat.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/dragon.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/dragon_old.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/egg.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/elephant.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/flying_pig.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/fox.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/gnorm.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/golem.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/hedgehog.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/nyancat.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/ogre.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/orc.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/orc_redesign.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/owl.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/panda.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/panda1.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/skeleton.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/tortoise.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/treeman.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/wasp.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/water_dragon.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/whale.b3d
Normal file
BIN
mods/mobs/general/dmobs/models/wyvern.b3d
Normal file
34
mods/mobs/general/dmobs/nodes.lua
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
|
||||||
|
|
||||||
|
--wasps nest
|
||||||
|
|
||||||
|
minetest.register_node("dmobs:hive", {
|
||||||
|
description = "Wasp Nest",
|
||||||
|
tiles = {"dmobs_hive.png"},
|
||||||
|
groups = {crumbly=1, oddly_breakable_by_hand=1, falling_node=1, flammable=1},
|
||||||
|
on_destruct = function(pos, oldnode)
|
||||||
|
minetest.env:add_entity(pos, "dmobs:wasp")
|
||||||
|
minetest.env:add_entity(pos, "dmobs:wasp")
|
||||||
|
minetest.env:add_entity(pos, "dmobs:wasp")
|
||||||
|
minetest.env:add_entity(pos, "dmobs:wasp")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
--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,
|
||||||
|
})
|
43
mods/mobs/general/dmobs/saddle.lua
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
--saddle license
|
||||||
|
|
||||||
|
-- **mobs_saddle.png**
|
||||||
|
-- -------------------
|
||||||
|
-- The MIT License (MIT)
|
||||||
|
|
||||||
|
-- Copyright (c) 2014 Krupnov Pavel
|
||||||
|
|
||||||
|
-- Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
-- of this software and associated documentation files (the "Software"), to deal
|
||||||
|
-- in the Software without restriction, including without limitation the rights
|
||||||
|
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
-- copies of the Software, and to permit persons to whom the Software is
|
||||||
|
-- furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
-- The above copyright notice and this permission notice shall be included in
|
||||||
|
-- all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
-- THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
-- saddle (if not already available)
|
||||||
|
if not minetest.get_modpath("mobs_horse") then
|
||||||
|
minetest.register_craftitem(":mobs:saddle", {
|
||||||
|
description = "Saddle",
|
||||||
|
inventory_image = "mobs_saddle.png"
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "mobs:saddle",
|
||||||
|
recipe = {
|
||||||
|
{"mobs:leather", "mobs:leather", "mobs:leather"},
|
||||||
|
{"mobs:leather", "default:steel_ingot", "mobs:leather"},
|
||||||
|
{"mobs:leather", "default:steel_ingot", "mobs:leather"}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
BIN
mods/mobs/general/dmobs/sounds/dmobs_chirrup.ogg
Normal file
BIN
mods/mobs/general/dmobs/sounds/mobs_pig.ogg
Normal file
BIN
mods/mobs/general/dmobs/sounds/roar.ogg
Normal file
BIN
mods/mobs/general/dmobs/sounds/velociraptor.ogg
Normal file
BIN
mods/mobs/general/dmobs/sounds/wasp.ogg
Normal file
BIN
mods/mobs/general/dmobs/sounds/whale_1.ogg
Normal file
52
mods/mobs/general/dmobs/spawn.lua
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
if dmobs.regulars then
|
||||||
|
-- friendlies
|
||||||
|
|
||||||
|
mobs:register_spawn("dmobs:nyan", {"default:pine_needles","default:leaves"}, 20, 10, 50000, 2, 31000)
|
||||||
|
mobs:register_spawn("dmobs:nyan", {"nyanland:meseleaves"}, 20, 10, 15000, 2, 31000)
|
||||||
|
|
||||||
|
mobs:register_spawn("dmobs:hedgehog", {"default:dirt_with_grass","default:pine_needles"}, 20, 10, 15000, 2, 31000)
|
||||||
|
mobs:register_spawn("dmobs:whale", {"default:water_source"}, 20, 10, 15000, -20, 1000)
|
||||||
|
mobs:register_spawn("dmobs:owl", {"default:leaves","default:tree"}, 20, 10, 15000, 2, 31000)
|
||||||
|
mobs:register_spawn("dmobs:gnorm", {"default:dirt_with_grass","default:wood"}, 20, 10, 32000, 2, 31000)
|
||||||
|
mobs:register_spawn("dmobs:tortoise", {"default:clay","default:sand"}, 20, 10, 15000, 2, 31000)
|
||||||
|
mobs:register_spawn("dmobs:elephant", {"default:dirt_with_dry_grass","default:desert_sand"}, 20, 10, 15000, 2, 31000)
|
||||||
|
mobs:register_spawn("dmobs:badger", {"default:dirt_with_grass","default:dirt"}, 20, 10, 15000, 2, 31000)
|
||||||
|
mobs:register_spawn("dmobs:pig", {"default:pine_needles","default:leaves", "nyanland:cloudstone"}, 20, 10, 32000, 2, 31000)
|
||||||
|
mobs:register_spawn("dmobs:panda", {"default:dirt_with_grass","ethereal:bamboo_dirt"}, 20, 10, 15000, 2, 31000)
|
||||||
|
|
||||||
|
-- baddies
|
||||||
|
|
||||||
|
mobs:register_spawn("dmobs:wasp", {"default:dirt_with_grass"}, 20, 10, 32000, 2, 31000)
|
||||||
|
mobs:register_spawn("dmobs:wasp", {"dmobs:hive"}, 20, 10, 16000, 2, 31000)
|
||||||
|
mobs:register_spawn("dmobs:wasp_leader", {"default:dirt_with_grass","dmobs:hive"}, 20, 10, 64000, 2, 31000)
|
||||||
|
|
||||||
|
mobs:register_spawn("dmobs:golem", {"default:stone"}, 7, 0, 16000, 2, 31000)
|
||||||
|
mobs:register_spawn("dmobs:pig_evil", {"default:pine_needles","default:leaves"}, 20, 10, 32000, 2, 31000)
|
||||||
|
mobs:register_spawn("dmobs:fox", {"default:dirt_with_grass","default:dirt"}, 20, 10, 32000, 2, 31000)
|
||||||
|
|
||||||
|
if not dmobs.dragons then
|
||||||
|
mobs:register_spawn("dmobs:orc", {"default:snow","default:snow_block", "default:desert_sand"}, 20, 10, 15000, 2, 31000)
|
||||||
|
mobs:register_spawn("dmobs:ogre", {"default:snow","default:dirt_with_dry_grass", "default:desert_sand"}, 20, 10, 15000, 2, 31000)
|
||||||
|
else
|
||||||
|
mobs:register_spawn("dmobs:orc", {"default:snow","default:snow_block", "default:desert_sand"}, 20, 10, 3500, 2, 31000)
|
||||||
|
mobs:register_spawn("dmobs:ogre", {"default:snow","default:dirt_with_dry_grass", "default:desert_sand"}, 20, 10, 350, 2, 31000)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_spawn("dmobs:rat", {"default:stone","default:sand"}, 20, 0, 32000, 2, 31000)
|
||||||
|
mobs:register_spawn("dmobs:treeman", {"default:leaves", "default:pine_needles"}, 7, 0, 16000, 2, 31000)
|
||||||
|
mobs:register_spawn("dmobs:skeleton", {"default:stone"}, 7, 0, 16000, 2, 31000)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- dragons
|
||||||
|
|
||||||
|
mobs:register_spawn("dmobs:dragon", {"default:leaves","default:dirt_with_grass"}, 20, 10, 64000, 2, 31000)
|
||||||
|
|
||||||
|
if dmobs.dragons then
|
||||||
|
mobs:register_spawn("dmobs:dragon2", {"default:pine_needles"}, 20, 10, 64000, 2, 31000)
|
||||||
|
mobs:register_spawn("dmobs:dragon3", {"default:acacia_leaves","default:dirt_with_dry_grass"}, 20, 10, 64000, 2, 31000)
|
||||||
|
mobs:register_spawn("dmobs:dragon4", {"default:jungleleaves"}, 20, 10, 64000, 2, 31000)
|
||||||
|
mobs:register_spawn("dmobs:waterdragon", {"default:water_source"}, 20, 10, 32000, 1, 31000, false)
|
||||||
|
mobs:register_spawn("dmobs:wyvern", {"default:leaves"}, 20, 10, 32000, 1, 31000, false)
|
||||||
|
mobs:register_spawn("dmobs:dragon_great", {"default:lava_source"}, 20, 0, 64000, -21000, 1000, false)
|
||||||
|
end
|
BIN
mods/mobs/general/dmobs/textures/dmobs_armor_steel.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
mods/mobs/general/dmobs/textures/dmobs_badger.png
Normal file
After Width: | Height: | Size: 441 KiB |
BIN
mods/mobs/general/dmobs/textures/dmobs_badger1.png
Normal file
After Width: | Height: | Size: 63 KiB |
BIN
mods/mobs/general/dmobs/textures/dmobs_butterfly1.png
Normal file
After Width: | Height: | Size: 440 B |
BIN
mods/mobs/general/dmobs/textures/dmobs_butterfly2.png
Normal file
After Width: | Height: | Size: 448 B |
BIN
mods/mobs/general/dmobs/textures/dmobs_butterfly3.png
Normal file
After Width: | Height: | Size: 445 B |
BIN
mods/mobs/general/dmobs/textures/dmobs_butterfly4.png
Normal file
After Width: | Height: | Size: 454 B |
BIN
mods/mobs/general/dmobs/textures/dmobs_dragon.png
Normal file
After Width: | Height: | Size: 505 KiB |
BIN
mods/mobs/general/dmobs/textures/dmobs_dragon2.png
Normal file
After Width: | Height: | Size: 726 KiB |
BIN
mods/mobs/general/dmobs/textures/dmobs_dragon3.png
Normal file
After Width: | Height: | Size: 881 KiB |
BIN
mods/mobs/general/dmobs/textures/dmobs_dragon4.png
Normal file
After Width: | Height: | Size: 657 KiB |
BIN
mods/mobs/general/dmobs/textures/dmobs_dragon_armor_inv.png
Normal file
After Width: | Height: | Size: 276 B |
BIN
mods/mobs/general/dmobs/textures/dmobs_dragon_great.png
Normal file
After Width: | Height: | Size: 887 KiB |
BIN
mods/mobs/general/dmobs/textures/dmobs_dragon_young.png
Normal file
After Width: | Height: | Size: 271 KiB |
BIN
mods/mobs/general/dmobs/textures/dmobs_egg.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
mods/mobs/general/dmobs/textures/dmobs_egg1.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
mods/mobs/general/dmobs/textures/dmobs_egg2.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
mods/mobs/general/dmobs/textures/dmobs_egg3.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
mods/mobs/general/dmobs/textures/dmobs_egg4.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
mods/mobs/general/dmobs/textures/dmobs_elephant.png
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
mods/mobs/general/dmobs/textures/dmobs_fire.png
Normal file
After Width: | Height: | Size: 1.0 KiB |