Commit 48c18b71e3ee92ac1efc361a9dfcdd7d6ca2605b
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
Showing
1 changed file
with
1 additions
and
1 deletions
... | ... | @@ -1568,7 +1568,7 @@ function _M:aiTalentTactics(t, aitarget, target_list, tactic, tg, wt_mod) |
1568 | 1568 | else |
1569 | 1569 | val_type, val_wt = next(val, val_type) if not val_wt then break end |
1570 | 1570 | end |
1571 | - if act == self and self:attr("encased_in_ice") and tact == "attack" or tact == "attackarea" then | |
1571 | + if act == self and self:attr("encased_in_ice") and (tact == "attack" or tact == "attackarea") then | |
1572 | 1572 | weight = s_mult * math.abs(benefit) -- Frozen status ignores selffire and allows self-fire |
1573 | 1573 | elseif act == self then -- hit self |
1574 | 1574 | weight = selffire*friendlyfire*s_mult*benefit -- matches actor:project | ... | ... |
-
Please register or login to post a comment