Update botete

master
Lean Rada 2015-01-22 21:47:40 +08:00
parent 5bcdb2c696
commit cf42c26bf6
6 changed files with 13 additions and 11 deletions

View File

@ -35,7 +35,7 @@ director.spawn_list = {
group_min = 1,
group_max = 4,
probability = 0.2,
day_start = 1,
day_start = 0,
spawn_time = 14.0,
spawn_location = "air",
},
@ -59,7 +59,7 @@ director.spawn_list = {
group_min = 1,
group_max = 1,
probability = 0.2,
day_start = 4,
day_start = 1,
spawn_time = 21.0,
spawn_location = "air",
},

View File

@ -120,6 +120,7 @@ function mobs.default_prototype:hunt()
local nearest = self:find_nearest_player()
if nearest.player then
local nearest_pos = nearest.player:getpos()
nearest_pos.y = nearest_pos.y + 1
local dir = vector.direction(nearest_pos, self.object:getpos())
local r = math.max(0, self.attack_range - 0.5)
self.destination = vector.add(nearest_pos, vector.multiply(dir, r))

View File

@ -1,25 +1,26 @@
defense.mobs.register_mob("defense:botete", {
hp_max = 2,
collisionbox = {-0.4,-0.4,-0.4, 0.4,0.4,0.4},
collisionbox = {-0.6,-0.7,-0.6, 0.6,0.4,0.6},
mesh = "defense_botete.b3d",
textures = {"defense_botete.png"},
makes_footstep_sound = false,
animation = {
-- idle = {a=0, b=29, rate=50},
-- attack = {a=60, b=89, rate=50},
-- move = {a=30, b=59, rate=75},
-- move_attack = {a=60, b=89, rate=75},
idle = {a=0, b=39, rate=20},
attack = {a=40, b=79, rate=50},
move = {a=40, b=79, rate=25},
move_attack = {a=40, b=79, rate=25},
},
mass = 1,
movement = "air",
move_speed = 6,
move_speed = 4,
attack_damage = 0,
attack_range = 8,
attack_interval = 2.2,
on_step = function(self, dtime)
defense.mobs.default_prototype.on_step(self, dtime)
self:hunt()
end,
})

View File

@ -1,6 +1,6 @@
defense.mobs.register_mob("defense:paniki", {
hp_max = 3,
collisionbox = {-0.4,-0.4,-0.4, 0.4,0.4,0.4},
collisionbox = {-0.3,-0.3,-0.3, 0.3,0.3,0.3},
mesh = "defense_paniki.b3d",
textures = {"defense_paniki.png"},
makes_footstep_sound = false,
@ -16,7 +16,7 @@ defense.mobs.register_mob("defense:paniki", {
movement = "air",
move_speed = 16,
attack_damage = 1,
attack_range = 1.2,
attack_range = 1.0,
attack_interval = 0.8,
rank = 0,

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB