Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
ec80a22c1e | |||
521a630efe | |||
32da63e517 | |||
fe00a32992 | |||
15aab8037a |
@ -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
|
||||||
|
|
||||||
@ -42,7 +42,6 @@ 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}
|
{name = "default:clay_lump", chance = 2, min = 0, max = 1}
|
||||||
},
|
},
|
||||||
water_damage = 1,
|
water_damage = 1,
|
||||||
@ -67,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 @@
|
|||||||
|
|
||||||
-- translation 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})
|
||||||
|
9
init.lua
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
-- translation and mod path
|
-- translation and mod path
|
||||||
|
|
||||||
local S = minetest.get_translator("mobs_monster")
|
local S = core.get_translator("mobs_monster")
|
||||||
local path = minetest.get_modpath(minetest.get_current_modname()) .. "/"
|
local path = core.get_modpath(core.get_current_modname()) .. "/"
|
||||||
|
|
||||||
-- Check for custom mob spawn file
|
-- Check for custom mob spawn file
|
||||||
|
|
||||||
@ -18,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
|
||||||
@ -39,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
|
||||||
|
|
||||||
@ -49,7 +48,7 @@ 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
|
||||||
|
|
||||||
|
@ -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)
|
||||||
|
|
||||||
@ -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,7 +180,7 @@ 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 = 5, gain = 0.05}, 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,9 +220,9 @@ 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 = S("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})
|
||||||
@ -276,7 +279,7 @@ mobs:register_egg("mobs_monster:obsidian_flan", S("Obsidian Flan"),
|
|||||||
|
|
||||||
-- 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",
|
||||||
@ -302,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
|
||||||
|
|
||||||
@ -322,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),
|
||||||
@ -341,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
|
||||||
})
|
})
|
||||||
|
@ -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,9 +310,10 @@ 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,
|
||||||
@ -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"},
|
|
||||||
},
|
|
||||||
})
|
|
@ -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,5 +1,5 @@
|
|||||||
|
|
||||||
local S = minetest.get_translator("mobs_monster")
|
local S = core.get_translator("mobs_monster")
|
||||||
|
|
||||||
-- custom particle effects
|
-- custom particle effects
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ local function effect(pos, amount, texture, min_size, max_size, radius, gravity,
|
|||||||
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,7 +59,6 @@ mobs:register_mob("mobs_monster:sand_monster", {
|
|||||||
jump = true,
|
jump = true,
|
||||||
floats = 0,
|
floats = 0,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "maptools:silver_coin", chance = 10, min = 1, max = 1,},
|
|
||||||
{name = "default:silver_sand", chance = 2, min = 1, max = 2},
|
{name = "default:silver_sand", chance = 2, min = 1, max = 2},
|
||||||
{name = "default:desert_sand", chance = 2, min = 1, max = 2},
|
{name = "default:desert_sand", chance = 2, min = 1, max = 2},
|
||||||
{name = "default:sand", chance = 2, min = 1, max = 2},
|
{name = "default:sand", chance = 2, min = 1, max = 2},
|
||||||
@ -87,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)
|
||||||
|
25
spider.lua
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
local S = minetest.get_translator("mobs_monster")
|
local S = core.get_translator("mobs_monster")
|
||||||
|
|
||||||
-- helper function
|
-- helper function
|
||||||
|
|
||||||
@ -91,8 +91,7 @@ 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,
|
||||||
@ -116,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})
|
||||||
@ -173,7 +172,7 @@ mobs:register_mob("mobs_monster:spider", {
|
|||||||
|
|
||||||
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
|
||||||
@ -183,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)
|
||||||
@ -265,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,
|
||||||
@ -286,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"},
|
||||||
@ -299,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
|
||||||
|
|
||||||
@ -344,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})
|
||||||
|
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 |
@ -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 = {
|
||||||
|
|
||||||
@ -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,7 +114,7 @@ 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})
|
||||||
|