diff --git a/dirt_monster.lua b/dirt_monster.lua index 042d3ac..f5158da 100644 --- a/dirt_monster.lua +++ b/dirt_monster.lua @@ -29,12 +29,12 @@ mobs:register_mob("mobs_monster:dirt_monster", { mesh = "mobs_stone_monster.b3d", textures = { {"mobs_dirt_monster.png"}, - {"mobs_dirt_monster2.png"}, + {"mobs_dirt_monster2.png"} }, blood_texture = "default_dirt.png", makes_footstep_sound = true, sounds = { - random = "mobs_dirtmonster", + random = "mobs_dirtmonster" }, view_range = 15, walk_velocity = 1, @@ -58,7 +58,7 @@ mobs:register_mob("mobs_monster:dirt_monster", { run_start = 40, run_end = 63, punch_start = 40, - punch_end = 63, + punch_end = 63 }, -- check surrounding nodes and spawn a specific monster @@ -90,16 +90,17 @@ mobs:register_mob("mobs_monster:dirt_monster", { if not mobs.custom_spawn_monster then -mobs:spawn({ - name = "mobs_monster:dirt_monster", - nodes = {"default:dirt_with_grass", "ethereal:gray_dirt", "ethereal:dry_dirt"}, - min_light = 0, - max_light = 7, - chance = 6000, - active_object_count = 2, - min_height = 0, - day_toggle = false, -}) + + mobs:spawn({ + name = "mobs_monster:dirt_monster", + nodes = {"default:dirt_with_grass", "ethereal:gray_dirt", "ethereal:dry_dirt"}, + min_light = 0, + max_light = 7, + chance = 6000, + active_object_count = 2, + min_height = 0, + day_toggle = false + }) end diff --git a/dungeon_master.lua b/dungeon_master.lua index 11c723a..f2074bf 100644 --- a/dungeon_master.lua +++ b/dungeon_master.lua @@ -25,6 +25,7 @@ mobs:register_mob("mobs_monster:dungeon_master", { reach = 3, shoot_interval = 2.2, arrow = "mobs_monster:fireball", + friendly_fire = false, shoot_offset = 1, hp_min = 42, hp_max = 75, @@ -35,12 +36,12 @@ mobs:register_mob("mobs_monster:dungeon_master", { textures = { {"mobs_dungeon_master.png"}, {"mobs_dungeon_master2.png"}, - {"mobs_dungeon_master3.png"}, + {"mobs_dungeon_master3.png"} }, makes_footstep_sound = true, sounds = { random = "mobs_dungeonmaster", - shoot_attack = "mobs_fireball", + shoot_attack = "mobs_fireball" }, walk_velocity = 1, run_velocity = 3, @@ -70,7 +71,7 @@ mobs:register_mob("mobs_monster:dungeon_master", { shoot_start = 36, shoot_end = 48, speed_normal = 15, - speed_run = 15, + speed_run = 15 }, -- check surrounding nodes and spawn a specific monster @@ -102,14 +103,14 @@ mobs:register_mob("mobs_monster:dungeon_master", { if not mobs.custom_spawn_monster then -mobs:spawn({ - name = "mobs_monster:dungeon_master", - nodes = {"default:stone", "nether:rack", "nether:rack_deep", "hell:hellrack"}, - max_light = 5, - chance = 9000, - active_object_count = 1, - max_height = -70, -}) + mobs:spawn({ + name = "mobs_monster:dungeon_master", + nodes = {"default:stone", "nether:rack", "nether:rack_deep", "hell:hellrack"}, + max_light = 5, + chance = 9000, + active_object_count = 1, + max_height = -70, + }) end @@ -152,7 +153,7 @@ mobs:register_arrow("mobs_monster:fireball", { self.object:set_velocity({ x = dir.x * self.velocity, y = dir.y * self.velocity, - z = dir.z * self.velocity, + z = dir.z * self.velocity }) end end @@ -162,14 +163,14 @@ mobs:register_arrow("mobs_monster:fireball", { hit_player = function(self, player) player:punch(self.object, 1.0, { full_punch_interval = 1.0, - damage_groups = {fleshy = 8}, + 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}, + damage_groups = {fleshy = 8} }, nil) end, diff --git a/fire_spirit.lua b/fire_spirit.lua index 33dd049..5a799bf 100644 --- a/fire_spirit.lua +++ b/fire_spirit.lua @@ -82,16 +82,17 @@ mobs:register_mob("mobs_monster:fire_spirit", { 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 -}) + + 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 diff --git a/init.lua b/init.lua index 479fba7..3866bd7 100644 --- a/init.lua +++ b/init.lua @@ -2,8 +2,6 @@ -- Load support for intllib. local path = minetest.get_modpath(minetest.get_current_modname()) .. "/" -local S - -- Check for translation method local S if minetest.get_translator ~= nil then @@ -12,11 +10,10 @@ else if minetest.get_modpath("intllib") then dofile(minetest.get_modpath("intllib") .. "/init.lua") if intllib.make_gettext_pair then - gettext, ngettext = intllib.make_gettext_pair() -- new gettext method + S = intllib.make_gettext_pair() -- new gettext method else - gettext = intllib.Getter() -- old text file method + S = intllib.Getter() -- old text file method end - S = gettext else -- boilerplate function S = function(str, ...) local args = {...} @@ -62,7 +59,9 @@ end -- Lucky Blocks -dofile(path .. "lucky_block.lua") +if minetest.get_modpath("lucky_block") then + dofile(path .. "lucky_block.lua") +end print ("[MOD] Mobs Redo Monsters loaded") diff --git a/lava_flan.lua b/lava_flan.lua index 8e2d085..441efac 100644 --- a/lava_flan.lua +++ b/lava_flan.lua @@ -150,29 +150,32 @@ function minetest.handle_node_drops(pos, drops, digger) local hot_drops = {} -- loop through current node drops - for _, drop in pairs(drops) do + for _, drop in ipairs(drops) do -- get cooked output of current drops local stack = ItemStack(drop) - local output = minetest.get_craft_result({ - method = "cooking", - width = 1, - items = {drop} - }) - -- if we have cooked result then add to new list - if output - and output.item - and not output.item:is_empty() then + while not stack:is_empty() do - table.insert(hot_drops, - ItemStack({ - name = output.item:get_name(), - count = output.item:to_table().count, - }) - ) - else -- if not then return normal drops - table.insert(hot_drops, stack) + local output, decremented_input = minetest.get_craft_result({ + method = "cooking", + width = 1, + items = {stack} + }) + + if output.item:is_empty() then + + table.insert_all(hot_drops, decremented_input.items) + break + else + if not output.item:is_empty() then + table.insert(hot_drops, output.item) + end + + table.insert_all(hot_drops, output.replacements) + + stack = decremented_input.items[1] or ItemStack() + end end end diff --git a/license.txt b/license.txt index b5d23d9..05c60a3 100644 --- a/license.txt +++ b/license.txt @@ -20,20 +20,25 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -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 - Textures created by wwar (CC0) mobs_dungeon_master_nether.png mobs_dungeon_master_netherdeep.png + mobs_stone_monster.png + mobs_dungeon_master2.png + mobs_land_guard.png + mobs_land_guard2.png + mobs_land_guard3.png + +Textures by AMMOnym (WTFPL) + mobs_stone_monster2.png + +Textures by TenPlus1 (MIT) + mobs_stone_monster3.png + mobs_fireball.png + +Textures by Sirrobzeroone (CC0 1.0 Universal) + mobs_stone_monster4.png + mobs_sand_monster.png Textures and Model created by SirrobZeroone (CC0) mobs_mese_monster_red.png @@ -42,3 +47,42 @@ Textures and Model created by SirrobZeroone (CC0) mobs_mese_monster_purple.png mobs_mese_arrow.png mobs_mese_monster.b3d + +Pavel_S and PilzAdam (WTFPL) + mobs_dirt_monster.png + mobs_dirt_monster2.png + mobs_dirt_monster3.png + mobs_dungeon_master.b3d + mobs_dungeon_master.png + mobs_dungeon_master.ogg + mobs_fireball.ogg + mobs_oerkki.b3d + mobs_oerkki.png + mobs_sand_monster.b3d [edited by SirrobZeroone] + mobs_sand_monster2.png + mobs_stone_monster.b3d [edited by SirrobZeroone] + mobs_tree_monster.b3d + mobs_tree_monster*.png (edited by TenPlus1) + +AspireMint (CC BY-SA 3.0) + mobs_spider.b3d + mobs_spider_mese.png + mobs_spider_orange.png + mobs_spider_snowy.png + mobs_spider_grey.png + mobs_spider_crystal.png + +Zeg9 (CC BY-SA 3.0) + zmobs_lava_flan.x + zmobs_lava_flan.png + zmobs_lava_orb.png + +Sounds by Cyberpangolin (WTFPL) https://forum.minetest.net/viewtopic.php?t=10798 + mobs_dirtmonster.ogg + mobs_dungeonmaster.ogg + mobs_lavaflan.ogg + mobs_mesemonster.ogg + mobs_oerkki.ogg + mobs_sandmonster.ogg + mobs_stonemonster.ogg + mobs_treemonster.ogg diff --git a/lucky_block.lua b/lucky_block.lua index c9aecea..9954b8c 100644 --- a/lucky_block.lua +++ b/lucky_block.lua @@ -1,42 +1,37 @@ +local web = {name = "mobs:cobweb"} +local web_trap = { + size = {x = 3, y = 3, z = 3}, + data = { + web, web, web, + web, web, web, + web, web, web, -if minetest.get_modpath("lucky_block") then + web, web, web, + web, web, web, + web, web, web, - local web = {name = "mobs:cobweb"} - local web_trap = { - size = {x = 3, y = 3, z = 3}, - data = { - web, web, web, - web, web, web, - web, web, web, - - web, web, web, - web, web, web, - web, web, web, - - web, web, web, - web, web, web, - web, web, web, - }, + web, web, web, + web, web, web, + web, web, web } +} - lucky_block:add_schematics({ - {"webtrap", web_trap, {x = 1, y = 0, z = 1}}, - }) +lucky_block:add_schematics({ + {"webtrap", web_trap, {x = 1, y = 0, z = 1}}, +}) - lucky_block:add_blocks({ - {"sch", "webtrap", 1, true}, - {"spw", "mobs:dungeon_master", 1, nil, nil, 3, "Billy"}, - {"spw", "mobs:sand_monster", 3}, - {"spw", "mobs:stone_monster", 3, nil, nil, 3, "Bob"}, - {"spw", "mobs:dirt_monster", 3}, - {"spw", "mobs:tree_monster", 3}, - {"spw", "mobs:oerkki", 3}, - {"exp"}, - {"spw", "mobs:spider", 5}, - {"spw", "mobs:mese_monster", 2}, - {"spw", "mobs:lava_flan", 3}, - {"nod", "default:chest", 0, { - {name = "mobs:lava_orb", max = 1}}}, - }) - -end +lucky_block:add_blocks({ + {"sch", "webtrap", 1, true}, + {"spw", "mobs:dungeon_master", 1, nil, nil, 3, "Billy"}, + {"spw", "mobs:sand_monster", 3}, + {"spw", "mobs:stone_monster", 3, nil, nil, 3, "Bob"}, + {"spw", "mobs:dirt_monster", 3}, + {"spw", "mobs:tree_monster", 3}, + {"spw", "mobs:oerkki", 3}, + {"exp"}, + {"spw", "mobs:spider", 5}, + {"spw", "mobs:mese_monster", 2}, + {"spw", "mobs:lava_flan", 3}, + {"nod", "default:chest", 0, { + {name = "mobs:lava_orb", max = 1}}}, +}) diff --git a/mese_monster.lua b/mese_monster.lua index 8784c7b..ef2926d 100644 --- a/mese_monster.lua +++ b/mese_monster.lua @@ -144,9 +144,9 @@ mobs:register_mob("mobs_monster:mese_monster", { shoot_interval = 0.5, arrow = "mobs_monster:mese_arrow", shoot_offset = 0.75, ---arrow_override = function(self) --- self.velocity = 20 ---end, +-- arrow_override = function(self) +-- self.velocity = 20 +-- end, knock_back = true, hp_min = 10, hp_max = 25, @@ -211,6 +211,15 @@ mobs:register_mob("mobs_monster:mese_monster", { punch_end = 189 }, + after_activate = function(self, staticdata, def, dtime) + + local tex = self and self.textures and self.textures[1] + + if tex == "zmobs_mese_monster.png" then + self.object:remove() + end + end, + on_spawn = function(self) local pos = self.object:get_pos() @@ -219,6 +228,7 @@ mobs:register_mob("mobs_monster:mese_monster", { local function update(self, def) self.object:set_properties({textures = def.skins}) + self.base_texture = def.skins -- added by mobs_redo self.hp_min = def.hp_min @@ -298,14 +308,14 @@ mobs:register_arrow("mobs_monster:mese_arrow", { hit_player = function(self, player) player:punch(self.object, 1.0, { full_punch_interval = 1.0, - damage_groups = {fleshy = self.damage}, + damage_groups = {fleshy = self.damage} }, nil) end, hit_mob = function(self, player) player:punch(self.object, 1.0, { full_punch_interval = 1.0, - damage_groups = {fleshy = self.damage}, + damage_groups = {fleshy = self.damage} }, nil) end, @@ -315,14 +325,14 @@ mobs:register_arrow("mobs_monster:mese_arrow", { if not mobs.custom_spawn_monster then -mobs:spawn({ - name = "mobs_monster:mese_monster", - nodes = {"default:stone", "default:sandstone"}, - max_light = 7, - chance = 5000, - active_object_count = 1, - max_height = -20 -}) + mobs:spawn({ + name = "mobs_monster:mese_monster", + nodes = {"default:stone", "default:sandstone"}, + max_light = 7, + chance = 5000, + active_object_count = 1, + max_height = -20 + }) end diff --git a/models/mobs_sand_monster.b3d b/models/mobs_sand_monster.b3d index 9782504..893cf96 100644 Binary files a/models/mobs_sand_monster.b3d and b/models/mobs_sand_monster.b3d differ diff --git a/models/mobs_stone_monster.b3d b/models/mobs_stone_monster.b3d index d9c0c71..4460b14 100644 Binary files a/models/mobs_stone_monster.b3d and b/models/mobs_stone_monster.b3d differ diff --git a/oerkki.lua b/oerkki.lua index 171690f..41ec8d6 100644 --- a/oerkki.lua +++ b/oerkki.lua @@ -19,11 +19,11 @@ mobs:register_mob("mobs_monster:oerkki", { textures = { {"mobs_oerkki.png"}, {"mobs_oerkki2.png"}, - {"mobs_oerkki3.png"}, + {"mobs_oerkki3.png"} }, makes_footstep_sound = false, sounds = { - random = "mobs_oerkki", + random = "mobs_oerkki" }, walk_velocity = 1, run_velocity = 3, @@ -48,7 +48,7 @@ mobs:register_mob("mobs_monster:oerkki", { punch_start = 37, punch_end = 49, speed_normal = 15, - speed_run = 15, + speed_run = 15 }, replace_rate = 5, replace_what = {"default:torch"}, @@ -56,19 +56,20 @@ mobs:register_mob("mobs_monster:oerkki", { replace_offset = -1, immune_to = { {"default:sword_wood", 0}, -- no damage - {"default:gold_lump", -10}, -- heals by 10 points + {"default:gold_lump", -10} -- heals by 10 points }, }) if not mobs.custom_spawn_monster then -mobs:spawn({ - name = "mobs_monster:oerkki", - nodes = {"default:stone"}, - max_light = 7, - chance = 7000, - max_height = -10, -}) + + mobs:spawn({ + name = "mobs_monster:oerkki", + nodes = {"default:stone"}, + max_light = 7, + chance = 7000, + max_height = -10 + }) end diff --git a/readme.md b/readme.md index e7db1d3..51b3942 100644 --- a/readme.md +++ b/readme.md @@ -1,48 +1,49 @@ +# MONSTER MOBS -MONSTER MOBS +This mod creates many types of monsters. Some are weak, some are powerful, and they generally do the player a lot of harm. Many of these monsters spawn below ground and take light damage. -Dirt Monster +**Lucky Blocks**: 12 -- Spawning at night on green grass (or grey in ethereal) these mobs wander around looking for a player to eat. Drops 1-5 dirt when killed. +## Dirt Monster -Dungeon Master +Dirt monsters spawn at night on green grass (or grey in `ethereal`). They have a tendency to wander around looking for a player to eat and drop 1-2 dirt when killed. Dirt monsters have between 3-27 health, take damage in sunlight, and deal very little damage. -- Spawning below -70 underground DM's have a tendency to hurl fire balls at unsuspecting players and can cause major damage, but get too close and he will switch to dogfight attack. Can drop mese or diamond when killed. +# Dungeon Master -Lava Flan +Dungeon masters spawn below -70 underground DM's and hurl fireballs at unsuspecting players and can cause major damage, but get too close and he will switch to dogfight attack. They have between 42 and 75 health points. Their melee attack deals six damage points and their fireball inflicts eight. The fireball will also explode if it hits a node. They drop mese or diamond 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. +# Lava Flan -Mese Monster +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. -- These mobs are territorial and spawn below -20 and will fire mese shards at passers by, so best avoided. The deeper you go the tougher they seem to get. Will drop mese when killed. +# Mese Monster -Oerkki +These mobs are territorial and spawn below -20 and will fire mese shards at passers by, so best avoided. The deeper you go the tougher they seem to get. Will drop mese when killed. Another thing - they do not take damage from many weapons. -- Found in dark areas like most monsters Oerkki wander the caverns stealing away torches on the ground and attacking anyone found in that area. 1 in 3 chance of dropping obsidian. +# Oerkki -Sand Monster +Found in dark areas like most monsters, Oerkki wander the caverns stealing away torches on the ground and attacking anyone found in that area. 1 in 3 chance of dropping obsidian. -- The hot deserts are home to these guys who spawn at any time of the day to attack players. They drop 3-5 desert sand when killed. +# Sand Monster -Spiders +The hot deserts are home to these guys who spawn at any time of the day to attack players. They drop 3-5 desert sand when killed. A single sand monster isn't much of a threat - they deal one damage point. -- 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. +# Spiders -Stone Monster +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. -- Found underground in dark caves these mobs seem to be zombie-like in fashion with a tendency to rush a player in the area. can drop torch, iron or coal when killed. +# Stone Monster -Tree Monster +Found underground in dark caves, these mobs seem to be zombie-like in fashion with a tendency to rush a player in the area. They can drop torch, iron or coal when killed. -- 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. +# Tree Monster -Land Guard +Found atop trees 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. -- These huge monsters roam the land in cold, hot and temperate areas and don't like players wandering around their domain. +# Land Guard -Fire Spirit +These huge monsters roam the land in cold, hot and temperate areas and don't like players wandering around their domain. They have between 60 and 130 health points and deal 15 damage, enough to kill you in two blows. -- Fire Spirits will not tolerate players roaming around their domain and will fiercely attack until their dying puff of smoke. Will drop it's spirit and some fire dust when using ethereal. +# Fire Spirit -Lucky Blocks: 11 +Fire Spirits will not tolerate players roaming around their domain and will fiercely attack until their dying puff of smoke. They will drop their spirit and some fire dust when using ethereal. diff --git a/sand_monster.lua b/sand_monster.lua index 678a4dd..fbc3e95 100644 --- a/sand_monster.lua +++ b/sand_monster.lua @@ -2,8 +2,7 @@ local S = mobs.intllib_monster -- 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 min_size = min_size or 0.5 @@ -25,7 +24,7 @@ local effect = function( minsize = min_size, maxsize = max_size, texture = texture, - glow = glow, + glow = glow }) end @@ -49,16 +48,16 @@ mobs:register_mob("mobs_monster:sand_monster", { mesh = "mobs_sand_monster.b3d", textures = { {"mobs_sand_monster.png"}, - {"mobs_sand_monster2.png"}, + {"mobs_sand_monster2.png"} }, blood_texture = "default_desert_sand.png", makes_footstep_sound = true, sounds = { - random = "mobs_sandmonster", + random = "mobs_sandmonster" }, walk_velocity = 1.5, run_velocity = 4, - view_range = 8, --15 + view_range = 8, jump = true, floats = 0, drops = { @@ -79,7 +78,7 @@ mobs:register_mob("mobs_monster:sand_monster", { run_start = 74, run_end = 105, punch_start = 74, - punch_end = 105, + punch_end = 105 }, immune_to = { {"default:shovel_wood", 3}, -- shovels deal more damage to sand monster @@ -87,7 +86,7 @@ mobs:register_mob("mobs_monster:sand_monster", { {"default:shovel_bronze", 4}, {"default:shovel_steel", 4}, {"default:shovel_mese", 5}, - {"default:shovel_diamond", 7}, + {"default:shovel_diamond", 7} }, --[[ custom_attack = function(self, p) @@ -119,17 +118,19 @@ mobs:register_mob("mobs_monster:sand_monster", { }) if not mobs.custom_spawn_monster then -mobs:spawn({ - name = "mobs_monster:sand_monster", - nodes = {"default:desert_sand"}, - chance = 7000, - active_object_count = 2, - min_height = 0, -}) + + mobs:spawn({ + name = "mobs_monster:sand_monster", + nodes = {"default:desert_sand"}, + chance = 7000, + active_object_count = 2, + 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) mobs:alias_mob("mobs:sand_monster", "mobs_monster:sand_monster") -- compatibility diff --git a/screenshot.jpg b/screenshot.jpg index 3e09d0f..9624e85 100644 Binary files a/screenshot.jpg and b/screenshot.jpg differ diff --git a/spider.lua b/spider.lua index ffcd0ee..4c1120f 100644 --- a/spider.lua +++ b/spider.lua @@ -74,12 +74,12 @@ mobs:register_mob("mobs_monster:spider", { {"mobs_spider_orange.png"}, {"mobs_spider_snowy.png"}, {"mobs_spider_grey.png"}, - {"mobs_spider_crystal.png"}, + {"mobs_spider_crystal.png"} }, makes_footstep_sound = false, sounds = { random = "mobs_spider", - attack = "mobs_spider", + attack = "mobs_spider" }, walk_velocity = 1, run_velocity = 3, @@ -103,7 +103,7 @@ mobs:register_mob("mobs_monster:spider", { run_start = 1, run_end = 21, punch_start = 25, - punch_end = 45, + punch_end = 45 }, -- check surrounding nodes and spawn a specific spider @@ -225,32 +225,33 @@ mobs:register_mob("mobs_monster:spider", { if not mobs.custom_spawn_monster then --- above ground spawn -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, -}) --- below ground spawn -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, -}) + -- above ground spawn + 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 + }) + + -- below ground spawn + 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 + }) end @@ -279,7 +280,7 @@ minetest.register_node(":mobs:cobweb", { walkable = false, groups = {snappy = 1, disable_jump = 1}, drop = "farming:string", - sounds = default.node_sound_leaves_defaults() + sounds = default and default.node_sound_leaves_defaults() }) minetest.register_craft({ @@ -287,12 +288,14 @@ minetest.register_craft({ recipe = { {"farming:string", "", "farming:string"}, {"", "farming:string", ""}, - {"farming:string", "", "farming:string"}, + {"farming:string", "", "farming:string"} } }) local web_place = function(pos) + if minetest.find_node_near(pos, 1, {"ignore"}) then return end + local pos2 = minetest.find_node_near(pos, 1, {"air", "group:leaves"}, true) if pos2 then @@ -316,7 +319,7 @@ mobs:register_arrow("mobs_monster:cobweb", { player:punch(self.object, 1.0, { full_punch_interval = 2.0, - damage_groups = {fleshy = 3}, + damage_groups = {fleshy = 3} }, nil) web_place(self.object:get_pos()) @@ -330,7 +333,7 @@ mobs:register_arrow("mobs_monster:cobweb", { player:punch(self.object, 1.0, { full_punch_interval = 2.0, - damage_groups = {fleshy = 3}, + damage_groups = {fleshy = 3} }, nil) end }) diff --git a/stone_monster.lua b/stone_monster.lua index fead089..3785839 100644 --- a/stone_monster.lua +++ b/stone_monster.lua @@ -10,6 +10,15 @@ local stone_types = { {name = "default:iron_lump", chance = 5, min = 0, max = 2}, {name = "default:gold_lump", chance = 5, min = 0, max = 2} } + }, + + { nodes = {"default:sandstone"}, + skins = {"mobs_stone_monster4.png"}, + drops = { + {name = "default:sandstone", chance = 1, min = 0, max = 2}, + {name = "default:tin_lump", chance = 5, min = 0, max = 2}, + {name = "default:copper_lump", chance = 5, min = 0, max = 2} + } } } @@ -31,11 +40,11 @@ mobs:register_mob("mobs_monster:stone_monster", { mesh = "mobs_stone_monster.b3d", textures = { {"mobs_stone_monster.png"}, - {"mobs_stone_monster2.png"}, -- by AMMOnym + {"mobs_stone_monster2.png"} -- by AMMOnym }, makes_footstep_sound = true, sounds = { - random = "mobs_stonemonster", + random = "mobs_stonemonster" }, walk_velocity = 1, run_velocity = 2, @@ -63,7 +72,7 @@ mobs:register_mob("mobs_monster:stone_monster", { run_start = 40, run_end = 63, punch_start = 40, - punch_end = 63, + punch_end = 63 }, immune_to = { {"default:pick_wood", 0}, -- wooden pick doesnt hurt stone monster @@ -71,7 +80,7 @@ mobs:register_mob("mobs_monster:stone_monster", { {"default:pick_bronze", 5}, {"default:pick_steel", 5}, {"default:pick_mese", 6}, - {"default:pick_diamond", 7}, + {"default:pick_diamond", 7} }, -- check surrounding nodes and spawn a specific spider @@ -103,13 +112,14 @@ mobs:register_mob("mobs_monster:stone_monster", { if not mobs.custom_spawn_monster then -mobs:spawn({ - name = "mobs_monster:stone_monster", - nodes = {"default:stone", "default:desert_stone", "default:sandstone"}, - max_light = 7, - chance = 7000, - max_height = 0, -}) + + mobs:spawn({ + name = "mobs_monster:stone_monster", + nodes = {"default:stone", "default:desert_stone", "default:sandstone"}, + max_light = 7, + chance = 7000, + max_height = 0 + }) end diff --git a/textures/mobs_cobweb.png b/textures/mobs_cobweb.png index 05b4fdc..5c3a580 100644 Binary files a/textures/mobs_cobweb.png and b/textures/mobs_cobweb.png differ diff --git a/textures/mobs_dirt_monster.png b/textures/mobs_dirt_monster.png index 14da90b..2362bf9 100644 Binary files a/textures/mobs_dirt_monster.png and b/textures/mobs_dirt_monster.png differ diff --git a/textures/mobs_dirt_monster2.png b/textures/mobs_dirt_monster2.png index 964698c..3215e98 100644 Binary files a/textures/mobs_dirt_monster2.png and b/textures/mobs_dirt_monster2.png differ diff --git a/textures/mobs_dirt_monster3.png b/textures/mobs_dirt_monster3.png index f11faee..00cf3fc 100644 Binary files a/textures/mobs_dirt_monster3.png and b/textures/mobs_dirt_monster3.png differ diff --git a/textures/mobs_fireball.png b/textures/mobs_fireball.png index d896563..50cd8e1 100644 Binary files a/textures/mobs_fireball.png and b/textures/mobs_fireball.png differ diff --git a/textures/mobs_sand_monster.png b/textures/mobs_sand_monster.png index 75fcc4b..7dc1d02 100644 Binary files a/textures/mobs_sand_monster.png and b/textures/mobs_sand_monster.png differ diff --git a/textures/mobs_stone_monster.png b/textures/mobs_stone_monster.png index 95c3c16..e2fe6ab 100644 Binary files a/textures/mobs_stone_monster.png and b/textures/mobs_stone_monster.png differ diff --git a/textures/mobs_stone_monster2.png b/textures/mobs_stone_monster2.png index 9c76b83..c9e483d 100644 Binary files a/textures/mobs_stone_monster2.png and b/textures/mobs_stone_monster2.png differ diff --git a/textures/mobs_stone_monster3.png b/textures/mobs_stone_monster3.png index 70bfc6e..08d6fdc 100644 Binary files a/textures/mobs_stone_monster3.png and b/textures/mobs_stone_monster3.png differ diff --git a/textures/mobs_stone_monster4.png b/textures/mobs_stone_monster4.png new file mode 100644 index 0000000..fe34d21 Binary files /dev/null and b/textures/mobs_stone_monster4.png differ diff --git a/textures/mobs_tree_monster(template).png b/textures/mobs_tree_monster(template).png new file mode 100644 index 0000000..0ed3833 Binary files /dev/null and b/textures/mobs_tree_monster(template).png differ diff --git a/textures/mobs_tree_monster.png b/textures/mobs_tree_monster.png index 909af19..291fa70 100644 Binary files a/textures/mobs_tree_monster.png and b/textures/mobs_tree_monster.png differ diff --git a/textures/mobs_tree_monster2.png b/textures/mobs_tree_monster2.png index f78c2da..1bace38 100644 Binary files a/textures/mobs_tree_monster2.png and b/textures/mobs_tree_monster2.png differ diff --git a/textures/mobs_tree_monster3.png b/textures/mobs_tree_monster3.png index 9e18fb2..f06717e 100644 Binary files a/textures/mobs_tree_monster3.png and b/textures/mobs_tree_monster3.png differ diff --git a/textures/mobs_tree_monster4.png b/textures/mobs_tree_monster4.png index 6299e32..e193f02 100644 Binary files a/textures/mobs_tree_monster4.png and b/textures/mobs_tree_monster4.png differ diff --git a/textures/mobs_tree_monster5.png b/textures/mobs_tree_monster5.png index 67cd508..ffadad0 100644 Binary files a/textures/mobs_tree_monster5.png and b/textures/mobs_tree_monster5.png differ diff --git a/tree_monster.lua b/tree_monster.lua index bd20d52..6a45efb 100644 --- a/tree_monster.lua +++ b/tree_monster.lua @@ -9,7 +9,7 @@ local tree_types = { {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}, + {name = "ethereal:sakura_tree_sapling", chance = 2, min = 0, max = 2} } }, @@ -19,7 +19,7 @@ local tree_types = { {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}, + {name = "ethereal:crystal_spike", chance = 4, min = 0, max = 2} } }, @@ -29,7 +29,7 @@ local tree_types = { {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}, + {name = "ethereal:golden_apple", chance = 3, min = 0, max = 2} } }, @@ -41,7 +41,7 @@ local tree_types = { {name = "default:coal_lump", chance = 3, min = 0, max = 3} }, explode = true - }, + } } @@ -63,12 +63,12 @@ mobs:register_mob("mobs_monster:tree_monster", { mesh = "mobs_tree_monster.b3d", textures = { {"mobs_tree_monster.png"}, - {"mobs_tree_monster2.png"}, + {"mobs_tree_monster2.png"} }, blood_texture = "default_wood.png", makes_footstep_sound = true, sounds = { - random = "mobs_treemonster", + random = "mobs_treemonster" }, walk_velocity = 1, run_velocity = 3, @@ -107,7 +107,7 @@ mobs:register_mob("mobs_monster:tree_monster", { run_start = 48, run_end = 62, punch_start = 48, - punch_end = 62, + punch_end = 62 }, -- check surrounding nodes and spawn a specific tree monster @@ -160,14 +160,15 @@ mobs:register_mob("mobs_monster:tree_monster", { if not mobs.custom_spawn_monster then -mobs:spawn({ - name = "mobs_monster:tree_monster", - nodes = {"group:leaves"}, --{"default:leaves", "default:jungleleaves"}, - max_light = 7, - chance = 7000, - min_height = 0, - day_toggle = false, -}) + + mobs:spawn({ + name = "mobs_monster:tree_monster", + nodes = {"group:leaves"}, + max_light = 7, + chance = 7000, + min_height = 0, + day_toggle = false + }) end