|
@@ -30,7 +30,7 @@ newAI("dumb_talented", function(self) |
|
@@ -30,7 +30,7 @@ newAI("dumb_talented", function(self) |
30
|
-- print(self.name, self.uid, "dumb ai talents can try use", t.name, tid, "::", t.mode, not self:isTalentCoolingDown(t), target_dist <= self:getTalentRange(t), self:preUseTalent(t, true), self:canProject({type="bolt"}, self.ai_target.actor.x, self.ai_target.actor.y))
|
30
|
-- print(self.name, self.uid, "dumb ai talents can try use", t.name, tid, "::", t.mode, not self:isTalentCoolingDown(t), target_dist <= self:getTalentRange(t), self:preUseTalent(t, true), self:canProject({type="bolt"}, self.ai_target.actor.x, self.ai_target.actor.y))
|
31
|
-- For dumb AI assume we need range and LOS
|
31
|
-- For dumb AI assume we need range and LOS
|
32
|
-- No special check for bolts, etc.
|
32
|
-- No special check for bolts, etc.
|
33
|
- local total_range = self:getTalentRange(t) + self:getTalentRadius(t)
|
33
|
+ local total_range = (self:getTalentRange(t) or 0) + (self:getTalentRadius(t) or 0)
|
34
|
local tg = {type=util.getval(t.direct_hit, self, t) and "hit" or "bolt", range=total_range}
|
34
|
local tg = {type=util.getval(t.direct_hit, self, t) and "hit" or "bolt", range=total_range}
|
35
|
if t.mode == "activated" and not t.no_npc_use and
|
35
|
if t.mode == "activated" and not t.no_npc_use and
|
36
|
not self:isTalentCoolingDown(t) and self:preUseTalent(t, true, true) and
|
36
|
not self:isTalentCoolingDown(t) and self:preUseTalent(t, true, true) and
|