Skip to content
Snippets Groups Projects
Commit 5cf87b45 authored by dg's avatar dg
Browse files

plop

git-svn-id: http://svn.net-core.org/repos/t-engine4@2427 51575b47-30f0-44d4-a5cc-537603b46e54
parent c3c3da8a
No related branches found
No related tags found
No related merge requests found
......@@ -133,11 +133,14 @@ newAI("use_tactical", function(self)
res = res[1]
if not res then return end
avail = avail[res[1]]
table.sort(avail, function(a,b) return a.val > b.val end)
local tid = avail[rng.range(1, #avail)].tid
print("Tactical choice:", res[1], tid)
self:useTalent(tid)
return true
if avail[1] then
local tid = avail[1].tid
print("Tactical choice:", res[1], tid)
self:useTalent(tid)
return true
end
end
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