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

Merge branch 'master' into 'master'

Fix Rune: Biting Gale not being used by tactical AI

Fix Rune: Biting Gale not being used by tactical AI

This was caused by the lack of a "radius" attribute in the talent definition.

While tactical.lua makes good use of the talent's "target" value, for the initial within_range check it ignores this and uses the sum of what it gets from getTalentRadius and getTalentRange. So, while Biting Gale had a perfectly good target table, because the radius was not stored in a separate radius value the AI was assuming it to have a range of 0, and thus never using it.

DG's verdict was to insist on better-written talents, rather than a more flexible check in the AI routine. Talent creators will need to watch out for this one.

Now, I've searched through all the talents, and not found any other cases exactly like this. I have, however, found a few which could be improved. I'll consider uploading a bundle of such fixes later.
parents 987ccf56 8d237393
No related branches found
No related tags found
No related merge requests found
......@@ -685,8 +685,9 @@ newInscription{
end },
requires_target = true,
range = 0,
radius = 6,
target = function(self, t)
return {type="cone", cone_angle=25, radius = 6, range=self:getTalentRange(t), talent=t, display={particle="bolt_ice", trail="icetrail"}}
return {type="cone", cone_angle=25, radius = self:getTalentRadius(t), range=self:getTalentRange(t), talent=t, display={particle="bolt_ice", trail="icetrail"}}
end,
action = function(self, t)
local data = self:getInscriptionData(t.short_name)
......
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