diff --git a/dirt_monster.lua b/dirt_monster.lua index 31e515a..3631fb2 100644 --- a/dirt_monster.lua +++ b/dirt_monster.lua @@ -60,7 +60,7 @@ mobs:register_mob("mobs_monster:dirt_monster", { punch_end = 63, }, - -- check surrounding nodes and spawn a specific spider + -- check surrounding nodes and spawn a specific monster on_spawn = function(self) local pos = self.object:get_pos() ; pos.y = pos.y - 1 diff --git a/dungeon_master.lua b/dungeon_master.lua index bcc04f8..4b68184 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 02142fd..4df355f 100644 --- a/init.lua +++ b/init.lua @@ -28,6 +28,7 @@ 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") -- 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/readme.md b/readme.md index 800079c..d00305a 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 @@ -37,4 +37,8 @@ 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. +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 a46f509..21c5af6 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/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_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/tree_monster.lua b/tree_monster.lua index 1708e46..99b3eaf 100644 --- a/tree_monster.lua +++ b/tree_monster.lua @@ -98,7 +98,7 @@ mobs:register_mob("mobs_monster:tree_monster", { punch_end = 62, }, - -- check surrounding nodes and spawn a specific spider + -- check surrounding nodes and spawn a specific tree monster on_spawn = function(self) local pos = self.object:get_pos() ; pos.y = pos.y - 1