Compare commits
18 Commits
bb6a664f1e
...
master
Author | SHA1 | Date | |
---|---|---|---|
ec80a22c1e | |||
521a630efe | |||
32da63e517 | |||
fe00a32992 | |||
15aab8037a | |||
a195057c8a | |||
185b4d22d4 | |||
edc86fec21 | |||
a02ca31b92 | |||
5d8bcde2ae | |||
70edecd5bb | |||
6ea38b5a16 | |||
d86f9253a7 | |||
004d7ed31d | |||
ddc541f8ed | |||
fc1c015d73 | |||
6de7ee6b11 | |||
1a576f2bb1 |
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
local S = minetest.get_translator("mobs_monster")
|
local S = core.get_translator("mobs_monster")
|
||||||
|
|
||||||
-- custom dirt monster type
|
-- custom dirt monster type
|
||||||
|
|
||||||
@ -8,7 +8,8 @@ local dirt_types = {
|
|||||||
{ nodes = {"ethereal:dry_dirt"},
|
{ nodes = {"ethereal:dry_dirt"},
|
||||||
skins = {"mobs_dirt_monster3.png"},
|
skins = {"mobs_dirt_monster3.png"},
|
||||||
drops = {
|
drops = {
|
||||||
{name = "ethereal:dry_dirt", chance = 1, min = 0, max = 2}
|
{name = "ethereal:dry_dirt", chance = 1, min = 0, max = 2},
|
||||||
|
{name = "ethereal:charcoal_lump", chance = 2, min = 0, max = 1}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -41,7 +42,7 @@ mobs:register_mob("mobs_monster:dirt_monster", {
|
|||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "default:dirt", chance = 1, min = 0, max = 2},
|
{name = "default:dirt", chance = 1, min = 0, max = 2},
|
||||||
{name = "maptools:silver_coin", chance = 2, min = 1, max = 1,},
|
{name = "default:clay_lump", chance = 2, min = 0, max = 1}
|
||||||
},
|
},
|
||||||
water_damage = 1,
|
water_damage = 1,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
@ -65,7 +66,7 @@ mobs:register_mob("mobs_monster:dirt_monster", {
|
|||||||
|
|
||||||
tmp = dirt_types[n]
|
tmp = dirt_types[n]
|
||||||
|
|
||||||
if minetest.find_node_near(pos, 1, tmp.nodes) then
|
if core.find_node_near(pos, 1, tmp.nodes) then
|
||||||
|
|
||||||
self.base_texture = tmp.skins
|
self.base_texture = tmp.skins
|
||||||
self.object:set_properties({textures = tmp.skins})
|
self.object:set_properties({textures = tmp.skins})
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
local S = minetest.get_translator("mobs_monster")
|
local S = core.get_translator("mobs_monster")
|
||||||
|
|
||||||
-- custom dungeon master types
|
-- custom dungeon master types
|
||||||
|
|
||||||
@ -53,10 +53,7 @@ mobs:register_mob("mobs_monster:dungeon_master", {
|
|||||||
{name = "mobs:leather", chance = 2, min = 0, max = 2},
|
{name = "mobs:leather", chance = 2, min = 0, max = 2},
|
||||||
{name = "default:mese_crystal", chance = 3, min = 0, max = 2},
|
{name = "default:mese_crystal", chance = 3, min = 0, max = 2},
|
||||||
{name = "default:diamond", chance = 4, min = 0, max = 1},
|
{name = "default:diamond", chance = 4, min = 0, max = 1},
|
||||||
{name = "default:diamondblock", chance = 30, min = 0, max = 1},
|
{name = "default:diamondblock", chance = 30, min = 0, max = 1}
|
||||||
{name = "mobs_monster:dungeon_master_blood", chance = 2, min = 0, max = 2,},
|
|
||||||
{name = "mobs_monster:dungeon_master_diamond", chance = 6, min = 0, max = 1,},
|
|
||||||
{name = "maptools:gold_coin", chance = 20, min = 0, max = 1,},
|
|
||||||
},
|
},
|
||||||
water_damage = 1,
|
water_damage = 1,
|
||||||
lava_damage = 1,
|
lava_damage = 1,
|
||||||
@ -80,7 +77,7 @@ mobs:register_mob("mobs_monster:dungeon_master", {
|
|||||||
|
|
||||||
tmp = master_types[n]
|
tmp = master_types[n]
|
||||||
|
|
||||||
if minetest.find_node_near(pos, 1, tmp.nodes) then
|
if core.find_node_near(pos, 1, tmp.nodes) then
|
||||||
|
|
||||||
self.base_texture = tmp.skins
|
self.base_texture = tmp.skins
|
||||||
self.object:set_properties({textures = tmp.skins})
|
self.object:set_properties({textures = tmp.skins})
|
||||||
@ -98,13 +95,14 @@ mobs:register_mob("mobs_monster:dungeon_master", {
|
|||||||
-- where to spawn
|
-- where to spawn
|
||||||
|
|
||||||
if not mobs.custom_spawn_monster then
|
if not mobs.custom_spawn_monster then
|
||||||
|
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
name = "mobs_monster:dungeon_master",
|
name = "mobs_monster:dungeon_master",
|
||||||
nodes = {"default:stone", "nether:rack", "nether:rack_deep", "hell:hellrack"},
|
nodes = {"default:stone", "nether:rack", "nether:rack_deep"},
|
||||||
max_light = 5,
|
max_light = 5,
|
||||||
chance = 9000,
|
chance = 9000,
|
||||||
active_object_count = 1,
|
active_object_count = 1,
|
||||||
max_height = -70,
|
max_height = -70
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -180,16 +178,4 @@ mobs:register_arrow("mobs_monster:fireball", {
|
|||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem(":mobs:dungeon_master_blood", {
|
--core.override_item("default:obsidian", {on_blast = function() end})
|
||||||
description = "Dungeon Master Blood",
|
|
||||||
inventory_image = "mobs_dungeon_master_blood.png",
|
|
||||||
groups = {magic = 1},
|
|
||||||
})
|
|
||||||
minetest.register_alias("mobs_monster:dungeon_master_blood", "mobs:dungeon_master_blood")
|
|
||||||
|
|
||||||
minetest.register_craftitem(":mobs:dungeon_master_diamond", {
|
|
||||||
description = "Dungeon Master Diamond",
|
|
||||||
inventory_image = "mobs_dungeon_master_diamond.png",
|
|
||||||
groups = {magic = 1},
|
|
||||||
})
|
|
||||||
minetest.register_alias("mobs_monster:dungeon_master_diamond", "mobs:dungeon_master_diamond")
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
|
|
||||||
-- transpation and drops
|
-- translation and drops
|
||||||
|
|
||||||
local S = minetest.get_translator("mobs_monster")
|
local S = core.get_translator("mobs_monster")
|
||||||
|
|
||||||
local mob_drops = {
|
local mob_drops = {
|
||||||
{name = "fireflies:firefly", chance = 1, min = 1, max = 1}
|
{name = "fireflies:firefly", chance = 1, min = 1, max = 1}
|
||||||
}
|
}
|
||||||
|
|
||||||
if minetest.get_modpath("ethereal") then
|
if core.get_modpath("ethereal") then
|
||||||
|
|
||||||
table.insert(mob_drops,
|
table.insert(mob_drops,
|
||||||
{name = "ethereal:fire_dust", chance = 1, min = 1, max = 1})
|
{name = "ethereal:fire_dust", chance = 1, min = 1, max = 1})
|
||||||
@ -32,8 +32,8 @@ mobs:register_mob("mobs_monster:fire_spirit", {
|
|||||||
glow = 14,
|
glow = 14,
|
||||||
blood_texture = "fire_basic_flame.png",
|
blood_texture = "fire_basic_flame.png",
|
||||||
immune_to = {
|
immune_to = {
|
||||||
{"bucket:bucket_water", 1},
|
{"bucket:bucket_water", 2},
|
||||||
{"bucket:bucket_river_water", 1},
|
{"bucket:bucket_river_water", 2},
|
||||||
{"all"}
|
{"all"}
|
||||||
},
|
},
|
||||||
makes_footstep_sound = false,
|
makes_footstep_sound = false,
|
||||||
@ -48,7 +48,7 @@ mobs:register_mob("mobs_monster:fire_spirit", {
|
|||||||
jump = true,
|
jump = true,
|
||||||
jump_height = 6,
|
jump_height = 6,
|
||||||
drops = mob_drops,
|
drops = mob_drops,
|
||||||
water_damage = 1,
|
water_damage = 4,
|
||||||
lava_damage = 0,
|
lava_damage = 0,
|
||||||
fire_damage = 0,
|
fire_damage = 0,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
@ -67,7 +67,7 @@ mobs:register_mob("mobs_monster:fire_spirit", {
|
|||||||
|
|
||||||
self.flame_timer = (self.flame_timer or 0) + dtime
|
self.flame_timer = (self.flame_timer or 0) + dtime
|
||||||
|
|
||||||
if self.flame_timer < 0.25 then return end
|
if self.flame_timer < 0.1 then return end
|
||||||
|
|
||||||
self.flame_timer = 0
|
self.flame_timer = 0
|
||||||
|
|
||||||
|
14
init.lua
@ -1,7 +1,8 @@
|
|||||||
|
|
||||||
-- transpation and get mod path
|
-- translation and mod path
|
||||||
local S = minetest.get_translator("mobs_monster")
|
|
||||||
local path = minetest.get_modpath(minetest.get_current_modname()) .. "/"
|
local S = core.get_translator("mobs_monster")
|
||||||
|
local path = core.get_modpath(core.get_current_modname()) .. "/"
|
||||||
|
|
||||||
-- Check for custom mob spawn file
|
-- Check for custom mob spawn file
|
||||||
|
|
||||||
@ -17,7 +18,7 @@ end
|
|||||||
|
|
||||||
local function ddoo(mob)
|
local function ddoo(mob)
|
||||||
|
|
||||||
if minetest.settings:get_bool("mobs_monster." .. mob) == false then
|
if core.settings:get_bool("mobs_monster." .. mob) == false then
|
||||||
print("[Mobs_Monster] " .. mob .. " disabled!")
|
print("[Mobs_Monster] " .. mob .. " disabled!")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -38,7 +39,6 @@ ddoo("mese_monster")
|
|||||||
ddoo("spider") -- AspireMint
|
ddoo("spider") -- AspireMint
|
||||||
ddoo("land_guard")
|
ddoo("land_guard")
|
||||||
ddoo("fire_spirit")
|
ddoo("fire_spirit")
|
||||||
dofile(path .. "minotaur.lua") -- NALC(sys4 fork MFF) Kalabasa
|
|
||||||
|
|
||||||
-- Load custom spawning if found
|
-- Load custom spawning if found
|
||||||
|
|
||||||
@ -48,8 +48,8 @@ end
|
|||||||
|
|
||||||
-- Lucky Blocks
|
-- Lucky Blocks
|
||||||
|
|
||||||
if minetest.get_modpath("lucky_block") then
|
if core.get_modpath("lucky_block") then
|
||||||
dofile(path .. "lucky_block.lua")
|
dofile(path .. "lucky_block.lua")
|
||||||
end
|
end
|
||||||
|
|
||||||
print ("[MOD] Mobs Monster loaded")
|
print ("[MOD] Mobs Redo Monsters loaded")
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
-- translation and custom land guard types
|
-- translation and custom land guard types
|
||||||
|
|
||||||
local S = minetest.get_translator("mobs_monster")
|
local S = core.get_translator("mobs_monster")
|
||||||
|
|
||||||
local guard_types = {
|
local guard_types = {
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ mobs:register_mob("mobs_monster:land_guard", {
|
|||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
group_attack = true,
|
group_attack = true,
|
||||||
reach = 3,
|
reach = 3,
|
||||||
damage = 15,
|
damage = 12,
|
||||||
hp_min = 30,
|
hp_min = 30,
|
||||||
hp_max = 65,
|
hp_max = 65,
|
||||||
armor = 50,
|
armor = 50,
|
||||||
@ -85,7 +85,7 @@ mobs:register_mob("mobs_monster:land_guard", {
|
|||||||
|
|
||||||
tmp = guard_types[n]
|
tmp = guard_types[n]
|
||||||
|
|
||||||
if minetest.find_node_near(pos, 1, tmp.nodes) then
|
if core.find_node_near(pos, 1, tmp.nodes) then
|
||||||
|
|
||||||
self.base_texture = { tmp.skins[math.random(#tmp.skins)] }
|
self.base_texture = { tmp.skins[math.random(#tmp.skins)] }
|
||||||
self.object:set_properties({textures = self.base_texture})
|
self.object:set_properties({textures = self.base_texture})
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
local S = minetest.get_translator("mobs_monster")
|
local S = core.get_translator("mobs_monster")
|
||||||
|
|
||||||
-- Lava Flan by Zeg9 (additional textures by JurajVajda)
|
-- Lava Flan by Zeg9 (additional textures by JurajVajda)
|
||||||
|
|
||||||
@ -7,14 +7,14 @@ mobs:register_mob("mobs_monster:lava_flan", {
|
|||||||
type = "monster",
|
type = "monster",
|
||||||
passive = false,
|
passive = false,
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
reach = 2,
|
reach = 2.5,
|
||||||
damage = 3,
|
damage = 3,
|
||||||
hp_min = 10,
|
hp_min = 20,
|
||||||
hp_max = 35,
|
hp_max = 35,
|
||||||
armor = 80,
|
armor = 80,
|
||||||
collisionbox = {-0.5, -0.5, -0.5, 0.5, 1.5, 0.5},
|
collisionbox = {-0.5, -0.5, -0.5, 0.5, 1.5, 0.5},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "zmobs_lava_flan.x",
|
mesh = "zmobs_lava_flan.b3d",
|
||||||
textures = {
|
textures = {
|
||||||
{"zmobs_lava_flan.png"},
|
{"zmobs_lava_flan.png"},
|
||||||
{"zmobs_lava_flan2.png"},
|
{"zmobs_lava_flan2.png"},
|
||||||
@ -39,9 +39,12 @@ mobs:register_mob("mobs_monster:lava_flan", {
|
|||||||
fire_damage = 0,
|
fire_damage = 0,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
immune_to = {
|
immune_to = {
|
||||||
{"mobs:pick_lava", -2} -- lava pick heals 2 health
|
{"mobs:pick_lava", -2}, -- lava pick heals 2 health
|
||||||
|
{"default:lava_source", 0}, -- so that damage per second doesnt affect mob
|
||||||
|
{"default:lava_flowing", 0},
|
||||||
|
{"nether:lava_source", 0},
|
||||||
},
|
},
|
||||||
fly_in = {"default:lava_source", "default:lava_flowing"},
|
fly_in = {"default:lava_source", "default:lava_flowing", "nether:lava_source"},
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 15,
|
speed_normal = 15,
|
||||||
speed_run = 15,
|
speed_run = 15,
|
||||||
@ -59,7 +62,7 @@ mobs:register_mob("mobs_monster:lava_flan", {
|
|||||||
on_die = function(self, pos)
|
on_die = function(self, pos)
|
||||||
|
|
||||||
local cod = self.cause_of_death or {}
|
local cod = self.cause_of_death or {}
|
||||||
local def = cod.node and minetest.registered_nodes[cod.node]
|
local def = cod.node and core.registered_nodes[cod.node]
|
||||||
|
|
||||||
if def and def.groups and def.groups.water then
|
if def and def.groups and def.groups.water then
|
||||||
|
|
||||||
@ -67,7 +70,7 @@ mobs:register_mob("mobs_monster:lava_flan", {
|
|||||||
|
|
||||||
mobs:effect(pos, 40, "tnt_smoke.png", 3, 5, 2, 0.5, nil, false)
|
mobs:effect(pos, 40, "tnt_smoke.png", 3, 5, 2, 0.5, nil, false)
|
||||||
|
|
||||||
minetest.sound_play("fire_extinguish_flame",
|
core.sound_play("fire_extinguish_flame",
|
||||||
{pos = pos, max_hear_distance = 12, gain = 1.5}, true)
|
{pos = pos, max_hear_distance = 12, gain = 1.5}, true)
|
||||||
|
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
@ -78,16 +81,16 @@ mobs:register_mob("mobs_monster:lava_flan", {
|
|||||||
else
|
else
|
||||||
mobs:effect(pos, 40, "fire_basic_flame.png", 2, 3, 2, 5, 10, nil)
|
mobs:effect(pos, 40, "fire_basic_flame.png", 2, 3, 2, 5, 10, nil)
|
||||||
|
|
||||||
local nods = minetest.find_nodes_in_area(
|
local nods = core.find_nodes_in_area(
|
||||||
{x = pos.x, y = pos.y + 1, z = pos.z},
|
{x = pos.x, y = pos.y + 1, z = pos.z},
|
||||||
{x = pos.x, y = pos.y, z = pos.z}, "air")
|
{x = pos.x, y = pos.y, z = pos.z}, "air")
|
||||||
|
|
||||||
-- place flame if position empty and flame exists
|
-- place flame if position empty and flame exists
|
||||||
if nods and #nods > 0
|
if nods and #nods > 0
|
||||||
and minetest.registered_nodes["fire:basic_flame"] then
|
and core.registered_nodes["fire:basic_flame"] then
|
||||||
|
|
||||||
pos = nods[math.random(#nods)]
|
pos = nods[math.random(#nods)]
|
||||||
minetest.set_node(pos, {name = "fire:basic_flame"})
|
core.set_node(pos, {name = "fire:basic_flame"})
|
||||||
end
|
end
|
||||||
|
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
@ -119,15 +122,15 @@ mobs:alias_mob("mobs:lava_flan", "mobs_monster:lava_flan")
|
|||||||
|
|
||||||
-- lava orb
|
-- lava orb
|
||||||
|
|
||||||
minetest.register_craftitem(":mobs:lava_orb", {
|
core.register_craftitem(":mobs:lava_orb", {
|
||||||
description = S("Lava orb"),
|
description = S("Lava orb"),
|
||||||
inventory_image = "zmobs_lava_orb.png",
|
inventory_image = "zmobs_lava_orb.png",
|
||||||
light_source = 14
|
light_source = 14
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_alias("zmobs:lava_orb", "mobs:lava_orb")
|
core.register_alias("zmobs:lava_orb", "mobs:lava_orb")
|
||||||
|
|
||||||
minetest.register_craft({
|
core.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
recipe = "mobs:lava_orb",
|
recipe = "mobs:lava_orb",
|
||||||
burntime = 80
|
burntime = 80
|
||||||
@ -135,9 +138,9 @@ minetest.register_craft({
|
|||||||
|
|
||||||
-- backup and replace old function
|
-- backup and replace old function
|
||||||
|
|
||||||
local old_handle_node_drops = minetest.handle_node_drops
|
local old_handle_node_drops = core.handle_node_drops
|
||||||
|
|
||||||
function minetest.handle_node_drops(pos, drops, digger)
|
function core.handle_node_drops(pos, drops, digger)
|
||||||
|
|
||||||
-- are we a player using the lava pick?
|
-- are we a player using the lava pick?
|
||||||
if digger and digger:get_wielded_item():get_name() == ("mobs:pick_lava") then
|
if digger and digger:get_wielded_item():get_name() == ("mobs:pick_lava") then
|
||||||
@ -151,7 +154,7 @@ function minetest.handle_node_drops(pos, drops, digger)
|
|||||||
|
|
||||||
while not stack:is_empty() do
|
while not stack:is_empty() do
|
||||||
|
|
||||||
local output, decremented_input = minetest.get_craft_result({
|
local output, decremented_input = core.get_craft_result({
|
||||||
method = "cooking", width = 1, items = {stack}})
|
method = "cooking", width = 1, items = {stack}})
|
||||||
|
|
||||||
if output.item:is_empty() then
|
if output.item:is_empty() then
|
||||||
@ -177,8 +180,8 @@ function minetest.handle_node_drops(pos, drops, digger)
|
|||||||
|
|
||||||
mobs:effect(pos, 1, "tnt_smoke.png", 3, 5, 2, 0.5, nil, false)
|
mobs:effect(pos, 1, "tnt_smoke.png", 3, 5, 2, 0.5, nil, false)
|
||||||
|
|
||||||
minetest.sound_play("fire_extinguish_flame",
|
core.sound_play("fire_extinguish_flame",
|
||||||
{pos = pos, max_hear_distance = 8, gain = 0.15}, true)
|
{pos = pos, max_hear_distance = 5, gain = 0.05}, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -187,7 +190,7 @@ end
|
|||||||
|
|
||||||
-- lava pick, smelts nodes when you dig
|
-- lava pick, smelts nodes when you dig
|
||||||
|
|
||||||
minetest.register_tool(":mobs:pick_lava", {
|
core.register_tool(":mobs:pick_lava", {
|
||||||
description = S("Lava Pickaxe"),
|
description = S("Lava Pickaxe"),
|
||||||
inventory_image = "mobs_pick_lava.png",
|
inventory_image = "mobs_pick_lava.png",
|
||||||
tool_capabilities = {
|
tool_capabilities = {
|
||||||
@ -206,7 +209,7 @@ minetest.register_tool(":mobs:pick_lava", {
|
|||||||
|
|
||||||
-- recipe
|
-- recipe
|
||||||
|
|
||||||
minetest.register_craft({
|
core.register_craft({
|
||||||
output = "mobs:pick_lava",
|
output = "mobs:pick_lava",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"mobs:lava_orb", "mobs:lava_orb", "mobs:lava_orb"},
|
{"mobs:lava_orb", "mobs:lava_orb", "mobs:lava_orb"},
|
||||||
@ -217,10 +220,10 @@ minetest.register_craft({
|
|||||||
|
|
||||||
-- Add [toolranks] mod support
|
-- Add [toolranks] mod support
|
||||||
|
|
||||||
if minetest.get_modpath("toolranks") then
|
if core.get_modpath("toolranks") then
|
||||||
|
|
||||||
minetest.override_item("mobs:pick_lava", {
|
core.override_item("mobs:pick_lava", {
|
||||||
original_description = "Lava Pickaxe",
|
original_description = S("Lava Pickaxe"),
|
||||||
description = toolranks.create_description("Lava Pickaxe", 0, 1),
|
description = toolranks.create_description("Lava Pickaxe", 0, 1),
|
||||||
after_use = toolranks.new_afteruse})
|
after_use = toolranks.new_afteruse})
|
||||||
end
|
end
|
||||||
@ -236,13 +239,13 @@ mobs:register_mob("mobs_monster:obsidian_flan", {
|
|||||||
arrow = "mobs_monster:obsidian_arrow",
|
arrow = "mobs_monster:obsidian_arrow",
|
||||||
reach = 2,
|
reach = 2,
|
||||||
damage = 3,
|
damage = 3,
|
||||||
hp_min = 10,
|
hp_min = 20,
|
||||||
hp_max = 35,
|
hp_max = 35,
|
||||||
armor = 30,
|
armor = 30,
|
||||||
visual_size = {x = 0.6, y = 0.6},
|
visual_size = {x = 0.6, y = 0.6},
|
||||||
collisionbox = {-0.3, -0.3, -0.3, 0.3, 0.8, 0.3},
|
collisionbox = {-0.3, -0.3, -0.3, 0.3, 0.8, 0.3},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "zmobs_lava_flan.x",
|
mesh = "zmobs_lava_flan.b3d",
|
||||||
textures = {{"mobs_obsidian_flan.png"}},
|
textures = {{"mobs_obsidian_flan.png"}},
|
||||||
blood_texture = "default_obsidian.png",
|
blood_texture = "default_obsidian.png",
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
@ -270,12 +273,13 @@ mobs:register_mob("mobs_monster:obsidian_flan", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- spawn egg
|
-- spawn egg
|
||||||
|
|
||||||
mobs:register_egg("mobs_monster:obsidian_flan", S("Obsidian Flan"),
|
mobs:register_egg("mobs_monster:obsidian_flan", S("Obsidian Flan"),
|
||||||
"default_obsidian.png", 1)
|
"default_obsidian.png", 1)
|
||||||
|
|
||||||
-- obsidian arrow and grief setting check
|
-- obsidian arrow and grief setting check
|
||||||
|
|
||||||
local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false
|
local mobs_griefing = core.settings:get_bool("mobs_griefing") ~= false
|
||||||
|
|
||||||
mobs:register_arrow("mobs_monster:obsidian_arrow", {
|
mobs:register_arrow("mobs_monster:obsidian_arrow", {
|
||||||
visual = "sprite",
|
visual = "sprite",
|
||||||
@ -301,13 +305,13 @@ mobs:register_arrow("mobs_monster:obsidian_arrow", {
|
|||||||
|
|
||||||
hit_node = function(self, pos, node)
|
hit_node = function(self, pos, node)
|
||||||
|
|
||||||
if mobs_griefing == false or minetest.is_protected(pos, "") then
|
if mobs_griefing == false or core.is_protected(pos, "") then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local texture = "default_dirt.png" --fallback texture
|
local texture = "default_dirt.png" --fallback texture
|
||||||
local radius = 1
|
local radius = 1
|
||||||
local def = node and minetest.registered_nodes[node.name]
|
local def = node and core.registered_nodes[node.name]
|
||||||
|
|
||||||
if not def then return end
|
if not def then return end
|
||||||
|
|
||||||
@ -321,7 +325,7 @@ mobs:register_arrow("mobs_monster:obsidian_arrow", {
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.add_particlespawner({
|
core.add_particlespawner({
|
||||||
amount = 32,
|
amount = 32,
|
||||||
time = 0.1,
|
time = 0.1,
|
||||||
minpos = vector.subtract(pos, radius / 2),
|
minpos = vector.subtract(pos, radius / 2),
|
||||||
@ -340,10 +344,10 @@ mobs:register_arrow("mobs_monster:obsidian_arrow", {
|
|||||||
collisiondetection = true
|
collisiondetection = true
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.set_node(pos, {name = "air"})
|
core.set_node(pos, {name = "air"})
|
||||||
|
|
||||||
local snd = def.sounds and def.sounds.dug or "default_dig_crumbly"
|
local snd = def.sounds and def.sounds.dug or "default_dig_crumbly"
|
||||||
|
|
||||||
minetest.sound_play(snd, {pos = pos, max_hear_distance = 8, gain = 1.0}, true)
|
core.sound_play(snd, {pos = pos, max_hear_distance = 8, gain = 1.0}, true)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
@ -35,6 +35,7 @@ Textures by AMMOnym (WTFPL)
|
|||||||
Textures by TenPlus1 (MIT)
|
Textures by TenPlus1 (MIT)
|
||||||
mobs_stone_monster3.png
|
mobs_stone_monster3.png
|
||||||
mobs_fireball.png
|
mobs_fireball.png
|
||||||
|
mobs_obsidian_flan.png
|
||||||
|
|
||||||
Textures by Sirrobzeroone (CC0 1.0 Universal)
|
Textures by Sirrobzeroone (CC0 1.0 Universal)
|
||||||
mobs_stone_monster4.png
|
mobs_stone_monster4.png
|
||||||
@ -71,10 +72,12 @@ AspireMint (CC BY-SA 3.0)
|
|||||||
mobs_spider_snowy.png
|
mobs_spider_snowy.png
|
||||||
mobs_spider_grey.png
|
mobs_spider_grey.png
|
||||||
mobs_spider_crystal.png
|
mobs_spider_crystal.png
|
||||||
|
zmobs_lava_flan.b3d
|
||||||
|
zmobs_lava_flan.png
|
||||||
|
zmobs_lava_flan2.png
|
||||||
|
zmobs_lava_flan3.png
|
||||||
|
|
||||||
Zeg9 (CC BY-SA 3.0)
|
Zeg9 (CC BY-SA 3.0)
|
||||||
zmobs_lava_flan.x
|
|
||||||
zmobs_lava_flan.png
|
|
||||||
zmobs_lava_orb.png
|
zmobs_lava_orb.png
|
||||||
|
|
||||||
Sounds by Cyberpangolin (WTFPL) https://forum.minetest.net/viewtopic.php?t=10798
|
Sounds by Cyberpangolin (WTFPL) https://forum.minetest.net/viewtopic.php?t=10798
|
||||||
|
14
locale/mobs_monster.pt_BR.tr
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# textdomain:mobs_monster
|
||||||
|
Cobweb=Teia de Aranha
|
||||||
|
Dirt Monster=Monstro de Terra
|
||||||
|
Dungeon Master=Mestre das Dungeons
|
||||||
|
Lava Flan=Pudim de Lava
|
||||||
|
Lava Pickaxe=Picareta de Lava
|
||||||
|
Lava orb=Orb de Lava
|
||||||
|
Mese Monster=Monstro de mese
|
||||||
|
#Obsidian Flan=Pudim de Obsidian
|
||||||
|
Oerkki=Oerkki
|
||||||
|
Sand Monster=Monstro de Areia
|
||||||
|
Spider=Aranha
|
||||||
|
Stone Monster=Monstro de pedra
|
||||||
|
Tree Monster= Arvore Monstro
|
14
locale/mobs_monster.ru.tr
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# textdomain:mobs_monster
|
||||||
|
Cobweb=Паутина
|
||||||
|
Dirt Monster=Земляной Монстр
|
||||||
|
Dungeon Master=Хозяйн Подземелья
|
||||||
|
Lava Flan=Лавовый Слизень
|
||||||
|
Lava Pickaxe=Лавовая Кирка
|
||||||
|
Lava orb=Лавовая сфера
|
||||||
|
Mese Monster=Месе Монстр
|
||||||
|
Obsidian Flan=Обсидиановый Слизень
|
||||||
|
Oerkki=Дух Ведьмы
|
||||||
|
Sand Monster=Песочный Монстр
|
||||||
|
Spider=Паук
|
||||||
|
Stone Monster=Каменный Монстр
|
||||||
|
Tree Monster=Древесный Монстр
|
19
locale/mobs_monster.uk.tr
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# textdomain:mobs_monster
|
||||||
|
Mobs Monster=Моби Монстри
|
||||||
|
Add many different monsters into your world.=Додає багато різних монстрів у світ.
|
||||||
|
Adds many types of monster.=Додає багато різних типів монстрів.
|
||||||
|
Cobweb=Павутина
|
||||||
|
Dirt Monster=Земляний монстр
|
||||||
|
Dungeon Master=Хазяїн печер
|
||||||
|
Lava Flan=Лавовий слимак
|
||||||
|
Lava Pickaxe=Лавове кайло
|
||||||
|
Lava orb=Лавова сфера
|
||||||
|
Mese Monster=Месе монстр
|
||||||
|
Obsidian Flan=Обсидіановий слимак
|
||||||
|
Oerkki=Оерккі
|
||||||
|
Land Guard=Охоронець землі
|
||||||
|
Fire Spirit=Вогняний дух
|
||||||
|
Sand Monster=Пісочний монстр
|
||||||
|
Spider=Павук
|
||||||
|
Stone Monster=Кам'яний монстр
|
||||||
|
Tree Monster=Дерево-монстр
|
@ -37,6 +37,7 @@ lucky_block:add_blocks({
|
|||||||
{"spw", "mobs:spider", 5},
|
{"spw", "mobs:spider", 5},
|
||||||
{"spw", "mobs:mese_monster", 2},
|
{"spw", "mobs:mese_monster", 2},
|
||||||
{"spw", "mobs:lava_flan", 3},
|
{"spw", "mobs:lava_flan", 3},
|
||||||
|
{"spw", "mobs_monster:land_guard", 2},
|
||||||
{"nod", "default:chest", 0, {
|
{"nod", "default:chest", 0, {
|
||||||
{name = "mobs:lava_orb", max = 1}}},
|
{name = "mobs:lava_orb", max = 1}}},
|
||||||
})
|
})
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
-- translation and custom mese monster types
|
-- translation and custom mese monster types
|
||||||
|
|
||||||
local S = minetest.get_translator("mobs_monster")
|
local S = core.get_translator("mobs_monster")
|
||||||
|
|
||||||
local mese_monster_types = {
|
local mese_monster_types = {
|
||||||
|
|
||||||
@ -179,8 +179,6 @@ mobs:register_mob("mobs_monster:mese_monster", {
|
|||||||
drops = {
|
drops = {
|
||||||
{name = "default:mese_crystal", chance = 9, min = 0, max = 2},
|
{name = "default:mese_crystal", chance = 9, min = 0, max = 2},
|
||||||
{name = "default:mese_crystal_fragment", chance = 1, min = 0, max = 2},
|
{name = "default:mese_crystal_fragment", chance = 1, min = 0, max = 2},
|
||||||
{name = "maptools:silver_coin", chance = 1, min = 0, max = 2},
|
|
||||||
{name = "returnmirror:mirror_inactive", chance = 50, min = 1, max = 1},
|
|
||||||
},
|
},
|
||||||
water_damage = 1,
|
water_damage = 1,
|
||||||
lava_damage = 1,
|
lava_damage = 1,
|
||||||
@ -240,11 +238,11 @@ mobs:register_mob("mobs_monster:mese_monster", {
|
|||||||
-- direction sets type N = red, E = green, S = blue, W = purple
|
-- direction sets type N = red, E = green, S = blue, W = purple
|
||||||
-- Just for fun - S01
|
-- Just for fun - S01
|
||||||
|
|
||||||
local objects = minetest.get_objects_inside_radius(pos, 10)
|
local objects = core.get_objects_inside_radius(pos, 10)
|
||||||
|
|
||||||
for i, obj in ipairs(objects) do
|
for i, obj in ipairs(objects) do
|
||||||
|
|
||||||
if minetest.is_player(obj)
|
if core.is_player(obj)
|
||||||
and obj:get_wielded_item():get_name() == "mobs_monster:mese_monster" then
|
and obj:get_wielded_item():get_name() == "mobs_monster:mese_monster" then
|
||||||
|
|
||||||
local degree = (360 + math.deg(obj:get_look_horizontal())) % 360
|
local degree = (360 + math.deg(obj:get_look_horizontal())) % 360
|
||||||
@ -273,7 +271,7 @@ mobs:register_mob("mobs_monster:mese_monster", {
|
|||||||
|
|
||||||
-- mese arrow item
|
-- mese arrow item
|
||||||
|
|
||||||
minetest.register_craftitem("mobs_monster:mese_crystal_fragment_arrow", {
|
core.register_craftitem("mobs_monster:mese_crystal_fragment_arrow", {
|
||||||
description = S("Mese Monster Arrow"),
|
description = S("Mese Monster Arrow"),
|
||||||
inventory_image = "mobs_mese_arrow.png",
|
inventory_image = "mobs_mese_arrow.png",
|
||||||
groups = {not_in_creative_inventory = 1}
|
groups = {not_in_creative_inventory = 1}
|
||||||
@ -312,13 +310,14 @@ mobs:register_arrow("mobs_monster:mese_arrow", {
|
|||||||
-- where to spawn
|
-- where to spawn
|
||||||
|
|
||||||
if not mobs.custom_spawn_monster then
|
if not mobs.custom_spawn_monster then
|
||||||
|
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
name = "mobs_monster:mese_monster",
|
name = "mobs_monster:mese_monster",
|
||||||
nodes = {"default:stone", "default:sandstone"},
|
nodes = {"default:stone"},
|
||||||
max_light = 7,
|
max_light = 7,
|
||||||
chance = 5000,
|
chance = 5000,
|
||||||
active_object_count = 1,
|
active_object_count = 1,
|
||||||
max_height = -20
|
max_height = -20
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -334,7 +333,7 @@ mobs:alias_mob("mobs:mese_monster", "mobs_monster:mese_monster")
|
|||||||
|
|
||||||
local f = "default:mese_crystal_fragment"
|
local f = "default:mese_crystal_fragment"
|
||||||
|
|
||||||
minetest.register_craft({
|
core.register_craft({
|
||||||
output = "default:mese_crystal",
|
output = "default:mese_crystal",
|
||||||
recipe = {{f, f, f}, {f, f, f}, {f, f, f}}
|
recipe = {{f, f, f}, {f, f, f}, {f, f, f}}
|
||||||
})
|
})
|
||||||
|
111
minotaur.lua
@ -1,111 +0,0 @@
|
|||||||
|
|
||||||
-- Minotaur Monster by ???
|
|
||||||
|
|
||||||
mobs:register_mob("mobs_monster:minotaur", {
|
|
||||||
-- animal, monster, npc, barbarian
|
|
||||||
type = "monster",
|
|
||||||
-- aggressive, deals 11 damage to player when hit
|
|
||||||
passive = false,
|
|
||||||
attack_type = "dogfight",
|
|
||||||
pathfinding = false,
|
|
||||||
reach = 2,
|
|
||||||
damage = 6,
|
|
||||||
-- health & armor
|
|
||||||
hp_min = 45,
|
|
||||||
hp_max = 55,
|
|
||||||
armor = 90,
|
|
||||||
-- textures and model
|
|
||||||
collisionbox = {-0.9,-0.01,-0.9, 0.9,2.5,0.9},
|
|
||||||
visual = "mesh",
|
|
||||||
mesh = "mobs_minotaur.b3d",
|
|
||||||
textures = {
|
|
||||||
{"mobs_minotaur.png"},
|
|
||||||
},
|
|
||||||
visual_size = {x=1, y=1},
|
|
||||||
blood_texture = "mobs_blood.png",
|
|
||||||
-- sounds
|
|
||||||
makes_footstep_sound = true,
|
|
||||||
-- sounds = {
|
|
||||||
-- random = "mobs_zombie",
|
|
||||||
-- damage = "mobs_zombie_hit",
|
|
||||||
-- attack = "mobs_zombie_attack",
|
|
||||||
-- death = "mobs_zombie_death",
|
|
||||||
-- },
|
|
||||||
-- speed and jump
|
|
||||||
walk_velocity = 1,
|
|
||||||
run_velocity = 3,
|
|
||||||
jump = true,
|
|
||||||
floats = 1,
|
|
||||||
view_range = 16,
|
|
||||||
knock_back = 0.05, --this is a test
|
|
||||||
-- drops desert_sand and coins when dead
|
|
||||||
drops = {
|
|
||||||
{name = "maptools:gold_coin", chance = 40, min = 1, max = 1,},
|
|
||||||
{name = "mobs_monster:minotaur_eye", chance = 2, min = 1, max = 2,},
|
|
||||||
{name = "mobs_monster:minotaur_horn", chance = 4, min = 1, max = 2,},
|
|
||||||
{name = "mobs_monster:minotaur_fur", chance = 1, min = 1, max = 3,},
|
|
||||||
},
|
|
||||||
water_damage = 0,
|
|
||||||
lava_damage = 5,
|
|
||||||
light_damage = 0,
|
|
||||||
-- model animation
|
|
||||||
animation = {
|
|
||||||
speed_normal = 15, speed_run = 15,
|
|
||||||
stand_start = 0, stand_end = 19,
|
|
||||||
walk_start = 20, walk_end = 39,
|
|
||||||
run_start = 20, run_end = 39,
|
|
||||||
punch_start = 40, punch_end = 50,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
mobs:alias_mob("mobs:minotaur", "mobs_monster:minotaur")
|
|
||||||
|
|
||||||
-- spawns on desert sand between -1 and 20 light, 1 in 100000 chance, 1 Minotaur in area up to 31000 in height
|
|
||||||
--mobs:spawn_specific("mobs_monster:minotaur", {"default:dirt_with_dry_grass"}, {"air"}, -1, 20, 30, 50000, 1, -31000, 31000, false)
|
|
||||||
mobs:spawn({
|
|
||||||
name = "mobs_monster:minotaur",
|
|
||||||
nodes = {"default:dirt_with_dry_grass", "default:desert_sand", "default:desert_stone"},
|
|
||||||
min_light = 0,
|
|
||||||
max_light = default.LIGHT_MAX,
|
|
||||||
chance = 7000,
|
|
||||||
active_object_count = 1,
|
|
||||||
min_height = -31000,
|
|
||||||
max_height = 31000,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- register spawn egg
|
|
||||||
mobs:register_egg("mobs_monster:minotaur", "Minotaur", "mobs_minotaur_inv.png", 1)
|
|
||||||
|
|
||||||
minetest.register_craftitem(":mobs:minotaur_eye", {
|
|
||||||
description = "Minotaur Eye",
|
|
||||||
inventory_image = "mobs_minotaur_eye.png",
|
|
||||||
groups = {magic = 1},
|
|
||||||
})
|
|
||||||
mobs:alias_mob("mobs_monster:minotaur_eye", "mobs:minotaur_eye")
|
|
||||||
|
|
||||||
minetest.register_craftitem(":mobs:minotaur_horn", {
|
|
||||||
description = "Minotaur Horn",
|
|
||||||
inventory_image = "mobs_minotaur_horn.png",
|
|
||||||
groups = {magic = 1},
|
|
||||||
})
|
|
||||||
mobs:alias_mob("mobs_monster:minotaur_horn", "mobs:minotaur_horn")
|
|
||||||
|
|
||||||
minetest.register_craftitem(":mobs:minotaur_fur", {
|
|
||||||
description = "Minotaur Fur",
|
|
||||||
inventory_image = "mobs_minotaur_fur.png",
|
|
||||||
groups = {magic = 1},
|
|
||||||
})
|
|
||||||
mobs:alias_mob("mobs_monster:minotaur_fur", "mobs:minotaur_fur")
|
|
||||||
|
|
||||||
minetest.register_craftitem(":mobs:minotaur_lots_of_fur", {
|
|
||||||
description = "Lot of Minotaur Fur",
|
|
||||||
inventory_image = "mobs_minotaur_lots_of_fur.png",
|
|
||||||
groups = {magic = 1},
|
|
||||||
})
|
|
||||||
mobs:alias_mob("mobs_monster:minotaur_lots_of_fur", "mobs:minotaur_lots_of_fur")
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "mobs_monster:minotaur_lots_of_fur",
|
|
||||||
recipe = {{"mobs_monster:minotaur_fur", "mobs_monster:minotaur_fur"},
|
|
||||||
{"mobs_monster:minotaur_fur", "mobs_monster:minotaur_fur"},
|
|
||||||
},
|
|
||||||
})
|
|
BIN
models/zmobs_lava_flan.b3d
Normal file
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
local S = minetest.get_translator("mobs_monster")
|
local S = core.get_translator("mobs_monster")
|
||||||
|
|
||||||
-- Oerkki by PilzAdam
|
-- Oerkki by PilzAdam
|
||||||
|
|
||||||
@ -29,8 +29,7 @@ mobs:register_mob("mobs_monster:oerkki", {
|
|||||||
jump = true,
|
jump = true,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "default:obsidian", chance = 3, min = 0, max = 2},
|
{name = "default:obsidian", chance = 3, min = 0, max = 2},
|
||||||
{name = "default:gold_lump", chance = 2, min = 0, max = 2},
|
{name = "default:gold_lump", chance = 2, min = 0, max = 2}
|
||||||
{name = "maptools:silver_coin", chance = 1, min = 0, max = 1},
|
|
||||||
},
|
},
|
||||||
water_damage = 2,
|
water_damage = 2,
|
||||||
lava_damage = 4,
|
lava_damage = 4,
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
local S = minetest.get_translator("mobs_monster")
|
local S = core.get_translator("mobs_monster")
|
||||||
|
|
||||||
-- custom particle effects
|
-- custom particle effects
|
||||||
|
|
||||||
local effect = function(pos, amount, texture, min_size, max_size, radius, gravity, glow)
|
local function effect(pos, amount, texture, min_size, max_size, radius, gravity, glow)
|
||||||
|
|
||||||
radius = radius or 2
|
radius = radius or 2
|
||||||
min_size = min_size or 0.5
|
min_size = min_size or 0.5
|
||||||
@ -11,7 +11,7 @@ local effect = function(pos, amount, texture, min_size, max_size, radius, gravit
|
|||||||
gravity = gravity or -10
|
gravity = gravity or -10
|
||||||
glow = glow or 0
|
glow = glow or 0
|
||||||
|
|
||||||
minetest.add_particlespawner({
|
core.add_particlespawner({
|
||||||
amount = amount,
|
amount = amount,
|
||||||
time = 0.25,
|
time = 0.25,
|
||||||
minpos = pos,
|
minpos = pos,
|
||||||
@ -59,8 +59,10 @@ mobs:register_mob("mobs_monster:sand_monster", {
|
|||||||
jump = true,
|
jump = true,
|
||||||
floats = 0,
|
floats = 0,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "default:desert_sand", chance = 1, min = 3, max = 5},
|
{name = "default:silver_sand", chance = 2, min = 1, max = 2},
|
||||||
{name = "maptools:silver_coin", chance = 10, min = 1, max = 1,},
|
{name = "default:desert_sand", chance = 2, min = 1, max = 2},
|
||||||
|
{name = "default:sand", chance = 2, min = 1, max = 2},
|
||||||
|
{name = "default:clay_lump", chance = 2, min = 0, max = 1}
|
||||||
},
|
},
|
||||||
water_damage = 3,
|
water_damage = 3,
|
||||||
lava_damage = 4,
|
lava_damage = 4,
|
||||||
@ -84,7 +86,7 @@ mobs:register_mob("mobs_monster:sand_monster", {
|
|||||||
--[[
|
--[[
|
||||||
custom_attack = function(self, p)
|
custom_attack = function(self, p)
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
minetest.add_item(pos, "default:sand")
|
core.add_item(pos, "default:sand")
|
||||||
end,
|
end,
|
||||||
]]
|
]]
|
||||||
on_die = function(self, pos)
|
on_die = function(self, pos)
|
||||||
|
47
spider.lua
@ -1,9 +1,9 @@
|
|||||||
-- Translation support
|
|
||||||
local S = minetest.get_translator("mobs_monster")
|
local S = core.get_translator("mobs_monster")
|
||||||
|
|
||||||
-- helper function
|
-- helper function
|
||||||
|
|
||||||
local get_velocity = function(self)
|
local function get_velocity(self)
|
||||||
|
|
||||||
local v = self.object:get_velocity()
|
local v = self.object:get_velocity()
|
||||||
|
|
||||||
@ -13,6 +13,8 @@ local get_velocity = function(self)
|
|||||||
return (v.x * v.x + v.z * v.z) ^ 0.5
|
return (v.x * v.x + v.z * v.z) ^ 0.5
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local math_cos, math_sin = math.cos, math.sin
|
||||||
|
|
||||||
-- custom spider types
|
-- custom spider types
|
||||||
|
|
||||||
local spider_types = {
|
local spider_types = {
|
||||||
@ -47,7 +49,7 @@ local spider_types = {
|
|||||||
|
|
||||||
{ nodes = {"ethereal:crystal_dirt", "ethereal:crystal_spike"},
|
{ nodes = {"ethereal:crystal_dirt", "ethereal:crystal_spike"},
|
||||||
skins = {"mobs_spider_crystal.png"},
|
skins = {"mobs_spider_crystal.png"},
|
||||||
docile = true,
|
docile = true, immune_to = {{"ethereal:crystal_spike", 0}},
|
||||||
drops = {
|
drops = {
|
||||||
{name = "farming:string", chance = 1, min = 0, max = 2},
|
{name = "farming:string", chance = 1, min = 0, max = 2},
|
||||||
{name = "ethereal:crystal_spike", chance = 15, min = 1, max = 2}}
|
{name = "ethereal:crystal_spike", chance = 15, min = 1, max = 2}}
|
||||||
@ -66,8 +68,8 @@ mobs:register_mob("mobs_monster:spider", {
|
|||||||
damage = 3,
|
damage = 3,
|
||||||
hp_min = 10,
|
hp_min = 10,
|
||||||
hp_max = 30,
|
hp_max = 30,
|
||||||
armor = 200,
|
armor = 100,
|
||||||
collisionbox = {-0.8, -0.5, -0.8, 0.8, 0, 0.8},
|
collisionbox = {-0.7, -0.5, -0.7, 0.7, 0, 0.7},
|
||||||
visual_size = {x = 1, y = 1},
|
visual_size = {x = 1, y = 1},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mobs_spider.b3d",
|
mesh = "mobs_spider.b3d",
|
||||||
@ -89,13 +91,12 @@ mobs:register_mob("mobs_monster:spider", {
|
|||||||
view_range = 15,
|
view_range = 15,
|
||||||
floats = 0,
|
floats = 0,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "farming:string", chance = 1, min = 0, max = 2},
|
{name = "farming:string", chance = 1, min = 0, max = 2}
|
||||||
{name = "maptools:silver_coin", chance = 3, min = 0, max = 1,},
|
|
||||||
},
|
},
|
||||||
water_damage = 5,
|
water_damage = 5,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
node_damage = false, -- disable damage_per_second node damage
|
-- node_damage = false, -- disable damage_per_second node damage
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 15, speed_run = 20,
|
speed_normal = 15, speed_run = 20,
|
||||||
stand_start = 0, stand_end = 0,
|
stand_start = 0, stand_end = 0,
|
||||||
@ -114,7 +115,7 @@ mobs:register_mob("mobs_monster:spider", {
|
|||||||
|
|
||||||
tmp = spider_types[n]
|
tmp = spider_types[n]
|
||||||
|
|
||||||
if minetest.find_node_near(pos, 1, tmp.nodes) then
|
if core.find_node_near(pos, 1, tmp.nodes) then
|
||||||
|
|
||||||
self.base_texture = tmp.skins
|
self.base_texture = tmp.skins
|
||||||
self.object:set_properties({textures = tmp.skins})
|
self.object:set_properties({textures = tmp.skins})
|
||||||
@ -122,6 +123,8 @@ mobs:register_mob("mobs_monster:spider", {
|
|||||||
|
|
||||||
if tmp.drops then self.drops = tmp.drops end
|
if tmp.drops then self.drops = tmp.drops end
|
||||||
|
|
||||||
|
if tmp.immune_to then self.immune_to = tmp.immune_to end
|
||||||
|
|
||||||
if tmp.shoot then
|
if tmp.shoot then
|
||||||
self.attack_type = "dogshoot"
|
self.attack_type = "dogshoot"
|
||||||
self.arrow = "mobs_monster:cobweb"
|
self.arrow = "mobs_monster:cobweb"
|
||||||
@ -167,9 +170,9 @@ mobs:register_mob("mobs_monster:spider", {
|
|||||||
|
|
||||||
pos.y = pos.y + prop.collisionbox[2] - 0.2
|
pos.y = pos.y + prop.collisionbox[2] - 0.2
|
||||||
|
|
||||||
local dir_x = -math.sin(yaw) * (prop.collisionbox[4] + 0.5)
|
local dir_x = -math_sin(yaw) * (prop.collisionbox[4] + 0.5)
|
||||||
local dir_z = math.cos(yaw) * (prop.collisionbox[4] + 0.5)
|
local dir_z = math_cos(yaw) * (prop.collisionbox[4] + 0.5)
|
||||||
local nod = minetest.get_node_or_nil({
|
local nod = core.get_node_or_nil({
|
||||||
x = pos.x + dir_x,
|
x = pos.x + dir_x,
|
||||||
y = pos.y + 0.5,
|
y = pos.y + 0.5,
|
||||||
z = pos.z + dir_z
|
z = pos.z + dir_z
|
||||||
@ -179,8 +182,8 @@ mobs:register_mob("mobs_monster:spider", {
|
|||||||
local v = self.object:get_velocity()
|
local v = self.object:get_velocity()
|
||||||
|
|
||||||
-- can only climb solid facings
|
-- can only climb solid facings
|
||||||
if not nod or not minetest.registered_nodes[nod.name]
|
if not nod or not core.registered_nodes[nod.name]
|
||||||
or not minetest.registered_nodes[nod.name].walkable then
|
or not core.registered_nodes[nod.name].walkable then
|
||||||
self.disable_falling = nil
|
self.disable_falling = nil
|
||||||
v.y = 0
|
v.y = 0
|
||||||
self.object:set_velocity(v)
|
self.object:set_velocity(v)
|
||||||
@ -233,7 +236,7 @@ if not mobs.custom_spawn_monster then
|
|||||||
max_light = 8,
|
max_light = 8,
|
||||||
chance = 7000,
|
chance = 7000,
|
||||||
active_object_count = 1,
|
active_object_count = 1,
|
||||||
min_height = 25,
|
min_height = 2,
|
||||||
max_height = 31000
|
max_height = 31000
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -261,7 +264,7 @@ mobs:alias_mob("mobs:spider", "mobs_monster:spider")
|
|||||||
|
|
||||||
-- cobweb and recipe
|
-- cobweb and recipe
|
||||||
|
|
||||||
minetest.register_node(":mobs:cobweb", {
|
core.register_node(":mobs:cobweb", {
|
||||||
description = S("Cobweb"),
|
description = S("Cobweb"),
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
visual_scale = 1.2,
|
visual_scale = 1.2,
|
||||||
@ -282,7 +285,7 @@ minetest.register_node(":mobs:cobweb", {
|
|||||||
sounds = mobs.node_sound_leaves_defaults()
|
sounds = mobs.node_sound_leaves_defaults()
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
core.register_craft({
|
||||||
output = "mobs:cobweb",
|
output = "mobs:cobweb",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"farming:string", "", "farming:string"},
|
{"farming:string", "", "farming:string"},
|
||||||
@ -295,12 +298,12 @@ minetest.register_craft({
|
|||||||
|
|
||||||
local web_place = function(pos)
|
local web_place = function(pos)
|
||||||
|
|
||||||
if minetest.find_node_near(pos, 1, {"ignore"}) then return end
|
if core.find_node_near(pos, 1, {"ignore"}) then return end
|
||||||
|
|
||||||
local pos2 = minetest.find_node_near(pos, 1, {"air", "group:leaves"}, true)
|
local pos2 = core.find_node_near(pos, 1, {"air", "group:leaves"}, true)
|
||||||
|
|
||||||
if pos2 then
|
if pos2 then
|
||||||
minetest.swap_node(pos2, {name = "mobs:cobweb"})
|
core.swap_node(pos2, {name = "mobs:cobweb"})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -340,5 +343,3 @@ mobs:register_arrow("mobs_monster:cobweb", {
|
|||||||
}, nil)
|
}, nil)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_alias("mobs:spider_cobweb", "mobs:cobweb")
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
-- translation and custom stone monster types
|
-- translation and custom stone monster types
|
||||||
|
|
||||||
local S = minetest.get_translator("mobs_monster")
|
local S = core.get_translator("mobs_monster")
|
||||||
|
|
||||||
local stone_types = {
|
local stone_types = {
|
||||||
|
|
||||||
@ -54,9 +54,7 @@ mobs:register_mob("mobs_monster:stone_monster", {
|
|||||||
drops = {
|
drops = {
|
||||||
{name = "default:cobble", chance = 1, min = 0, max = 2},
|
{name = "default:cobble", chance = 1, min = 0, max = 2},
|
||||||
{name = "default:coal_lump", chance = 3, min = 0, max = 2},
|
{name = "default:coal_lump", chance = 3, min = 0, max = 2},
|
||||||
{name = "default:iron_lump", chance = 5, min = 0, max = 2},
|
{name = "default:iron_lump", chance = 5, min = 0, max = 2}
|
||||||
{name = "maptools:silver_coin", chance = 1, min = 0, max = 1},
|
|
||||||
{name = "default:torch", chance = 2, min = 3, max = 5},
|
|
||||||
},
|
},
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 1,
|
lava_damage = 1,
|
||||||
@ -87,7 +85,7 @@ mobs:register_mob("mobs_monster:stone_monster", {
|
|||||||
|
|
||||||
tmp = stone_types[n]
|
tmp = stone_types[n]
|
||||||
|
|
||||||
if minetest.find_node_near(pos, 1, tmp.nodes) then
|
if core.find_node_near(pos, 1, tmp.nodes) then
|
||||||
|
|
||||||
self.base_texture = tmp.skins
|
self.base_texture = tmp.skins
|
||||||
self.object:set_properties({textures = tmp.skins})
|
self.object:set_properties({textures = tmp.skins})
|
||||||
@ -108,7 +106,8 @@ if not mobs.custom_spawn_monster then
|
|||||||
|
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
name = "mobs_monster:stone_monster",
|
name = "mobs_monster:stone_monster",
|
||||||
nodes = {"default:stone", "default:desert_stone", "default:sandstone"},
|
nodes = {"default:stone", "default:desert_stone", "default:sandstone",
|
||||||
|
"default:permafrost_with_stones"},
|
||||||
max_light = 7,
|
max_light = 7,
|
||||||
chance = 7000,
|
chance = 7000,
|
||||||
max_height = 0
|
max_height = 0
|
||||||
|
Before Width: | Height: | Size: 456 B |
Before Width: | Height: | Size: 310 B |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 458 B |
Before Width: | Height: | Size: 252 B |
Before Width: | Height: | Size: 302 B |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 275 B After Width: | Height: | Size: 891 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.6 KiB |
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
-- translation and custom tree monster types
|
-- translation and custom tree monster types
|
||||||
|
|
||||||
local S = minetest.get_translator("mobs_monster")
|
local S = core.get_translator("mobs_monster")
|
||||||
|
|
||||||
local tree_types = {
|
local tree_types = {
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ local tree_types = {
|
|||||||
{name = "ethereal:frost_leaves", chance = 1, min = 1, max = 2},
|
{name = "ethereal:frost_leaves", chance = 1, min = 1, max = 2},
|
||||||
{name = "ethereal:frost_tree", chance = 2, min = 1, max = 2},
|
{name = "ethereal:frost_tree", chance = 2, min = 1, max = 2},
|
||||||
{name = "ethereal:crystal_spike", chance = 4, min = 0, max = 2}
|
{name = "ethereal:crystal_spike", chance = 4, min = 0, max = 2}
|
||||||
}
|
}, glow = 1
|
||||||
},
|
},
|
||||||
|
|
||||||
{ nodes = {"ethereal:yellowleaves"},
|
{ nodes = {"ethereal:yellowleaves"},
|
||||||
@ -32,7 +32,7 @@ local tree_types = {
|
|||||||
{name = "ethereal:yellowleaves", chance = 1, min = 1, max = 2},
|
{name = "ethereal:yellowleaves", chance = 1, min = 1, max = 2},
|
||||||
{name = "ethereal:yellow_tree_sapling", chance = 2, min = 0, max = 2},
|
{name = "ethereal:yellow_tree_sapling", chance = 2, min = 0, max = 2},
|
||||||
{name = "ethereal:golden_apple", chance = 3, min = 0, max = 2}
|
{name = "ethereal:golden_apple", chance = 3, min = 0, max = 2}
|
||||||
}
|
}, glow = 1
|
||||||
},
|
},
|
||||||
|
|
||||||
{ nodes = {"default:acacia_bush_leaves"},
|
{ nodes = {"default:acacia_bush_leaves"},
|
||||||
@ -77,9 +77,7 @@ mobs:register_mob("mobs_monster:tree_monster", {
|
|||||||
{name = "default:stick", chance = 1, min = 0, max = 2},
|
{name = "default:stick", chance = 1, min = 0, max = 2},
|
||||||
{name = "default:sapling", chance = 2, min = 0, max = 2},
|
{name = "default:sapling", chance = 2, min = 0, max = 2},
|
||||||
{name = "default:junglesapling", chance = 3, min = 0, max = 2},
|
{name = "default:junglesapling", chance = 3, min = 0, max = 2},
|
||||||
{name = "default:apple", chance = 4, min = 1, max = 2},
|
{name = "default:apple", chance = 4, min = 1, max = 2}
|
||||||
{name = "maptools:superapple", chance = 4, min = 0, max = 1,},
|
|
||||||
{name = "maptools:silver_coin", chance = 3, min = 0, max = 1,},
|
|
||||||
},
|
},
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
lava_damage = 0,
|
lava_damage = 0,
|
||||||
@ -116,11 +114,13 @@ mobs:register_mob("mobs_monster:tree_monster", {
|
|||||||
|
|
||||||
if tmp.explode and math.random(2) == 1 then return true end
|
if tmp.explode and math.random(2) == 1 then return true end
|
||||||
|
|
||||||
if minetest.find_node_near(pos, 1, tmp.nodes) then
|
if core.find_node_near(pos, 1, tmp.nodes) then
|
||||||
|
|
||||||
self.base_texture = tmp.skins
|
self.base_texture = tmp.skins
|
||||||
self.object:set_properties({textures = tmp.skins})
|
self.object:set_properties({textures = tmp.skins})
|
||||||
|
|
||||||
|
if tmp.glow then self.object:set_properties({glow = tmp.glow}) end
|
||||||
|
|
||||||
if tmp.drops then self.drops = tmp.drops end
|
if tmp.drops then self.drops = tmp.drops end
|
||||||
|
|
||||||
if tmp.explode then
|
if tmp.explode then
|
||||||
|