Skip to content
Snippets Groups Projects
Commit 481aaedf authored by dg's avatar dg
Browse files

ahha

git-svn-id: http://svn.net-core.org/repos/t-engine4@2162 51575b47-30f0-44d4-a5cc-537603b46e54
parent a96575e7
No related branches found
No related tags found
No related merge requests found
......@@ -95,7 +95,9 @@ function _M:checkAngered(src, set, value)
end
if not was_hostile and self:reactionToward(src) < 0 then
self:doEmote("Kill him!", 30)
if self.anger_emote then
self:doEmote(self.anger_emote:gsub("@himher@", src.female and "her" or "him"), 30)
end
end
end
......@@ -116,7 +118,7 @@ function _M:onTakeHit(value, src)
-- Call for help if we become hostile
for i = 1, #self.fov.actors_dist do
local act = self.fov.actors_dist[i]
if act and self:reactionToward(act) > 0 and not act.dead then
if act and act ~= self and self:reactionToward(act) > 0 and not act.dead then
act:checkAngered(src, false, -50)
end
end
......@@ -138,7 +140,7 @@ function _M:die(src)
-- Call for help if we become hostile
for i = 1, #self.fov.actors_dist do
local act = self.fov.actors_dist[i]
if act and act:reactionToward(rsrc) >= 0 and self:reactionToward(act) > 0 and not act.dead then
if act and act ~= self and act:reactionToward(rsrc) >= 0 and self:reactionToward(act) > 0 and not act.dead then
act:checkAngered(src, false, -101)
end
end
......
......@@ -26,6 +26,7 @@ newEntity{
type = "humanoid", subtype = "human",
display = "p", color=colors.WHITE,
faction = "allied-kingdoms",
anger_emote = "Catch @himher@!",
combat = { dam=resolvers.rngavg(1,2), atk=2, apr=0, dammod={str=0.4} },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment