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
a4e4eb51
Commit
a4e4eb51
authored
Mar 23, 2023
by
JoyJ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes
parent
e2bc7f9b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
22 deletions
+50
-22
BotLib/hero_drow_ranger.lua
BotLib/hero_drow_ranger.lua
+1
-0
BotLib/hero_muerta.lua
BotLib/hero_muerta.lua
+35
-14
BotLib/hero_visage.lua
BotLib/hero_visage.lua
+7
-7
FunLib/jmz_func.lua
FunLib/jmz_func.lua
+6
-0
hero_selection.lua
hero_selection.lua
+1
-1
No files found.
BotLib/hero_drow_ranger.lua
View file @
a4e4eb51
...
...
@@ -301,6 +301,7 @@ function X.ConsiderWM()
local
nCastRange
=
abilityW
:
GetCastRange
()
local
nCastPoint
=
abilityW
:
GetCastPoint
()
local
nRadius
=
abilityW
:
GetAOERadius
()
local
nTargetLocation
=
nil
local
nEnemysHeroesInView
=
hEnemyList
local
nEnemysHeroesNearBy
=
bot
:
GetNearbyHeroes
(
500
,
true
,
BOT_MODE_NONE
)
...
...
BotLib/hero_muerta.lua
View file @
a4e4eb51
...
...
@@ -143,19 +143,12 @@ function X.SkillsComplement()
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
castRDesire
,
sMotive
=
X
.
ConsiderR
()
if
castRDesire
>
0
then
J
.
SetReportMotive
(
bDebugMode
,
sMotive
)
J
.
SetQueuePtToINT
(
bot
,
true
)
bot
:
Action_UseAbility
(
abilityR
)
--无论如何,大招期间绝不逃跑
if
bot
:
HasModifier
(
'modifier_muerta_pierce_the_veil_buff'
)
then
--释放BKB
local
abilityBKB
=
J
.
IsItemAvailable
(
"item_black_king_bar"
)
...
...
@@ -175,6 +168,22 @@ function X.SkillsComplement()
bot
:
ActionQueue_UseAbility
(
abilityMoM
)
end
local
attackList
=
J
.
FilterGroup
(
hEnemyList
,
function
(
u
)
return
not
u
:
IsMagicImmune
()
and
GetUnitToUnitDistance
(
bot
,
u
)
<=
bot
:
GetAttackRange
()
+
200
end
)
if
#
attackList
>
0
then
bot
:
ActionQueue_AttackUnit
(
attackList
[
1
],
true
)
return
end
end
castRDesire
,
sMotive
=
X
.
ConsiderR
()
if
castRDesire
>
0
then
J
.
SetReportMotive
(
bDebugMode
,
sMotive
)
J
.
SetQueuePtToINT
(
bot
,
true
)
bot
:
ActionQueue_UseAbility
(
abilityR
)
return
end
...
...
@@ -185,7 +194,7 @@ function X.SkillsComplement()
J
.
SetQueuePtToINT
(
bot
,
true
)
bot
:
ActionQueue_UseAbilityOnEntity
(
abilityQ
,
castQTarget
)
bot
:
ActionQueue_UseAbilityOnEntity
(
abilityQ
,
castQTarget
)
return
end
...
...
@@ -226,10 +235,18 @@ function X.ConsiderQ()
end
--团战
if
J
.
IsInTeamFight
(
bot
,
1200
)
and
DotaTime
()
>
4
*
60
then
if
J
.
IsInTeamFight
(
bot
,
1200
)
then
local
npcEnemy
=
J
.
GetLeastHpUnit
(
nInRangeEnemyList
)
if
npcEnemy
then
return
BOT_ACTION_DESIRE_HIGH
,
npcEnemy
,
"Q-团战"
..
J
.
Chat
.
GetNormName
(
npcEnemy
)
end
end
--通常
if
nSkillLV
>
1
and
J
.
IsAllowedToSpam
(
bot
,
nManaCost
)
then
local
npcEnemy
=
J
.
GetLeastHpUnit
(
nInRangeEnemyList
)
if
npcEnemy
then
return
BOT_ACTION_DESIRE_HIGH
,
npcEnemy
,
"
W-团战
"
..
J
.
Chat
.
GetNormName
(
npcEnemy
)
return
BOT_ACTION_DESIRE_HIGH
,
npcEnemy
,
"
Q-通常
"
..
J
.
Chat
.
GetNormName
(
npcEnemy
)
end
end
...
...
@@ -302,8 +319,8 @@ function X.ConsiderW()
--攻击
if
J
.
IsValidHero
(
botTarget
)
and
J
.
IsInRange
(
bot
,
botTarget
,
nCastRange
+
nRadius
-
200
)
and
J
.
CanCastOnNonMagicImmune
(
botTarget
)
and
(
J
.
IsInRange
(
bot
,
botTarget
,
700
)
or
botTarget
:
IsFacingLocation
(
bot
:
GetLocation
(),
40
)
)
and
not
botTarget
:
IsMagicImmune
(
)
and
(
J
.
IsInRange
(
bot
,
botTarget
,
nCastRange
)
or
botTarget
:
IsFacingLocation
(
bot
:
GetLocation
(),
40
)
)
and
not
J
.
IsDisabled
(
botTarget
)
then
nTargetLocation
=
J
.
GetCastLocation
(
bot
,
botTarget
,
nCastRange
,
nRadius
)
...
...
@@ -339,6 +356,10 @@ function X.ConsiderR()
end
end
if
J
.
IsRetreating
(
bot
)
and
bot
:
WasRecentlyDamagedByAnyHero
(
2
.
0
)
and
nHP
<
0
.
6
and
#
hEnemyList
>
0
then
return
BOT_ACTION_DESIRE_HIGH
end
return
0
end
...
...
BotLib/hero_visage.lua
View file @
a4e4eb51
...
...
@@ -114,6 +114,7 @@ function X.SkillsComplement()
nLV
=
bot
:
GetLevel
()
hEnemyHeroList
=
bot
:
GetNearbyHeroes
(
1600
,
true
,
BOT_MODE_NONE
)
castRDesire
=
X
.
ConsiderR
()
if
(
castRDesire
>
0
)
then
...
...
@@ -148,6 +149,7 @@ function X.SkillsComplement()
return
end
bot
:
ActionImmediate_Chat
(
"CheckD"
,
true
)
castDDesire
=
X
.
ConsiderD
()
if
(
castDDesire
>
0
)
then
bot
:
ActionQueue_UseAbility
(
abilityD
)
...
...
@@ -216,9 +218,8 @@ end
function
X
.
ConsiderW
()
if
not
abilityW
:
IsFullyCastable
()
or
bot
:
IsRooted
()
then
return
BOT_ACTION_DESIRE_NONE
end
if
not
bot
:
HasModifier
(
'modifier_visage_soul_assumption'
)
then
return
end
if
not
abilityW
:
IsFullyCastable
()
or
bot
:
IsRooted
()
or
not
bot
:
HasModifier
(
'modifier_visage_soul_assumption'
)
then
return
BOT_ACTION_DESIRE_NONE
end
local
nCastRange
=
abilityW
:
GetCastRange
()
local
nCastPoint
=
abilityW
:
GetCastPoint
()
...
...
@@ -226,7 +227,7 @@ function X.ConsiderW()
local
nSkillLV
=
abilityW
:
GetLevel
()
local
nDamage
=
70
if
nLV
>
27
then
nDamage
=
90
end
local
nSoul
=
bot
:
GetModifierStackCount
(
'modifier_visage_soul_assumption'
)
local
nSoul
=
bot
:
GetModifierStackCount
(
bot
:
GetModifierByName
(
'modifier_visage_soul_assumption'
)
)
nDamage
=
nSoul
*
nDamage
+
20
local
nEnemysHeroesInCastRange
=
bot
:
GetNearbyHeroes
(
nCastRange
,
true
,
BOT_MODE_NONE
)
...
...
@@ -245,8 +246,7 @@ function X.ConsiderW()
end
end
end
if
nSoul
<
2
+
nSkillLV
then
return
end
if
nSoul
<
2
+
nSkillLV
then
return
BOT_ACTION_DESIRE_NONE
end
--追杀
if
J
.
IsGoingOnSomeone
(
bot
)
then
...
...
@@ -294,7 +294,7 @@ function X.ConsiderR()
local
listFamiliar
=
GetUnitList
(
UNIT_LIST_ALLIES
)
for
_
,
unit
in
pairs
(
listFamiliar
)
do
if
Minion
.
IsFamiliar
(
unit
:
GetUnitName
())
then
if
Minion
.
IsFamiliar
(
unit
:
GetUnitName
())
and
unit
:
IsAlive
()
then
nMaxUnit
=
nMaxUnit
-
1
end
end
...
...
FunLib/jmz_func.lua
View file @
a4e4eb51
...
...
@@ -3398,6 +3398,12 @@ function J.GetRandomPointInCircle(center, max, min)
return
J
.
GetVectorFromVectorToAngleWithDistance
(
center
,
angle
,
r
,
nil
)
end
function
J
.
DebugMessage
(
str
,
b
)
if
b
then
bot
:
ActionImmediate_Chat
(
str
,
true
)
end
end
return
J
--[[
...
...
hero_selection.lua
View file @
a4e4eb51
...
...
@@ -1002,7 +1002,7 @@ function Think()
end
--if GetTeam() ~= TEAM_DIRE and i == 1 then sSelectHero = "npc_dota_hero_alchemist" end
--if GetTeam() ~= TEAM_DIRE and i == 3 then sSelectHero = "npc_dota_hero_centaur
" end
if
GetTeam
()
~=
TEAM_DIRE
and
i
==
3
then
sSelectHero
=
"npc_dota_hero_muerta
"
end
-------******************************-----------------------------------------------
-- if GetTeam() ~= TEAM_DIRE and i == 2 then sSelectHero = "npc_dota_hero_lina" end
-- if GetTeam() ~= TEAM_DIRE and i == 1 then sSelectHero = "npc_dota_hero_antimage" end
...
...
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