Compare commits
56 Commits
nalc-1.0
...
7bd9080eda
Author | SHA1 | Date | |
---|---|---|---|
7bd9080eda | |||
e39d06b2d8 | |||
b9666dffb4 | |||
2baa1cc77d | |||
095d8753e0 | |||
476ad97935 | |||
5723ba508e | |||
57f40cf4b1 | |||
22308b4c94 | |||
05ccc87150 | |||
b1a94c5abc | |||
2129b4731f | |||
9835105cf9 | |||
c8003524d6 | |||
dbc501da64 | |||
4a3bf56409 | |||
2c88a98ca3 | |||
5297dfbbdf | |||
4018a5c8e8 | |||
1e72bfd920 | |||
144c851207 | |||
057177203a | |||
84f1ff383a | |||
6b69a3e23d | |||
a42877ef78 | |||
deea6597da | |||
7be2f3bd63 | |||
fd1807e746 | |||
ca10e7e1f6 | |||
3c3d65796a | |||
a39eec8822 | |||
a6b6795eb4 | |||
592c4aca50 | |||
475e0f5624 | |||
4477466120 | |||
abae5bada4 | |||
4f135de146 | |||
b6591fa9a7 | |||
55d3d4b547 | |||
674afa91e5 | |||
2fdfd7f84c | |||
ded074939a | |||
ffc136296e | |||
33a314934a | |||
5674b6328e | |||
2663922651 | |||
cd5909697b | |||
3ddd27e515 | |||
e6d4b185b3 | |||
822450e2c7 | |||
133766d0ab | |||
947adeeb79 | |||
6cf5b95fc9 | |||
86e5f4ed09 | |||
eeb6a8e138 | |||
d6420071ab |
@ -1,5 +1,5 @@
|
|||||||
default
|
default
|
||||||
mobs
|
mobs
|
||||||
intllib?
|
|
||||||
lucky_block?
|
lucky_block?
|
||||||
toolranks?
|
toolranks?
|
||||||
|
intllib?
|
||||||
|
@ -1,6 +1,16 @@
|
|||||||
|
|
||||||
local S = mobs.intllib
|
local S = mobs.intllib
|
||||||
|
|
||||||
|
local dirt_types = {
|
||||||
|
|
||||||
|
{ nodes = {"ethereal:dry_dirt"},
|
||||||
|
skins = {"mobs_dirt_monster3.png"},
|
||||||
|
drops = {
|
||||||
|
{name = "ethereal:dry_dirt", chance = 1, min = 0, max = 2}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
-- Dirt Monster by PilzAdam
|
-- Dirt Monster by PilzAdam
|
||||||
|
|
||||||
@ -19,6 +29,7 @@ mobs:register_mob("mobs_monster:dirt_monster", {
|
|||||||
mesh = "mobs_stone_monster.b3d",
|
mesh = "mobs_stone_monster.b3d",
|
||||||
textures = {
|
textures = {
|
||||||
{"mobs_dirt_monster.png"},
|
{"mobs_dirt_monster.png"},
|
||||||
|
{"mobs_dirt_monster2.png"},
|
||||||
},
|
},
|
||||||
blood_texture = "default_dirt.png",
|
blood_texture = "default_dirt.png",
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
@ -49,18 +60,39 @@ mobs:register_mob("mobs_monster:dirt_monster", {
|
|||||||
punch_start = 40,
|
punch_start = 40,
|
||||||
punch_end = 63,
|
punch_end = 63,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- check surrounding nodes and spawn a specific monster
|
||||||
|
on_spawn = function(self)
|
||||||
|
|
||||||
|
local pos = self.object:get_pos() ; pos.y = pos.y - 1
|
||||||
|
local tmp
|
||||||
|
|
||||||
|
for n = 1, #dirt_types do
|
||||||
|
|
||||||
|
tmp = dirt_types[n]
|
||||||
|
|
||||||
|
if minetest.find_node_near(pos, 1, tmp.nodes) then
|
||||||
|
|
||||||
|
self.base_texture = tmp.skins
|
||||||
|
self.object:set_properties({textures = tmp.skins})
|
||||||
|
|
||||||
|
if tmp.drops then
|
||||||
|
self.drops = tmp.drops
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return true -- run only once, false/nil runs every activation
|
||||||
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
local spawn_on = "default:dirt_with_grass"
|
if not mobs.custom_spawn_monster then
|
||||||
|
|
||||||
if minetest.get_modpath("ethereal") then
|
|
||||||
spawn_on = "ethereal:gray_dirt"
|
|
||||||
end
|
|
||||||
|
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
name = "mobs_monster:dirt_monster",
|
name = "mobs_monster:dirt_monster",
|
||||||
nodes = {spawn_on},
|
nodes = {"default:dirt_with_grass", "ethereal:gray_dirt", "ethereal:dry_dirt"},
|
||||||
min_light = 0,
|
min_light = 0,
|
||||||
max_light = 7,
|
max_light = 7,
|
||||||
chance = 6000,
|
chance = 6000,
|
||||||
@ -68,6 +100,7 @@ mobs:spawn({
|
|||||||
min_height = 0,
|
min_height = 0,
|
||||||
day_toggle = false,
|
day_toggle = false,
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
mobs:register_egg("mobs_monster:dirt_monster", S("Dirt Monster"), "default_dirt.png", 1)
|
mobs:register_egg("mobs_monster:dirt_monster", S("Dirt Monster"), "default_dirt.png", 1)
|
||||||
|
@ -16,8 +16,8 @@ mobs:register_mob("mobs_monster:dungeon_master", {
|
|||||||
shoot_interval = 2.2,
|
shoot_interval = 2.2,
|
||||||
arrow = "mobs_monster:fireball",
|
arrow = "mobs_monster:fireball",
|
||||||
shoot_offset = 1,
|
shoot_offset = 1,
|
||||||
hp_min = 22,
|
hp_min = 42,
|
||||||
hp_max = 45,
|
hp_max = 75,
|
||||||
armor = 60,
|
armor = 60,
|
||||||
collisionbox = {-0.7, -1, -0.7, 0.7, 1.6, 0.7},
|
collisionbox = {-0.7, -1, -0.7, 0.7, 1.6, 0.7},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
@ -65,6 +65,7 @@ mobs:register_mob("mobs_monster:dungeon_master", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
if not mobs.custom_spawn_monster then
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
name = "mobs_monster:dungeon_master",
|
name = "mobs_monster:dungeon_master",
|
||||||
nodes = {"default:stone", "default:sandstone", "nether:netherrack"},
|
nodes = {"default:stone", "default:sandstone", "nether:netherrack"},
|
||||||
@ -73,6 +74,7 @@ mobs:spawn({
|
|||||||
active_object_count = 1,
|
active_object_count = 1,
|
||||||
max_height = -70,
|
max_height = -70,
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
mobs:register_egg("mobs_monster:dungeon_master", S("Dungeon Master"), "fire_basic_flame.png", 1, true)
|
mobs:register_egg("mobs_monster:dungeon_master", S("Dungeon Master"), "fire_basic_flame.png", 1, true)
|
||||||
|
63
init.lua
@ -1,34 +1,45 @@
|
|||||||
|
|
||||||
local path = minetest.get_modpath("mobs_monster")
|
-- Load support for intllib.
|
||||||
|
local path = minetest.get_modpath(minetest.get_current_modname()) .. "/"
|
||||||
|
|
||||||
|
local S = minetest.get_translator and minetest.get_translator("mobs_monster") or
|
||||||
|
dofile(path .. "intllib.lua")
|
||||||
|
|
||||||
-- Intllib
|
|
||||||
local S
|
|
||||||
if minetest.global_exists("intllib") then
|
|
||||||
if intllib.make_gettext_pair then
|
|
||||||
-- New method using gettext.
|
|
||||||
S = intllib.make_gettext_pair()
|
|
||||||
else
|
|
||||||
-- Old method using text files.
|
|
||||||
S = intllib.Getter()
|
|
||||||
end
|
|
||||||
else
|
|
||||||
S = function(s) return s end
|
|
||||||
end
|
|
||||||
mobs.intllib = S
|
mobs.intllib = S
|
||||||
|
|
||||||
|
|
||||||
|
-- Check for custom mob spawn file
|
||||||
|
local input = io.open(path .. "spawn.lua", "r")
|
||||||
|
|
||||||
|
if input then
|
||||||
|
mobs.custom_spawn_monster = true
|
||||||
|
input:close()
|
||||||
|
input = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- Monsters
|
-- Monsters
|
||||||
|
dofile(path .. "dirt_monster.lua") -- PilzAdam
|
||||||
|
dofile(path .. "dungeon_master.lua")
|
||||||
|
dofile(path .. "oerkki.lua")
|
||||||
|
dofile(path .. "sand_monster.lua")
|
||||||
|
dofile(path .. "stone_monster.lua")
|
||||||
|
dofile(path .. "tree_monster.lua")
|
||||||
|
dofile(path .. "lava_flan.lua") -- Zeg9
|
||||||
|
dofile(path .. "mese_monster.lua")
|
||||||
|
dofile(path .. "spider.lua") -- AspireMint
|
||||||
|
dofile(path .. "minotaur.lua") -- NALC(sys4 fork MFF) Kalabasa
|
||||||
|
dofile(path .. "land_guard.lua")
|
||||||
|
|
||||||
dofile(path .. "/dirt_monster.lua") -- PilzAdam
|
|
||||||
dofile(path .. "/dungeon_master.lua")
|
|
||||||
dofile(path .. "/oerkki.lua")
|
|
||||||
dofile(path .. "/sand_monster.lua")
|
|
||||||
dofile(path .. "/stone_monster.lua")
|
|
||||||
dofile(path .. "/tree_monster.lua")
|
|
||||||
dofile(path .. "/lava_flan.lua") -- Zeg9
|
|
||||||
dofile(path .. "/mese_monster.lua")
|
|
||||||
dofile(path .. "/spider.lua") -- AspireMint
|
|
||||||
dofile(path .. "/minotaur.lua") -- NALC(sys4 fork MFF) Kalabasa
|
|
||||||
|
|
||||||
dofile(path .. "/lucky_block.lua")
|
-- Load custom spawning
|
||||||
|
if mobs.custom_spawn_monster then
|
||||||
|
dofile(path .. "spawn.lua")
|
||||||
|
end
|
||||||
|
|
||||||
print ("[MOD] Mobs Redo 'Monsters' loaded")
|
|
||||||
|
-- Lucky Blocks
|
||||||
|
dofile(path .. "lucky_block.lua")
|
||||||
|
|
||||||
|
|
||||||
|
print (S("[MOD] Mobs Redo Monsters loaded"))
|
||||||
|
3
intllib.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
-- Support for the old multi-load method
|
||||||
|
dofile(minetest.get_modpath("intllib").."/init.lua")
|
||||||
|
|
127
land_guard.lua
Normal file
@ -0,0 +1,127 @@
|
|||||||
|
|
||||||
|
local S = mobs.intllib
|
||||||
|
|
||||||
|
|
||||||
|
local guard_types = {
|
||||||
|
|
||||||
|
{ nodes = {
|
||||||
|
"default:snow", "default:snowblock", "default:ice",
|
||||||
|
"default:dirt_with_snow"
|
||||||
|
},
|
||||||
|
skins = {"mobs_land_guard6.png", "mobs_land_guard7.png", "mobs_land_guard8.png"},
|
||||||
|
drops = {
|
||||||
|
{name = "default:ice", chance = 1, min = 1, max = 4},
|
||||||
|
{name = "mobs:leather", chance = 2, min = 0, max = 2},
|
||||||
|
{name = "default:diamond", chance = 4, min = 0, max = 2},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{ nodes = {
|
||||||
|
"ethereal:dry_dirt", "default:sand", "default:desert_sand",
|
||||||
|
"default:dry_dirt_with_dry_grass", "default:dry_dirt"
|
||||||
|
},
|
||||||
|
skins = {"mobs_land_guard4.png", "mobs_land_guard5.png"},
|
||||||
|
drops = {
|
||||||
|
{name = "default:sandstone", chance = 1, min = 1, max = 4},
|
||||||
|
{name = "mobs:leather", chance = 2, min = 0, max = 2},
|
||||||
|
{name = "default:mese_crystal", chance = 4, min = 0, max = 2},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Land Guard
|
||||||
|
|
||||||
|
mobs:register_mob("mobs_monster:land_guard", {
|
||||||
|
type = "monster",
|
||||||
|
passive = false,
|
||||||
|
attack_type = "dogfight",
|
||||||
|
group_attack = true,
|
||||||
|
reach = 3,
|
||||||
|
damage = 15,
|
||||||
|
hp_min = 30,
|
||||||
|
hp_max = 65,
|
||||||
|
armor = 50,
|
||||||
|
collisionbox = {-0.5, -1.01, -0.5, 0.5, 1.6, 0.5},
|
||||||
|
visual_size = {x = 1, y = 1},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "mobs_dungeon_master.b3d",
|
||||||
|
textures = {
|
||||||
|
{"mobs_land_guard.png"},
|
||||||
|
{"mobs_land_guard2.png"},
|
||||||
|
{"mobs_land_guard3.png"}
|
||||||
|
},
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
sounds = {
|
||||||
|
random = "mobs_dungeonmaster",
|
||||||
|
},
|
||||||
|
walk_velocity = 1.5,
|
||||||
|
run_velocity = 3.4,
|
||||||
|
jump = true,
|
||||||
|
jump_height = 2.0,
|
||||||
|
floats = 0,
|
||||||
|
view_range = 15,
|
||||||
|
drops = {
|
||||||
|
{name = "mobs:leather", chance = 2, min = 0, max = 2},
|
||||||
|
{name = "default:mese_crystal", chance = 3, min = 0, max = 2},
|
||||||
|
{name = "default:diamond", chance = 4, min = 0, max = 1},
|
||||||
|
},
|
||||||
|
water_damage = 0,
|
||||||
|
lava_damage = 6,
|
||||||
|
light_damage = 0,
|
||||||
|
fear_height = 8,
|
||||||
|
animation = {
|
||||||
|
stand_start = 0,
|
||||||
|
stand_end = 19,
|
||||||
|
walk_start = 20,
|
||||||
|
walk_end = 35,
|
||||||
|
punch_start = 36,
|
||||||
|
punch_end = 48,
|
||||||
|
speed_normal = 15,
|
||||||
|
speed_run = 20,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- check surrounding nodes and spawn a specific guard
|
||||||
|
on_spawn = function(self)
|
||||||
|
|
||||||
|
local pos = self.object:get_pos() ; pos.y = pos.y - 1
|
||||||
|
local tmp
|
||||||
|
|
||||||
|
for n = 1, #guard_types do
|
||||||
|
|
||||||
|
tmp = guard_types[n]
|
||||||
|
|
||||||
|
if minetest.find_node_near(pos, 1, tmp.nodes) then
|
||||||
|
|
||||||
|
self.base_texture = { tmp.skins[math.random(#tmp.skins)] }
|
||||||
|
self.object:set_properties({textures = self.base_texture})
|
||||||
|
self.docile_by_day = tmp.docile
|
||||||
|
|
||||||
|
if tmp.drops then
|
||||||
|
self.drops = tmp.drops
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return true -- run only once, false/nil runs every activation
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
if not mobs.custom_spawn_monster then
|
||||||
|
mobs:spawn({
|
||||||
|
name = "mobs_monster:land_guard",
|
||||||
|
nodes = {
|
||||||
|
"default:snow", "default:ice", "default:stone",
|
||||||
|
"default:dry_dirt_with_dry_grass", "ethereal:dry_dirt"
|
||||||
|
},
|
||||||
|
max_light = 7,
|
||||||
|
chance = 25000,
|
||||||
|
min_height = 0,
|
||||||
|
active_object_count = 1,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
mobs:register_egg("mobs_monster:land_guard", S("Land Guard"), "default_ice.png", 1)
|
199
lava_flan.lua
@ -35,9 +35,14 @@ mobs:register_mob("mobs_monster:lava_flan", {
|
|||||||
drops = {
|
drops = {
|
||||||
{name = "mobs:lava_orb", chance = 15, min = 1, max = 1},
|
{name = "mobs:lava_orb", chance = 15, min = 1, max = 1},
|
||||||
},
|
},
|
||||||
water_damage = 5,
|
water_damage = 8,
|
||||||
lava_damage = 0,
|
lava_damage = 0,
|
||||||
|
fire_damage = 0,
|
||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
|
immune_to = {
|
||||||
|
{"mobs:pick_lava", -2}, -- lava pick heals 2 health
|
||||||
|
},
|
||||||
|
fly_in = {"default:lava_source", "default:lava_flowing"},
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 15,
|
speed_normal = 15,
|
||||||
speed_run = 15,
|
speed_run = 15,
|
||||||
@ -52,31 +57,40 @@ mobs:register_mob("mobs_monster:lava_flan", {
|
|||||||
},
|
},
|
||||||
on_die = function(self, pos)
|
on_die = function(self, pos)
|
||||||
|
|
||||||
if minetest.get_node(pos).name == "air" then
|
local cod = self.cause_of_death or {}
|
||||||
minetest.set_node(pos, {name = "fire:basic_flame"})
|
local def = cod.node and minetest.registered_nodes[cod.node]
|
||||||
|
|
||||||
|
if def and def.groups and def.groups.water then
|
||||||
|
|
||||||
|
pos.y = pos.y + 1
|
||||||
|
|
||||||
|
mobs:effect(pos, 40, "tnt_smoke.png", 3, 5, 2, 0.5, nil, false)
|
||||||
|
|
||||||
|
minetest.sound_play("fire_extinguish_flame",
|
||||||
|
{pos = pos, max_hear_distance = 12, gain = 1.5}, true)
|
||||||
|
|
||||||
|
self.object:remove()
|
||||||
|
|
||||||
|
if math.random(4) == 1 then
|
||||||
|
mobs:add_mob(pos, {
|
||||||
|
name = "mobs_monster:obsidian_flan",
|
||||||
|
})
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if minetest.get_node(pos).name == "air" then
|
||||||
|
minetest.set_node(pos, {name = "fire:basic_flame"})
|
||||||
|
end
|
||||||
|
|
||||||
|
mobs:effect(pos, 40, "fire_basic_flame.png", 2, 3, 2, 5, 10, nil)
|
||||||
|
|
||||||
|
self.object:remove()
|
||||||
end
|
end
|
||||||
|
|
||||||
self.object:remove()
|
|
||||||
|
|
||||||
minetest.add_particlespawner({
|
|
||||||
amount = 20,
|
|
||||||
time = 0.25,
|
|
||||||
minpos = pos,
|
|
||||||
maxpos = pos,
|
|
||||||
minvel = {x = -2, y = -2, z = -2},
|
|
||||||
maxvel = {x = 2, y = 2, z = 2},
|
|
||||||
minacc = {x = 0, y = -10, z = 0},
|
|
||||||
maxacc = {x = 0, y = -10, z = 0},
|
|
||||||
minexptime = 0.1,
|
|
||||||
maxexptime = 1,
|
|
||||||
minsize = 1.0,
|
|
||||||
maxsize = 2.0,
|
|
||||||
texture = "fire_basic_flame.png",
|
|
||||||
})
|
|
||||||
end,
|
end,
|
||||||
|
glow = 10,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
if not mobs.custom_spawn_monster then
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
name = "mobs_monster:lava_flan",
|
name = "mobs_monster:lava_flan",
|
||||||
nodes = {"default:lava_source"},
|
nodes = {"default:lava_source"},
|
||||||
@ -84,6 +98,7 @@ mobs:spawn({
|
|||||||
active_object_count = 1,
|
active_object_count = 1,
|
||||||
max_height = 0,
|
max_height = 0,
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
mobs:register_egg("mobs_monster:lava_flan", S("Lava Flan"), "default_lava.png", 1)
|
mobs:register_egg("mobs_monster:lava_flan", S("Lava Flan"), "default_lava.png", 1)
|
||||||
@ -95,6 +110,7 @@ mobs:alias_mob("mobs:lava_flan", "mobs_monster:lava_flan") -- compatibility
|
|||||||
minetest.register_craftitem(":mobs:lava_orb", {
|
minetest.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,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_alias("zmobs:lava_orb", "mobs:lava_orb")
|
minetest.register_alias("zmobs:lava_orb", "mobs:lava_orb")
|
||||||
@ -112,6 +128,9 @@ local old_handle_node_drops = minetest.handle_node_drops
|
|||||||
|
|
||||||
function minetest.handle_node_drops(pos, drops, digger)
|
function minetest.handle_node_drops(pos, drops, digger)
|
||||||
|
|
||||||
|
-- does player exist?
|
||||||
|
if not digger then return end
|
||||||
|
|
||||||
-- are we holding Lava Pick?
|
-- are we holding Lava Pick?
|
||||||
if digger:get_wielded_item():get_name() ~= ("mobs:pick_lava") then
|
if digger:get_wielded_item():get_name() ~= ("mobs:pick_lava") then
|
||||||
return old_handle_node_drops(pos, drops, digger)
|
return old_handle_node_drops(pos, drops, digger)
|
||||||
@ -159,8 +178,10 @@ minetest.register_tool(":mobs:pick_lava", {
|
|||||||
groupcaps={
|
groupcaps={
|
||||||
cracky = {times={[1]=1.80, [2]=0.80, [3]=0.40}, uses=40, maxlevel=3},
|
cracky = {times={[1]=1.80, [2]=0.80, [3]=0.40}, uses=40, maxlevel=3},
|
||||||
},
|
},
|
||||||
damage_groups = {fleshy=6,fire=1},
|
damage_groups = {fleshy = 6, fire = 1},
|
||||||
},
|
},
|
||||||
|
groups = {pickaxe = 1},
|
||||||
|
light_source = 14
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
@ -180,3 +201,137 @@ minetest.override_item("mobs:pick_lava", {
|
|||||||
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
|
||||||
|
|
||||||
|
|
||||||
|
-- obsidian flan
|
||||||
|
|
||||||
|
mobs:register_mob("mobs_monster:obsidian_flan", {
|
||||||
|
type = "monster",
|
||||||
|
passive = false,
|
||||||
|
attack_type = "shoot",
|
||||||
|
shoot_interval = 0.5,
|
||||||
|
shoot_offset = 1.0,
|
||||||
|
arrow = "mobs_monster:obsidian_arrow",
|
||||||
|
reach = 2,
|
||||||
|
damage = 3,
|
||||||
|
hp_min = 10,
|
||||||
|
hp_max = 35,
|
||||||
|
armor = 30,
|
||||||
|
visual_size = {x = 0.6, y = 0.6},
|
||||||
|
collisionbox = {-0.3, -0.3, -0.3, 0.3, 0.8, 0.3},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "zmobs_lava_flan.x",
|
||||||
|
textures = {
|
||||||
|
{"mobs_obsidian_flan.png"},
|
||||||
|
},
|
||||||
|
blood_texture = "default_obsidian.png",
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
sounds = {
|
||||||
|
random = "mobs_lavaflan",
|
||||||
|
-- war_cry = "mobs_lavaflan",
|
||||||
|
},
|
||||||
|
walk_velocity = 0.1,
|
||||||
|
run_velocity = 0.5,
|
||||||
|
jump = false,
|
||||||
|
view_range = 10,
|
||||||
|
floats = 0,
|
||||||
|
drops = {
|
||||||
|
{name = "default:obsidian_shard", chance = 1, min = 1, max = 5},
|
||||||
|
{name = "default:obsidian", chance = 3, min = 0, max = 2},
|
||||||
|
},
|
||||||
|
water_damage = 0,
|
||||||
|
lava_damage = 8,
|
||||||
|
fire_damage = 0,
|
||||||
|
light_damage = 0,
|
||||||
|
animation = {
|
||||||
|
speed_normal = 15,
|
||||||
|
speed_run = 15,
|
||||||
|
stand_start = 0,
|
||||||
|
stand_end = 8,
|
||||||
|
walk_start = 10,
|
||||||
|
walk_end = 18,
|
||||||
|
run_start = 20,
|
||||||
|
run_end = 28,
|
||||||
|
punch_start = 20,
|
||||||
|
punch_end = 28,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
mobs:register_egg("mobs_monster:obsidian_flan", S("Obsidian Flan"),
|
||||||
|
"default_obsidian.png", 1)
|
||||||
|
|
||||||
|
|
||||||
|
local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false
|
||||||
|
|
||||||
|
-- mese arrow (weapon)
|
||||||
|
mobs:register_arrow("mobs_monster:obsidian_arrow", {
|
||||||
|
visual = "sprite",
|
||||||
|
-- visual = "wielditem",
|
||||||
|
visual_size = {x = 0.5, y = 0.5},
|
||||||
|
textures = {"default_obsidian_shard.png"},
|
||||||
|
velocity = 6,
|
||||||
|
-- rotate = 180,
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
if mobs_griefing == false or minetest.is_protected(pos, "") then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local texture = "default_dirt.png" --fallback texture
|
||||||
|
|
||||||
|
local radius = 1
|
||||||
|
local def = minetest.registered_nodes[node]
|
||||||
|
if def then
|
||||||
|
node = { name = node }
|
||||||
|
end
|
||||||
|
if def and def.tiles and def.tiles[1] then
|
||||||
|
texture = def.tiles[1]
|
||||||
|
end
|
||||||
|
|
||||||
|
-- do not break obsidian or diamond blocks or unbreakable nodes
|
||||||
|
if (def.groups and def.groups.level and def.groups.level > 1)
|
||||||
|
or def.groups.unbreakable then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.add_particlespawner({
|
||||||
|
amount = 32,
|
||||||
|
time = 0.1,
|
||||||
|
minpos = vector.subtract(pos, radius / 2),
|
||||||
|
maxpos = vector.add(pos, radius / 2),
|
||||||
|
minvel = {x = -3, y = 0, z = -3},
|
||||||
|
maxvel = {x = 3, y = 5, z = 3},
|
||||||
|
minacc = {x = 0, y = -10, z = 0},
|
||||||
|
maxacc = {x = 0, y = -10, z = 0},
|
||||||
|
minexptime = 0.8,
|
||||||
|
maxexptime = 2.0,
|
||||||
|
minsize = radius * 0.33,
|
||||||
|
maxsize = radius,
|
||||||
|
texture = texture,
|
||||||
|
-- ^ only as fallback for clients without support for `node` parameter
|
||||||
|
node = node,
|
||||||
|
collisiondetection = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.set_node(pos, {name = "air"})
|
||||||
|
|
||||||
|
local snd = def.sounds and def.sounds.dug or "default_dig_crumbly"
|
||||||
|
|
||||||
|
minetest.sound_play(snd, {pos = pos, max_hear_distance = 12, gain = 1.0}, true)
|
||||||
|
end
|
||||||
|
})
|
||||||
|
11
license.txt
@ -19,3 +19,14 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
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
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
mobs.fireball.png was originally made by Sapier and edited by Benrob:
|
||||||
|
|
||||||
|
-- Animals Mod by Sapier
|
||||||
|
--
|
||||||
|
-- You may copy, use, modify or do nearly anything except removing this
|
||||||
|
-- copyright notice.
|
||||||
|
-- And of course you are NOT allow to pretend you have written it.
|
||||||
|
--
|
||||||
|
-- (c) Sapier
|
||||||
|
-- Contact sapier a t gmx net
|
||||||
|
14
locale/mobs_monster.de.tr
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# textdomain:mobs_monster
|
||||||
|
Cobweb=Spinnennetz
|
||||||
|
Dirt Monster=Erdmonster
|
||||||
|
Dungeon Master=Kerkermeister
|
||||||
|
Lava Flan=Lavaflan
|
||||||
|
Lava Pickaxe=Lavaspitzhacke
|
||||||
|
Lava orb=Lavakugel
|
||||||
|
Mese Monster=Mesemonster
|
||||||
|
#Obsidian Flan=
|
||||||
|
Oerkki=Oerkki
|
||||||
|
Sand Monster=Sandmonster
|
||||||
|
Spider=Spinne
|
||||||
|
Stone Monster=Steinmonster
|
||||||
|
Tree Monster=Baummonster
|
14
locale/mobs_monster.en.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=
|
14
locale/mobs_monster.fr.tr
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# textdomain:mobs_monster
|
||||||
|
Cobweb=Toile d'arraignée
|
||||||
|
Dirt Monster=Monstre de terre
|
||||||
|
Dungeon Master=Maître des donjons
|
||||||
|
Lava Flan=Lave en gelée
|
||||||
|
Lava Pickaxe=Pioche de lave
|
||||||
|
Lava orb=Orbe de lave
|
||||||
|
Mese Monster=Monstre de mese
|
||||||
|
Obsidian Flan=Obsidienne en gelée
|
||||||
|
Oerkki=Oerkki
|
||||||
|
Sand Monster=Monstre de sable
|
||||||
|
Spider=Araignée
|
||||||
|
Stone Monster=Monstre de pierre
|
||||||
|
Tree Monster=Monstre de bois
|
14
locale/mobs_monster.it.tr
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# textdomain:mobs_monster
|
||||||
|
Cobweb=Ragnatela
|
||||||
|
Dirt Monster=Mostro di terra
|
||||||
|
Dungeon Master=Padrone delle segrete
|
||||||
|
Lava Flan=Sformato di lava
|
||||||
|
Lava Pickaxe=Piccone di lava
|
||||||
|
Lava orb=Sfera di lava
|
||||||
|
Mese Monster=Mostro di mese
|
||||||
|
#Obsidian Flan=
|
||||||
|
Oerkki=Oerkki
|
||||||
|
Sand Monster=Mostro di sabbia
|
||||||
|
Spider=Ragno
|
||||||
|
Stone Monster=Mostro di pietra
|
||||||
|
Tree Monster=Albero mostro
|
14
locale/mobs_monster.ms.tr
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# textdomain:mobs_monster
|
||||||
|
Cobweb=Sarang Labah-labah
|
||||||
|
Dirt Monster=Raksasa Tanah
|
||||||
|
Dungeon Master=Penjaga Kurungan Bawah Tanah
|
||||||
|
Lava Flan=Raksasa Lava
|
||||||
|
Lava Pickaxe=Beliung Lava
|
||||||
|
Lava orb=Bola Lava
|
||||||
|
Mese Monster=Raksasa Mese
|
||||||
|
#Obsidian Flan=
|
||||||
|
Oerkki=Oerkki
|
||||||
|
Sand Monster=Raksasa Pasir
|
||||||
|
Spider=Labah-labah
|
||||||
|
Stone Monster=Raksasa Batu
|
||||||
|
Tree Monster=Raksasa Pokok
|
14
locale/mobs_monster.tr.tr
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# textdomain:mobs_monster
|
||||||
|
Cobweb=Örümcek ağı
|
||||||
|
Dirt Monster=Toprak Canavarı
|
||||||
|
Dungeon Master=Zindan başı
|
||||||
|
Lava Flan=Lav Flan
|
||||||
|
Lava Pickaxe=Lav kazması
|
||||||
|
Lava orb=Lav küre
|
||||||
|
Mese Monster=Mese Canavarı
|
||||||
|
#Obsidian Flan=
|
||||||
|
Oerkki=Oerkki
|
||||||
|
Sand Monster=Kum Canavarı
|
||||||
|
Spider=Örümcek
|
||||||
|
Stone Monster=Taş Canavarı
|
||||||
|
Tree Monster=Ağaç Canavarı
|
14
locale/mobs_monster.zh_CN.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=树怪
|
14
locale/mobs_monster.zh_TW.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=樹怪
|
@ -2,34 +2,35 @@
|
|||||||
# last update: 2016/June/10
|
# last update: 2016/June/10
|
||||||
|
|
||||||
#dirtmonster.lua
|
#dirtmonster.lua
|
||||||
Dirt Monster =
|
Dirt Monster=
|
||||||
|
|
||||||
#dungeonmaster.lua
|
#dungeonmaster.lua
|
||||||
Dungeon Master =
|
Dungeon Master=
|
||||||
|
|
||||||
#init.lua
|
#init.lua
|
||||||
[MOD] Mobs Redo 'Monsters' loaded =
|
[MOD] Mobs Redo 'Monsters' loaded=
|
||||||
|
|
||||||
#lava_flan.lua
|
#lava_flan.lua
|
||||||
Lava Flan =
|
Lava Flan=
|
||||||
Lava orb =
|
Lava orb=
|
||||||
Lava Pickaxe =
|
Lava Pickaxe=
|
||||||
|
Obsidian Flan=
|
||||||
|
|
||||||
#mese_monster.lua
|
#mese_monster.lua
|
||||||
Mese Monster =
|
Mese Monster=
|
||||||
|
|
||||||
#oerkki.lua
|
#oerkki.lua
|
||||||
Oerkki =
|
Oerkki=
|
||||||
|
|
||||||
#sandmonster.lua
|
#sandmonster.lua
|
||||||
Sand Monster =
|
Sand Monster=
|
||||||
|
|
||||||
#spider.lua
|
#spider.lua
|
||||||
Spider =
|
Spider=
|
||||||
Cobweb =
|
Cobweb=
|
||||||
|
|
||||||
#stonemonster.lua
|
#stonemonster.lua
|
||||||
Stone Monster =
|
Stone Monster=
|
||||||
|
|
||||||
#treemonster.lua
|
#treemonster.lua
|
||||||
Tree Monster =
|
Tree Monster=
|
||||||
|
36
locale/zh_CN.txt
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# Template for translations of mobs_monster mod
|
||||||
|
# last update: 2016/June/10
|
||||||
|
|
||||||
|
#dirtmonster.lua
|
||||||
|
Dirt Monster = 泥土怪
|
||||||
|
|
||||||
|
#dungeonmaster.lua
|
||||||
|
Dungeon Master = 地穴之主
|
||||||
|
|
||||||
|
#init.lua
|
||||||
|
[MOD] Mobs Redo 'Monsters' loaded = [模组] Mobs Redo 'Monsters' 已加载
|
||||||
|
|
||||||
|
#lava_flan.lua
|
||||||
|
Lava Flan = 岩浆饼
|
||||||
|
Lava orb = 岩浆球
|
||||||
|
Lava Pickaxe = 岩浆镐
|
||||||
|
Obsidian Flan = 黑耀石饼
|
||||||
|
|
||||||
|
#mese_monster.lua
|
||||||
|
Mese Monster = 黄石怪
|
||||||
|
|
||||||
|
#oerkki.lua
|
||||||
|
Oerkki = 奥尔基
|
||||||
|
|
||||||
|
#sandmonster.lua
|
||||||
|
Sand Monster = 沙怪
|
||||||
|
|
||||||
|
#spider.lua
|
||||||
|
Spider = 蜘蛛
|
||||||
|
Cobweb = 蜘蛛网
|
||||||
|
|
||||||
|
#stonemonster.lua
|
||||||
|
Stone Monster = 石头怪
|
||||||
|
|
||||||
|
#treemonster.lua
|
||||||
|
Tree Monster = 树怪
|
36
locale/zh_TW.txt
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# Template for translations of mobs_monster mod
|
||||||
|
# last update: 2016/June/10
|
||||||
|
|
||||||
|
#dirtmonster.lua
|
||||||
|
Dirt Monster = 泥土怪
|
||||||
|
|
||||||
|
#dungeonmaster.lua
|
||||||
|
Dungeon Master = 地穴之主
|
||||||
|
|
||||||
|
#init.lua
|
||||||
|
[MOD] Mobs Redo 'Monsters' loaded = [模組] Mobs Redo 'Monsters' 已加載
|
||||||
|
|
||||||
|
#lava_flan.lua
|
||||||
|
Lava Flan = 岩漿餅
|
||||||
|
Lava orb = 岩漿球
|
||||||
|
Lava Pickaxe = 岩漿鎬
|
||||||
|
Obsidian Flan = 黑耀石餅
|
||||||
|
|
||||||
|
#mese_monster.lua
|
||||||
|
Mese Monster = 黃石怪
|
||||||
|
|
||||||
|
#oerkki.lua
|
||||||
|
Oerkki = 奧爾基
|
||||||
|
|
||||||
|
#sandmonster.lua
|
||||||
|
Sand Monster = 沙怪
|
||||||
|
|
||||||
|
#spider.lua
|
||||||
|
Spider = 蜘蛛
|
||||||
|
Cobweb = 蜘蛛網
|
||||||
|
|
||||||
|
#stonemonster.lua
|
||||||
|
Stone Monster = 石頭怪
|
||||||
|
|
||||||
|
#treemonster.lua
|
||||||
|
Tree Monster = 樹怪
|
@ -58,6 +58,7 @@ mobs:register_mob("mobs_monster:mese_monster", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
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", "default:sandstone"},
|
||||||
@ -66,6 +67,7 @@ mobs:spawn({
|
|||||||
active_object_count = 1,
|
active_object_count = 1,
|
||||||
max_height = -20,
|
max_height = -20,
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
mobs:register_egg("mobs_monster:mese_monster", S("Mese Monster"), "default_mese_block.png", 1)
|
mobs:register_egg("mobs_monster:mese_monster", S("Mese Monster"), "default_mese_block.png", 1)
|
||||||
|
3
mod.conf
@ -1 +1,4 @@
|
|||||||
name = mobs_monster
|
name = mobs_monster
|
||||||
|
depends = default, mobs
|
||||||
|
optional_depends = lucky_block, toolranks, intllib
|
||||||
|
description = Adds many types of monsters.
|
||||||
|
@ -20,6 +20,7 @@ mobs:register_mob("mobs_monster:oerkki", {
|
|||||||
textures = {
|
textures = {
|
||||||
{"mobs_oerkki.png"},
|
{"mobs_oerkki.png"},
|
||||||
{"mobs_oerkki2.png"},
|
{"mobs_oerkki2.png"},
|
||||||
|
{"mobs_oerkki3.png"},
|
||||||
},
|
},
|
||||||
makes_footstep_sound = false,
|
makes_footstep_sound = false,
|
||||||
sounds = {
|
sounds = {
|
||||||
@ -61,6 +62,7 @@ mobs:register_mob("mobs_monster:oerkki", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
if not mobs.custom_spawn_monster then
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
name = "mobs_monster:oerkki",
|
name = "mobs_monster:oerkki",
|
||||||
nodes = {"default:stone"},
|
nodes = {"default:stone"},
|
||||||
@ -68,6 +70,7 @@ mobs:spawn({
|
|||||||
chance = 7000,
|
chance = 7000,
|
||||||
max_height = -10,
|
max_height = -10,
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
mobs:register_egg("mobs_monster:oerkki", S("Oerkki"), "default_obsidian.png", 1)
|
mobs:register_egg("mobs_monster:oerkki", S("Oerkki"), "default_obsidian.png", 1)
|
||||||
|
10
readme.md
@ -11,7 +11,7 @@ Dungeon Master
|
|||||||
|
|
||||||
Lava Flan
|
Lava Flan
|
||||||
|
|
||||||
- Cute as they may look lava flan wallow in their namesake (no, not flans) and get curious about players who wander by, forgetting that they can burn you and cause damage. They have a 1 in 5 chance of dropping lava orb when killed.
|
- Cute as they may look lava flan wallow in their namesake (no, not flans) and get curious about players who wander by, forgetting that they can burn you and cause damage. They have a 1 in 5 chance of dropping lava orb when killed, but if they die in water then pray they dont solidify into an obsidian flan that shoots shards and destroys all around them.
|
||||||
|
|
||||||
Mese Monster
|
Mese Monster
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ Sand Monster
|
|||||||
|
|
||||||
Spiders
|
Spiders
|
||||||
|
|
||||||
- Snowy spiders are found on higher cold areas, Tarantula's in higher jungle, Cave spider below -20 and Mese spider near areas containing the ore and Crystal spiders only in Ethereal's crystal biomes. Some are docile during the daytime and will drop string when killed.
|
- Snowy spiders are found on higher cold areas, spitting Tarantula's in higher jungle, small Cave spider below -20 and Mese spider near areas containing the ore and Crystal spiders only in Ethereal's crystal biomes. Some are docile during the daytime and will drop string when killed.
|
||||||
|
|
||||||
Stone Monster
|
Stone Monster
|
||||||
|
|
||||||
@ -35,6 +35,10 @@ Stone Monster
|
|||||||
|
|
||||||
Tree Monster
|
Tree Monster
|
||||||
|
|
||||||
- Found atop tree's at night time they drop down and look for food in the form of players and animals. Can drop saplings and sometimes an apple or three.
|
- Found atop tree's at night time they drop down and look for food in the form of players and animals. Can drop saplings and sometimes an apple or three depending on type. Also note that green tree creepers exist and sometimes go boom.
|
||||||
|
|
||||||
|
Land Guard
|
||||||
|
|
||||||
|
- These huge monsters roam the land in cold, hot and temperate areas and don't like players wandering around their domain.
|
||||||
|
|
||||||
Lucky Blocks: 11
|
Lucky Blocks: 11
|
||||||
|
@ -3,7 +3,8 @@ local S = mobs.intllib
|
|||||||
|
|
||||||
|
|
||||||
-- custom particle effects
|
-- custom particle effects
|
||||||
local effect = function(pos, amount, texture, min_size, max_size, radius, gravity, glow)
|
local effect = function(
|
||||||
|
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
|
||||||
@ -38,6 +39,7 @@ mobs:register_mob("mobs_monster:sand_monster", {
|
|||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
pathfinding = true,
|
pathfinding = true,
|
||||||
--specific_attack = {"player", "mobs_npc:npc"},
|
--specific_attack = {"player", "mobs_npc:npc"},
|
||||||
|
--ignore_invisibility = true,
|
||||||
reach = 2,
|
reach = 2,
|
||||||
damage = 1,
|
damage = 1,
|
||||||
hp_min = 4,
|
hp_min = 4,
|
||||||
@ -48,6 +50,7 @@ mobs:register_mob("mobs_monster:sand_monster", {
|
|||||||
mesh = "mobs_sand_monster.b3d",
|
mesh = "mobs_sand_monster.b3d",
|
||||||
textures = {
|
textures = {
|
||||||
{"mobs_sand_monster.png"},
|
{"mobs_sand_monster.png"},
|
||||||
|
{"mobs_sand_monster2.png"},
|
||||||
},
|
},
|
||||||
blood_texture = "default_desert_sand.png",
|
blood_texture = "default_desert_sand.png",
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
@ -79,6 +82,14 @@ mobs:register_mob("mobs_monster:sand_monster", {
|
|||||||
punch_start = 74,
|
punch_start = 74,
|
||||||
punch_end = 105,
|
punch_end = 105,
|
||||||
},
|
},
|
||||||
|
immune_to = {
|
||||||
|
{"default:shovel_wood", 3}, -- shovels deal more damage to sand monster
|
||||||
|
{"default:shovel_stone", 3},
|
||||||
|
{"default:shovel_bronze", 4},
|
||||||
|
{"default:shovel_steel", 4},
|
||||||
|
{"default:shovel_mese", 5},
|
||||||
|
{"default:shovel_diamond", 7},
|
||||||
|
},
|
||||||
--[[
|
--[[
|
||||||
custom_attack = function(self, p)
|
custom_attack = function(self, p)
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
@ -87,13 +98,28 @@ mobs:register_mob("mobs_monster:sand_monster", {
|
|||||||
]]
|
]]
|
||||||
on_die = function(self, pos)
|
on_die = function(self, pos)
|
||||||
pos.y = pos.y + 0.5
|
pos.y = pos.y + 0.5
|
||||||
effect(pos, 30, "mobs_sand_particles.png", 0.1, 2, 3, 5)
|
mobs:effect(pos, 30, "mobs_sand_particles.png", .1, 2, 3, 5)
|
||||||
pos.y = pos.y + 0.25
|
pos.y = pos.y + 0.25
|
||||||
effect(pos, 30, "mobs_sand_particles.png", 0.1, 2, 3, 5)
|
mobs:effect(pos, 30, "mobs_sand_particles.png", .1, 2, 3, 5)
|
||||||
end,
|
end,
|
||||||
|
--[[
|
||||||
|
on_rightclick = function(self, clicker)
|
||||||
|
|
||||||
|
local tool = clicker:get_wielded_item()
|
||||||
|
local name = clicker:get_player_name()
|
||||||
|
|
||||||
|
if tool:get_name() == "default:sand" then
|
||||||
|
|
||||||
|
self.owner = name
|
||||||
|
self.type = "npc"
|
||||||
|
|
||||||
|
mobs:force_capture(self, clicker)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
]]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if not mobs.custom_spawn_monster then
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
name = "mobs_monster:sand_monster",
|
name = "mobs_monster:sand_monster",
|
||||||
nodes = {"default:desert_sand"},
|
nodes = {"default:desert_sand"},
|
||||||
@ -101,6 +127,7 @@ mobs:spawn({
|
|||||||
active_object_count = 2,
|
active_object_count = 2,
|
||||||
min_height = 0,
|
min_height = 0,
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
mobs:register_egg("mobs_monster:sand_monster", S("Sand Monster"), "default_desert_sand.png", 1)
|
mobs:register_egg("mobs_monster:sand_monster", S("Sand Monster"), "default_desert_sand.png", 1)
|
||||||
|
173
spawn_example.lua
Normal file
@ -0,0 +1,173 @@
|
|||||||
|
|
||||||
|
--[[ Spawn Template, defaults to values shown if line not provided
|
||||||
|
|
||||||
|
mobs:spawn({
|
||||||
|
|
||||||
|
name = "",
|
||||||
|
|
||||||
|
- Name of mob, must be provided e.g. "mymod:my_mob"
|
||||||
|
|
||||||
|
nodes = {"group:soil, "group:stone"},
|
||||||
|
|
||||||
|
- Nodes to spawn on top of.
|
||||||
|
|
||||||
|
neighbors = {"air"},
|
||||||
|
|
||||||
|
- Nodes to spawn beside.
|
||||||
|
|
||||||
|
min_light = 0,
|
||||||
|
|
||||||
|
- Minimum light level.
|
||||||
|
|
||||||
|
max_light = 15,
|
||||||
|
|
||||||
|
- Maximum light level, 15 is sunlight only.
|
||||||
|
|
||||||
|
interval = 30,
|
||||||
|
|
||||||
|
- Spawn interval in seconds.
|
||||||
|
|
||||||
|
chance = 5000,
|
||||||
|
|
||||||
|
- Spawn chance, 1 in every 5000 nodes.
|
||||||
|
|
||||||
|
active_object_count = 1,
|
||||||
|
|
||||||
|
- Active mobs of this type in area.
|
||||||
|
|
||||||
|
min_height = -31000,
|
||||||
|
|
||||||
|
- Minimum height level.
|
||||||
|
|
||||||
|
max_height = 31000,
|
||||||
|
|
||||||
|
- Maximum height level.
|
||||||
|
|
||||||
|
day_toggle = nil,
|
||||||
|
|
||||||
|
- Daytime toggle, true to spawn during day, false for night, nil for both
|
||||||
|
|
||||||
|
on_spawn = nil,
|
||||||
|
|
||||||
|
- On spawn function to run when mob spawns in world
|
||||||
|
|
||||||
|
on_map_load = nil,
|
||||||
|
|
||||||
|
- On map load, when true mob only spawns in newly generated map areas
|
||||||
|
})
|
||||||
|
]]--
|
||||||
|
|
||||||
|
|
||||||
|
-- Dirt Monster
|
||||||
|
|
||||||
|
mobs:spawn({
|
||||||
|
name = "mobs_monster:dirt_monster",
|
||||||
|
nodes = {"default:dirt_with_grass"},
|
||||||
|
min_light = 0,
|
||||||
|
max_light = 7,
|
||||||
|
chance = 6000,
|
||||||
|
active_object_count = 2,
|
||||||
|
min_height = 0,
|
||||||
|
day_toggle = false,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Dungeon Master
|
||||||
|
|
||||||
|
mobs:spawn({
|
||||||
|
name = "mobs_monster:dungeon_master",
|
||||||
|
nodes = {"default:stone"},
|
||||||
|
max_light = 5,
|
||||||
|
chance = 9000,
|
||||||
|
active_object_count = 1,
|
||||||
|
max_height = -70,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Lava Flan
|
||||||
|
|
||||||
|
mobs:spawn({
|
||||||
|
name = "mobs_monster:lava_flan",
|
||||||
|
nodes = {"default:lava_source"},
|
||||||
|
chance = 1500,
|
||||||
|
active_object_count = 1,
|
||||||
|
max_height = 0,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Mese Monster
|
||||||
|
|
||||||
|
mobs:spawn({
|
||||||
|
name = "mobs_monster:mese_monster",
|
||||||
|
nodes = {"default:stone"},
|
||||||
|
max_light = 7,
|
||||||
|
chance = 5000,
|
||||||
|
active_object_count = 1,
|
||||||
|
max_height = -20,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Oerkki
|
||||||
|
|
||||||
|
mobs:spawn({
|
||||||
|
name = "mobs_monster:oerkki",
|
||||||
|
nodes = {"default:stone"},
|
||||||
|
max_light = 7,
|
||||||
|
chance = 7000,
|
||||||
|
max_height = -10,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Sand Monster
|
||||||
|
|
||||||
|
mobs:spawn({
|
||||||
|
name = "mobs_monster:sand_monster",
|
||||||
|
nodes = {"default:desert_sand"},
|
||||||
|
chance = 7000,
|
||||||
|
active_object_count = 2,
|
||||||
|
min_height = 0,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Spider (above ground)
|
||||||
|
|
||||||
|
mobs:spawn({
|
||||||
|
name = "mobs_monster:spider",
|
||||||
|
nodes = {
|
||||||
|
"default:dirt_with_rainforest_litter", "default:snowblock",
|
||||||
|
"default:snow", "ethereal:crystal_dirt", "ethereal:cold_dirt"
|
||||||
|
},
|
||||||
|
min_light = 0,
|
||||||
|
max_light = 8,
|
||||||
|
chance = 7000,
|
||||||
|
active_object_count = 1,
|
||||||
|
min_height = 25,
|
||||||
|
max_height = 31000,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Spider (below ground)
|
||||||
|
mobs:spawn({
|
||||||
|
name = "mobs_monster:spider",
|
||||||
|
nodes = {"default:stone_with_mese", "default:mese", "default:stone"},
|
||||||
|
min_light = 0,
|
||||||
|
max_light = 7,
|
||||||
|
chance = 7000,
|
||||||
|
active_object_count = 1,
|
||||||
|
min_height = -31000,
|
||||||
|
max_height = -40,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Stone Monster
|
||||||
|
|
||||||
|
mobs:spawn({
|
||||||
|
name = "mobs_monster:stone_monster",
|
||||||
|
nodes = {"default:stone", "default:desert_stone", "default:sandstone"},
|
||||||
|
max_light = 7,
|
||||||
|
chance = 7000,
|
||||||
|
max_height = 0,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Tree Monster
|
||||||
|
|
||||||
|
mobs:spawn({
|
||||||
|
name = "mobs_monster:tree_monster",
|
||||||
|
nodes = {"default:leaves", "default:jungleleaves"},
|
||||||
|
max_light = 7,
|
||||||
|
chance = 7000,
|
||||||
|
min_height = 0,
|
||||||
|
day_toggle = false,
|
||||||
|
})
|
242
spider.lua
@ -1,6 +1,56 @@
|
|||||||
|
|
||||||
local S = mobs.intllib
|
local S = mobs.intllib
|
||||||
|
|
||||||
|
local get_velocity = function(self)
|
||||||
|
|
||||||
|
local v = self.object:get_velocity()
|
||||||
|
|
||||||
|
-- sanity check
|
||||||
|
if not v then return 0 end
|
||||||
|
|
||||||
|
return (v.x * v.x + v.z * v.z) ^ 0.5
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local spider_types = {
|
||||||
|
|
||||||
|
{ nodes = {"default:snow", "default:snowblock", "default:dirt_with_snow"},
|
||||||
|
skins = {"mobs_spider_snowy.png"},
|
||||||
|
docile = true,
|
||||||
|
drops = nil
|
||||||
|
},
|
||||||
|
|
||||||
|
{ nodes = {"default:dirt_with_rainforest_litter", "default:jungletree"},
|
||||||
|
skins = {"mobs_spider_orange.png"},
|
||||||
|
docile = true,
|
||||||
|
drops = nil,
|
||||||
|
shoot = true
|
||||||
|
},
|
||||||
|
|
||||||
|
{ nodes = {"default:stone", "default:gravel"},
|
||||||
|
skins = {"mobs_spider_grey.png"},
|
||||||
|
docile = nil,
|
||||||
|
drops = nil,
|
||||||
|
small = true
|
||||||
|
},
|
||||||
|
|
||||||
|
{ nodes = {"default:mese", "default:stone_with_mese"},
|
||||||
|
skins = {"mobs_spider_mese.png"},
|
||||||
|
docile = nil,
|
||||||
|
drops = {
|
||||||
|
{name = "farming:string", chance = 1, min = 0, max = 2},
|
||||||
|
{name = "default:mese_crystal_fragment", chance = 2, min = 1, max = 4}}
|
||||||
|
},
|
||||||
|
|
||||||
|
{ nodes = {"ethereal:crystal_dirt", "ethereal:crystal_spike"},
|
||||||
|
skins = {"mobs_spider_crystal.png"},
|
||||||
|
docile = true,
|
||||||
|
drops = {
|
||||||
|
{name = "farming:string", chance = 1, min = 0, max = 2},
|
||||||
|
{name = "ethereal:crystal_spike", chance = 15, min = 1, max = 2}}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
-- Spider by AspireMint (CC-BY-SA 3.0 license)
|
-- Spider by AspireMint (CC-BY-SA 3.0 license)
|
||||||
|
|
||||||
@ -45,7 +95,7 @@ mobs:register_mob("mobs_monster:spider", {
|
|||||||
light_damage = 0,
|
light_damage = 0,
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 15,
|
speed_normal = 15,
|
||||||
speed_run = 20,--15,
|
speed_run = 20,
|
||||||
stand_start = 0,
|
stand_start = 0,
|
||||||
stand_end = 0,
|
stand_end = 0,
|
||||||
walk_start = 1,
|
walk_start = 1,
|
||||||
@ -55,55 +105,132 @@ mobs:register_mob("mobs_monster:spider", {
|
|||||||
punch_start = 25,
|
punch_start = 25,
|
||||||
punch_end = 45,
|
punch_end = 45,
|
||||||
},
|
},
|
||||||
-- what kind of spider are we spawning?
|
|
||||||
|
-- check surrounding nodes and spawn a specific spider
|
||||||
on_spawn = function(self)
|
on_spawn = function(self)
|
||||||
|
|
||||||
local pos = self.object:get_pos() ; pos.y = pos.y - 1
|
local pos = self.object:get_pos() ; pos.y = pos.y - 1
|
||||||
|
local tmp
|
||||||
|
|
||||||
-- snowy spider
|
for n = 1, #spider_types do
|
||||||
if minetest.find_node_near(pos, 1,
|
|
||||||
{"default:snow", "default:snowblock", "default:dirt_with_snow"}) then
|
tmp = spider_types[n]
|
||||||
self.base_texture = {"mobs_spider_snowy.png"}
|
|
||||||
self.object:set_properties({textures = self.base_texture})
|
if minetest.find_node_near(pos, 1, tmp.nodes) then
|
||||||
self.docile_by_day = true
|
|
||||||
-- tarantula
|
self.base_texture = tmp.skins
|
||||||
elseif minetest.find_node_near(pos, 1,
|
self.object:set_properties({textures = tmp.skins})
|
||||||
{"default:dirt_with_rainforest_litter", "default:jungletree"}) then
|
self.docile_by_day = tmp.docile
|
||||||
self.base_texture = {"mobs_spider_orange.png"}
|
|
||||||
self.object:set_properties({textures = self.base_texture})
|
if tmp.drops then
|
||||||
self.docile_by_day = true
|
self.drops = tmp.drops
|
||||||
-- grey spider
|
end
|
||||||
elseif minetest.find_node_near(pos, 1,
|
|
||||||
{"default:stone", "default:gravel"}) then
|
if tmp.shoot then
|
||||||
self.base_texture = {"mobs_spider_grey.png"}
|
self.attack_type = "dogshoot"
|
||||||
self.object:set_properties({textures = self.base_texture})
|
self.arrow = "mobs_monster:cobweb"
|
||||||
-- mese spider
|
self.dogshoot_switch = 1
|
||||||
elseif minetest.find_node_near(pos, 1,
|
self.dogshoot_count_max = 60
|
||||||
{"default:mese", "default:stone_with_mese"}) then
|
self.dogshoot_count2_max = 20
|
||||||
self.base_texture = {"mobs_spider_mese.png"}
|
self.shoot_interval = 2
|
||||||
self.object:set_properties({textures = self.base_texture})
|
self.shoot_offset = 2
|
||||||
elseif minetest.find_node_near(pos, 1,
|
end
|
||||||
{"ethereal:crystal_dirt", "ethereal:crystal_spike"}) then
|
|
||||||
self.base_texture = {"mobs_spider_crystal.png"}
|
if tmp.small then
|
||||||
self.object:set_properties({textures = self.base_texture})
|
self.object:set_properties({
|
||||||
self.docile_by_day = true
|
collisionbox = {-0.2, -0.2, -0.2, 0.2, 0, 0.2},
|
||||||
self.drops = {
|
visual_size = {x = 0.25, y = 0.25}
|
||||||
{name = "farming:string", chance = 1, min = 0, max = 2},
|
})
|
||||||
{name = "ethereal:crystal_spike", chance = 15, min = 1, max = 2},
|
end
|
||||||
}
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return true -- run only once, false/nil runs every activation
|
return true -- run only once, false/nil runs every activation
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
-- custom function to make spiders climb vertical facings
|
||||||
|
do_custom = function(self, dtime)
|
||||||
|
|
||||||
|
-- quarter second timer
|
||||||
|
self.spider_timer = (self.spider_timer or 0) + dtime
|
||||||
|
if self.spider_timer < 0.25 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self.spider_timer = 0
|
||||||
|
|
||||||
|
-- need to be stopped to go onwards
|
||||||
|
if get_velocity(self) > 0.5 then
|
||||||
|
self.disable_falling = nil
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local pos = self.object:get_pos()
|
||||||
|
local yaw = self.object:get_yaw()
|
||||||
|
|
||||||
|
-- sanity check
|
||||||
|
if not yaw then return end
|
||||||
|
|
||||||
|
pos.y = pos.y + self.collisionbox[2] - 0.2
|
||||||
|
|
||||||
|
local dir_x = -math.sin(yaw) * (self.collisionbox[4] + 0.5)
|
||||||
|
local dir_z = math.cos(yaw) * (self.collisionbox[4] + 0.5)
|
||||||
|
local nod = minetest.get_node_or_nil({
|
||||||
|
x = pos.x + dir_x,
|
||||||
|
y = pos.y + 0.5,
|
||||||
|
z = pos.z + dir_z
|
||||||
|
})
|
||||||
|
|
||||||
|
-- get current velocity
|
||||||
|
local v = self.object:get_velocity()
|
||||||
|
|
||||||
|
-- can only climb solid facings
|
||||||
|
if not nod or not minetest.registered_nodes[nod.name]
|
||||||
|
or not minetest.registered_nodes[nod.name].walkable then
|
||||||
|
self.disable_falling = nil
|
||||||
|
v.y = 0
|
||||||
|
self.object:set_velocity(v)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
--print ("----", nod.name, self.disable_falling, dtime)
|
||||||
|
|
||||||
|
-- turn off falling if attached to facing
|
||||||
|
self.disable_falling = true
|
||||||
|
|
||||||
|
-- move up facing
|
||||||
|
v.x = 0 ; v.y = 0
|
||||||
|
v.y = self.jump_height
|
||||||
|
mobs:set_animation(self, "jump")
|
||||||
|
self.object:set_velocity(v)
|
||||||
|
end,
|
||||||
|
|
||||||
|
-- make spiders jump at you on attack
|
||||||
|
custom_attack = function(self, pos)
|
||||||
|
|
||||||
|
local vel = self.object:get_velocity()
|
||||||
|
|
||||||
|
self.object:set_velocity({
|
||||||
|
x = vel.x * self.run_velocity,
|
||||||
|
y = self.jump_height * 1.5,
|
||||||
|
z = vel.z * self.run_velocity
|
||||||
|
})
|
||||||
|
|
||||||
|
self.pausetimer = 0.5
|
||||||
|
|
||||||
|
return true -- continue rest of attack function
|
||||||
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
if not mobs.custom_spawn_monster then
|
||||||
-- above ground spawn
|
-- above ground spawn
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
name = "mobs_monster:spider",
|
name = "mobs_monster:spider",
|
||||||
nodes = {
|
nodes = {
|
||||||
"default:dirt_with_rainforest_litter", "default:snowblock",
|
"default:dirt_with_rainforest_litter", "default:snowblock",
|
||||||
"default:snow", "ethereal:crystal_dirt"
|
"default:snow", "ethereal:crystal_dirt", "ethereal:cold_dirt"
|
||||||
},
|
},
|
||||||
min_light = 0,
|
min_light = 0,
|
||||||
max_light = 8,
|
max_light = 8,
|
||||||
@ -124,6 +251,7 @@ mobs:spawn({
|
|||||||
min_height = -31000,
|
min_height = -31000,
|
||||||
max_height = -40,
|
max_height = -40,
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
mobs:register_egg("mobs_monster:spider", S("Spider"), "mobs_cobweb.png", 1)
|
mobs:register_egg("mobs_monster:spider", S("Spider"), "mobs_cobweb.png", 1)
|
||||||
@ -151,7 +279,7 @@ minetest.register_node(":mobs:cobweb", {
|
|||||||
walkable = false,
|
walkable = false,
|
||||||
groups = {snappy = 1, disable_jump = 1},
|
groups = {snappy = 1, disable_jump = 1},
|
||||||
drop = "farming:string",
|
drop = "farming:string",
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults()
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
@ -163,4 +291,48 @@ minetest.register_craft({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local web_place = function(pos)
|
||||||
|
|
||||||
|
local pos2 = minetest.find_node_near(pos, 1, {"air", "group:leaves"}, true)
|
||||||
|
|
||||||
|
if pos2 then
|
||||||
|
minetest.swap_node(pos2, {name = "mobs:cobweb"})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
mobs:register_arrow("mobs_monster:cobweb", {
|
||||||
|
visual = "sprite",
|
||||||
|
visual_size = {x = 1, y = 1},
|
||||||
|
textures = {"mobs_cobweb.png"},
|
||||||
|
collisionbox = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1},
|
||||||
|
velocity = 15,
|
||||||
|
tail = 1,
|
||||||
|
tail_texture = "mobs_cobweb.png",
|
||||||
|
tail_size = 5,
|
||||||
|
glow = 2,
|
||||||
|
expire = 0.1,
|
||||||
|
|
||||||
|
hit_player = function(self, player)
|
||||||
|
|
||||||
|
player:punch(self.object, 1.0, {
|
||||||
|
full_punch_interval = 2.0,
|
||||||
|
damage_groups = {fleshy = 3},
|
||||||
|
}, nil)
|
||||||
|
|
||||||
|
web_place(self.object:get_pos())
|
||||||
|
end,
|
||||||
|
|
||||||
|
hit_node = function(self, pos, node)
|
||||||
|
web_place(pos)
|
||||||
|
end,
|
||||||
|
|
||||||
|
hit_mob = function(self, player)
|
||||||
|
|
||||||
|
player:punch(self.object, 1.0, {
|
||||||
|
full_punch_interval = 2.0,
|
||||||
|
damage_groups = {fleshy = 3},
|
||||||
|
}, nil)
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_alias("mobs:spider_cobweb", "mobs:cobweb")
|
minetest.register_alias("mobs:spider_cobweb", "mobs:cobweb")
|
||||||
|
@ -1,6 +1,18 @@
|
|||||||
|
|
||||||
local S = mobs.intllib
|
local S = mobs.intllib
|
||||||
|
|
||||||
|
local stone_types = {
|
||||||
|
|
||||||
|
{ nodes = {"default:desert_stone"},
|
||||||
|
skins = {"mobs_stone_monster3.png"},
|
||||||
|
drops = {
|
||||||
|
{name = "default:desert_cobble", chance = 1, min = 0, max = 2},
|
||||||
|
{name = "default:iron_lump", chance = 5, min = 0, max = 2},
|
||||||
|
{name = "default:gold_lump", chance = 5, min = 0, max = 2}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
-- Stone Monster by PilzAdam
|
-- Stone Monster by PilzAdam
|
||||||
|
|
||||||
@ -35,7 +47,7 @@ mobs:register_mob("mobs_monster:stone_monster", {
|
|||||||
{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 = "maptools:silver_coin", chance = 1, min = 0, max = 1},
|
||||||
{name = "default:torch", chance = 2, min = 3, max = 5},
|
{name = "default:torch", chance = 2, min = 3, max = 5},
|
||||||
},
|
},
|
||||||
water_damage = 0,
|
water_damage = 0,
|
||||||
@ -53,9 +65,44 @@ mobs:register_mob("mobs_monster:stone_monster", {
|
|||||||
punch_start = 40,
|
punch_start = 40,
|
||||||
punch_end = 63,
|
punch_end = 63,
|
||||||
},
|
},
|
||||||
|
immune_to = {
|
||||||
|
{"default:pick_wood", 0}, -- wooden pick doesnt hurt stone monster
|
||||||
|
{"default:pick_stone", 4}, -- picks deal more damage to stone monster
|
||||||
|
{"default:pick_bronze", 5},
|
||||||
|
{"default:pick_steel", 5},
|
||||||
|
{"default:pick_mese", 6},
|
||||||
|
{"default:pick_diamond", 7},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- check surrounding nodes and spawn a specific spider
|
||||||
|
on_spawn = function(self)
|
||||||
|
|
||||||
|
local pos = self.object:get_pos() ; pos.y = pos.y - 1
|
||||||
|
local tmp
|
||||||
|
|
||||||
|
for n = 1, #stone_types do
|
||||||
|
|
||||||
|
tmp = stone_types[n]
|
||||||
|
|
||||||
|
if minetest.find_node_near(pos, 1, tmp.nodes) then
|
||||||
|
|
||||||
|
self.base_texture = tmp.skins
|
||||||
|
self.object:set_properties({textures = tmp.skins})
|
||||||
|
|
||||||
|
if tmp.drops then
|
||||||
|
self.drops = tmp.drops
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return true -- run only once, false/nil runs every activation
|
||||||
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
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"},
|
||||||
@ -63,6 +110,7 @@ mobs:spawn({
|
|||||||
chance = 7000,
|
chance = 7000,
|
||||||
max_height = 0,
|
max_height = 0,
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
mobs:register_egg("mobs_monster:stone_monster", S("Stone Monster"), "default_stone.png", 1)
|
mobs:register_egg("mobs_monster:stone_monster", S("Stone Monster"), "default_stone.png", 1)
|
||||||
|
BIN
textures/mobs_dirt_monster2.png
Normal file
After Width: | Height: | Size: 594 B |
BIN
textures/mobs_dirt_monster3.png
Normal file
After Width: | Height: | Size: 610 B |
BIN
textures/mobs_land_guard.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
textures/mobs_land_guard2.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
textures/mobs_land_guard3.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
textures/mobs_land_guard4.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
textures/mobs_land_guard5.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
textures/mobs_land_guard6.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
textures/mobs_land_guard7.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
textures/mobs_land_guard8.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
textures/mobs_obsidian_flan.png
Normal file
After Width: | Height: | Size: 275 B |
BIN
textures/mobs_oerkki3.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
textures/mobs_sand_monster2.png
Normal file
After Width: | Height: | Size: 778 B |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 757 B |
BIN
textures/mobs_stone_monster3.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
textures/mobs_tree_monster3.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
textures/mobs_tree_monster4.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
textures/mobs_tree_monster5.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
textures/mobs_tree_monster6.png
Executable file
After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 567 B After Width: | Height: | Size: 305 B |
BIN
textures/zmobs_mese_monster_old.png
Normal file
After Width: | Height: | Size: 567 B |
114
tree_monster.lua
@ -1,6 +1,49 @@
|
|||||||
|
|
||||||
local S = mobs.intllib
|
local S = mobs.intllib
|
||||||
|
|
||||||
|
local tree_types = {
|
||||||
|
|
||||||
|
{ nodes = {"ethereal:sakura_leaves", "ethereal:sakura_leaves2"},
|
||||||
|
skins = {"mobs_tree_monster5.png"},
|
||||||
|
drops = {
|
||||||
|
{name = "default:stick", chance = 1, min = 1, max = 3},
|
||||||
|
{name = "ethereal:sakura_leaves", chance = 1, min = 1, max = 2},
|
||||||
|
{name = "ethereal:sakura_trunk", chance = 2, min = 1, max = 2},
|
||||||
|
{name = "ethereal:sakura_tree_sapling", chance = 2, min = 0, max = 2},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{ nodes = {"ethereal:frost_leaves"},
|
||||||
|
skins = {"mobs_tree_monster3.png"},
|
||||||
|
drops = {
|
||||||
|
{name = "default:stick", chance = 1, min = 1, max = 3},
|
||||||
|
{name = "ethereal:frost_leaves", chance = 1, min = 1, max = 2},
|
||||||
|
{name = "ethereal:frost_tree", chance = 2, min = 1, max = 2},
|
||||||
|
{name = "ethereal:crystal_spike", chance = 4, min = 0, max = 2},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{ nodes = {"ethereal:yellowleaves"},
|
||||||
|
skins = {"mobs_tree_monster4.png"},
|
||||||
|
drops = {
|
||||||
|
{name = "default:stick", chance = 1, min = 1, max = 3},
|
||||||
|
{name = "ethereal:yellowleaves", chance = 1, min = 1, max = 2},
|
||||||
|
{name = "ethereal:yellow_tree_sapling", chance = 2, min = 0, max = 2},
|
||||||
|
{name = "ethereal:golden_apple", chance = 3, min = 0, max = 2},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{ nodes = {"default:acacia_bush_leaves"},
|
||||||
|
skins = {"mobs_tree_monster6.png"},
|
||||||
|
drops = {
|
||||||
|
{name = "tnt:gunpowder", chance = 1, min = 0, max = 2},
|
||||||
|
{name = "default:iron_lump", chance = 5, min = 0, max = 2},
|
||||||
|
{name = "default:coal_lump", chance = 3, min = 0, max = 3}
|
||||||
|
},
|
||||||
|
explode = true
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
-- Tree Monster (or Tree Gollum) by PilzAdam
|
-- Tree Monster (or Tree Gollum) by PilzAdam
|
||||||
|
|
||||||
@ -12,8 +55,8 @@ mobs:register_mob("mobs_monster:tree_monster", {
|
|||||||
--specific_attack = {"player", "mobs_animal:chicken"},
|
--specific_attack = {"player", "mobs_animal:chicken"},
|
||||||
reach = 2,
|
reach = 2,
|
||||||
damage = 2,
|
damage = 2,
|
||||||
hp_min = 7,
|
hp_min = 20,
|
||||||
hp_max = 33,
|
hp_max = 40,
|
||||||
armor = 100,
|
armor = 100,
|
||||||
collisionbox = {-0.4, -1, -0.4, 0.4, 0.8, 0.4},
|
collisionbox = {-0.4, -1, -0.4, 0.4, 0.8, 0.4},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
@ -43,11 +86,17 @@ mobs:register_mob("mobs_monster:tree_monster", {
|
|||||||
lava_damage = 0,
|
lava_damage = 0,
|
||||||
light_damage = 2,
|
light_damage = 2,
|
||||||
fall_damage = 0,
|
fall_damage = 0,
|
||||||
-- immune_to = {
|
immune_to = {
|
||||||
-- {"default:axe_diamond", 5},
|
{"default:axe_wood", 0}, -- wooden axe doesnt hurt wooden monster
|
||||||
-- {"default:sapling", -5}, -- saplings heal
|
{"default:axe_stone", 4}, -- axes deal more damage to tree monster
|
||||||
-- {"all", 0},
|
{"default:axe_bronze", 5},
|
||||||
-- },
|
{"default:axe_steel", 5},
|
||||||
|
{"default:axe_mese", 7},
|
||||||
|
{"default:axe_diamond", 9},
|
||||||
|
{"default:sapling", -5}, -- default and jungle saplings heal
|
||||||
|
{"default:junglesapling", -5},
|
||||||
|
-- {"all", 0}, -- only weapons on list deal damage
|
||||||
|
},
|
||||||
animation = {
|
animation = {
|
||||||
speed_normal = 15,
|
speed_normal = 15,
|
||||||
speed_run = 15,
|
speed_run = 15,
|
||||||
@ -60,17 +109,66 @@ mobs:register_mob("mobs_monster:tree_monster", {
|
|||||||
punch_start = 48,
|
punch_start = 48,
|
||||||
punch_end = 62,
|
punch_end = 62,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- check surrounding nodes and spawn a specific tree monster
|
||||||
|
on_spawn = function(self)
|
||||||
|
|
||||||
|
local pos = self.object:get_pos() ; pos.y = pos.y - 1
|
||||||
|
local tmp
|
||||||
|
|
||||||
|
for n = 1, #tree_types do
|
||||||
|
|
||||||
|
tmp = tree_types[n]
|
||||||
|
|
||||||
|
if tmp.explode and math.random(2) == 1 then return true end
|
||||||
|
|
||||||
|
if minetest.find_node_near(pos, 1, tmp.nodes) then
|
||||||
|
|
||||||
|
self.base_texture = tmp.skins
|
||||||
|
self.object:set_properties({textures = tmp.skins})
|
||||||
|
|
||||||
|
if tmp.drops then
|
||||||
|
self.drops = tmp.drops
|
||||||
|
end
|
||||||
|
|
||||||
|
if tmp.explode then
|
||||||
|
self.attack_type = "explode"
|
||||||
|
self.explosion_radius = 3
|
||||||
|
self.explosion_timer = 3
|
||||||
|
self.damage = 21
|
||||||
|
self.reach = 3
|
||||||
|
self.fear_height = 4
|
||||||
|
self.water_damage = 2
|
||||||
|
self.lava_damage = 15
|
||||||
|
self.light_damage = 0
|
||||||
|
self.makes_footstep_sound = false
|
||||||
|
self.runaway_from = {"mobs_animal:kitten"}
|
||||||
|
self.sounds = {
|
||||||
|
attack = "tnt_ignite",
|
||||||
|
explode = "tnt_explode",
|
||||||
|
fuse = "tnt_ignite"
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return true -- run only once, false/nil runs every activation
|
||||||
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
if not mobs.custom_spawn_monster then
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
name = "mobs_monster:tree_monster",
|
name = "mobs_monster:tree_monster",
|
||||||
nodes = {"default:leaves", "default:jungleleaves", "moretrees:beech_leaves"},
|
nodes = {"group:leaves"}, --{"default:leaves", "default:jungleleaves"},
|
||||||
max_light = 7,
|
max_light = 7,
|
||||||
chance = 7000,
|
chance = 7000,
|
||||||
min_height = 0,
|
min_height = 0,
|
||||||
day_toggle = false,
|
day_toggle = false,
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
mobs:register_egg("mobs_monster:tree_monster", S("Tree Monster"), "default_tree_top.png", 1)
|
mobs:register_egg("mobs_monster:tree_monster", S("Tree Monster"), "default_tree_top.png", 1)
|
||||||
|