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
bacd194c
Commit
bacd194c
authored
Mar 22, 2023
by
JoyJ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add disruptor
parent
688807e9
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
642 additions
and
10 deletions
+642
-10
BotLib/hero_abyssal_underlord.lua
BotLib/hero_abyssal_underlord.lua
+8
-2
BotLib/hero_alchemist.lua
BotLib/hero_alchemist.lua
+5
-3
BotLib/hero_disruptor.lua
BotLib/hero_disruptor.lua
+579
-0
FunLib/jmz_func.lua
FunLib/jmz_func.lua
+46
-0
hero_selection.lua
hero_selection.lua
+4
-5
No files found.
BotLib/hero_abyssal_underlord.lua
View file @
bacd194c
...
...
@@ -169,6 +169,10 @@ function X.SkillsComplement()
if
itemGungir
and
itemGungir
:
IsFullyCastable
()
then
bot
:
ActionQueue_UseAbilityOnLocation
(
itemGungir
,
lastWLocation
)
end
local
itemAtos
=
J
.
IsItemAvailable
(
"item_rod_of_atos"
)
if
itemAtos
and
itemAtos
:
IsFullyCastable
()
and
GetUnitToLocationDistance
(
bot
:
GetTarget
(),
lastWLocation
)
<
400
then
bot
:
ActionQueue_UseAbilityOnEntity
(
itemAtos
,
bot
:
GetTarget
()
)
end
lastWTime
=
0
lastWLocation
=
nil
end
...
...
@@ -211,12 +215,14 @@ function X.ConsiderQ()
end
end
--消耗,保持一定魔量
--消耗,保持一定魔量
;仅在兵线相持时消耗
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
return
BOT_ACTION_DESIRE_HIGH
,
nTargetLocation
,
'Q消耗'
end
end
--团战
if
J
.
IsInTeamFight
(
bot
,
1200
)
then
...
...
BotLib/hero_alchemist.lua
View file @
bacd194c
...
...
@@ -300,12 +300,14 @@ function X.ConsiderQ()
local
nTargetLocation
=
nil
--消耗,保持一定魔量
--消耗,保持一定魔量
;仅在兵线相持时消耗
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
return
BOT_ACTION_DESIRE_HIGH
,
nTargetLocation
,
'Q消耗'
end
end
--团战
if
J
.
IsInTeamFight
(
bot
,
1200
)
then
...
...
@@ -323,7 +325,7 @@ function X.ConsiderQ()
if
J
.
IsValidHero
(
botTarget
)
and
J
.
CanCastOnNonMagicImmune
(
botTarget
)
and
J
.
IsInRange
(
botTarget
,
bot
,
nCastRange
-
30
)
and
(
botTarget
:
GetCurrentMovementSpeed
()
<
240
or
botTarget
:
IsStunned
())
and
(
botTarget
:
GetCurrentMovementSpeed
()
<
240
or
botTarget
:
IsStunned
()
or
botTarget
:
IsRooted
()
)
then
nTargetLocation
=
J
.
GetDelayCastLocation
(
bot
,
botTarget
,
nCastRange
,
nRadius
,
nCastPoint
)
if
nTargetLocation
~=
nil
...
...
BotLib/hero_disruptor.lua
0 → 100644
View file @
bacd194c
This diff is collapsed.
Click to expand it.
FunLib/jmz_func.lua
View file @
bacd194c
...
...
@@ -436,6 +436,13 @@ function J.GetAlliesNearLoc( vLoc, nRadius )
end
function
J
.
GetEnemiesNearLoc
(
bot
,
vLoc
,
nRadius
)
local
enemies
=
bot
:
GetNearbyHeroes
(
99999
,
true
,
BOT_MODE_NONE
)
return
J
.
FilterGroup
(
enemies
,
function
(
u
)
return
u
:
IsAlive
()
and
GetUnitToLocationDistance
(
u
,
vLoc
)
<=
nRadius
end
)
end
function
J
.
IsAllyHeroBetweenAllyAndEnemy
(
hAlly
,
hEnemy
,
vLoc
,
nRadius
)
...
...
@@ -3211,6 +3218,45 @@ function J.GetMagicToPhysicalDamage( bot, nUnit, nMagicDamage )
end
function
J
.
FilterGroup
(
nList
,
func
)
local
newGroup
=
{}
for
_
,
npc
in
pairs
(
nList
)
do
if
func
(
npc
)
then
table.insert
(
newGroup
,
npc
)
end
end
return
newGroup
end
function
J
.
Not
(
f
)
return
function
(
...
)
return
not
f
(
...
)
end
end
function
J
.
And
(
...
)
local
funcList
=
table.unpack
(
...
)
return
function
(
...
)
for
_
,
func
in
pairs
(
funcList
)
do
if
not
func
(
...
)
then
return
false
end
end
return
true
end
end
function
J
.
Or
(
...
)
local
funcList
=
table.unpack
(
...
)
return
function
(
...
)
for
_
,
func
in
pairs
(
funcList
)
do
if
func
(
...
)
then
return
true
end
end
return
false
end
end
return
J
...
...
hero_selection.lua
View file @
bacd194c
...
...
@@ -67,7 +67,7 @@ local sUserKeyDir = Chat.GetUserKeyDir()
'npc_dota_hero_dark_seer',
'npc_dota_hero_dark_willow',
--'npc_dota_hero_dazzle',
'npc_dota_hero_disruptor',
--
'npc_dota_hero_disruptor',
--'npc_dota_hero_death_prophet',
'npc_dota_hero_doom_bringer',
--'npc_dota_hero_dragon_knight',
...
...
@@ -176,6 +176,7 @@ local sHasDevelopmentHeroList = {
"npc_dota_hero_abyssal_underlord"
,
"npc_dota_hero_alchemist"
,
"npc_dota_hero_life_stealer"
,
"npc_dota_hero_disruptor"
,
"npc_dota_hero_silencer"
,
"npc_dota_hero_warlock"
,
"npc_dota_hero_necrolyte"
,
...
...
@@ -230,9 +231,6 @@ local sHasDevelopmentHeroList = {
"npc_dota_hero_razor"
,
"npc_dota_hero_mirana"
,
}
...
...
@@ -344,7 +342,7 @@ local sPriestList = {
"npc_dota_hero_bane"
,
-- "npc_dota_hero_windrunner",
"npc_dota_hero_queenofpain"
,
"npc_dota_hero_disruptor"
,
}
local
sMageList
=
{
...
...
@@ -369,6 +367,7 @@ local sMageList = {
"npc_dota_hero_bane"
,
-- "npc_dota_hero_windrunner",
"npc_dota_hero_queenofpain"
,
"npc_dota_hero_disruptor"
,
}
...
...
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