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
1e0b77f8
Commit
1e0b77f8
authored
Apr 18, 2023
by
JoyJ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes
parent
e12963ba
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
32 deletions
+30
-32
BotLib/hero_abyssal_underlord.lua
BotLib/hero_abyssal_underlord.lua
+16
-16
BotLib/hero_venomancer.lua
BotLib/hero_venomancer.lua
+2
-2
BotLib/hero_visage.lua
BotLib/hero_visage.lua
+1
-1
FunLib/aba_minion.lua
FunLib/aba_minion.lua
+10
-12
mode_team_roam_generic.lua
mode_team_roam_generic.lua
+1
-1
No files found.
BotLib/hero_abyssal_underlord.lua
View file @
1e0b77f8
...
@@ -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
--守塔
--守塔
...
...
BotLib/hero_venomancer.lua
View file @
1e0b77f8
...
@@ -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
)
...
...
BotLib/hero_visage.lua
View file @
1e0b77f8
...
@@ -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
...
...
FunLib/aba_minion.lua
View file @
1e0b77f8
...
@@ -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
.
99
99
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
()
...
...
mode_team_roam_generic.lua
View file @
1e0b77f8
...
@@ -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
()
...
...
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