Skip to content
Snippets Groups Projects
Commit d2b8a479 authored by Otowa Kotori's avatar Otowa Kotori
Browse files

fix ai bug if you don't have preferred_paradox

parent 485ebc96
No related branches found
No related tags found
1 merge request!630otowakotori 1.7 misc fixes
......@@ -176,7 +176,7 @@ ActorResource:defineResource(_t"Paradox", "paradox", ActorTalents.T_PARADOX_POOL
ai = { -- special ai functions and data
tactical = { default_pool_size = 100, -- assumed pool size to account for gains/losses/regeneration
want_level = function(act, aitarget)
local value = util.bound(5*(act:getParadox()-act.preferred_paradox)*act.global_speed/300, -10, 5) -- excess paradox
local value = util.bound(5*(act:getParadox()-(act.preferred_paradox or 300))*act.global_speed/300, -10, 5) -- excess paradox
value = value + math.min(value, 5*(act:paradoxFailChance()/100)^.5) -- preferred paradox overrides failure chance
return value
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