diff --git a/readme.md b/readme.md index d00305a..cd03fcb 100644 --- a/readme.md +++ b/readme.md @@ -35,7 +35,7 @@ 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 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/tree_monster.lua b/tree_monster.lua index 99b3eaf..4276f02 100644 --- a/tree_monster.lua +++ b/tree_monster.lua @@ -31,7 +31,17 @@ local tree_types = { {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 + }, } @@ -45,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", @@ -108,6 +118,8 @@ mobs:register_mob("mobs_monster:tree_monster", { 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 @@ -117,6 +129,25 @@ mobs:register_mob("mobs_monster:tree_monster", { 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