Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
dota2-ai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
JoyJ
dota2-ai
Commits
87fc5eb5
Commit
87fc5eb5
authored
Mar 05, 2023
by
JoyJ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update centaur, abaddon, abyssalunderload, add life stealer
parent
11026a03
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
423 additions
and
58 deletions
+423
-58
BotLib/hero_abaddon.lua
BotLib/hero_abaddon.lua
+25
-32
BotLib/hero_abyssal_underlord.lua
BotLib/hero_abyssal_underlord.lua
+10
-22
BotLib/hero_centaur.lua
BotLib/hero_centaur.lua
+2
-2
BotLib/hero_life_stealer.lua
BotLib/hero_life_stealer.lua
+381
-0
hero_selection.lua
hero_selection.lua
+5
-2
No files found.
BotLib/hero_abaddon.lua
View file @
87fc5eb5
...
@@ -16,7 +16,7 @@ local tTalentTreeList = {
...
@@ -16,7 +16,7 @@ local tTalentTreeList = {
}
}
local
tAllAbilityBuildList
=
{
local
tAllAbilityBuildList
=
{
{
2
,
1
,
1
,
3
,
2
,
6
,
1
,
1
,
2
,
2
,
6
,
3
,
3
,
3
,
6
},
{
2
,
3
,
2
,
1
,
2
,
6
,
2
,
1
,
1
,
1
,
6
,
3
,
3
,
3
,
6
},
}
}
local
nAbilityBuildList
=
J
.
Skill
.
GetRandomBuild
(
tAllAbilityBuildList
)
local
nAbilityBuildList
=
J
.
Skill
.
GetRandomBuild
(
tAllAbilityBuildList
)
...
@@ -27,33 +27,35 @@ local tOutFitList = {}
...
@@ -27,33 +27,35 @@ local tOutFitList = {}
tOutFitList
[
'outfit_priest'
]
=
{
tOutFitList
[
'outfit_priest'
]
=
{
"item_bristleback_outfit"
,
"item_mage_outfit"
,
"item_urn_of_shadows"
,
-- "item_glimmer_cape",
"item_glimmer_cape"
,
-- "item_rod_of_atos",
"item_mekansm"
,
"item_ultimate_scepter"
,
"item_travel_boots"
,
"item_aghanims_shard"
,
"item_aghanims_shard"
,
"item_sphere"
,
"item_holy_locket"
,
"item_ultimate_scepter_2"
,
"item_lotus_orb"
,
"item_radiance"
,
"item_ultimate_scepter"
,
"item_travel_boots_2"
,
"item_cyclone"
,
"item_sheepstick"
,
"item_wind_waker"
,
"item_moon_shard"
,
}
}
tOutFitList
[
'outfit_tank'
]
=
{
tOutFitList
[
'outfit_tank'
]
=
{
"item_bristleback_outfit"
,
"item_priest_outfit"
,
"item_sange_and_yasha"
,
"item_urn_of_shadows"
,
"item_mekansm"
,
"item_glimmer_cape"
,
"item_aghanims_shard"
,
"item_aghanims_shard"
,
"item_solar_cres
t"
,
"item_holy_locke
t"
,
"item_
travel_boot
s"
,
"item_
guardian_greave
s"
,
"item_
black_king_bar
"
,
"item_
spirit_vessel
"
,
"item_
assaul
t"
,
"item_
wraith_pac
t"
,
"item_
ultimate_scepter
"
,
"item_
shivas_guard
"
,
"item_radiance"
,
-- "item_sheepstick",
"item_
ultimate_scepter_2
"
,
"item_
moon_shard
"
,
"item_travel_boots_2"
,
}
}
tOutFitList
[
'outfit_mid'
]
=
tOutFitList
[
'outfit_tank'
]
tOutFitList
[
'outfit_mid'
]
=
tOutFitList
[
'outfit_tank'
]
...
@@ -65,17 +67,8 @@ tOutFitList['outfit_mage'] = tOutFitList['outfit_priest']
...
@@ -65,17 +67,8 @@ tOutFitList['outfit_mage'] = tOutFitList['outfit_priest']
X
[
'sBuyList'
]
=
tOutFitList
[
sOutfitType
]
X
[
'sBuyList'
]
=
tOutFitList
[
sOutfitType
]
X
[
'sSellList'
]
=
{
X
[
'sSellList'
]
=
{
"item_power_treads"
,
"item_ultimate_scepter"
,
"item_quelling_blade"
,
"item_magic_wand"
,
"item_aether_lens"
,
"item_bracer"
,
"item_heart"
,
"item_glimmer_cape"
,
"item_travel_boots"
,
"item_power_treads"
,
}
}
if
J
.
Role
.
IsPvNMode
()
or
J
.
Role
.
IsAllShadow
()
then
X
[
'sBuyList'
],
X
[
'sSellList'
]
=
{
'PvN_mage'
},
{}
end
if
J
.
Role
.
IsPvNMode
()
or
J
.
Role
.
IsAllShadow
()
then
X
[
'sBuyList'
],
X
[
'sSellList'
]
=
{
'PvN_mage'
},
{}
end
...
...
BotLib/hero_abyssal_underlord.lua
View file @
87fc5eb5
...
@@ -29,31 +29,28 @@ tOutFitList['outfit_priest'] = {
...
@@ -29,31 +29,28 @@ tOutFitList['outfit_priest'] = {
"item_bristleback_outfit"
,
"item_bristleback_outfit"
,
"item_aghanims_shard"
,
"item_aghanims_shard"
,
"item_aether_lens"
,
"item_rod_of_atos"
,
"item_gungir"
,
"item_urn_of_shadows"
,
"item_urn_of_shadows"
,
"item_mekansm"
,
"item_glimmer_cape"
,
"item_octarine_core"
,
"item_travel_boots"
,
"item_travel_boots"
,
"item_sphere"
,
"item_sphere"
,
"item_radiance"
,
"item_radiance"
,
"item_travel_boots_2"
,
"item_travel_boots_2"
,
"item_moon_shard"
,
}
}
tOutFitList
[
'outfit_tank'
]
=
{
tOutFitList
[
'outfit_tank'
]
=
{
"item_bristleback_outfit"
,
"item_bristleback_outfit"
,
"item_aghanims_shard"
,
"item_aghanims_shard"
,
"item_pipe"
,
"item_glimmer_cape"
,
"item_glimmer_cape"
,
"item_aether_lens"
,
"item_rod_of_atos"
,
"item_rod_of_atos"
,
"item_octarine_core"
,
"item_gungir"
,
"item_gungir"
,
"item_travel_boots"
,
"item_travel_boots"
,
"item_heart"
,
"item_heart"
,
"item_radiance"
,
"item_radiance"
,
"item_ultimate_scepter_2"
,
"item_ultimate_scepter_2"
,
"item_moon_shard"
,
"item_travel_boots_2"
,
"item_travel_boots_2"
,
}
}
...
@@ -67,23 +64,14 @@ tOutFitList['outfit_mage'] = tOutFitList['outfit_priest']
...
@@ -67,23 +64,14 @@ tOutFitList['outfit_mage'] = tOutFitList['outfit_priest']
X
[
'sBuyList'
]
=
tOutFitList
[
sOutfitType
]
X
[
'sBuyList'
]
=
tOutFitList
[
sOutfitType
]
X
[
'sSellList'
]
=
{
X
[
'sSellList'
]
=
{
"item_
power_tread
s"
,
"item_
rod_of_ato
s"
,
"item_
quelling_blade
"
,
"item_
gungir
"
,
"item_
glimmer_cape
"
,
"item_
veil_of_discord
"
,
"item_magic_wand"
,
"item_magic_wand"
,
"item_aether_lens"
,
"item_ultimate_scepter"
,
"item_bracer"
,
"item_magic_wand"
,
"item_heart"
,
"item_glimmer_cape"
,
"item_octarine_core"
,
"item_glimmer_cape"
,
"item_travel_boots"
,
"item_power_treads"
,
}
}
if
J
.
Role
.
IsPvNMode
()
or
J
.
Role
.
IsAllShadow
()
then
X
[
'sBuyList'
],
X
[
'sSellList'
]
=
{
'PvN_mage'
},
{}
end
if
J
.
Role
.
IsPvNMode
()
or
J
.
Role
.
IsAllShadow
()
then
X
[
'sBuyList'
],
X
[
'sSellList'
]
=
{
'PvN_mage'
},
{}
end
...
...
BotLib/hero_centaur.lua
View file @
87fc5eb5
...
@@ -16,7 +16,7 @@ local tTalentTreeList = {
...
@@ -16,7 +16,7 @@ local tTalentTreeList = {
}
}
local
tAllAbilityBuildList
=
{
local
tAllAbilityBuildList
=
{
{
1
,
2
,
2
,
3
,
2
,
6
,
2
,
1
,
3
,
1
,
6
,
3
,
1
,
3
,
6
},
{
1
,
2
,
3
,
3
,
3
,
6
,
3
,
1
,
1
,
1
,
2
,
6
,
2
,
2
,
},
}
}
local
nAbilityBuildList
=
J
.
Skill
.
GetRandomBuild
(
tAllAbilityBuildList
)
local
nAbilityBuildList
=
J
.
Skill
.
GetRandomBuild
(
tAllAbilityBuildList
)
...
@@ -29,9 +29,9 @@ tOutFitList['outfit_tank'] = {
...
@@ -29,9 +29,9 @@ tOutFitList['outfit_tank'] = {
"item_bristleback_outfit"
,
"item_bristleback_outfit"
,
"item_vanguard"
,
"item_vanguard"
,
"item_aghanims_shard"
,
"item_hood_of_defiance"
,
"item_hood_of_defiance"
,
"item_blink"
,
"item_blink"
,
"item_aghanims_shard"
,
"item_crimson_guard"
,
"item_crimson_guard"
,
"item_pipe"
,
"item_pipe"
,
"item_heart"
,
"item_heart"
,
...
...
BotLib/hero_life_stealer.lua
0 → 100644
View file @
87fc5eb5
local
X
=
{}
local
bDebugMode
=
true
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
=
{
[
't25'
]
=
{
10
,
0
},
[
't20'
]
=
{
10
,
0
},
[
't15'
]
=
{
0
,
10
},
[
't10'
]
=
{
10
,
0
},
}
local
tAllAbilityBuildList
=
{
{
2
,
3
,
1
,
2
,
3
,
6
,
3
,
2
,
2
,
3
,
6
,
1
,
1
,
1
,
6
},
}
local
nAbilityBuildList
=
J
.
Skill
.
GetRandomBuild
(
tAllAbilityBuildList
)
local
nTalentBuildList
=
J
.
Skill
.
GetTalentBuild
(
tTalentTreeList
)
local
tOutFitList
=
{}
tOutFitList
[
'outfit_carry'
]
=
{
"item_bristleback_outfit"
,
"item_armlet"
,
"item_desolator"
,
"item_aghanims_shard"
,
"item_heavens_halberd"
,
"item_heart"
,
"item_travel_boots"
,
"item_abyssal_blade"
,
"item_skadi"
,
"item_moon_shard"
,
"item_travel_boots_2"
,
}
tOutFitList
[
'outfit_mid'
]
=
tOutFitList
[
'outfit_carry'
]
tOutFitList
[
'outfit_priest'
]
=
tOutFitList
[
'outfit_carry'
]
tOutFitList
[
'outfit_mage'
]
=
tOutFitList
[
'outfit_carry'
]
tOutFitList
[
'outfit_tank'
]
=
tOutFitList
[
'outfit_carry'
]
X
[
'sBuyList'
]
=
tOutFitList
[
sOutfitType
]
X
[
'sSellList'
]
=
{
"item_phase_boots"
,
"item_quelling_blade"
,
'item_travel_boots'
,
'item_armlet'
,
"item_assault"
,
"item_magic_wand"
,
"item_travel_boots"
,
"item_magic_wand"
,
"item_assault"
,
"item_ancient_janggo"
,
}
if
J
.
Role
.
IsPvNMode
()
or
J
.
Role
.
IsAllShadow
()
then
X
[
'sBuyList'
],
X
[
'sSellList'
]
=
{
'PvN_tank'
},
{}
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'
]
=
true
X
[
'bDeafaultItem'
]
=
true
function
X
.
MinionThink
(
hMinionUnit
)
if
Minion
.
IsValidUnit
(
hMinionUnit
)
then
Minion
.
IllusionThink
(
hMinionUnit
)
end
end
local
abilityQ
=
bot
:
GetAbilityByName
(
sAbilityList
[
1
]
)
local
abilityD
=
bot
:
GetAbilityByName
(
sAbilityList
[
4
]
)
local
abilityF
=
bot
:
GetAbilityByName
(
'life_stealer_consume'
)
local
abilityR
=
bot
:
GetAbilityByName
(
sAbilityList
[
6
]
)
local
castQDesire
local
castDDesire
,
castDTarget
local
castRDesire
local
nKeepMana
,
nMP
,
nHP
,
nLV
,
hEnemyList
,
hAllyList
,
botTarget
,
sMotive
local
aetherRange
=
0
function
X
.
SkillsComplement
()
if
J
.
CanNotUseAbility
(
bot
)
or
bot
:
IsInvisible
()
then
return
end
nKeepMana
=
150
aetherRange
=
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
)
local
aether
=
J
.
IsItemAvailable
(
"item_aether_lens"
)
if
aether
~=
nil
then
aetherRange
=
250
end
castQDesire
,
_
,
_
,
sMotive
=
X
.
ConsiderQ
()
if
(
castQDesire
>
0
)
then
J
.
SetReportMotive
(
bDebugMode
,
sMotive
)
J
.
SetQueuePtToINT
(
bot
,
true
)
bot
:
ActionQueue_UseAbility
(
abilityQ
)
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
castFDesire
,
castFTarget
,
sMotive
=
X
.
ConsiderF
()
if
(
castFDesire
>
0
)
then
J
.
SetReportMotive
(
bDebugMode
,
sMotive
)
J
.
SetQueuePtToINT
(
bot
,
false
)
bot
:
ActionQueue_UseAbility
(
abilityF
)
return
end
castRDesire
,
castRTarget
,
sMotive
=
X
.
ConsiderR
()
if
(
castRDesire
>
0
)
then
J
.
SetReportMotive
(
bDebugMode
,
sMotive
)
J
.
SetQueuePtToINT
(
bot
,
true
)
bot
:
ActionQueue_UseAbilityOnEntity
(
abilityR
,
castRTarget
)
return
end
end
function
ConsiderQ
()
if
not
abilityQ
:
IsFullyCastable
()
then
return
BOT_ACTION_DESIRE_NONE
end
local
nCastRange
=
1300
local
sCastType
=
'none'
local
hEffectTarget
=
nil
local
sCastMotive
=
nil
local
nInRangeEnmyList
=
bot
:
GetNearbyHeroes
(
nCastRange
,
true
,
BOT_MODE_NONE
)
if
#
nInRangeEnmyList
>
0
and
not
bot
:
IsMagicImmune
()
and
not
bot
:
IsInvulnerable
()
and
not
bot
:
HasModifier
(
'modifier_item_lotus_orb_active'
)
and
not
bot
:
HasModifier
(
'modifier_antimage_spell_shield'
)
and
(
J
.
IsGoingOnSomeone
(
bot
)
or
J
.
IsRetreating
(
bot
)
)
then
if
bot
:
IsRooted
()
then
sCastMotive
=
'解缠绕'
return
BOT_ACTION_DESIRE_HIGH
,
sCastMotive
end
if
J
.
IsNotAttackProjectileIncoming
(
bot
,
350
)
then
sCastMotive
=
'防御弹道'
return
BOT_ACTION_DESIRE_HIGH
,
sCastMotive
end
if
J
.
IsWillBeCastUnitTargetSpell
(
bot
,
nCastRange
)
then
sCastMotive
=
'防御指向技能'
return
BOT_ACTION_DESIRE_HIGH
,
sCastMotive
end
if
J
.
IsWillBeCastPointSpell
(
bot
,
nCastRange
)
then
sCastMotive
=
'防御地点技能'
return
BOT_ACTION_DESIRE_HIGH
,
sCastMotive
end
if
J
.
GetEnemyCount
(
bot
,
800
)
>=
3
then
sCastMotive
=
'先开BKB切入'
return
BOT_ACTION_DESIRE_HIGH
,
sCastMotive
end
end
return
BOT_ACTION_DESIRE_NONE
end
function
X
.
ConsiderF
()
if
not
abilityF
or
not
abilityF
:
IsFullyCastable
()
or
abilityF
:
IsHidden
()
then
return
BOT_ACTION_DESIRE_NONE
end
local
hp
=
0
.
5
+
bot
:
GetNearbyHeroes
(
1200
,
true
,
BOT_MODE_NONE
)
*
0
.
05
if
J
.
GetHP
(
bot
)
<
hp
then
return
BOT_ACTION_DESIRE_NONE
end
return
BOT_ACTION_DESIRE_HIGH
end
function
X
.
ConsiderD
()
if
not
abilityD
:
IsFullyCastable
()
or
abilityD
:
IsHidden
()
then
return
BOT_ACTION_DESIRE_NONE
end
local
nCastRange
=
abilityD
:
GetCastRange
()
local
nCastPoint
=
abilityD
:
GetCastPoint
()
local
nSkillLV
=
abilityD
:
GetLevel
()
local
nEnemysHeroesInCastRange
=
bot
:
GetNearbyHeroes
(
nCastRange
+
99
,
true
,
BOT_MODE_NONE
)
local
nEnemysHeroesInView
=
bot
:
GetNearbyHeroes
(
880
,
true
,
BOT_MODE_NONE
)
--团战
if
J
.
IsInTeamFight
(
bot
,
1200
)
and
DotaTime
()
>
4
*
60
then
local
npcMostDangerousEnemy
=
nil
local
nMostDangerousDamage
=
0
for
_
,
npcEnemy
in
pairs
(
nEnemysHeroesInCastRange
)
do
if
J
.
IsValid
(
npcEnemy
)
and
J
.
CanCastOnNonMagicImmune
(
npcEnemy
)
and
J
.
CanCastOnTargetAdvanced
(
npcEnemy
)
and
not
J
.
IsDisabled
(
npcEnemy
)
and
not
npcEnemy
:
IsDisarmed
()
then
local
npcEnemyDamage
=
npcEnemy
:
GetEstimatedDamageToTarget
(
false
,
bot
,
3
.
0
,
DAMAGE_TYPE_ALL
)
if
(
npcEnemyDamage
>
nMostDangerousDamage
)
then
nMostDangerousDamage
=
npcEnemyDamage
npcMostDangerousEnemy
=
npcEnemy
end
end
end
if
(
npcMostDangerousEnemy
~=
nil
)
then
return
BOT_ACTION_DESIRE_HIGH
,
npcMostDangerousEnemy
end
end
--常规
if
J
.
IsGoingOnSomeone
(
bot
)
then
local
target
=
J
.
GetProperTarget
(
bot
)
if
J
.
IsValidHero
(
target
)
and
J
.
CanCastOnNonMagicImmune
(
target
)
and
J
.
CanCastOnTargetAdvanced
(
target
)
and
J
.
IsInRange
(
target
,
bot
,
nCastRange
)
and
not
J
.
IsDisabled
(
target
)
and
not
target
:
IsDisarmed
()
then
return
BOT_ACTION_DESIRE_HIGH
,
target
end
end
--对线期间
if
J
.
IsRetreating
(
bot
)
then
if
J
.
IsValid
(
nEnemysHeroesInCastRange
[
1
]
)
and
J
.
CanCastOnNonMagicImmune
(
nEnemysHeroesInCastRange
[
1
]
)
and
J
.
CanCastOnTargetAdvanced
(
nEnemysHeroesInCastRange
[
1
]
)
and
not
J
.
IsDisabled
(
nEnemysHeroesInCastRange
[
1
]
)
and
not
nEnemysHeroesInCastRange
[
1
]:
IsDisarmed
()
and
GetUnitToUnitDistance
(
bot
,
nEnemysHeroesInCastRange
[
1
]
)
<=
nCastRange
-
60
then
return
BOT_ACTION_DESIRE_HIGH
,
nEnemysHeroesInCastRange
[
1
]
end
end
if
bot
:
GetActiveMode
()
==
BOT_MODE_ROSHAN
and
bot
:
GetMana
()
>
400
then
local
target
=
bot
:
GetAttackTarget
()
if
target
~=
nil
and
target
:
IsAlive
()
and
J
.
GetHP
(
target
)
>
0
.
2
and
not
J
.
IsDisabled
(
target
)
and
not
target
:
IsDisarmed
()
then
return
BOT_ACTION_DESIRE_LOW
,
target
end
end
return
BOT_ACTION_DESIRE_NONE
end
function
X
.
ConsiderR
()
if
not
abilityR
:
IsFullyCastable
()
then
return
0
end
local
nSkillLV
=
abilityR
:
GetLevel
()
local
nCastRange
=
abilityR
:
GetCastRange
()
+
aetherRange
+
32
local
nCastPoint
=
abilityR
:
GetCastPoint
()
local
nManaCost
=
abilityR
:
GetManaCost
()
local
nDamage
=
abilityR
:
GetAbilityDamage
()
local
nDamageType
=
DAMAGE_TYPE_MAGICAL
if
#
hEnemyList
==
0
then
nCastRange
=
1600
end
local
nEnemyCreepList
=
bot
:
GetNearbyCreeps
(
nCastRange
,
true
)
local
nBestCreep
=
nil
local
targetCreepBountyGoldMax
=
0
for
_
,
nCreep
in
pairs
(
nEnemyCreepList
)
do
if
J
.
IsValid
(
nCreep
)
and
not
nCreep
:
IsHero
()
and
not
nCreep
:
IsAncientCreep
()
and
not
nCreep
:
IsMagicImmune
()
and
nCreep
:
GetHealth
()
>
targetCreepBountyGoldMax
then
nBestCreep
=
nCreep
targetCreepBountyGoldMax
=
nCreep
:
GetHealth
()
end
end
if
nBestCreep
~=
nil
then
return
BOT_ACTION_DESIRE_HIGH
,
nBestCreep
,
"R-吃敌方兵:"
..
nBestCreep
:
GetUnitName
()
end
local
nAllyCreepList
=
bot
:
GetNearbyCreeps
(
nCastRange
,
false
)
for
_
,
nCreep
in
pairs
(
nAllyCreepList
)
do
if
J
.
IsValid
(
nCreep
)
and
not
nCreep
:
IsHero
()
and
not
nCreep
:
IsAncientCreep
()
and
not
nCreep
:
IsMagicImmune
()
and
nCreep
:
GetHealth
()
>
targetCreepBountyGoldMax
then
nBestCreep
=
nCreep
targetCreepBountyGoldMax
=
nCreep
:
GetHealth
()
end
end
if
nBestCreep
~=
nil
then
return
BOT_ACTION_DESIRE_HIGH
,
nBestCreep
,
"R-吃友方兵:"
..
nBestCreep
:
GetUnitName
()
end
return
BOT_ACTION_DESIRE_NONE
end
return
X
hero_selection.lua
View file @
87fc5eb5
...
@@ -175,6 +175,7 @@ local sHasDevelopmentHeroList = {
...
@@ -175,6 +175,7 @@ local sHasDevelopmentHeroList = {
"npc_dota_hero_abaddon"
,
"npc_dota_hero_abaddon"
,
"npc_dota_hero_abyssal_underlord"
,
"npc_dota_hero_abyssal_underlord"
,
"npc_dota_hero_alchemist"
,
"npc_dota_hero_alchemist"
,
"npc_dota_hero_life_stealer"
,
"npc_dota_hero_silencer"
,
"npc_dota_hero_silencer"
,
"npc_dota_hero_warlock"
,
"npc_dota_hero_warlock"
,
"npc_dota_hero_necrolyte"
,
"npc_dota_hero_necrolyte"
,
...
@@ -238,7 +239,6 @@ local sHasDevelopmentHeroList = {
...
@@ -238,7 +239,6 @@ local sHasDevelopmentHeroList = {
local
sFirstList
=
{
local
sFirstList
=
{
"npc_dota_hero_silencer"
,
"npc_dota_hero_silencer"
,
"npc_dota_hero_alchemist"
,
"npc_dota_hero_warlock"
,
"npc_dota_hero_warlock"
,
"npc_dota_hero_necrolyte"
,
"npc_dota_hero_necrolyte"
,
"npc_dota_hero_oracle"
,
"npc_dota_hero_oracle"
,
...
@@ -315,7 +315,8 @@ local sFifthList = {
...
@@ -315,7 +315,8 @@ local sFifthList = {
"npc_dota_hero_templar_assassin"
,
"npc_dota_hero_templar_assassin"
,
"npc_dota_hero_razor"
,
"npc_dota_hero_razor"
,
"npc_dota_hero_mirana"
,
"npc_dota_hero_mirana"
,
"npc_dota_hero_life_stealer"
,
"npc_dota_hero_alchemist"
,
}
}
---------------------------------------------------------
---------------------------------------------------------
...
@@ -407,6 +408,7 @@ local sCarryList = {
...
@@ -407,6 +408,7 @@ local sCarryList = {
"npc_dota_hero_juggernaut"
,
"npc_dota_hero_juggernaut"
,
"npc_dota_hero_mirana"
,
"npc_dota_hero_mirana"
,
"npc_dota_hero_naga_siren"
,
"npc_dota_hero_naga_siren"
,
"npc_dota_hero_life_stealer"
,
}
}
...
@@ -430,6 +432,7 @@ local sTankList = {
...
@@ -430,6 +432,7 @@ local sTankList = {
"npc_dota_hero_legion_commander"
,
"npc_dota_hero_legion_commander"
,
"npc_dota_hero_legion_commander"
,
"npc_dota_hero_legion_commander"
,
"npc_dota_hero_omniknight"
,
"npc_dota_hero_omniknight"
,
"npc_dota_hero_life_stealer"
,
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment