diff --git a/dirt_monster.lua b/dirt_monster.lua index e0c6717..b0a21bf 100644 --- a/dirt_monster.lua +++ b/dirt_monster.lua @@ -1,6 +1,16 @@ 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, @@ -49,19 +60,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 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 minetest.get_modpath("ethereal") then - spawn_on = "ethereal:gray_dirt" -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, diff --git a/dungeon_master.lua b/dungeon_master.lua index 440afd5..10ecb8a 100644 --- a/dungeon_master.lua +++ b/dungeon_master.lua @@ -16,8 +16,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", diff --git a/init.lua b/init.lua index ab1b5ba..29d5516 100644 --- a/init.lua +++ b/init.lua @@ -29,6 +29,7 @@ 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") -- Load custom spawning diff --git a/land_guard.lua b/land_guard.lua new file mode 100644 index 0000000..6545b33 --- /dev/null +++ b/land_guard.lua @@ -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) diff --git a/oerkki.lua b/oerkki.lua index ac1f117..9ca8a99 100644 --- a/oerkki.lua +++ b/oerkki.lua @@ -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 = { diff --git a/readme.md b/readme.md index 800079c..cd03fcb 100644 --- a/readme.md +++ b/readme.md @@ -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,10 @@ 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 + +- These huge monsters roam the land in cold, hot and temperate areas and don't like players wandering around their domain. Lucky Blocks: 11 diff --git a/sand_monster.lua b/sand_monster.lua index 12c9193..7f20368 100644 --- a/sand_monster.lua +++ b/sand_monster.lua @@ -49,6 +49,7 @@ mobs:register_mob("mobs_monster:sand_monster", { mesh = "mobs_sand_monster.b3d", textures = { {"mobs_sand_monster.png"}, + {"mobs_sand_monster2.png"}, }, blood_texture = "default_desert_sand.png", makes_footstep_sound = true, diff --git a/spider.lua b/spider.lua index 33ab2e8..bb6d67e 100644 --- a/spider.lua +++ b/spider.lua @@ -11,6 +11,47 @@ local get_velocity = function(self) 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) mobs:register_mob("mobs_monster:spider", { @@ -54,7 +95,7 @@ mobs:register_mob("mobs_monster:spider", { light_damage = 0, animation = { speed_normal = 15, - speed_run = 20,--15, + speed_run = 20, stand_start = 0, stand_end = 0, walk_start = 1, @@ -64,42 +105,46 @@ mobs:register_mob("mobs_monster:spider", { punch_start = 25, punch_end = 45, }, - -- what kind of spider are we spawning? + + -- 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 - -- snowy spider - if minetest.find_node_near(pos, 1, - {"default:snow", "default:snowblock", "default:dirt_with_snow"}) then - self.base_texture = {"mobs_spider_snowy.png"} - self.object:set_properties({textures = self.base_texture}) - self.docile_by_day = true - -- tarantula - elseif minetest.find_node_near(pos, 1, - {"default:dirt_with_rainforest_litter", "default:jungletree"}) then - self.base_texture = {"mobs_spider_orange.png"} - self.object:set_properties({textures = self.base_texture}) - self.docile_by_day = true - -- grey spider - elseif minetest.find_node_near(pos, 1, - {"default:stone", "default:gravel"}) then - self.base_texture = {"mobs_spider_grey.png"} - self.object:set_properties({textures = self.base_texture}) - -- mese spider - elseif minetest.find_node_near(pos, 1, - {"default:mese", "default:stone_with_mese"}) then - self.base_texture = {"mobs_spider_mese.png"} - self.object:set_properties({textures = self.base_texture}) - elseif minetest.find_node_near(pos, 1, - {"ethereal:crystal_dirt", "ethereal:crystal_spike"}) then - self.base_texture = {"mobs_spider_crystal.png"} - self.object:set_properties({textures = self.base_texture}) - self.docile_by_day = true - self.drops = { - {name = "farming:string", chance = 1, min = 0, max = 2}, - {name = "ethereal:crystal_spike", chance = 15, min = 1, max = 2}, - } + for n = 1, #spider_types do + + tmp = spider_types[n] + + if minetest.find_node_near(pos, 1, tmp.nodes) then + + self.base_texture = tmp.skins + self.object:set_properties({textures = tmp.skins}) + self.docile_by_day = tmp.docile + + if tmp.drops then + self.drops = tmp.drops + end + + if tmp.shoot then + self.attack_type = "dogshoot" + self.arrow = "mobs_monster:cobweb" + self.dogshoot_switch = 1 + self.dogshoot_count_max = 60 + self.dogshoot_count2_max = 20 + self.shoot_interval = 2 + self.shoot_offset = 2 + end + + if tmp.small then + self.object:set_properties({ + collisionbox = {-0.2, -0.2, -0.2, 0.2, 0, 0.2}, + visual_size = {x = 0.25, y = 0.25} + }) + end + + return true + end end return true -- run only once, false/nil runs every activation @@ -234,7 +279,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.node_sound_leaves_defaults() }) minetest.register_craft({ @@ -246,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") diff --git a/stone_monster.lua b/stone_monster.lua index e605c74..e811459 100644 --- a/stone_monster.lua +++ b/stone_monster.lua @@ -1,6 +1,18 @@ 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 @@ -35,7 +47,7 @@ mobs:register_mob("mobs_monster:stone_monster", { {name = "default:cobble", chance = 1, 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 = "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}, }, water_damage = 0, @@ -61,6 +73,32 @@ mobs:register_mob("mobs_monster:stone_monster", { {"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 }) diff --git a/textures/mobs_dirt_monster2.png b/textures/mobs_dirt_monster2.png new file mode 100644 index 0000000..964698c Binary files /dev/null and b/textures/mobs_dirt_monster2.png differ diff --git a/textures/mobs_dirt_monster3.png b/textures/mobs_dirt_monster3.png new file mode 100644 index 0000000..f11faee Binary files /dev/null and b/textures/mobs_dirt_monster3.png differ diff --git a/textures/mobs_land_guard.png b/textures/mobs_land_guard.png new file mode 100644 index 0000000..53100ab Binary files /dev/null and b/textures/mobs_land_guard.png differ diff --git a/textures/mobs_land_guard2.png b/textures/mobs_land_guard2.png new file mode 100644 index 0000000..cfa0630 Binary files /dev/null and b/textures/mobs_land_guard2.png differ diff --git a/textures/mobs_land_guard3.png b/textures/mobs_land_guard3.png new file mode 100644 index 0000000..69e8691 Binary files /dev/null and b/textures/mobs_land_guard3.png differ diff --git a/textures/mobs_land_guard4.png b/textures/mobs_land_guard4.png new file mode 100644 index 0000000..295282f Binary files /dev/null and b/textures/mobs_land_guard4.png differ diff --git a/textures/mobs_land_guard5.png b/textures/mobs_land_guard5.png new file mode 100644 index 0000000..3e0332d Binary files /dev/null and b/textures/mobs_land_guard5.png differ diff --git a/textures/mobs_land_guard6.png b/textures/mobs_land_guard6.png new file mode 100644 index 0000000..4ccd83e Binary files /dev/null and b/textures/mobs_land_guard6.png differ diff --git a/textures/mobs_land_guard7.png b/textures/mobs_land_guard7.png new file mode 100644 index 0000000..6a9d0fd Binary files /dev/null and b/textures/mobs_land_guard7.png differ diff --git a/textures/mobs_land_guard8.png b/textures/mobs_land_guard8.png new file mode 100644 index 0000000..73c8322 Binary files /dev/null and b/textures/mobs_land_guard8.png differ diff --git a/textures/mobs_oerkki3.png b/textures/mobs_oerkki3.png new file mode 100644 index 0000000..8c24d5c Binary files /dev/null and b/textures/mobs_oerkki3.png differ diff --git a/textures/mobs_sand_monster2.png b/textures/mobs_sand_monster2.png new file mode 100644 index 0000000..5773943 Binary files /dev/null and b/textures/mobs_sand_monster2.png differ diff --git a/textures/mobs_stone_monster2.png b/textures/mobs_stone_monster2.png index 70bfc6e..9c76b83 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 new file mode 100644 index 0000000..70bfc6e Binary files /dev/null and b/textures/mobs_stone_monster3.png differ diff --git a/textures/mobs_tree_monster3.png b/textures/mobs_tree_monster3.png new file mode 100644 index 0000000..9e18fb2 Binary files /dev/null and b/textures/mobs_tree_monster3.png differ diff --git a/textures/mobs_tree_monster4.png b/textures/mobs_tree_monster4.png new file mode 100644 index 0000000..6299e32 Binary files /dev/null and b/textures/mobs_tree_monster4.png differ diff --git a/textures/mobs_tree_monster5.png b/textures/mobs_tree_monster5.png new file mode 100644 index 0000000..67cd508 Binary files /dev/null and b/textures/mobs_tree_monster5.png differ diff --git a/textures/mobs_tree_monster6.png b/textures/mobs_tree_monster6.png new file mode 100755 index 0000000..6e884a6 Binary files /dev/null and b/textures/mobs_tree_monster6.png differ diff --git a/textures/zmobs_mese_monster.png b/textures/zmobs_mese_monster.png index 55f662a..3d3812d 100644 Binary files a/textures/zmobs_mese_monster.png and b/textures/zmobs_mese_monster.png differ diff --git a/textures/zmobs_mese_monster_old.png b/textures/zmobs_mese_monster_old.png new file mode 100644 index 0000000..55f662a Binary files /dev/null and b/textures/zmobs_mese_monster_old.png differ diff --git a/tree_monster.lua b/tree_monster.lua index 8f1fde4..002cce4 100644 --- a/tree_monster.lua +++ b/tree_monster.lua @@ -1,6 +1,49 @@ 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 @@ -12,8 +55,8 @@ mobs:register_mob("mobs_monster:tree_monster", { --specific_attack = {"player", "mobs_animal:chicken"}, reach = 2, damage = 2, - hp_min = 7, - hp_max = 33, + hp_min = 20, + hp_max = 40, armor = 100, collisionbox = {-0.4, -1, -0.4, 0.4, 0.8, 0.4}, visual = "mesh", @@ -66,13 +109,60 @@ mobs:register_mob("mobs_monster:tree_monster", { punch_start = 48, 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({ name = "mobs_monster:tree_monster", - nodes = {"default:leaves", "default:jungleleaves", "moretrees:beech_leaves"}, + nodes = {"group:leaves"}, --{"default:leaves", "default:jungleleaves"}, max_light = 7, chance = 7000, min_height = 0,