1
0
Fork 0

Fix and overhaul wolves

This commit is contained in:
jordan4ibanez 2021-04-22 23:30:32 -04:00
parent aac1e19336
commit 408296140a
2 changed files with 12 additions and 3 deletions

View File

@ -129,7 +129,14 @@ end
mobs.group_attack_initialization = function(self) mobs.group_attack_initialization = function(self)
--get basic data --get basic data
local friends_list = table_copy(self.group_attack) local friends_list
if self.group_attack == true then
friends_list = {self.name}
else
friends_list = table_copy(self.group_attack)
end
local objects_in_area = minetest_get_objects_inside_radius(self.object:get_pos(), self.view_range) local objects_in_area = minetest_get_objects_inside_radius(self.object:get_pos(), self.view_range)
--get the player's name --get the player's name

View File

@ -22,13 +22,15 @@ local wolf = {
type = "animal", type = "animal",
spawn_class = "passive", spawn_class = "passive",
can_despawn = true, can_despawn = true,
neutral = true,
hp_min = 8, hp_min = 8,
hp_max = 8, hp_max = 8,
xp_min = 1, xp_min = 1,
xp_max = 3, xp_max = 3,
rotate = 270,
passive = false, passive = false,
group_attack = true, group_attack = true,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.84, 0.3}, collisionbox = {-0.3, -0.00, -0.3, 0.3, 0.85, 0.3},
visual = "mesh", visual = "mesh",
mesh = "mobs_mc_wolf.b3d", mesh = "mobs_mc_wolf.b3d",
textures = { textures = {
@ -52,7 +54,7 @@ local wolf = {
run_velocity = 3, run_velocity = 3,
damage = 4, damage = 4,
reach = 2, reach = 2,
attack_type = "dogfight", attack_type = "punch",
fear_height = 4, fear_height = 4,
follow = mobs_mc.follow.wolf, follow = mobs_mc.follow.wolf,
on_rightclick = function(self, clicker) on_rightclick = function(self, clicker)