Skip to content
Snippets Groups Projects
Commit a7b9bae0 authored by DarkGod's avatar DarkGod
Browse files

Merge branch 'small_fixes' into 'master'

Friendlyfire fixes

friendlyblock now works consistently with friendlyfire & alch bombs too.
parents ed1fd9b4 4d989487
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)
-- Reduce the nb blocking for friendlies
if not typ.friendlyblock and typ.source_actor and typ.source_actor.reactionToward then
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
end
end
......
......@@ -159,7 +159,7 @@ newTalent{
end end
-- Randomly take targets
local tg = {type="hit", range=self:getTalentRange(t), talent=t, selffire=self:spellFriendlyFire()}
local tg = {type="hit", range=self:getTalentRange(t), talent=t, friendlyfire=false} -- don't make it blocked by the golem
for i = 1, 1 do
if #tgts <= 0 then break end
local a, id = rng.table(tgts)
......
......@@ -106,7 +106,7 @@ newTalent{
self:callTalent(self.T_DYNAMIC_RECHARGE, "applyEffect", golem)
end
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
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