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
688807e9
Commit
688807e9
authored
Mar 22, 2023
by
JoyJ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix underlord and life stealer
parent
7d2982ba
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
35 deletions
+31
-35
BotLib/hero_abyssal_underlord.lua
BotLib/hero_abyssal_underlord.lua
+24
-32
BotLib/hero_life_stealer.lua
BotLib/hero_life_stealer.lua
+7
-3
No files found.
BotLib/hero_abyssal_underlord.lua
View file @
688807e9
...
...
@@ -102,6 +102,9 @@ local castWDesire, castWLocation
local
castEDesire
,
castETarget
local
castRDesire
,
castRLocation
local
lastWLocation
=
nil
local
lastWTime
=
0
local
nKeepMana
,
nMP
,
nHP
,
nLV
,
hEnemyList
,
hAllyList
,
botTarget
,
sMotive
local
aetherRange
=
0
...
...
@@ -142,6 +145,10 @@ function X.SkillsComplement()
J
.
SetQueuePtToINT
(
bot
,
true
)
bot
:
ActionQueue_UseAbilityOnLocation
(
abilityW
,
castWLocation
)
lastWLocation
=
castWLocation
lastWTime
=
DotaTime
()
return
end
...
...
@@ -157,6 +164,15 @@ function X.SkillsComplement()
return
end
if
lastWLocation
~=
nil
and
DotaTime
()
-
lastWTime
>=
1
.
5
then
local
itemGungir
=
J
.
IsItemAvailable
(
"item_gungir"
)
if
itemGungir
and
itemGungir
:
IsFullyCastable
()
then
bot
:
ActionQueue_UseAbilityOnLocation
(
itemGungir
,
lastWLocation
)
end
lastWTime
=
0
lastWLocation
=
nil
end
end
function
X
.
ConsiderQ
()
...
...
@@ -447,7 +463,7 @@ function X.ConsiderR()
if
botAmount
.
distance
>
nMinTPDistance
or
botAmount
.
amount
<
laneFront
/
5
then
tpLoc
=
X
.
GetDefendTPLocation
(
nDefendLane
)
tpLoc
=
GetLaneFrontLocation
(
GetTeam
(),
nDefendLane
,
-
950
)
end
if
tpLoc
~=
nil
...
...
@@ -473,7 +489,7 @@ function X.ConsiderR()
if
botAmount
.
distance
>
nMinTPDistance
or
botAmount
.
amount
<
laneFront
/
5
then
tpLoc
=
X
.
GetPushTPLocation
(
nPushLane
)
tpLoc
=
GetLaneFrontLocation
(
GetTeam
(),
nPushLane
,
-
950
)
end
if
tpLoc
~=
nil
...
...
@@ -496,10 +512,8 @@ function X.ConsiderR()
and
target
:
IsHero
()
and
GetUnitToUnitDistance
(
bot
,
target
)
>
nMinTPDistance
then
local
bestTpLoc
=
J
.
GetNearbyLocationToTp
(
target
:
GetLocation
()
)
if
bestTpLoc
~=
nil
and
GetUnitToLocationDistance
(
bot
,
bestTpLoc
)
>
nMinTPDistance
-
800
then
local
bestTpLoc
=
target
:
GetLocation
()
if
GetUnitToLocationDistance
(
bot
,
bestTpLoc
)
>
nMinTPDistance
-
800
then
tpLoc
=
bestTpLoc
end
end
...
...
@@ -538,12 +552,11 @@ function X.ConsiderR()
end
--第二种情况:有多个敌人但可以
卡视野
TP
--第二种情况:有多个敌人但可以
强行
TP
local
nAttackAllyList
=
bot
:
GetNearbyHeroes
(
1500
,
false
,
BOT_MODE_ATTACK
)
if
botHP
<
(
0
.
15
+
0
.
24
*
nEnemyCount
)
and
#
nAttackAllyList
==
0
and
bot
:
WasRecentlyDamagedByAnyHero
(
6
.
0
)
and
X
.
CanJuke
()
and
nEnemyCount
<=
(
botHP
<
0
.
4
and
2
or
3
)
and
nAllyCount
<=
2
and
itemFlask
==
nil
...
...
@@ -555,7 +568,7 @@ function X.ConsiderR()
and
bot
:
DistanceFromFountain
()
>
nMinTPDistance
-
600
then
tpLoc
=
J
.
GetTeamFountain
()
sCastMotive
=
'R-撤退-尝试
卡视野
跑路'
sCastMotive
=
'R-撤退-尝试
强行
跑路'
return
BOT_ACTION_DESIRE_HIGH
,
tpLoc
,
sCastMotive
end
...
...
@@ -564,7 +577,6 @@ function X.ConsiderR()
if
(
botHP
<
0
.
34
or
botHP
+
botMP
<
0
.
43
)
and
#
nAttackAllyList
==
0
and
bot
:
GetLevel
()
>=
9
and
X
.
CanJuke
()
and
nEnemyCount
<=
1
and
nAllyCount
<=
2
and
itemFlask
==
nil
...
...
@@ -590,7 +602,6 @@ function X.ConsiderR()
--TP发育带线
if
bot
:
GetLevel
()
>=
10
and
nMode
~=
BOT_MODE_ROSHAN
and
not
X
.
IsBaseTowerDestroyed
()
and
J
.
GetAllyCount
(
bot
,
1600
)
<=
2
and
J
.
Role
.
ShouldTpToFarm
()
and
not
J
.
Role
.
IsAllyHaveAegis
()
...
...
@@ -627,7 +638,6 @@ function X.ConsiderR()
and
nMode
~=
BOT_MODE_ROSHAN
and
nMode
~=
BOT_MODE_ATTACK
and
(
botTarget
==
nil
or
not
botTarget
:
IsHero
()
)
--and J.GetAllyCount( bot, 1600 ) <= 3 --守护遗迹bug
then
local
nNearEnemyList
=
bot
:
GetNearbyHeroes
(
1400
,
true
,
BOT_MODE_NONE
)
local
nTeamFightLocation
=
J
.
GetTeamFightLocation
(
bot
)
...
...
@@ -690,8 +700,7 @@ function X.ConsiderR()
and
bot
:
GetUnitName
()
~=
'npc_dota_hero_slark'
and
not
bot
:
HasModifier
(
"modifier_arc_warden_tempest_double"
)
then
if
X
.
CanJuke
()
and
bot
:
DistanceFromFountain
()
>
nMinTPDistance
+
200
if
bot
:
DistanceFromFountain
()
>
nMinTPDistance
+
200
and
nEnemyCount
<=
1
and
nAllyCount
<=
1
and
J
.
GetProperTarget
(
bot
)
==
nil
and
itemFlask
==
nil
...
...
@@ -721,8 +730,7 @@ function X.ConsiderR()
and
J
.
GetModifierTime
(
bot
,
"modifier_bloodseeker_rupture"
)
>=
3
.
1
then
local
nAllyCount
=
bot
:
GetNearbyHeroes
(
1000
,
false
,
BOT_MODE_NONE
)
if
#
nAllyCount
<=
1
and
X
.
CanJuke
()
then
if
#
nAllyCount
<=
1
then
tpLoc
=
J
.
GetTeamFountain
()
end
...
...
@@ -734,22 +742,6 @@ function X.ConsiderR()
end
end
--处理特殊情况一
if
X
.
IsFarmingAlways
(
bot
)
then
tpLoc
=
GetAncient
(
GetTeam
()
):
GetLocation
()
sCastMotive
=
'R-停止刷钱'
return
BOT_ACTION_DESIRE_HIGH
,
tpLoc
,
sCastMotive
end
--处理特殊情况二
if
J
.
IsStuck
(
bot
)
--and nEnemyCount == 0
then
tpLoc
=
GetAncient
(
GetTeam
()
):
GetLocation
()
sCastMotive
=
'R-尝试解决卡住问题'
return
BOT_ACTION_DESIRE_HIGH
,
tpLoc
,
sCastMotive
end
if
J
.
Role
.
ShouldTpToDefend
()
and
bot
:
DistanceFromFountain
()
>
3800
then
...
...
BotLib/hero_life_stealer.lua
View file @
688807e9
...
...
@@ -161,7 +161,7 @@ function X.SkillsComplement()
end
end
function
ConsiderQ
()
function
X
.
ConsiderQ
()
if
not
abilityQ
:
IsFullyCastable
()
then
return
BOT_ACTION_DESIRE_NONE
end
...
...
@@ -179,8 +179,7 @@ function ConsiderQ()
and
not
bot
:
HasModifier
(
'modifier_antimage_spell_shield'
)
and
(
J
.
IsGoingOnSomeone
(
bot
)
or
J
.
IsRetreating
(
bot
)
)
then
if
bot
:
IsRooted
()
then
if
bot
:
IsRooted
()
then
sCastMotive
=
'解缠绕'
return
BOT_ACTION_DESIRE_HIGH
,
sCastMotive
end
...
...
@@ -209,6 +208,11 @@ function ConsiderQ()
return
BOT_ACTION_DESIRE_HIGH
,
sCastMotive
end
if
J
.
IsRetreating
(
bot
)
and
bot
:
GetActiveMode
()
~=
BOT_MODE_FARM
then
sCastMotive
=
'撤退魔免'
return
BOT_ACTION_DESIRE_HIGH
,
sCastMotive
end
end
return
BOT_ACTION_DESIRE_NONE
...
...
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