While playing a couple games, the Vengeful Spirit bot would continuously cycle through power treads.
I suspect (guess?) the cause is the new Universal attribute type. Within the "ItemUsuage-New.lua" (lines 277-313) behavior for tread switching and switching desire is defined. If treads are not on the primary attribute, a switch is initiated. Since these heroes apparently have no primary attribute, or returns an unrecognized attribute, an infinite loop is initiated.
I don't know too much about how all of this is coded - so I can't suggest a fix at the moment. (Default to strength maybe?) But I imagine 7.33 is going to break a lot of interactions.
local function GetWantedPowerTreadsAttribute()
if mode == BOT_MODE_RETREAT and npcBot:WasRecentlyDamagedByAnyHero(3) then
return ATTRIBUTE_STRENGTH
elseif fun1:IsAttackingEnemies(npcBot) then
local name = npcBot:GetUnitName()
name = fun1:GetHeroShortName(name)
if fun1:Contains({
"obsidian_destroyer",
"silencer",
"huskar",
"drow_ranger",
}, name) then
return npcBot:GetPrimaryAttribute()
else
return ATTRIBUTE_AGILITY
end
elseif mode == BOT_MODE_LANING then
return npcBot:GetPrimaryAttribute()
else
return npcBot:GetPrimaryAttribute()
end
end
local function UsePowerTreads(treads)
if math.floor(DotaTime()) / 4 ~= 0 then
return
end
if npcBot:IsInvisible() and npcBot:UsingItemBreaksInvisibility() then
if npcBot:HasModifier("modifier_item_dustofappearance") then
M.UseItemNoTarget(npcBot, treads)
return true
end
return
end
if GetWantedPowerTreadsAttribute() ~= treads:GetPowerTreadsStat() then
M.UseItemNoTarget(npcBot, treads)
return true
end
While playing a couple games, the Vengeful Spirit bot would continuously cycle through power treads.
I suspect (guess?) the cause is the new Universal attribute type. Within the "ItemUsuage-New.lua" (lines 277-313) behavior for tread switching and switching desire is defined. If treads are not on the primary attribute, a switch is initiated. Since these heroes apparently have no primary attribute, or returns an unrecognized attribute, an infinite loop is initiated.
I don't know too much about how all of this is coded - so I can't suggest a fix at the moment. (Default to strength maybe?) But I imagine 7.33 is going to break a lot of interactions.