Commit 1e0b77f8 authored by JoyJ's avatar JoyJ

fixes

parent e12963ba
...@@ -413,6 +413,22 @@ end ...@@ -413,6 +413,22 @@ end
function X.ConsiderR() function X.ConsiderR()
local tpLoc = nil
local sCastType = 'ground'
local hEffectTarget = nil
local sCastMotive = nil
local nMinTPDistance = 3500
local nMode = bot:GetActiveMode()
local nModeDesire = bot:GetActiveModeDesire()
local botLocation = bot:GetLocation()
local botHP = J.GetHP( bot )
local botMP = J.GetMP( bot )
local nEnemyCount = J.GetEnemyCount( bot, 1600 )
local nAllyCount = J.GetAllyCount( bot, 1600 )
local itemFlask = J.IsItemAvailable( "item_flask" )
--照抄回城卷轴 --照抄回城卷轴
if nMode == BOT_MODE_RUNE if nMode == BOT_MODE_RUNE
...@@ -437,22 +453,6 @@ function X.ConsiderR() ...@@ -437,22 +453,6 @@ function X.ConsiderR()
local nNearbyEnemyTowers = bot:GetNearbyTowers( 888, true ) local nNearbyEnemyTowers = bot:GetNearbyTowers( 888, true )
if #nNearbyEnemyTowers > 0 then return BOT_ACTION_DESIRE_NONE end if #nNearbyEnemyTowers > 0 then return BOT_ACTION_DESIRE_NONE end
local tpLoc = nil
local sCastType = 'ground'
local hEffectTarget = nil
local sCastMotive = nil
local nMinTPDistance = 3500
local nMode = bot:GetActiveMode()
local nModeDesire = bot:GetActiveModeDesire()
local botLocation = bot:GetLocation()
local botHP = J.GetHP( bot )
local botMP = J.GetMP( bot )
local nEnemyCount = X.GetNumHeroWithinRange( 1600 )
local nAllyCount = J.GetAllyCount( bot, 1600 )
local itemFlask = J.IsItemAvailable( "item_flask" )
if bot:GetLevel() > 12 and bot:DistanceFromFountain() < 600 then nMinTPDistance = nMinTPDistance + 600 end if bot:GetLevel() > 12 and bot:DistanceFromFountain() < 600 then nMinTPDistance = nMinTPDistance + 600 end
--守塔 --守塔
......
...@@ -330,7 +330,7 @@ function X.ConsiderQ() ...@@ -330,7 +330,7 @@ function X.ConsiderQ()
if nAoeLoc ~= nil and most>1 if nAoeLoc ~= nil and most>1
then then
nTargetLocation = nAoeLoc nTargetLocation = nAoeLoc
return BOT_ACTION_DESIRE_HIGH, nTargetLocation, 'Q-对线AOE' return BOT_ACTION_DESIRE_HIGH, nTargetLocation, 'Q-AOE'
end end
--团战 --团战
...@@ -416,7 +416,7 @@ function X.ConsiderE() ...@@ -416,7 +416,7 @@ function X.ConsiderE()
end end
end end
--追杀 --团战
if J.IsInTeamFight( bot, 1200 ) if J.IsInTeamFight( bot, 1200 )
then then
for _, npcEnemy in pairs( nEnemyHeroesInRange ) for _, npcEnemy in pairs( nEnemyHeroesInRange )
......
...@@ -159,7 +159,7 @@ end ...@@ -159,7 +159,7 @@ end
function X.ConsiderD() function X.ConsiderD()
if not abilityD:IsTrained() or not abilityD:IsFullyCastable() then return 0 end if not abilityD:IsTrained() or abilityD:IsHidden() or not abilityD:IsFullyCastable() then return 0 end
if J.IsGoingOnSomeone(bot) or J.IsRetreating(bot) then return BOT_ACTION_DESIRE_HIGH end if J.IsGoingOnSomeone(bot) or J.IsRetreating(bot) then return BOT_ACTION_DESIRE_HIGH end
......
...@@ -385,14 +385,20 @@ function X.FamiliarThink(minion) ...@@ -385,14 +385,20 @@ function X.FamiliarThink(minion)
if minion:IsStunned() or minion:IsInvulnerable() then return end if minion:IsStunned() or minion:IsInvulnerable() then return end
local nHP = minion:GetHealth() / minion:GetMaxHealth() local nHP = minion:GetHealth() / minion:GetMaxHealth()
local abilityQ = bot:GetAbilityByName( 'visage_summon_familiars_stone_form' ) local abilityQ = minion:GetAbilityByName( 'visage_summon_familiars_stone_form' )
local canCast = abilityQ:IsFullyCastable() and not minion:IsSilenced() and not minion:IsStunned() local canCast = abilityQ:IsFullyCastable() and not minion:IsSilenced() and not minion:IsStunned()
local nEnemyHeroes = minion:GetNearbyHeroes( 1200, true, BOT_MODE_DESIRE_NONE ) local nEnemyHeroes = minion:GetNearbyHeroes( 1200, true, BOT_MODE_DESIRE_NONE )
local nEnemyHeroesFromBot = bot:GetNearbyHeroes( 1200, true, BOT_MODE_DESIRE_NONE ) local nEnemyHeroesFromBot = bot:GetNearbyHeroes( 1200, true, BOT_MODE_DESIRE_NONE )
--石化不可用,逃跑 --英雄死亡状态,返回泉水
if nHP < 0.7 and not canCast and #nEnemyHeroes>0 then if not bot:IsAlive() then
minion:Action_MoveToLocation(J.GetTeamFountain())
return
end
--石化不可用或被缴械,逃跑
if (nHP < 0.7 and not canCast and #nEnemyHeroes>0) or minion:IsDisarmed() then
local moveTo = J.GetVectorFromVectorToAngleWithDistance(nEnemyHeroes[1]:GetLocation(), local moveTo = J.GetVectorFromVectorToAngleWithDistance(nEnemyHeroes[1]:GetLocation(),
J.GetAngleFromUnitToUnit(nEnemyHeroes[1],minion),200 + nEnemyHeroes[1]:GetAttackRange() ) J.GetAngleFromUnitToUnit(nEnemyHeroes[1],minion),200 + nEnemyHeroes[1]:GetAttackRange() )
...@@ -401,7 +407,7 @@ function X.FamiliarThink(minion) ...@@ -401,7 +407,7 @@ function X.FamiliarThink(minion)
end end
--石化可用,闲时石化回血 --石化可用,闲时石化回血
if nHP < 0.99 and canCast and #nEnemyHeroes==0 then if nHP < 0.9999 and canCast and #nEnemyHeroes==0 then
minion:Action_UseAbility(abilityQ) minion:Action_UseAbility(abilityQ)
return return
end end
...@@ -412,12 +418,6 @@ function X.FamiliarThink(minion) ...@@ -412,12 +418,6 @@ function X.FamiliarThink(minion)
return return
end end
--英雄死亡状态,返回泉水
if not bot:IsAlive() then
minion:Action_MoveToLocation(J.GetTeamFountain())
return
end
--有可用目标,跟随追杀 --有可用目标,跟随追杀
if J.IsGoingOnSomeone(bot) then if J.IsGoingOnSomeone(bot) then
local target = J.GetProperTarget( bot ) local target = J.GetProperTarget( bot )
...@@ -503,8 +503,6 @@ function X.HealingWardThink(minion) ...@@ -503,8 +503,6 @@ function X.HealingWardThink(minion)
end end
end end
if targetLocation ~= nil if targetLocation ~= nil
then then
if targetLocation == GetBot():GetLocation() if targetLocation == GetBot():GetLocation()
......
...@@ -1009,7 +1009,7 @@ end ...@@ -1009,7 +1009,7 @@ end
function X.CanNotUseAttack(bot) function X.CanNotUseAttack(bot)
return not bot:IsAlive() return not bot:IsAlive()
or bot:NumQueuedActions() > 0 or (bot==GetBot() and bot:NumQueuedActions() > 0)
or bot:IsInvulnerable() or bot:IsInvulnerable()
or bot:IsCastingAbility() or bot:IsCastingAbility()
or bot:IsUsingAbility() or bot:IsUsingAbility()
......
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