Commit 462df243 authored by JoyJ's avatar JoyJ

fix abyssal_underlord and alchemist

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