Skip to content
Snippets Groups Projects
Commit a36247b1 authored by Alex Ksandra's avatar Alex Ksandra
Browse files

Made friendlyfire more consistent.

parent ed1fd9b4
No related branches found
No related tags found
No related merge requests found
...@@ -459,7 +459,7 @@ _M.defaults.block_path = function(typ, lx, ly, for_highlights) ...@@ -459,7 +459,7 @@ _M.defaults.block_path = function(typ, lx, ly, for_highlights)
-- Reduce the nb blocking for friendlies -- Reduce the nb blocking for friendlies
if not typ.friendlyblock and typ.source_actor and typ.source_actor.reactionToward then if not typ.friendlyblock and typ.source_actor and typ.source_actor.reactionToward then
local a = game.level.map(lx, ly, engine.Map.ACTOR) local a = game.level.map(lx, ly, engine.Map.ACTOR)
if a and typ.source_actor:reactionToward(a) > 0 then if a and typ.source_actor:reactionToward(a) >= 0 then
nb = nb - 1 nb = nb - 1
end end
end end
......
...@@ -106,7 +106,7 @@ newTalent{ ...@@ -106,7 +106,7 @@ newTalent{
self:callTalent(self.T_DYNAMIC_RECHARGE, "applyEffect", golem) self:callTalent(self.T_DYNAMIC_RECHARGE, "applyEffect", golem)
end end
else -- reduced damage to friendly npcs (could make random chance like friendlyfire instead) else -- reduced damage to friendly npcs (could make random chance like friendlyfire instead)
if target and self:reactionToward(target) > 0 then d = dam * (1 - prot) end if target and self:reactionToward(target) >= 0 then d = dam * (1 - prot) end
end end
if d <= 0 then return end if d <= 0 then return end
......
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