Commit 688807e9 authored by JoyJ's avatar JoyJ

fix underlord and life stealer

parent 7d2982ba
......@@ -102,6 +102,9 @@ local castWDesire, castWLocation
local castEDesire, castETarget
local castRDesire, castRLocation
local lastWLocation = nil
local lastWTime = 0
local nKeepMana, nMP, nHP, nLV, hEnemyList, hAllyList, botTarget, sMotive
local aetherRange = 0
......@@ -142,6 +145,10 @@ function X.SkillsComplement()
J.SetQueuePtToINT( bot, true )
bot:ActionQueue_UseAbilityOnLocation( abilityW, castWLocation )
lastWLocation = castWLocation
lastWTime = DotaTime()
return
end
......@@ -156,6 +163,15 @@ function X.SkillsComplement()
return
end
if lastWLocation~=nil and DotaTime()-lastWTime >= 1.5 then
local itemGungir = J.IsItemAvailable("item_gungir")
if itemGungir and itemGungir:IsFullyCastable() then
bot:ActionQueue_UseAbilityOnLocation( itemGungir, lastWLocation )
end
lastWTime = 0
lastWLocation = nil
end
end
......@@ -447,7 +463,7 @@ function X.ConsiderR()
if botAmount.distance > nMinTPDistance
or botAmount.amount < laneFront / 5
then
tpLoc = X.GetDefendTPLocation( nDefendLane )
tpLoc = GetLaneFrontLocation( GetTeam(), nDefendLane, -950 )
end
if tpLoc ~= nil
......@@ -473,7 +489,7 @@ function X.ConsiderR()
if botAmount.distance > nMinTPDistance
or botAmount.amount < laneFront / 5
then
tpLoc = X.GetPushTPLocation( nPushLane )
tpLoc = GetLaneFrontLocation( GetTeam(), nPushLane, -950 )
end
if tpLoc ~= nil
......@@ -496,10 +512,8 @@ function X.ConsiderR()
and target:IsHero()
and GetUnitToUnitDistance( bot, target ) > nMinTPDistance
then
local bestTpLoc = J.GetNearbyLocationToTp( target:GetLocation() )
if bestTpLoc ~= nil
and GetUnitToLocationDistance( bot, bestTpLoc ) > nMinTPDistance - 800
then
local bestTpLoc = target:GetLocation()
if GetUnitToLocationDistance( bot, bestTpLoc ) > nMinTPDistance - 800 then
tpLoc = bestTpLoc
end
end
......@@ -538,12 +552,11 @@ function X.ConsiderR()
end
--第二种情况:有多个敌人但可以卡视野TP
--第二种情况:有多个敌人但可以强行TP
local nAttackAllyList = bot:GetNearbyHeroes( 1500, false, BOT_MODE_ATTACK )
if botHP < ( 0.15 + 0.24 * nEnemyCount )
and #nAttackAllyList == 0
and bot:WasRecentlyDamagedByAnyHero( 6.0 )
and X.CanJuke()
and nEnemyCount <= ( botHP < 0.4 and 2 or 3 )
and nAllyCount <= 2
and itemFlask == nil
......@@ -555,7 +568,7 @@ function X.ConsiderR()
and bot:DistanceFromFountain() > nMinTPDistance - 600
then
tpLoc = J.GetTeamFountain()
sCastMotive = 'R-撤退-尝试卡视野跑路'
sCastMotive = 'R-撤退-尝试强行跑路'
return BOT_ACTION_DESIRE_HIGH, tpLoc, sCastMotive
end
......@@ -564,7 +577,6 @@ function X.ConsiderR()
if ( botHP < 0.34 or botHP + botMP < 0.43 )
and #nAttackAllyList == 0
and bot:GetLevel() >= 9
and X.CanJuke()
and nEnemyCount <= 1
and nAllyCount <= 2
and itemFlask == nil
......@@ -590,7 +602,6 @@ function X.ConsiderR()
--TP发育带线
if bot:GetLevel() >= 10
and nMode ~= BOT_MODE_ROSHAN
and not X.IsBaseTowerDestroyed()
and J.GetAllyCount( bot, 1600 ) <= 2
and J.Role.ShouldTpToFarm()
and not J.Role.IsAllyHaveAegis()
......@@ -627,7 +638,6 @@ function X.ConsiderR()
and nMode ~= BOT_MODE_ROSHAN
and nMode ~= BOT_MODE_ATTACK
and ( botTarget == nil or not botTarget:IsHero() )
--and J.GetAllyCount( bot, 1600 ) <= 3 --守护遗迹bug
then
local nNearEnemyList = bot:GetNearbyHeroes( 1400, true, BOT_MODE_NONE )
local nTeamFightLocation = J.GetTeamFightLocation( bot )
......@@ -690,8 +700,7 @@ function X.ConsiderR()
and bot:GetUnitName() ~= 'npc_dota_hero_slark'
and not bot:HasModifier( "modifier_arc_warden_tempest_double" )
then
if X.CanJuke()
and bot:DistanceFromFountain() > nMinTPDistance + 200
if bot:DistanceFromFountain() > nMinTPDistance + 200
and nEnemyCount <= 1 and nAllyCount <= 1
and J.GetProperTarget( bot ) == nil
and itemFlask == nil
......@@ -721,8 +730,7 @@ function X.ConsiderR()
and J.GetModifierTime( bot, "modifier_bloodseeker_rupture" ) >= 3.1
then
local nAllyCount = bot:GetNearbyHeroes( 1000, false, BOT_MODE_NONE )
if #nAllyCount <= 1 and X.CanJuke()
then
if #nAllyCount <= 1 then
tpLoc = J.GetTeamFountain()
end
......@@ -734,22 +742,6 @@ function X.ConsiderR()
end
end
--处理特殊情况一
if X.IsFarmingAlways( bot )
then
tpLoc = GetAncient( GetTeam() ):GetLocation()
sCastMotive = 'R-停止刷钱'
return BOT_ACTION_DESIRE_HIGH, tpLoc, sCastMotive
end
--处理特殊情况二
if J.IsStuck( bot ) --and nEnemyCount == 0
then
tpLoc = GetAncient( GetTeam() ):GetLocation()
sCastMotive = 'R-尝试解决卡住问题'
return BOT_ACTION_DESIRE_HIGH, tpLoc, sCastMotive
end
if J.Role.ShouldTpToDefend()
and bot:DistanceFromFountain() > 3800
then
......
......@@ -161,7 +161,7 @@ function X.SkillsComplement()
end
end
function ConsiderQ()
function X.ConsiderQ()
if not abilityQ:IsFullyCastable() then return BOT_ACTION_DESIRE_NONE end
......@@ -179,8 +179,7 @@ function ConsiderQ()
and not bot:HasModifier( 'modifier_antimage_spell_shield' )
and ( J.IsGoingOnSomeone( bot ) or J.IsRetreating( bot ) )
then
if bot:IsRooted()
then
if bot:IsRooted() then
sCastMotive = '解缠绕'
return BOT_ACTION_DESIRE_HIGH, sCastMotive
end
......@@ -209,6 +208,11 @@ function ConsiderQ()
return BOT_ACTION_DESIRE_HIGH, sCastMotive
end
if J.IsRetreating(bot) and bot:GetActiveMode()~=BOT_MODE_FARM then
sCastMotive = '撤退魔免'
return BOT_ACTION_DESIRE_HIGH, sCastMotive
end
end
return BOT_ACTION_DESIRE_NONE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment