Commit a96c7029 authored by Milan's avatar Milan
Browse files

merge with upstream

parents 886a2fd9 cd201150
default
mobs
default?
lucky_block?
toolranks?
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
......@@ -19,6 +29,7 @@ mobs:register_mob("mobs_monster:dirt_monster", {
mesh = "mobs_stone_monster.b3d",
textures = {
{"mobs_dirt_monster.png"},
{"mobs_dirt_monster2.png"},
},
blood_texture = "default_dirt.png",
makes_footstep_sound = true,
......@@ -48,18 +59,39 @@ mobs:register_mob("mobs_monster:dirt_monster", {
punch_start = 40,
punch_end = 63,
},
})
-- check surrounding nodes and spawn a specific monster
on_spawn = function(self)
local spawn_on = "default:dirt_with_grass"
local pos = self.object:get_pos() ; pos.y = pos.y - 1
local tmp
if minetest.get_modpath("ethereal") then
spawn_on = "ethereal:gray_dirt"
end
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
})
if not mobs.custom_spawn_monster then
mobs:spawn({
name = "mobs_monster:dirt_monster",
nodes = {spawn_on},
nodes = {"default:dirt_with_grass", "ethereal:gray_dirt", "ethereal:dry_dirt"},
min_light = 0,
max_light = 7,
chance = 6000,
......@@ -68,6 +100,7 @@ mobs:spawn({
max_height = 80,
day_toggle = false,
})
end
mobs:register_egg("mobs_monster:dirt_monster", S("Dirt Monster"), "default_dirt.png", 1)
......
local S = mobs.intllib
local master_types = {
{ nodes = {"nether:rack"},
skins = {"mobs_dungeon_master_nether.png"},
},
{ nodes = {"nether:rack_deep"},
skins = {"mobs_dungeon_master_netherdeep.png"},
}
}
-- Dungeon Master by PilzAdam
......@@ -16,8 +26,8 @@ mobs:register_mob("mobs_monster:dungeon_master", {
shoot_interval = 2.2,
arrow = "mobs_monster:fireball",
shoot_offset = 1,
hp_min = 22,
hp_max = 45,
hp_min = 42,
hp_max = 75,
armor = 60,
collisionbox = {-0.7, -1, -0.7, 0.7, 1.6, 0.7},
visual = "mesh",
......@@ -60,17 +70,45 @@ mobs:register_mob("mobs_monster:dungeon_master", {
speed_normal = 15,
speed_run = 15,
},
-- 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, #master_types do
tmp = master_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({
name = "mobs_monster:dungeon_master",
nodes = {"default:stone"},
nodes = {"default:stone", "nether:rack", "nether:rack_deep"},
max_light = 5,
chance = 9000,
active_object_count = 1,
max_height = -70,
})
end
mobs:register_egg("mobs_monster:dungeon_master", S("Dungeon Master"), "fire_basic_flame.png", 1, true)
......
local S = mobs.intllib
local mob_drops = {
{name = "fireflies:firefly", chance = 1, min = 1, max = 1}
}
if minetest.get_modpath("ethereal") then
table.insert(mob_drops,
{name = "ethereal:fire_dust", chance = 1, min = 1, max = 1})
end
-- Fire Spirit
mobs:register_mob("mobs_monster:fire_spirit", {
type = "monster",
passive = false,
attack_type = "dogfight",
pathfinding = true,
reach = 2,
damage = 4,
hp_min = 25,
hp_max = 45,
armor = 100,
collisionbox = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1},
visual_scale = {x = 0.5, y = 0.5, z = 0.5},
visual = "sprite",
textures = {
{"mobs_fire_spirit.png"}
},
glow = 14,
blood_texture = "fire_basic_flame.png",
immune_to = {
{"bucket:bucket_water", 1},
{"bucket:bucket_river_water", 1},
{"all"}
},
makes_footstep_sound = false,
sounds = {
random = "fire_fire",
damage = "fire_extinguish_flame",
death = "fire_extinguish_flame"
},
view_range = 14,
walk_velocity = 2,
run_velocity = 3,
jump = true,
jump_height = 6,
drops = mob_drops,
water_damage = 1,
lava_damage = 0,
fire_damage = 0,
light_damage = 0,
fall_damage = false,
fear_height = 8,
animation = {},
on_die = function(self, pos)
mobs:effect(pos, 20, "tnt_smoke.png", 3, 5, 2, 0.5, nil, false)
self.object:remove()
end,
do_custom = function(self, dtime)
self.flame_timer = (self.flame_timer or 0) + dtime
if self.flame_timer < 0.25 then
return
end
self.flame_timer = 0
local pos = self.object:get_pos()
-- pos, amount, texture, min_size, max_size, radius, gravity, glow, fall
mobs:effect(pos, 5, "fire_basic_flame.png", 1, 2, 0.1, 0.2, 14, nil)
end
})
if not mobs.custom_spawn_monster then
mobs:spawn({
name = "mobs_monster:fire_spirit",
nodes = {"default:obsidian", "caverealms:hot_cobble"},
neighbors = {"group:fire"},
min_light = 12,
max_light = 15,
chance = 1500,
active_object_count = 1,
max_height = -150
})
end
mobs:register_egg("mobs_monster:fire_spirit", S("Fire Spirit"), "fire_basic_flame.png", 1)
-- Load support for intllib.
local path = minetest.get_modpath(minetest.get_current_modname())
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")
dofile(path .. "intllib.lua")
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
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 .. "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 .. "land_guard.lua")
dofile(path .. "fire_spirit.lua")
-- Load custom spawning
if mobs.custom_spawn_monster then
dofile(path .. "spawn.lua")
end
-- Lucky Blocks
dofile(path .. "/lucky_block.lua")
dofile(path .. "lucky_block.lua")
print (S("[MOD] Mobs Redo Monsters loaded"))
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)
......@@ -36,7 +36,8 @@ mobs:register_mob("mobs_monster:lava_flan", {
{name = "mobs:lava_orb", chance = 15, min = 1, max = 1},
},
water_damage = 8,
lava_damage = 0,
lava_damage = -1,
fire_damage = 0,
light_damage = 0,
immune_to = {
{"mobs:pick_lava", -2}, -- lava pick heals 2 health
......@@ -52,7 +53,7 @@ mobs:register_mob("mobs_monster:lava_flan", {
run_start = 20,
run_end = 28,
punch_start = 20,
punch_end = 28,
punch_end = 28
},
on_die = function(self, pos)
......@@ -89,6 +90,7 @@ mobs:register_mob("mobs_monster:lava_flan", {
})
if not mobs.custom_spawn_monster then
mobs:spawn({
name = "mobs_monster:lava_flan",
nodes = {"default:lava_source"},
......@@ -96,6 +98,7 @@ mobs:spawn({
active_object_count = 1,
max_height = 0,
})
end
mobs:register_egg("mobs_monster:lava_flan", S("Lava Flan"), "default_lava.png", 1)
......@@ -107,6 +110,7 @@ mobs:alias_mob("mobs:lava_flan", "mobs_monster:lava_flan") -- compatibility
minetest.register_craftitem(":mobs:lava_orb", {
description = S("Lava orb"),
inventory_image = "zmobs_lava_orb.png",
light_source = 14,
})
minetest.register_alias("zmobs:lava_orb", "mobs:lava_orb")
......@@ -170,13 +174,18 @@ minetest.register_tool(":mobs:pick_lava", {
inventory_image = "mobs_pick_lava.png",
tool_capabilities = {
full_punch_interval = 0.4,
max_drop_level=3,
groupcaps={
cracky = {times={[1]=1.80, [2]=0.80, [3]=0.40}, uses=40, maxlevel=3},
max_drop_level = 3,
groupcaps = {
cracky = {
times = {[1] = 1.80, [2] = 0.80, [3] = 0.40},
uses = 40,
maxlevel = 3
}
},
damage_groups = {fleshy = 6, fire = 1},
},
groups = {pickaxe = 1}
groups = {pickaxe = 1},
light_source = 14
})
minetest.register_craft({
......@@ -184,7 +193,7 @@ minetest.register_craft({
recipe = {
{"mobs:lava_orb", "mobs:lava_orb", "mobs:lava_orb"},
{"", "default:obsidian_shard", ""},
{"", "default:obsidian_shard", ""},
{"", "default:obsidian_shard", ""}
}
})
......@@ -363,6 +372,7 @@ mobs:register_mob("mobs_monster:obsidian_flan", {
},
water_damage = 0,
lava_damage = 8,
fire_damage = 0,
light_damage = 0,
animation = {
speed_normal = 15,
......@@ -374,7 +384,7 @@ mobs:register_mob("mobs_monster:obsidian_flan", {
run_start = 20,
run_end = 28,
punch_start = 20,
punch_end = 28,
punch_end = 28
}
})
......@@ -417,9 +427,11 @@ mobs:register_arrow("mobs_monster:obsidian_arrow", {
local radius = 1
local def = minetest.registered_nodes[node]
if def then
node = { name = node }
node = {name = node}
end
if def and def.tiles and def.tiles[1] then
texture = def.tiles[1]
end
......@@ -446,7 +458,7 @@ mobs:register_arrow("mobs_monster:obsidian_arrow", {
texture = texture,
-- ^ only as fallback for clients without support for `node` parameter
node = node,
collisiondetection = true,
collisiondetection = true
})
minetest.set_node(pos, {name = "air"})
......
......@@ -30,3 +30,7 @@ mobs.fireball.png was originally made by Sapier and edited by Benrob:
--
-- (c) Sapier
-- Contact sapier a t gmx net
Textures created by wwar (cc0)
mobs_dungeon_master_nether.png
mobs_dungeon_master_netherdeep.png
......@@ -12,6 +12,9 @@ mobs:register_mob("mobs_monster:mese_monster", {
shoot_interval = 0.5,
arrow = "mobs_monster:mese_arrow",
shoot_offset = 2,
--arrow_override = function(self)
-- self.velocity = 20
--end,
hp_min = 10,
hp_max = 25,
armor = 80,
......@@ -56,6 +59,7 @@ mobs:register_mob("mobs_monster:mese_monster", {
})
if not mobs.custom_spawn_monster then
mobs:spawn({
name = "mobs_monster:mese_monster",
nodes = {"default:stone"},
......@@ -64,6 +68,7 @@ mobs:spawn({
active_object_count = 1,
max_height = -20,
})
end
mobs:register_egg("mobs_monster:mese_monster", S("Mese Monster"), "default_mese_block.png", 1)
......
name = mobs_monster
depends = mobs
optional_depends = default, lucky_block, toolranks, intllib
description = Adds many types of monsters.
......@@ -20,6 +20,7 @@ mobs:register_mob("mobs_monster:oerkki", {
textures = {
{"mobs_oerkki.png"},
{"mobs_oerkki2.png"},
{"mobs_oerkki3.png"},
},
makes_footstep_sound = false,
sounds = {
......@@ -61,6 +62,7 @@ mobs:register_mob("mobs_monster:oerkki", {
})
if not mobs.custom_spawn_monster then
mobs:spawn({
name = "mobs_monster:oerkki",
nodes = {"default:stone"},
......@@ -68,6 +70,7 @@ mobs:spawn({
chance = 7000,
max_height = -10,
})
end
mobs:register_egg("mobs_monster:oerkki", S("Oerkki"), "default_obsidian.png", 1)
......
......@@ -27,7 +27,7 @@ Sand Monster
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
......@@ -35,6 +35,14 @@ Stone 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