Commit 095d8753 authored by tenplus1's avatar tenplus1
Browse files

add Tree Creeper

parent 476ad979
...@@ -35,7 +35,7 @@ Stone Monster ...@@ -35,7 +35,7 @@ Stone Monster
Tree 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 Land Guard
......
...@@ -31,7 +31,17 @@ local tree_types = { ...@@ -31,7 +31,17 @@ local tree_types = {
{name = "ethereal:yellow_tree_sapling", chance = 2, min = 0, 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},
} }
} },
{ 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", { ...@@ -45,8 +55,8 @@ mobs:register_mob("mobs_monster:tree_monster", {
--specific_attack = {"player", "mobs_animal:chicken"}, --specific_attack = {"player", "mobs_animal:chicken"},
reach = 2, reach = 2,
damage = 2, damage = 2,
hp_min = 7, hp_min = 20,
hp_max = 33, hp_max = 40,
armor = 100, armor = 100,
collisionbox = {-0.4, -1, -0.4, 0.4, 0.8, 0.4}, collisionbox = {-0.4, -1, -0.4, 0.4, 0.8, 0.4},
visual = "mesh", visual = "mesh",
...@@ -108,6 +118,8 @@ mobs:register_mob("mobs_monster:tree_monster", { ...@@ -108,6 +118,8 @@ mobs:register_mob("mobs_monster:tree_monster", {
tmp = tree_types[n] 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 if minetest.find_node_near(pos, 1, tmp.nodes) then
self.base_texture = tmp.skins self.base_texture = tmp.skins
...@@ -117,6 +129,25 @@ mobs:register_mob("mobs_monster:tree_monster", { ...@@ -117,6 +129,25 @@ mobs:register_mob("mobs_monster:tree_monster", {
self.drops = tmp.drops self.drops = tmp.drops
end 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 return true
end end
end end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment