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 = {
|
guards.guard_data = {
|
||||||
-- type needs to be "npc" - else it doesn't know how to follow
|
-- type needs to be "npc" - else it doesn't know how to follow
|
||||||
type = "npc", -- "guard",
|
type = "npc", -- "guard",
|
||||||
passive = true,
|
passive = false, -- we are a guard...
|
||||||
damage = 9,
|
damage = 9,
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
attacks_monsters = true,
|
attacks_monsters = true,
|
||||||
|
attack_monsters = true,
|
||||||
attack_npcs = false,
|
attack_npcs = false,
|
||||||
|
attack_chance = 80,
|
||||||
owner_loyal = false,
|
owner_loyal = false,
|
||||||
pathfinding = false,
|
pathfinding = false,
|
||||||
hp_min = 60,
|
hp_min = 60,
|
||||||
hp_max = 100,
|
hp_max = 100,
|
||||||
armor = 0,
|
armor = 100,
|
||||||
collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3},
|
collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
visual_size = {x = 1, y = 1},
|
visual_size = {x = 1, y = 1},
|
||||||
|
@ -94,7 +94,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
guards.on_step = function(self, dtime, moveresult)
|
guards.on_step = function(self, dtime, moveresult)
|
||||||
if(self.order ~= "patrol") then
|
if(self.order ~= "patrol" or self.state == "attack") then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user