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

Merge branch '173_ai_fix' into 'master'

fix AI targeting

add the missing brackets, so AI's AOE does not ignores friendly creatures and correctly calculate weight; the most obvious behavior of this bug is that summoner's fire dragon & hydra hit their master and other allies.

See merge request !722
parents c13b3b03 622f5493
No related branches found
No related tags found
No related merge requests found
......@@ -1568,7 +1568,7 @@ function _M:aiTalentTactics(t, aitarget, target_list, tactic, tg, wt_mod)
else
val_type, val_wt = next(val, val_type) if not val_wt then break end
end
if act == self and self:attr("encased_in_ice") and tact == "attack" or tact == "attackarea" then
if act == self and self:attr("encased_in_ice") and (tact == "attack" or tact == "attackarea") then
weight = s_mult * math.abs(benefit) -- Frozen status ignores selffire and allows self-fire
elseif act == self then -- hit self
weight = selffire*friendlyfire*s_mult*benefit -- matches actor:project
......
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