Commit e1de1801 authored by JoyJ's avatar JoyJ

add venomancer and 7.32 stuff

parent cda235f7
...@@ -118,14 +118,14 @@ local abilityR = bot:GetAbilityByName( sAbilityList[6] ) ...@@ -118,14 +118,14 @@ local abilityR = bot:GetAbilityByName( sAbilityList[6] )
local castQDesire, castQTarget local castQDesire, castQTarget
local castWDesire, castWTarget local castWDesire, castWTarget
local castRDesire, castRTarget local castRDesire
local nKeepMana, nMP, nHP, nLV, hEnemyList, hAllyList, botTarget, sMotive local nKeepMana, nMP, nHP, nLV, hEnemyList, hAllyList, botTarget, sMotive
local aetherRange = 0 local aetherRange = 0
function X.SkillsComplement() function X.SkillsComplement()
if J.CanNotUseAbility( bot ) or bot:IsInvisible() then return end if J.CanNotUseAbilityIgnoreStun( bot ) or bot:IsInvisible() then return end
nKeepMana = 350 nKeepMana = 350
aetherRange = 0 aetherRange = 0
...@@ -136,8 +136,20 @@ function X.SkillsComplement() ...@@ -136,8 +136,20 @@ function X.SkillsComplement()
hEnemyList = bot:GetNearbyHeroes( 1600, true, BOT_MODE_NONE ) hEnemyList = bot:GetNearbyHeroes( 1600, true, BOT_MODE_NONE )
hAllyList = J.GetAlliesNearLoc( bot:GetLocation(), 1600 ) hAllyList = J.GetAlliesNearLoc( bot:GetLocation(), 1600 )
local aether = J.IsItemAvailable( "item_aether_lens" ) aetherRange = J.GetBonusCastRange( bot )
if aether ~= nil then aetherRange = 250 end
castRDesire, sMotive = X.ConsiderR()
if ( castRDesire > 0 )
then
J.SetReportMotive( bDebugMode, sMotive )
J.SetQueuePtToINT( bot, true )
bot:ActionQueue_UseAbility( abilityR )
return
end
if bot:IsStunned() then return end
castQDesire, castQTarget, sMotive = X.ConsiderQ() castQDesire, castQTarget, sMotive = X.ConsiderQ()
if ( castQDesire > 0 ) then if ( castQDesire > 0 ) then
...@@ -163,17 +175,6 @@ function X.SkillsComplement() ...@@ -163,17 +175,6 @@ function X.SkillsComplement()
end end
castRDesire, castRTarget, sMotive = X.ConsiderR()
if ( castRDesire > 0 )
then
J.SetReportMotive( bDebugMode, sMotive )
J.SetQueuePtToINT( bot, true )
bot:ActionQueue_UseAbility( abilityR )
return
end
end end
function X.ConsiderQ() function X.ConsiderQ()
...@@ -187,6 +188,20 @@ function X.ConsiderQ() ...@@ -187,6 +188,20 @@ function X.ConsiderQ()
local nDamage = abilityQ:GetAbilityDamage() local nDamage = abilityQ:GetAbilityDamage()
local nDamageType = DAMAGE_TYPE_MAGICAL local nDamageType = DAMAGE_TYPE_MAGICAL
local nInRangeEnemyList = bot:GetNearbyHeroes( nCastRange, true, BOT_MODE_NONE ) local nInRangeEnemyList = bot:GetNearbyHeroes( nCastRange, true, BOT_MODE_NONE )
local heroList = J.FilterGroup(nInRangeEnemyList,function(u)
return J.IsValidHero(u) and J.IsInRange( bot, u, nCastRange )
and J.CanCastOnNonMagicImmune(u)
end)
--击杀,WR期间无脑用
for _, npcEnemy in pairs(heroList)
do
if J.WillMagicKillTarget(bot, npcEnemy, nDamage, nCastPoint + 1.0)
or J.GetModifierTime(bot, 'modifier_abaddon_borrowed_time')>nCastPoint
or J.GetModifierTime(bot, 'modifier_abaddon_aphotic_shield')>nCastPoint then
return BOT_ACTION_DESIRE_HIGH, npcEnemy, "Q-对"..J.Chat.GetNormName( npcEnemy ).."耗血"
end
end
--治疗队友 --治疗队友
for _, npcAlly in pairs( hAllyList ) for _, npcAlly in pairs( hAllyList )
...@@ -196,7 +211,7 @@ function X.ConsiderQ() ...@@ -196,7 +211,7 @@ function X.ConsiderQ()
and npcAlly ~= bot and npcAlly ~= bot
and J.IsInRange( bot, npcAlly, nCastRange ) and J.IsInRange( bot, npcAlly, nCastRange )
and J.CanCastOnNonMagicImmune( npcAlly ) and J.CanCastOnNonMagicImmune( npcAlly )
and (J.GetHP( npcAlly ) < 0.3 or ((J.IsPushing(npcAlly) or npcAlly:WasRecentlyDamagedByAnyHero(3.0)) and J.GetHP(npcAlly)<0.5) ) and (J.GetHP( npcAlly ) < 0.3 or ((J.IsPushing(npcAlly) or npcAlly:WasRecentlyDamagedByAnyHero(3.0)) and J.GetHP(npcAlly)<0.7))
then then
return BOT_ACTION_DESIRE_HIGH, npcAlly, "Q-治疗"..J.Chat.GetNormName( npcAlly ) return BOT_ACTION_DESIRE_HIGH, npcAlly, "Q-治疗"..J.Chat.GetNormName( npcAlly )
end end
...@@ -213,18 +228,6 @@ function X.ConsiderQ() ...@@ -213,18 +228,6 @@ function X.ConsiderQ()
return BOT_ACTION_DESIRE_HIGH, botTarget, "Q-攻击"..J.Chat.GetNormName( botTarget ) return BOT_ACTION_DESIRE_HIGH, botTarget, "Q-攻击"..J.Chat.GetNormName( botTarget )
end end
for _, npcEnemy in pairs( hEnemyList )
do
if J.IsValidHero( npcEnemy )
and J.IsInRange( bot, npcEnemy, nCastRange )
and J.CanCastOnNonMagicImmune( npcEnemy )
and (J.WillMagicKillTarget(bot, npcEnemy, nDamage, nCastPoint) or (nSkillLV>1 and nMP > 0.6)
or J.GetModifierTime(bot, 'modifier_abaddon_borrowed_time')>nCastPoint
or J.GetModifierTime(bot, 'modifier_abaddon_aphotic_shield')>nCastPoint) then
return BOT_ACTION_DESIRE_HIGH, npcEnemy, "Q-对"..J.Chat.GetNormName( npcEnemy ).."耗血"
end
end
return BOT_ACTION_DESIRE_NONE return BOT_ACTION_DESIRE_NONE
end end
......
----------------------------------------------------------------------------------------------------
--- The Creation Come From: BOT EXPERIMENT Credit:FURIOUSPUPPY
--- BOT EXPERIMENT Author: Arizona Fauzie 2018.11.21
--- Link:http://steamcommunity.com/sharedfiles/filedetails/?id=837040016
--- Refactor: 决明子 Email: dota2jmz@163.com 微博@Dota2_决明子
--- Link:http://steamcommunity.com/sharedfiles/filedetails/?id=1573671599
--- Link:http://steamcommunity.com/sharedfiles/filedetails/?id=1627071163
--- Updated: Nikel
--- tank, priest
----------------------------------------------------------------------------------------------------
--script from https://github.com/jodyjmaulana/aba-update
--只看了Q,剩下的还没看
----------------------------------------------------------------------------------------------------
local X = {}
local bDebugMode = ( 1 == 10 )
local bot = GetBot()
local J = require( GetScriptDirectory()..'/FunLib/jmz_func' )
local Minion = dofile( GetScriptDirectory()..'/FunLib/aba_minion' )
local sTalentList = J.Skill.GetTalentList( bot )
local sAbilityList = J.Skill.GetAbilityList( bot )
local sOutfitType = J.Item.GetOutfitType( bot )
local tTalentTreeList = {
['outfit_carry'] = {
['t25'] = {10, 0},
['t20'] = {0, 10},
['t15'] = {10, 0},
['t10'] = {10, 0},
},
['outfit_mid'] = {
['t25'] = {10, 0},
['t20'] = {0, 10},
['t15'] = {0, 10},
['t10'] = {10, 0},
},
['outfit_priest'] = {
['t25'] = {10, 0},
['t20'] = {0, 10},
['t15'] = {0, 10},
['t10'] = {10, 0},
},
['outfit_mage'] = {
['t25'] = {0, 10},
['t20'] = {10, 0},
['t15'] = {0, 10},
['t10'] = {0, 10},
},
['outfit_tank'] = {
['t25'] = {0, 10},
['t20'] = {10, 0},
['t15'] = {0, 10},
['t10'] = {0, 10},
},
}
local tAllAbilityBuildList = {
['outfit_carry'] = {
{2,3,3,2,2,6,3,2,3,1,6,1,1,1,6}
},
['outfit_mid'] = {
{1,2,3,3,3,6,3,2,2,2,6,1,1,1,6}
},
['outfit_priest'] = {
{1,3,1,2,1,6,1,3,3,3,6,2,2,2,6}
},
['outfit_mage'] = {
{1,3,1,2,1,6,1,3,3,3,6,2,2,2,6}
},
['outfit_tank'] = {
{1,2,3,3,3,6,3,2,2,2,6,1,1,1,6}
},
}
local nAbilityBuildList = J.Skill.GetRandomBuild( tAllAbilityBuildList[sOutfitType] )
local nTalentBuildList = J.Skill.GetTalentBuild( tTalentTreeList[sOutfitType] )
local sRandomItem = RandomInt( 1, 9 ) > 6 and 0 or 10
local sRandomItem_1 = sRandomItem == 0 and "item_blink" or "item_force_staff"
local sRandomItem_2 = sRandomItem == 0 and "item_overwhelming_blink" or "item_hurricane_pike"
local tOutFitList = {}
tOutFitList['outfit_carry'] = {
"item_venomancer_outfit",
"item_urn_of_shadows",
"item_ancient_janggo",
"item_veil_of_discord",
"item_aghanims_shard",
sRandomItem_1,
"item_ultimate_scepter",
"item_boots_of_bearing",
"item_ghost",
"item_spirit_vessel",
sRandomItem_2,
"item_ethereal_blade",
"item_ultimate_scepter_2",
"item_aether_lens",
"item_octarine_core",
"item_moon_shard",
}
tOutFitList['outfit_mid'] = tOutFitList['outfit_carry']
tOutFitList['outfit_priest'] = {
"item_priest_2_outfit",
"item_force_staff",
"item_glimmer_cape",
"item_mekansm",
"item_aeon_disk",
"item_aghanims_shard",
"item_guardian_greaves",
"item_ghost",
"item_ultimate_scepter",
"item_hurricane_pike",
"item_ethereal_blade",
"item_ultimate_scepter_2",
"item_aether_lens",
"item_octarine_core",
"item_moon_shard",
}
tOutFitList['outfit_mage'] = tOutFitList['outfit_carry']
tOutFitList['outfit_tank'] = tOutFitList['outfit_carry']
X['sBuyList'] = tOutFitList[sOutfitType]
X['sSellList'] = {
"item_blink",
"item_wraith_band",
"item_force_staff",
"item_wraith_band",
"item_ultimate_scepter",
"item_magic_wand",
}
if J.Role.IsPvNMode() or J.Role.IsAllShadow() then X['sBuyList'], X['sSellList'] = { 'PvN_mage' }, {} end
nAbilityBuildList, nTalentBuildList, X['sBuyList'], X['sSellList'] = J.SetUserHeroInit( nAbilityBuildList, nTalentBuildList, X['sBuyList'], X['sSellList'] )
X['sSkillList'] = J.Skill.GetSkillList( sAbilityList, nAbilityBuildList, sTalentList, nTalentBuildList )
X['bDeafaultAbility'] = false
X['bDeafaultItem'] = false
function X.MinionThink( hMinionUnit )
if Minion.IsValidUnit( hMinionUnit )
then
if Minion.IsAttackingWard( hMinionUnit:GetUnitName() )
then
Minion.AttackingWardThink( hMinionUnit )
else
Minion.IllusionThink( hMinionUnit )
end
end
end
--[[
npc_dota_hero_venomancer
"Ability1" "venomancer_venomous_gale"
"Ability2" "venomancer_poison_sting"
"Ability3" "venomancer_plague_ward"
"Ability4" "venomancer_latent_poison"
"Ability5" "generic_hidden"
"Ability6" "venomancer_poison_nova"
"Ability10" "special_bonus_unique_venomancer_3"
"Ability11" "special_bonus_unique_venomancer_poisonsting_regen_reduction"
"Ability12" "special_bonus_unique_venomancer_8"
"Ability13" "special_bonus_unique_venomancer_2"
"Ability14" "special_bonus_unique_venomancer_4"
"Ability15" "special_bonus_unique_venomancer_gale_plagueward"
"Ability16" "special_bonus_unique_venomancer_5"
"Ability17" "special_bonus_unique_venomancer"
modifier_projectile_vision
modifier_venomancer_venomous_gale
modifier_venomancer_poison_sting_applier
modifier_venomancer_poison_sting
modifier_venomancer_poison_sting_ward
modifier_kill
modifier_magic_immune
modifier_plague_wards_bonus
modifier_venomancer_latent_poison
modifier_stunned
modifier_venomancer_poison_nova_thinker
modifier_venomancer_poison_nova
--]]
local abilityQ = bot:GetAbilityByName( sAbilityList[1] )
local abilityE = bot:GetAbilityByName( sAbilityList[3] )
local abilityD = bot:GetAbilityByName( sAbilityList[4] )
local abilityR = bot:GetAbilityByName( sAbilityList[6] )
local castQDesire, castQLocation
local castEDesire, castELocation
local castDDesire, castDTarget
local castRDesire
local nKeepMana, nMP, nHP, nLV, botTarget, hEnemyList, hAllyList, sMotive
local bonusRange = 0
function X.SkillsComplement()
if J.CanNotUseAbility( bot ) or bot:IsInvisible() then return end
nKeepMana = 400
bonusRange = 0
nLV = bot:GetLevel()
nMP = bot:GetMana()/bot:GetMaxMana()
nHP = bot:GetHealth()/bot:GetMaxHealth()
botTarget = J.GetProperTarget( bot )
hEnemyList = bot:GetNearbyHeroes( 1600, true, BOT_MODE_NONE )
hAllyList = J.GetAlliesNearLoc( bot:GetLocation(), 1600 )
bonusRange = J.GetBonusCastRange( bot )
castRDesire, sMotive = X.ConsiderR()
if castRDesire > 0
then
J.SetReportMotive( bDebugMode, sMotive )
J.SetQueuePtToINT( bot, true )
bot:ActionQueue_UseAbility( abilityR )
return
end
castQDesire, castQLocation, sMotive = X.ConsiderQ()
if castQDesire > 0
then
J.SetReportMotive( bDebugMode, sMotive )
J.SetQueuePtToINT( bot, true )
bot:ActionQueue_UseAbilityOnLocation( abilityQ, castQLocation )
return
end
castDDesire, castDTarget, sMotive = X.ConsiderD()
if ( castDDesire > 0 )
then
J.SetReportMotive( bDebugMode, sMotive )
J.SetQueuePtToINT( bot, false )
bot:ActionQueue_UseAbilityOnEntity( abilityD, castDTarget )
return
end
castEDesire, castELocation, sMotive = X.ConsiderE()
if castEDesire > 0
then
J.SetReportMotive( bDebugMode, sMotive )
J.SetQueuePtToINT( bot, false )
bot:ActionQueue_UseAbilityOnLocation( abilityE, castELocation )
return
end
end
function X.ConsiderQ()
if not abilityQ:IsFullyCastable() then return BOT_ACTION_DESIRE_NONE, nil end
local nSkillLV = abilityQ:GetLevel()
local nCastRange = abilityQ:GetCastRange() + bonusRange
local nRadius = abilityQ:GetSpecialValueInt( 'radius' )
local nCastPoint = abilityQ:GetCastPoint()
local nManaCost = abilityQ:GetManaCost()
local nDamage = abilityQ:GetSpecialValueInt( 'strike_damage' ) + ( abilityQ:GetSpecialValueInt( 'tick_damage' ) * 3 ) --因为是延时伤害所以故意少算一些
local nRealDamage = abilityQ:GetSpecialValueInt( 'strike_damage' ) + ( abilityQ:GetSpecialValueInt( 'tick_damage' ) * 3 )
local nDamageType = DAMAGE_TYPE_MAGICAL
local nAlliedHeroesInRange = bot:GetNearbyHeroes( nCastRange, false, BOT_MODE_NONE )
local nEnemyHeroesInRange = bot:GetNearbyHeroes( nCastRange, true, BOT_MODE_NONE )
local nTargetLocation = nil
--击杀
for _, npcEnemy in pairs( nEnemyHeroesInRange )
do
if J.IsValidHero( npcEnemy )
and J.CanCastOnNonMagicImmune( npcEnemy )
and J.WillMagicKillTarget( bot, npcEnemy, nDamage, nCastPoint )
or (nRealDamage * (1-npcEnemy:GetMagicResist()) > J.GetHP(npcEnemy) * 0.4) --能耗好多血的话也扔一下
then
nTargetLocation = botTarget:GetExtrapolatedLocation( nCastPoint + J.GetDistanceFromUnitToUnit(bot,botTarget) / 1200 )
return BOT_ACTION_DESIRE_HIGH, nTargetLocation, 'Q-击杀:'..J.Chat.GetNormName( npcEnemy )
end
end
--AOE
local most=0
local nAoeLoc
for i=1,36 do
local angle = 10 * i
local hitEnemy = J.FilterGroup(nEnemyHeroesInRange,function(u)
return J.IsValidHero(u) and not u:IsMagicImmune()
and J.PointInRectangle(u:GetLocation(),bot:GetLocation(),angle,nCastRange,nRadius)
end)
if #hitEnemy>most then
most=#hitEnemy
nAoeLoc=J.GetVectorFromVectorToAngleWithDistance(bot:GetLocation(), angle, nCastRange - 100)
end
end
if nAoeLoc ~= nil and most>1
then
nTargetLocation = nAoeLoc
return BOT_ACTION_DESIRE_HIGH, nTargetLocation, 'Q-对线AOE'
end
--团战
if J.IsInTeamFight( bot, 1200 )
then
nAoeLoc = J.GetAoeEnemyHeroLocation( bot, nCastRange, nRadius, 2 )
if nAoeLoc ~= nil
then
nTargetLocation = nAoeLoc
return BOT_ACTION_DESIRE_HIGH, nTargetLocation, 'Q-Battle'
end
end
--追杀
if J.IsGoingOnSomeone( bot )
then
if J.IsValidHero( botTarget )
and J.CanCastOnNonMagicImmune( botTarget )
and J.IsInRange( botTarget, bot, nCastRange )
then
nTargetLocation = botTarget:GetExtrapolatedLocation( nCastPoint )
if J.IsInLocRange( bot, nTargetLocation, nCastRange )
then
return BOT_ACTION_DESIRE_HIGH, nTargetLocation, 'Q-Attack:'..J.Chat.GetNormName( botTarget )
end
end
end
--撤退减速
if J.IsRetreating( bot )
then
for _, npcEnemy in pairs( nEnemyHeroesInRange )
do
if J.IsValidHero( npcEnemy )
and bot:WasRecentlyDamagedByHero( npcEnemy, 5.0 )
and J.CanCastOnNonMagicImmune( npcEnemy )
and bot:IsFacingLocation( npcEnemy:GetExtrapolatedLocation( nCastPoint ), 20 )
then
nTargetLocation = npcEnemy:GetExtrapolatedLocation( nCastPoint )
return BOT_ACTION_DESIRE_HIGH, nTargetLocation, 'Q-Retreat:'..J.Chat.GetNormName( npcEnemy )
end
end
end
--肉山
if bot:GetActiveMode() == BOT_MODE_ROSHAN
and nMP >= 0.78
then
if J.IsRoshan( botTarget ) and J.GetHP( botTarget ) > 0.15
and J.IsInRange( botTarget, bot, nCastRange )
then
nTargetLocation = botTarget:GetLocation()
return BOT_ACTION_DESIRE_HIGH, nTargetLocation, 'Q-Roshan'
end
end
return BOT_ACTION_DESIRE_NONE, nil
end
function X.ConsiderE()
if not abilityE:IsFullyCastable() then return BOT_ACTION_DESIRE_NONE, nil end
local nSkillLV = abilityE:GetLevel()
local nCastRange = abilityE:GetCastRange() + bonusRange
local nRadius = 600
local nCastPoint = abilityE:GetCastPoint()
local nManaCost = abilityE:GetManaCost()
local nEnemyHeroesInRange = bot:GetNearbyHeroes( nCastRange, true, BOT_MODE_NONE )
local nTargetLocation = nil
--追杀
if J.IsGoingOnSomeone( bot )
then
if J.IsValidHero( botTarget )
and J.IsInRange( bot, botTarget, nCastRange + nRadius - 100 )
and not botTarget:IsAttackImmune()
then
nTargetLocation = J.GetCastLocation( bot, botTarget, nCastRange, nRadius ) + RandomVector( nRadius * 0.1 )
return BOT_ACTION_DESIRE_HIGH, nTargetLocation, 'E-Attack:'..J.Chat.GetNormName( botTarget )
end
end
--追杀
if J.IsInTeamFight( bot, 1200 )
then
for _, npcEnemy in pairs( nEnemyHeroesInRange )
do
if J.IsValidHero( botTarget )
and not npcEnemy:IsAttackImmune()
then
nTargetLocation = J.GetCastLocation( bot, npcEnemy, nCastRange, nRadius ) + RandomVector( nRadius * 0.5 )
return BOT_ACTION_DESIRE_HIGH, nTargetLocation, 'E-Battle'
end
end
end
if J.IsLaning( bot )
then
for _, npcEnemy in pairs( nEnemyHeroesInRange )
do
if J.IsValidHero( npcEnemy )
and not botTarget:IsAttackImmune()
and J.IsInRange( npcEnemy, bot, nCastRange + nRadius )
and J.IsHealing( npcEnemy )
then
nTargetLocation = J.GetCastLocation( bot, botTarget, nCastRange, nRadius ) + RandomVector( nRadius * 0.5 )
return BOT_ACTION_DESIRE_HIGH, nTargetLocation, "E-DispelHeal:"..J.Chat.GetNormName( npcEnemy )
end
if J.IsValidHero( npcEnemy )
and not botTarget:IsAttackImmune()
and J.IsAllowedToSpam( bot, nManaCost )
and nMP >= 0.5
then
nTargetLocation = J.GetCastLocation( bot, botTarget, nCastRange, nRadius ) + RandomVector( nRadius * 0.5 )
return BOT_ACTION_DESIRE_HIGH, nTargetLocation, "E-SpamHarass:"..J.Chat.GetNormName( npcEnemy )
end
end
end
if ( J.IsPushing( bot ) or J.IsDefending( bot ) or J.IsFarming( bot ) )
and J.IsAllowedToSpam( bot, nManaCost * 0.32 )
and nSkillLV >= 2 and DotaTime() > 8 * 60
then
local nEnemyCreeps = bot:GetNearbyLaneCreeps( nCastRange + nRadius, true )
if #nEnemyCreeps >= 3
and J.IsValid( nEnemyCreeps[1] )
and not nEnemyCreeps[1]:HasModifier( "modifier_fountain_glyph" )
then
nTargetLocation = J.GetCastLocation( bot, nEnemyCreeps[1], nCastRange, nRadius ) + RandomVector( nRadius * 0.5 )
return BOT_ACTION_DESIRE_HIGH, nTargetLocation, "E-Push"
end
end
if J.IsFarming( bot )
and not ( J.IsPushing( bot ) or J.IsDefending( bot ) )
and J.IsAllowedToSpam( bot, nManaCost * 0.25 )
and nSkillLV >= 3
and #hEnemyList == 0
and #hAllyList <= 2
then
local nNeutralCreeps = bot:GetNearbyNeutralCreeps( nCastRange + nRadius )
if #nNeutralCreeps >= 3 or nMP >= 0.8
then
local targetCreep = nNeutralCreeps[1]
if J.IsValid( targetCreep )
and targetCreep:GetHealth() >= 500
and J.GetAroundTargetEnemyUnitCount( targetCreep, 300 ) >= 1
then
nTargetLocation = J.GetCastLocation( bot, targetCreep, nCastRange, nRadius ) + RandomVector( nRadius * 0.5 )
return BOT_ACTION_DESIRE_HIGH, nTargetLocation, "E-Farm:"..( #nNeutralCreeps )
end
end
end
if bot:GetActiveMode() == BOT_MODE_ROSHAN
and nMP >= 0.65
then
if J.IsRoshan( botTarget ) and J.GetHP( botTarget ) > 0.15
and J.IsInRange( botTarget, bot, nCastRange )
then
nTargetLocation = J.GetCastLocation( bot, botTarget, nCastRange, nRadius )
return BOT_ACTION_DESIRE_HIGH, nTargetLocation, 'E-Roshan'
end
end
local nRManaCost = abilityR:GetManaCost()
if #hEnemyList >= 1
and ( not abilityR:IsFullyCastable() or bot:GetMana() > nRManaCost )
then
local nAlliedCreeps = bot:GetNearbyLaneCreeps( nCastRange + nRadius, false )
if J.IsValidHero( hEnemyList[1] )
and not hEnemyList[1]:IsAttackImmune()
and J.IsAllowedToSpam( bot, nManaCost )
and nMP >= 0.5
and ( #nAlliedCreeps >= 1 or #hAllyList >= 2)
then
nTargetLocation = J.GetCastLocation( bot, hEnemyList[1], nCastRange, nRadius ) + RandomVector( nRadius * 0.5 )
return BOT_ACTION_DESIRE_HIGH, nTargetLocation, 'E-Spam'
end
end
local nTowerList = bot:GetNearbyTowers( 990, true )
local nBarrackList = bot:GetNearbyBarracks( 990, true )
local nEnemyAncient = GetAncient( GetOpposingTeam() )
local hBuildingList = {
botTarget,
nTowerList[1],
nBarrackList[1],
nEnemyAncient,
}
for _, building in pairs( hBuildingList )
do
if J.IsValidBuilding( building )
and J.IsInRange( bot, building, nCastRange + nRadius )
and not building:HasModifier( 'modifier_fountain_glyph' )
and not building:HasModifier( 'modifier_invulnerable' )
and not building:HasModifier( 'modifier_backdoor_protection' )
and not J.IsKeyWordUnit( "DOTA_Outpost", building )
then
nTargetLocation = building:GetLocation() + RandomVector( nRadius * 0.5 )
return BOT_ACTION_DESIRE_HIGH, nTargetLocation, "E-Push-Tower"
end
end
nTowerList = bot:GetNearbyTowers( 990, false )
nBarrackList = bot:GetNearbyBarracks( 990, false )
nEnemyAncient = GetAncient( GetOpposingTeam() )
hBuildingList = {
nTowerList[1],
nBarrackList[1],
nEnemyAncient,
}
for _, building in pairs (hBuildingList )
do
if J.IsValidBuilding( building )
and J.IsInRange( bot, building, nCastRange + nRadius )
and not J.IsKeyWordUnit( "DOTA_Outpost", building )
and ( J.GetAroundTargetEnemyUnitCount( building, 600 ) >= 1 or J.IsDefending( bot ) )
then
nTargetLocation = building:GetLocation() + RandomVector( nRadius * 0.5 )
return BOT_ACTION_DESIRE_HIGH, nTargetLocation, "E-Defend-Tower"
end
end
return BOT_ACTION_DESIRE_NONE, nil
end
function X.ConsiderD()
if not abilityD:IsFullyCastable() then return BOT_ACTION_DESIRE_NONE, nil end
local nSkillLV = abilityD:GetLevel()
local nCastRange = abilityD:GetCastRange() + bonusRange
local nCastPoint = abilityD:GetCastPoint()
local nManaCost = abilityD:GetManaCost()
local nAlliedHeroesInRange = bot:GetNearbyHeroes( nCastRange, false, BOT_MODE_NONE )
local nEnemyHeroesInRange = bot:GetNearbyHeroes( nCastRange, true, BOT_MODE_NONE )
if J.IsInTeamFight( bot, 1200 )
then
local npcWeakestEnemy = J.GetVulnerableWeakestUnitWithLotusCheck( bot, true, true, nCastRange )
if npcWeakestEnemy ~= nil
then
return BOT_ACTION_DESIRE_HIGH, npcWeakestEnemy, 'D-Battle-Weakest:'..J.Chat.GetNormName( npcWeakestEnemy )
end
end
if J.IsGoingOnSomeone( bot )
then
if J.IsValidHero( botTarget )
and J.CanCastAbilityOnTarget( botTarget, false )
and J.CanCastOnTargetAdvanced( botTarget )
and J.IsInRange( botTarget, bot, nCastRange )
then
return BOT_ACTION_DESIRE_HIGH, botTarget, 'D-Slow:'..J.Chat.GetNormName( botTarget )
end
end
if J.IsRetreating( bot )
then
for _, npcEnemy in pairs( nEnemyHeroesInRange )
do
if J.IsValid( npcEnemy )
and bot:WasRecentlyDamagedByHero( npcEnemy, 3.5 )
and J.CanCastAbilityOnTarget( botTarget, false )
and J.CanCastOnTargetAdvanced( npcEnemy )
and bot:IsFacingLocation( npcEnemy:GetExtrapolatedLocation( nCastPoint ), 20 )
then
return BOT_ACTION_DESIRE_HIGH, npcEnemy, 'D-Retreat:'..J.Chat.GetNormName( npcEnemy )
end
end
end
return BOT_ACTION_DESIRE_NONE, nil
end
function X.ConsiderR()
if not abilityR:IsFullyCastable() then return BOT_ACTION_DESIRE_NONE, nil end
local nSkillLV = abilityR:GetLevel()
local nRadius = abilityR:GetSpecialValueInt( 'start_radius' ) + abilityR:GetSpecialValueInt( 'radius' )
local nCastPoint = abilityR:GetCastPoint()
local nManaCost = abilityR:GetManaCost()
local nAlliedHeroesInRange = bot:GetNearbyHeroes( nRadius, false, BOT_MODE_NONE )
local nEnemyHeroesInRange = bot:GetNearbyHeroes( nRadius - 300, true, BOT_MODE_NONE )
local nTargetLocation = nil
if J.IsInTeamFight( bot, 1200 )
then
if #nEnemyHeroesInRange >= 3
then
return BOT_ACTION_DESIRE_HIGH, 'R-Battle'
end
end
if J.IsGoingOnSomeone( bot )
then
if J.IsValidHero( botTarget )
and J.CanCastOnMagicImmune( botTarget )
and J.IsInRange( botTarget, bot, nRadius - 150 )
and #nEnemyHeroesInRange >= 2
and #nEnemyHeroesInRange >= #nAlliedHeroesInRange
then
return BOT_ACTION_DESIRE_HIGH, 'R-Chase:'..J.Chat.GetNormName( botTarget )
end
end
if J.IsRetreating( bot )
and bot:WasRecentlyDamagedByHero( npcEnemy, 3.0 )
and #nEnemyHeroesInRange >= 2
and #nEnemyHeroesInRange >= #hAllyList
then
return BOT_ACTION_DESIRE_HIGH, 'R-Retreat'
end
return BOT_ACTION_DESIRE_NONE, nil
end
return X
\ No newline at end of file
...@@ -18,10 +18,10 @@ Buff["creep_is_immune"] = { ...@@ -18,10 +18,10 @@ Buff["creep_is_immune"] = {
Buff["enemy_is_immune"] = { Buff["enemy_is_immune"] = {
"modifier_necrolyte_reapers_scythe", --Nec大
"modifier_winter_wyvern_winters_curse", --冰龙大 "modifier_winter_wyvern_winters_curse", --冰龙大
"modifier_winter_wyvern_winters_curse_aura", --冰龙大 "modifier_winter_wyvern_winters_curse_aura", --冰龙大
"modifier_troll_warlord_battle_trance", --巨魔大 "modifier_troll_warlord_battle_trance", --巨魔大
"modifier_naga_siren_song_of_the_siren",--娜迦大
--"modifier_modifier_dazzle_shallow_grave", --"modifier_modifier_dazzle_shallow_grave",
--"modifier_oracle_false_promise_timer", --"modifier_oracle_false_promise_timer",
--"modifier_item_blade_mail_reflect", --"modifier_item_blade_mail_reflect",
...@@ -98,6 +98,8 @@ Buff["hero_is_healing"] = { ...@@ -98,6 +98,8 @@ Buff["hero_is_healing"] = {
"modifier_item_spirit_vessel_heal", "modifier_item_spirit_vessel_heal",
"modifier_bottle_regeneration", "modifier_bottle_regeneration",
--"modifier_filler_heal", --"modifier_filler_heal",
"modifier_aegis_regen",
"modifier_rune_regen",
} }
...@@ -107,21 +109,27 @@ Buff["hero_not_invisible"] = { ...@@ -107,21 +109,27 @@ Buff["hero_not_invisible"] = {
"modifier_item_dustofappearance", "modifier_item_dustofappearance",
"modifier_sniper_assassinate", "modifier_sniper_assassinate",
"modifier_bounty_hunter_track", "modifier_bounty_hunter_track",
--大鱼大 "modifier_slardar_amplify_damage",
--血魔嗜血 "modifier_bloodseeker_thirst_vision",
--祸乱魔爪 "modifier_bane_fiends_grip",
--渔网诱捕 "modifier_bane_fiends_grip_cast_illusion",
--阿托斯 "modifier_oracle_fortunes_end_purge",
--小Y锁 "modifier_shadow_shaman_shackles",
--米波网 "modifier_rod_of_atos_debuff",
--娜迦网 "modifier_gungnir_debuff",
--冰女冰 "modifier_meepo_earthbind",
--火猫索 "modifier_naga_siren_ensnare",
--军团决斗 "modifier_crystal_maiden_frostbite",
--骨法吸 "modifier_ember_spirit_searing_chains",
--屠夫大 "modifier_legion_commander_duel",
--大树大 "modifier_pugna_life_drain",
--孽主深渊 "modifier_pudge_dismember",
"modifier_treant_natures_guise_root",
"modifier_treant_overgrowth",
"modifier_abyssal_underlord_pit_of_malice_ensare",
"modifier_aghsfort_lich_sinister_gaze",
"modifier_lone_druid_spirit_bear_entangle_effect",
"modifier_troll_warlord_berserkers_rage_ensnare",
} }
......
...@@ -381,6 +381,8 @@ local sConsumableList = { ...@@ -381,6 +381,8 @@ local sConsumableList = {
'item_cheese', 'item_cheese',
'item_refresher_shard', 'item_refresher_shard',
'item_aegis', 'item_aegis',
'item_ultimate_scepter_roshan',
'item_aghanims_shard_roshan',
} }
local tConsumableItemList = {} local tConsumableItemList = {}
...@@ -441,62 +443,72 @@ local tNeutralItemLevelList = { ...@@ -441,62 +443,72 @@ local tNeutralItemLevelList = {
['item_arcane_ring'] = 35, ['item_arcane_ring'] = 35,
['item_broom_handle'] = 33, ['item_broom_handle'] = 33,
['item_faded_broach'] = 31, -- ['item_faded_broach'] = 31,
['item_keen_optic'] = 29, -- 基恩镜片 -- ['item_keen_optic'] = 29, -- 基恩镜片
['item_ocean_heart'] = 43, -- ['item_ocean_heart'] = 43,
['item_royal_jelly'] = 96, ['item_royal_jelly'] = 96,
['item_trusty_shovel'] = 32, ['item_trusty_shovel'] = 32,
['item_ironwood_tree'] = 44, ['item_ironwood_tree'] = 44,
['item_mysterious_hat'] = 35, ['item_mysterious_hat'] = 35,
['item_chipped_vest'] = 34, -- ['item_chipped_vest'] = 34,
['item_possessed_mask'] = 33, ['item_possessed_mask'] = 33,
['item_pogo_stick'] = 30,
['item_unstable_wand'] = 30,
['item_seeds_of_serenity'] = 30,
['item_lance_of_pursuit'] = 30,
['item_occult_bracelet'] = 30,
['item_dragon_scale'] = 38, -- 炎龙之鳞 ['item_dragon_scale'] = 38, -- 炎龙之鳞
['item_essence_ring'] = 55.5, -- 精华指环 -- ['item_essence_ring'] = 55.5, -- 精华指环
['item_grove_bow'] = 40, -- 林野长弓 ['item_grove_bow'] = 40, -- 林野长弓
['item_imp_claw'] = 51.5, -- 魔童之爪 -- ['item_imp_claw'] = 51.5, -- 魔童之爪
['item_nether_shawl'] = 28, -- 幽冥披巾 ['item_nether_shawl'] = 28, -- 幽冥披巾
['item_philosophers_stone'] = 47.5, -- 贤者石 ['item_philosophers_stone'] = 47.5, -- 贤者石
['item_pupils_gift'] = 41, ['item_pupils_gift'] = 41,
['item_ring_of_aquila'] = 46, ['item_ring_of_aquila'] = 46,
['item_vambrace'] = 52, ['item_vambrace'] = 52,
-- ['item_quicksilver_amulet'] = 45,
['item_quicksilver_amulet'] = 45,
['item_bullwhip'] = 48, ['item_bullwhip'] = 48,
['item_misericorde'] = 40,
['item_eye_of_the_vizier'] = 40,
['item_specialists_array'] = 40,
['item_dagger_of_ristul'] = 40,
['item_enchanted_quiver'] = 44, -- 魔力箭袋 ['item_enchanted_quiver'] = 44, -- 魔力箭袋
['item_mind_breaker'] = 55, ['item_mind_breaker'] = 55,
['item_orb_of_destruction'] = 53, -- 毁灭灵球 -- ['item_orb_of_destruction'] = 53, -- 毁灭灵球
['item_paladin_sword'] = 40, -- 骑士剑 ['item_paladin_sword'] = 40, -- 骑士剑
['item_quickening_charm'] = 50, ['item_quickening_charm'] = 50,
['item_titan_sliver'] = 54, -- 巨神残铁 ['item_titan_sliver'] = 54, -- 巨神残铁
['item_spider_legs'] = 60, -- ['item_spider_legs'] = 60,
['item_ceremonial_robe'] = 46, ['item_ceremonial_robe'] = 46,
['item_cloak_of_flames'] = 49, ['item_cloak_of_flames'] = 49,
['item_elven_tunic'] = 47, ['item_elven_tunic'] = 47,
['item_psychic_headband'] = 50, ['item_psychic_headband'] = 50,
['item_black_powder_bag'] = 50,
['item_ogre_seal_totem'] = 50,
['item_spy_gadget'] = 36, -- 望远镜 ['item_spy_gadget'] = 36, -- 望远镜
['item_flicker'] = 49, -- 闪灵 ['item_flicker'] = 49, -- 闪灵
['item_illusionsts_cape'] = 64, -- ['item_illusionsts_cape'] = 64,
['item_minotaur_horn'] = 65, -- 恶牛角 -- ['item_minotaur_horn'] = 65, -- 恶牛角
['item_ninja_gear'] = 58, -- 忍者用具 ['item_ninja_gear'] = 58, -- 忍者用具
['item_spell_prism'] = 69, -- 法术棱镜 ['item_spell_prism'] = 69, -- 法术棱镜
['item_the_leveller'] = 61, -- 平世剑 -- ['item_the_leveller'] = 61, -- 平世剑
['item_timeless_relic'] = 59, -- 永恒遗物 ['item_timeless_relic'] = 59, -- 永恒遗物
['item_trickster_cloak'] = 62, ['item_trickster_cloak'] = 62,
['item_stormcrafter'] = 68, ['item_stormcrafter'] = 68,
['item_penta_edged_sword'] = 57, ['item_penta_edged_sword'] = 57,
['item_heavy_blade'] = 55,
['item_ascetic_cap'] = 55,
['item_havoc_hammer'] = 55,
['item_apex'] = 72, -- 极品 ['item_apex'] = 72, -- 极品
['item_ballista'] = 36.5, -- 弩炮 ['item_ballista'] = 76.5, -- 弩炮
['item_demonicon'] = 73, ['item_demonicon'] = 73,
['item_desolator_2'] = 75, ['item_desolator_2'] = 75,
['item_ex_machina'] = 71, ['item_ex_machina'] = 71,
...@@ -505,9 +517,9 @@ local tNeutralItemLevelList = { ...@@ -505,9 +517,9 @@ local tNeutralItemLevelList = {
['item_mirror_shield'] = 77, ['item_mirror_shield'] = 77,
['item_pirate_hat'] = 74, ['item_pirate_hat'] = 74,
['item_seer_stone'] = 40, ['item_seer_stone'] = 40,
['item_book_of_shadows'] = 49, ['item_book_of_shadows'] = 49,
['item_giants_ring'] = 70, ['item_giants_ring'] = 70,
['item_force_field'] = 70,
} }
...@@ -900,8 +912,6 @@ Item['item_sven_outfit'] = { 'item_tango', 'item_flask', 'item_quelling_blade ...@@ -900,8 +912,6 @@ Item['item_sven_outfit'] = { 'item_tango', 'item_flask', 'item_quelling_blade
Item['item_bristleback_outfit'] = { 'item_tango', 'item_flask', 'item_quelling_blade', 'item_double_branches', 'item_circlet', 'item_magic_stick', 'item_gauntlets', 'item_recipe_bracer', 'item_flask', 'item_recipe_magic_wand', 'item_power_treads_str' } Item['item_bristleback_outfit'] = { 'item_tango', 'item_flask', 'item_quelling_blade', 'item_double_branches', 'item_circlet', 'item_magic_stick', 'item_gauntlets', 'item_recipe_bracer', 'item_flask', 'item_recipe_magic_wand', 'item_power_treads_str' }
Item['item_centaur_outfit'] = { 'item_tango', 'item_flask', 'item_quelling_blade', 'item_double_branches', 'item_circlet', 'item_magic_stick', 'item_gauntlets', 'item_recipe_bracer', 'item_flask', 'item_recipe_magic_wand', 'item_tranquil_boots' }
---------------------------------------------------------------------- ----------------------------------------------------------------------
......
...@@ -111,12 +111,9 @@ function X.IsMinionWithNoSkill(unit_name) ...@@ -111,12 +111,9 @@ function X.IsMinionWithNoSkill(unit_name)
or unit_name == "npc_dota_neutral_kobold_tunneler" or unit_name == "npc_dota_neutral_kobold_tunneler"
or unit_name == "npc_dota_neutral_kobold_taskmaster" or unit_name == "npc_dota_neutral_kobold_taskmaster"
or unit_name == "npc_dota_neutral_centaur_outrunner" or unit_name == "npc_dota_neutral_centaur_outrunner"
or unit_name == "npc_dota_neutral_fel_beast"
or unit_name == "npc_dota_neutral_polar_furbolg_champion" or unit_name == "npc_dota_neutral_polar_furbolg_champion"
or unit_name == "npc_dota_neutral_ogre_mauler"
or unit_name == "npc_dota_neutral_giant_wolf" or unit_name == "npc_dota_neutral_giant_wolf"
or unit_name == "npc_dota_neutral_alpha_wolf" or unit_name == "npc_dota_neutral_alpha_wolf"
or unit_name == "npc_dota_neutral_wildkin"
or unit_name == "npc_dota_neutral_jungle_stalker" or unit_name == "npc_dota_neutral_jungle_stalker"
or unit_name == "npc_dota_neutral_elder_jungle_stalker" or unit_name == "npc_dota_neutral_elder_jungle_stalker"
or unit_name == "npc_dota_neutral_prowler_acolyte" or unit_name == "npc_dota_neutral_prowler_acolyte"
...@@ -126,9 +123,7 @@ function X.IsMinionWithNoSkill(unit_name) ...@@ -126,9 +123,7 @@ function X.IsMinionWithNoSkill(unit_name)
or unit_name == "npc_dota_neutral_gnoll_assassin" or unit_name == "npc_dota_neutral_gnoll_assassin"
or unit_name == "npc_dota_neutral_ghost" or unit_name == "npc_dota_neutral_ghost"
or unit_name == "npc_dota_wraith_ghost" or unit_name == "npc_dota_wraith_ghost"
or unit_name == "npc_dota_neutral_dark_troll"
or unit_name == "npc_dota_neutral_forest_troll_berserker" or unit_name == "npc_dota_neutral_forest_troll_berserker"
or unit_name == "npc_dota_neutral_harpy_scout"
or unit_name == "npc_dota_neutral_black_drake" or unit_name == "npc_dota_neutral_black_drake"
or unit_name == "npc_dota_dark_troll_warlord_skeleton_warrior" or unit_name == "npc_dota_dark_troll_warlord_skeleton_warrior"
or unit_name == "npc_dota_necronomicon_warrior_1" or unit_name == "npc_dota_necronomicon_warrior_1"
...@@ -158,7 +153,10 @@ local independent = { ...@@ -158,7 +153,10 @@ local independent = {
"npc_dota_brewmaster_storm_3", "npc_dota_brewmaster_storm_3",
"npc_dota_brewmaster_fire_1", "npc_dota_brewmaster_fire_1",
"npc_dota_brewmaster_fire_2", "npc_dota_brewmaster_fire_2",
"npc_dota_brewmaster_fire_3" "npc_dota_brewmaster_fire_3",
"npc_dota_brewmaster_void_1",
"npc_dota_brewmaster_void_2",
"npc_dota_brewmaster_void_3"
} }
function X.IsValidUnit(unit) function X.IsValidUnit(unit)
...@@ -559,6 +557,13 @@ end ...@@ -559,6 +557,13 @@ end
-----------MINION WITH SKILLS -----------MINION WITH SKILLS
function X.IsMinionWithSkill(unit_name) function X.IsMinionWithSkill(unit_name)
return unit_name == "npc_dota_neutral_centaur_khan" return unit_name == "npc_dota_neutral_centaur_khan"
or unit_name == "npc_dota_neutral_fel_beast"
or unit_name == "npc_dota_neutral_warpine_raider"
or unit_name == "npc_dota_neutral_ogre_mauler"
or unit_name == "npc_dota_neutral_wildkin"
or unit_name == "npc_dota_neutral_ice_shaman"
or unit_name == "npc_dota_neutral_dark_troll"
or unit_name == "npc_dota_neutral_harpy_scout"
or unit_name == "npc_dota_neutral_polar_furbolg_ursa_warrior" or unit_name == "npc_dota_neutral_polar_furbolg_ursa_warrior"
or unit_name == "npc_dota_neutral_mud_golem" or unit_name == "npc_dota_neutral_mud_golem"
or unit_name == "npc_dota_neutral_mud_golem_split" or unit_name == "npc_dota_neutral_mud_golem_split"
......
...@@ -670,9 +670,9 @@ local function ItemUsageComplement() ...@@ -670,9 +670,9 @@ local function ItemUsageComplement()
botTarget = J.GetProperTarget( bot ) botTarget = J.GetProperTarget( bot )
nMode = bot:GetActiveMode() nMode = bot:GetActiveMode()
local aether = J.IsItemAvailable( "item_aether_lens" )
if aether ~= nil then aetherRange = 250 else aetherRange = 0 end aetherRange = J.GetBonusCastRange( bot )
local nItemSlot = { 5, 4, 3, 2, 1, 0, 15, 16 } local nItemSlot = { 5, 4, 3, 2, 1, 0, 15, 16 }
for _, nSlot in pairs( nItemSlot ) for _, nSlot in pairs( nItemSlot )
......
...@@ -233,6 +233,7 @@ local sHasDevelopmentHeroList = { ...@@ -233,6 +233,7 @@ local sHasDevelopmentHeroList = {
"npc_dota_hero_mirana", "npc_dota_hero_mirana",
"npc_dota_hero_muerta", "npc_dota_hero_muerta",
"npc_dota_hero_visage", "npc_dota_hero_visage",
'npc_dota_hero_venomancer',
} }
...@@ -248,6 +249,7 @@ local sFirstList = { ...@@ -248,6 +249,7 @@ local sFirstList = {
"npc_dota_hero_death_prophet", "npc_dota_hero_death_prophet",
"npc_dota_hero_lion", "npc_dota_hero_lion",
"npc_dota_hero_dazzle", "npc_dota_hero_dazzle",
'npc_dota_hero_venomancer',
-- "npc_dota_hero_windrunner", -- "npc_dota_hero_windrunner",
...@@ -375,6 +377,7 @@ local sMageList = { ...@@ -375,6 +377,7 @@ local sMageList = {
-- "npc_dota_hero_windrunner", -- "npc_dota_hero_windrunner",
"npc_dota_hero_queenofpain", "npc_dota_hero_queenofpain",
"npc_dota_hero_disruptor", "npc_dota_hero_disruptor",
'npc_dota_hero_venomancer',
} }
...@@ -460,6 +463,7 @@ local sMidList = { ...@@ -460,6 +463,7 @@ local sMidList = {
"npc_dota_hero_sniper", "npc_dota_hero_sniper",
"npc_dota_hero_viper", "npc_dota_hero_viper",
"npc_dota_hero_muerta", "npc_dota_hero_muerta",
'npc_dota_hero_venomancer',
} }
......
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