strike back when hit by other mobs
This commit is contained in:
parent
7f8e486d48
commit
2e735d1b77
6
init.lua
6
init.lua
@ -29,16 +29,18 @@ end
|
||||
guards.guard_data = {
|
||||
-- type needs to be "npc" - else it doesn't know how to follow
|
||||
type = "npc", -- "guard",
|
||||
passive = true,
|
||||
passive = false, -- we are a guard...
|
||||
damage = 9,
|
||||
attack_type = "dogfight",
|
||||
attacks_monsters = true,
|
||||
attack_monsters = true,
|
||||
attack_npcs = false,
|
||||
attack_chance = 80,
|
||||
owner_loyal = false,
|
||||
pathfinding = false,
|
||||
hp_min = 60,
|
||||
hp_max = 100,
|
||||
armor = 0,
|
||||
armor = 100,
|
||||
collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3},
|
||||
visual = "mesh",
|
||||
visual_size = {x = 1, y = 1},
|
||||
|
@ -94,7 +94,7 @@ end
|
||||
|
||||
|
||||
guards.on_step = function(self, dtime, moveresult)
|
||||
if(self.order ~= "patrol") then
|
||||
if(self.order ~= "patrol" or self.state == "attack") then
|
||||
return true
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user