Commit 462df243 authored by JoyJ's avatar JoyJ

fix abyssal_underlord and alchemist

parent 4595011f
...@@ -219,7 +219,7 @@ function X.ConsiderQ() ...@@ -219,7 +219,7 @@ function X.ConsiderQ()
local nCanHurtEnemyAoE = bot:FindAoELocation( true, true, bot:GetLocation(), nCastRange, nRadius + 20, 0, 0 ) local nCanHurtEnemyAoE = bot:FindAoELocation( true, true, bot:GetLocation(), nCastRange, nRadius + 20, 0, 0 )
if nSkillLV>1 and J.IsAllowedToSpam( bot, nManaCost) and nCanHurtEnemyAoE.count >= 2 then if nSkillLV>1 and J.IsAllowedToSpam( bot, nManaCost) and nCanHurtEnemyAoE.count >= 2 then
nTargetLocation = nCanHurtEnemyAoE.targetloc nTargetLocation = nCanHurtEnemyAoE.targetloc
if J.GetAllyCreepNearLoc(bot, nTargetLocation, 400)>1 then if #J.GetAllyCreepNearLoc(bot, nTargetLocation, 400)>1 then
return BOT_ACTION_DESIRE_HIGH, nTargetLocation, 'Q消耗' return BOT_ACTION_DESIRE_HIGH, nTargetLocation, 'Q消耗'
end end
end end
......
...@@ -304,7 +304,7 @@ function X.ConsiderQ() ...@@ -304,7 +304,7 @@ function X.ConsiderQ()
local nCanHurtEnemyAoE = bot:FindAoELocation( true, false, bot:GetLocation(), nCastRange, nRadius + 20, 0, 0 ) local nCanHurtEnemyAoE = bot:FindAoELocation( true, false, bot:GetLocation(), nCastRange, nRadius + 20, 0, 0 )
if J.IsAllowedToSpam( bot, nManaCost) and nCanHurtEnemyAoE.count >= 3 then if J.IsAllowedToSpam( bot, nManaCost) and nCanHurtEnemyAoE.count >= 3 then
nTargetLocation = nCanHurtEnemyAoE.targetloc nTargetLocation = nCanHurtEnemyAoE.targetloc
if J.GetAllyCreepNearLoc(bot, nTargetLocation, 400)>1 then if #J.GetAllyCreepNearLoc(bot, nTargetLocation, 400)>1 then
return BOT_ACTION_DESIRE_HIGH, nTargetLocation, 'Q消耗' return BOT_ACTION_DESIRE_HIGH, nTargetLocation, 'Q消耗'
end end
end end
......
local X = {} local X = {}
local bDebugMode = false local bDebugMode = true
local bot = GetBot() local bot = GetBot()
local J = require( GetScriptDirectory()..'/FunLib/jmz_func' ) local J = require( GetScriptDirectory()..'/FunLib/jmz_func' )
...@@ -93,7 +93,8 @@ local abilityR = bot:GetAbilityByName( sAbilityList[6] ) ...@@ -93,7 +93,8 @@ local abilityR = bot:GetAbilityByName( sAbilityList[6] )
local castQDesire local castQDesire
local castDDesire, castDTarget local castDDesire, castDTarget
local castRDesire local castRDesire, castRTarget
local castFDesire
local nKeepMana, nMP, nHP, nLV, hEnemyList, hAllyList, botTarget, sMotive local nKeepMana, nMP, nHP, nLV, hEnemyList, hAllyList, botTarget, sMotive
local aetherRange = 0 local aetherRange = 0
...@@ -138,14 +139,12 @@ function X.SkillsComplement() ...@@ -138,14 +139,12 @@ function X.SkillsComplement()
end end
castFDesire, castFTarget, sMotive = X.ConsiderF() castFDesire, sMotive = X.ConsiderF()
if ( castFDesire > 0 ) if ( castFDesire > 0 )
then then
J.SetReportMotive( bDebugMode, sMotive ) J.SetReportMotive( bDebugMode, sMotive )
bot:ClearActions(true)
J.SetQueuePtToINT( bot, false ) bot:Action_UseAbility( abilityF )
bot:ActionQueue_UseAbility( abilityF )
return return
end end
...@@ -208,7 +207,8 @@ function X.ConsiderQ() ...@@ -208,7 +207,8 @@ function X.ConsiderQ()
return BOT_ACTION_DESIRE_HIGH, sCastMotive return BOT_ACTION_DESIRE_HIGH, sCastMotive
end end
if J.IsRetreating(bot) and bot:GetActiveMode()~=BOT_MODE_FARM then if J.IsRetreating(bot) and bot:GetActiveMode()~=BOT_MODE_FARM and bot:WasRecentlyDamagedByAnyHero(2.0)
and nHP<0.7 then
sCastMotive = '撤退魔免' sCastMotive = '撤退魔免'
return BOT_ACTION_DESIRE_HIGH, sCastMotive return BOT_ACTION_DESIRE_HIGH, sCastMotive
end end
......
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