2019-07-31 10:32:04 +02:00
|
|
|
local name = {}
|
|
|
|
|
2016-12-14 17:13:01 +00:00
|
|
|
local base_arrow = {
|
|
|
|
visual = "sprite",
|
|
|
|
visual_size = {x = 0.5, y = 0.5},
|
|
|
|
velocity = 8,
|
2019-07-31 10:32:04 +02:00
|
|
|
textures = {},
|
2016-12-14 17:13:01 +00:00
|
|
|
tail = 1, -- enable tail
|
|
|
|
tail_texture = "dmobs_ice.png",
|
|
|
|
|
|
|
|
hit_player = function(self, player)
|
|
|
|
player:punch(self.object, 1.0, {
|
|
|
|
full_punch_interval = 1.0,
|
|
|
|
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},
|
|
|
|
}, nil)
|
|
|
|
end,
|
|
|
|
|
|
|
|
hit_node = function(self, pos, node)
|
|
|
|
self.object:remove()
|
|
|
|
end,
|
|
|
|
}
|
|
|
|
|
|
|
|
for _,arrowtype in pairs( {"ice","lightning","poison"} ) do
|
2019-07-31 10:32:04 +02:00
|
|
|
base_arrow.textures = {"dmobs_"..arrowtype..".png"}
|
2022-01-24 15:31:51 -04:00
|
|
|
name = "mobs_doomed:"..arrowtype
|
|
|
|
mobs:register_arrow(name, mobs_doomed.deepclone(base_arrow) )
|
2016-12-14 17:13:01 +00:00
|
|
|
end
|