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
753c7ce6
Commit
753c7ce6
authored
Apr 23, 2023
by
JoyJ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify diff blade and echo sabre
parent
8667e00e
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
88 additions
and
59 deletions
+88
-59
BotLib/hero_abaddon.lua
BotLib/hero_abaddon.lua
+1
-1
BotLib/hero_alchemist.lua
BotLib/hero_alchemist.lua
+2
-0
BotLib/hero_arc_warden.lua
BotLib/hero_arc_warden.lua
+1
-0
BotLib/hero_bloodseeker.lua
BotLib/hero_bloodseeker.lua
+1
-0
BotLib/hero_disruptor.lua
BotLib/hero_disruptor.lua
+6
-8
BotLib/hero_drow_ranger.lua
BotLib/hero_drow_ranger.lua
+19
-0
BotLib/hero_legion_commander.lua
BotLib/hero_legion_commander.lua
+2
-3
BotLib/hero_muerta.lua
BotLib/hero_muerta.lua
+1
-1
BotLib/hero_naga_siren.lua
BotLib/hero_naga_siren.lua
+1
-0
BotLib/hero_night_stalker.lua
BotLib/hero_night_stalker.lua
+1
-3
BotLib/hero_omniknight.lua
BotLib/hero_omniknight.lua
+2
-3
BotLib/hero_phantom_lancer.lua
BotLib/hero_phantom_lancer.lua
+1
-0
BotLib/hero_riki.lua
BotLib/hero_riki.lua
+2
-1
BotLib/hero_slardar.lua
BotLib/hero_slardar.lua
+2
-0
BotLib/hero_sven.lua
BotLib/hero_sven.lua
+1
-2
BotLib/hero_tidehunter.lua
BotLib/hero_tidehunter.lua
+2
-1
BotLib/hero_venomancer.lua
BotLib/hero_venomancer.lua
+36
-19
BotLib/hero_visage.lua
BotLib/hero_visage.lua
+1
-1
FunLib/jmz_func.lua
FunLib/jmz_func.lua
+4
-14
rewrite_functions.lua
rewrite_functions.lua
+2
-2
No files found.
BotLib/hero_abaddon.lua
View file @
753c7ce6
...
...
@@ -188,7 +188,7 @@ function X.ConsiderQ()
local
nDamage
=
abilityQ
:
GetAbilityDamage
()
local
nDamageType
=
DAMAGE_TYPE_MAGICAL
local
nInRangeEnemyList
=
bot
:
GetNearbyHeroes
(
nCastRange
,
true
,
BOT_MODE_NONE
)
local
heroList
=
J
.
FilterGroup
(
nInRangeEnemyList
,
function
(
u
)
local
heroList
=
FilterTable
(
nInRangeEnemyList
,
function
(
u
)
return
J
.
IsValidHero
(
u
)
and
J
.
IsInRange
(
bot
,
u
,
nCastRange
)
and
J
.
CanCastOnNonMagicImmune
(
u
)
end
)
...
...
BotLib/hero_alchemist.lua
View file @
753c7ce6
...
...
@@ -32,8 +32,10 @@ tOutFitList['outfit_carry'] = {
"item_bristleback_outfit"
,
"item_soul_ring"
,
"item_yasha"
,
"item_echo_sabre"
,
"item_black_king_bar"
,
"item_radiance"
,
"item_harpoon"
,
"item_travel_boots"
,
"item_sange_and_yasha"
,
"item_basher"
,
...
...
BotLib/hero_arc_warden.lua
View file @
753c7ce6
...
...
@@ -40,6 +40,7 @@ tOutFitList['outfit_carry'] = {
"item_hand_of_midas"
,
"item_aghanims_shard"
,
"item_black_king_bar"
,
"item_disperser"
,
"item_manta"
,
"item_travel_boots"
,
"item_sheepstick"
,
...
...
BotLib/hero_bloodseeker.lua
View file @
753c7ce6
...
...
@@ -45,6 +45,7 @@ tOutFitList['outfit_carry'] = {
"item_diffusal_blade"
,
"item_sange_and_yasha"
,
"item_black_king_bar"
,
"item_disperser"
,
"item_travel_boots"
,
"item_abyssal_blade"
,
sRandomItem_1
,
...
...
BotLib/hero_disruptor.lua
View file @
753c7ce6
...
...
@@ -36,9 +36,9 @@ local tOutFitList = {}
tOutFitList
[
'outfit_carry'
]
=
{
"item_crystal_maiden_outfit"
,
"item_aghanims_shard"
,
"item_force_staff"
,
"item_glimmer_cape"
,
"item_aghanims_shard"
,
"item_rod_of_atos"
,
"item_ultimate_scepter"
,
"item_sheepstick"
,
...
...
@@ -238,7 +238,7 @@ function X.ConsiderQ()
local
nInRangeEnemyList
=
bot
:
GetNearbyHeroes
(
nCastRange
,
true
,
BOT_MODE_NONE
)
local
nInBonusEnemyList
=
bot
:
GetNearbyHeroes
(
nCastRange
+
200
,
true
,
BOT_MODE_NONE
)
nInRangeEnemyList
=
J
.
FilterGroup
(
nInRangeEnemyList
,
J
.
CanCastOnNonMagicImmune
)
nInRangeEnemyList
=
FilterTable
(
nInRangeEnemyList
,
J
.
CanCastOnNonMagicImmune
)
--击杀
for
_
,
npcEnemy
in
pairs
(
nInRangeEnemyList
)
...
...
@@ -253,7 +253,7 @@ function X.ConsiderQ()
--团战
if
J
.
IsInTeamFight
(
bot
,
1200
)
then
local
valid
=
J
.
FilterGroup
(
nInRangeEnemyList
,
J
.
IsValidHero
)
local
valid
=
FilterTable
(
nInRangeEnemyList
,
J
.
IsValidHero
)
local
enemy
=
J
.
GetLeastHpUnit
(
valid
)
if
enemy
~=
nil
then
return
BOT_ACTION_DESIRE_HIGH
,
enemy
,
'Q-团战攻击血量最少单位'
...
...
@@ -286,11 +286,9 @@ function X.ConsiderQ()
--Push
if
(
J
.
IsPushing
(
bot
)
or
J
.
IsDefending
(
bot
)
or
J
.
IsFarming
(
bot
)
or
(
J
.
IsLaning
(
bot
)
and
bot
:
GetAssignedLane
()
==
LANE_MID
))
and
J
.
IsAllowedToSpam
(
bot
,
nManaCost
)
and
nSkillLV
>=
2
or
DotaTime
()
>
9
*
60
and
#
hAllyList
<=
2
and
#
hEnemyList
==
0
then
and
nSkillLV
>=
2
or
DotaTime
()
>
9
*
60
then
local
laneCreepList
=
bot
:
GetNearbyLaneCreeps
(
nCastRange
,
true
)
laneCreepList
=
J
.
FilterGroup
(
laneCreepList
,
function
(
u
)
laneCreepList
=
FilterTable
(
laneCreepList
,
function
(
u
)
return
J
.
IsValid
(
u
)
and
not
u
:
HasModifier
(
"modifier_fountain_glyph"
)
end
)
if
#
laneCreepList
>=
3
then
...
...
@@ -378,7 +376,7 @@ function X.ConsiderW()
local
nDamageType
=
DAMAGE_TYPE_MAGICAL
local
nInRangeEnemyList
=
GetUnitList
(
UNIT_LIST_ENEMY_HEROES
)
nInRangeEnemyList
=
J
.
FilterGroup
(
nInRangeEnemyList
,
function
(
u
)
nInRangeEnemyList
=
FilterTable
(
nInRangeEnemyList
,
function
(
u
)
return
J
.
IsValidHero
(
u
)
and
J
.
CanCastOnNonMagicImmune
(
u
)
and
J
.
IsInRange
(
bot
,
u
,
nCastRange
)
end
)
...
...
BotLib/hero_drow_ranger.lua
View file @
753c7ce6
...
...
@@ -122,11 +122,13 @@ modifier_drow_ranger_marksmanship_reduction
local
abilityQ
=
bot
:
GetAbilityByName
(
sAbilityList
[
1
]
)
local
abilityW
=
bot
:
GetAbilityByName
(
sAbilityList
[
2
]
)
local
abilityE
=
bot
:
GetAbilityByName
(
sAbilityList
[
3
]
)
local
abilityD
=
bot
:
GetAbilityByName
(
sAbilityList
[
4
]
)
local
abilityM
=
nil
local
castQDesire
,
castQTarget
local
castWDesire
,
castWLocation
local
castEDesire
,
castELocation
local
castDDesire
local
castMDesire
local
castWMDesire
,
castWMLocation
...
...
@@ -146,6 +148,15 @@ function X.SkillsComplement()
hAllyList
=
J
.
GetAlliesNearLoc
(
bot
:
GetLocation
(),
1600
)
abilityM
=
J
.
IsItemAvailable
(
"item_mask_of_madness"
)
castDDesire
=
X
.
ConsiderD
()
if
castDDesire
>
0
then
bot
:
Action_UseAbility
(
abilityD
)
return
end
castEDesire
,
castELocation
=
X
.
ConsiderE
()
if
castEDesire
>
0
then
...
...
@@ -727,6 +738,14 @@ function X.ConsiderQ()
return
BOT_ACTION_DESIRE_NONE
,
nil
end
function
X
.
ConsiderD
()
local
nEnemysHeroesNearBy
=
bot
:
GetNearbyHeroes
(
bot
:
GetAttackRange
()
/
2
,
true
,
BOT_MODE_NONE
)
local
nEnemysHeroesNearByImmediate
=
bot
:
GetNearbyHeroes
(
175
,
true
,
BOT_MODE_NONE
)
if
(
J
.
IsGoingOnSomeone
(
bot
)
and
#
nEnemysHeroesNearBy
>
0
)
or
#
nEnemysHeroesNearByImmediate
>
0
then
return
BOT_ACTION_DESIRE_HIGH
end
return
BOT_ACTION_DESIRE_NONE
end
return
X
-- dota2jmz@163.com QQ:2462331592..
BotLib/hero_legion_commander.lua
View file @
753c7ce6
...
...
@@ -39,16 +39,15 @@ tOutFitList['outfit_carry'] = {
"item_sven_outfit"
,
--"item_bracer",
"item_blade_mail"
,
"item_echo_sabre"
,
"item_aghanims_shard"
,
"item_black_king_bar"
,
"item_travel_boots"
,
"item_greater_crit"
,
"item_abyssal_blade"
,
-- "item_hear
t",
"item_assaul
t"
,
"item_moon_shard"
,
"item_travel_boots_2"
,
--
"item_ultimate_scepter_2",
"item_ultimate_scepter_2"
,
}
...
...
BotLib/hero_muerta.lua
View file @
753c7ce6
...
...
@@ -169,7 +169,7 @@ function X.SkillsComplement()
bot
:
Action_UseAbility
(
abilityMoM
)
end
local
attackList
=
J
.
FilterGroup
(
hEnemyList
,
function
(
u
)
local
attackList
=
FilterTable
(
hEnemyList
,
function
(
u
)
return
not
u
:
IsMagicImmune
()
and
GetUnitToUnitDistance
(
bot
,
u
)
<=
bot
:
GetAttackRange
()
+
200
end
)
if
#
attackList
>
0
then
...
...
BotLib/hero_naga_siren.lua
View file @
753c7ce6
...
...
@@ -40,6 +40,7 @@ tOutFitList['outfit_carry'] = {
"item_diffusal_blade"
,
"item_manta"
,
"item_skadi"
,
"item_disperser"
,
"item_travel_boots"
,
"item_aghanims_shard"
,
"item_abyssal_blade"
,
...
...
BotLib/hero_night_stalker.lua
View file @
753c7ce6
...
...
@@ -89,6 +89,7 @@ tOutFitList['outfit_carry'] = {
"item_echo_sabre"
,
"item_black_king_bar"
,
"item_basher"
,
"item_harpoon"
,
"item_blink"
,
"item_abyssal_blade"
,
"item_assault"
,
...
...
@@ -123,9 +124,6 @@ X['sSellList'] = {
"item_assault"
,
"item_bracer"
,
"item_ultimate_scepter"
,
"item_echo_sabre"
,
"item_travel_boots"
,
"item_phase_boots"
,
}
...
...
BotLib/hero_omniknight.lua
View file @
753c7ce6
...
...
@@ -41,6 +41,7 @@ tOutFitList['outfit_carry'] = {
"item_echo_sabre"
,
"item_aghanims_shard"
,
"item_ultimate_scepter"
,
"item_harpoon"
,
"item_lotus_orb"
,
"item_black_king_bar"
,
"item_travel_boots"
,
...
...
@@ -65,6 +66,7 @@ tOutFitList['outfit_tank'] = {
"item_echo_sabre"
,
"item_aghanims_shard"
,
"item_crimson_guard"
,
"item_harpoon"
,
"item_ultimate_scepter"
,
"item_heavens_halberd"
,
"item_travel_boots"
,
...
...
@@ -88,9 +90,6 @@ X['sSellList'] = {
"item_black_king_bar"
,
"item_magic_wand"
,
"item_ultimate_scepter"
,
"item_echo_sabre"
,
"item_travel_boots"
,
"item_magic_wand"
,
...
...
BotLib/hero_phantom_lancer.lua
View file @
753c7ce6
...
...
@@ -44,6 +44,7 @@ tOutFitList['outfit_carry'] = {
"item_aghanims_shard"
,
"item_diffusal_blade"
,
"item_manta"
,
"item_disperser"
,
"item_ultimate_scepter"
,
"item_travel_boots"
,
"item_skadi"
,
...
...
BotLib/hero_riki.lua
View file @
753c7ce6
...
...
@@ -34,10 +34,11 @@ local nTalentBuildList = J.Skill.GetTalentBuild( tTalentTreeList )
X
[
'sBuyList'
]
=
{
"item_melee_carry_outfit"
,
"item_aghanims_shard"
,
"item_yasha"
,
"item_diffusal_blade"
,
"item_aghanims_shard"
,
"item_manta"
,
"item_disperser"
,
"item_basher"
,
"item_black_king_bar"
,
"item_travel_boots"
,
...
...
BotLib/hero_slardar.lua
View file @
753c7ce6
...
...
@@ -41,6 +41,7 @@ tOutFitList['outfit_carry'] = {
"item_echo_sabre"
,
"item_ultimate_scepter"
,
"item_blink"
,
"item_harpoon"
,
-- "item_aghanims_shard",
"item_black_king_bar"
,
"item_travel_boots"
,
...
...
@@ -65,6 +66,7 @@ tOutFitList['outfit_tank'] = {
"item_echo_sabre"
,
"item_crimson_guard"
,
"item_ultimate_scepter"
,
"item_harpoon"
,
"item_heavens_halberd"
,
"item_assault"
,
"item_travel_boots"
,
...
...
BotLib/hero_sven.lua
View file @
753c7ce6
...
...
@@ -40,6 +40,7 @@ tOutFitList['outfit_carry'] = {
"item_hand_of_midas"
,
"item_aghanims_shard"
,
"item_blink"
,
"item_harpoon"
,
"item_black_king_bar"
,
"item_travel_boots"
,
"item_satanic"
,
...
...
@@ -72,8 +73,6 @@ X['sSellList'] = {
"item_greater_crit"
,
"item_hand_of_midas"
,
"item_overwhelming_blink"
,
"item_echo_sabre"
,
}
if
J
.
Role
.
IsPvNMode
()
or
J
.
Role
.
IsAllShadow
()
then
X
[
'sBuyList'
],
X
[
'sSellList'
]
=
{
'PvN_str_carry'
},
{
"item_power_treads"
,
'item_quelling_blade'
}
end
...
...
BotLib/hero_tidehunter.lua
View file @
753c7ce6
...
...
@@ -43,7 +43,8 @@ tOutFitList['outfit_carry'] = {
"item_blink"
,
"item_ultimate_scepter"
,
-- "item_aghanims_shard",
"item_black_king_bar"
,
"item_black_king_bar"
,
"item_harpoon"
,
"item_travel_boots"
,
"item_skadi"
,
"item_satanic"
,
...
...
BotLib/hero_venomancer.lua
View file @
753c7ce6
...
...
@@ -215,7 +215,7 @@ local abilityR = bot:GetAbilityByName( sAbilityList[6] )
local
castQDesire
,
castQLocation
local
castEDesire
,
castELocation
local
castDDesire
,
castDTarget
local
castRDesire
local
castRDesire
,
castRTarget
local
nKeepMana
,
nMP
,
nHP
,
nLV
,
botTarget
,
hEnemyList
,
hAllyList
,
sMotive
local
bonusRange
=
0
...
...
@@ -621,41 +621,58 @@ function X.ConsiderR()
if
not
abilityR
:
IsFullyCastable
()
then
return
BOT_ACTION_DESIRE_NONE
,
nil
end
local
nSkillLV
=
abilityR
:
GetLevel
()
local
nRadius
=
abilityR
:
Get
SpecialValueInt
(
'start_radius'
)
+
abilityR
:
GetSpecialValueInt
(
'radius'
)
local
nRadius
=
abilityR
:
Get
Val
(
'debuff_radius'
)
local
nCastPoint
=
abilityR
:
GetCastPoint
()
local
nManaCost
=
abilityR
:
GetManaCost
()
local
nAlliedHeroesInRange
=
bot
:
GetNearbyHeroes
(
nRadius
,
false
,
BOT_MODE_NONE
)
local
nEnemyHeroesInRange
=
bot
:
GetNearbyHeroes
(
nRadius
-
300
,
true
,
BOT_MODE_NONE
)
local
nTargetLocation
=
nil
nEnemyHeroesInRange
=
FilterTable
(
nEnemyHeroesInRange
,
function
(
u
)
return
J
.
IsValidHero
(
u
)
and
not
u
:
IsMagicImmune
()
and
J
.
CanCastOnMagicImmune
(
botTarget
)
end
)
if
J
.
IsInTeamFight
(
bot
,
1200
)
then
if
#
nEnemyHeroesInRange
>=
3
then
return
BOT_ACTION_DESIRE_HIGH
,
'R-Battle'
for
_
,
u
in
pairs
(
nEnemyHeroesInRange
)
do
local
hd
=
abilityR
:
GetVal
(
'health_damage'
)
if
bot
:
GetTalent
(
'special_bonus_unique_venomancer_4'
)
then
hd
=
hd
+
1
.
5
end
hd
=
hd
/
100
.
0
local
damage
=
abilityR
:
GetVal
(
'impact_damage'
)
+
u
:
GetMaxHealth
()
*
hd
*
2
--少计算一点
if
J
.
WillMagicKillTarget
(
bot
,
u
,
damage
,
2
.
0
)
then
return
BOT_ACTION_DESIRE_HIGH
,
u
,
"R-击杀"
end
end
if
J
.
IsGoingOnSomeone
(
bot
)
then
local
most
=
0
local
mostUnit
=
nil
if
J
.
IsInTeamFight
(
bot
,
1200
)
then
for
_
,
u
in
pairs
(
nEnemyHeroesInRange
)
do
local
units
=
u
:
GetNearbyHeroes
(
nRadius
,
false
,
BOT_MODE_NONE
)
units
=
FilterTable
(
units
,
function
(
u2
)
return
u2
~=
u
end
)
if
#
units
>
most
then
most
=#
units
mostUnit
=
u
end
end
if
mostUnit
then
return
BOT_ACTION_DESIRE_HIGH
,
mostUnit
,
"R-团战"
end
end
if
J
.
IsGoingOnSomeone
(
bot
)
then
if
J
.
IsValidHero
(
botTarget
)
and
J
.
CanCastOnMagicImmune
(
botTarget
)
and
J
.
IsInRange
(
botTarget
,
bot
,
nRadius
-
150
)
and
#
nEnemyHeroesInRange
>=
2
and
#
nEnemyHeroesInRange
>=
#
nAlliedHeroesInRange
and
J
.
IsInRange
(
botTarget
,
bot
,
nRadius
-
50
)
then
return
BOT_ACTION_DESIRE_HIGH
,
'R-Chase
:'
..
J
.
Chat
.
GetNormName
(
botTarget
)
return
BOT_ACTION_DESIRE_HIGH
,
botTarget
,
'R-追杀
:'
..
J
.
Chat
.
GetNormName
(
botTarget
)
end
end
if
J
.
IsRetreating
(
bot
)
and
bot
:
WasRecentlyDamagedByHero
(
npcEnemy
,
3
.
0
)
and
#
nEnemyHeroesInRange
>=
2
and
#
nEnemyHeroesInRange
>=
#
hAllyList
then
and
bot
:
WasRecentlyDamagedByHero
(
npcEnemy
,
2
.
0
)
then
return
BOT_ACTION_DESIRE_HIGH
,
'R-Retreat'
end
...
...
BotLib/hero_visage.lua
View file @
753c7ce6
...
...
@@ -260,7 +260,7 @@ function X.ConsiderW()
end
--通常
local
valid
=
J
.
FilterGroup
(
nEnemysHeroesInCastRange
,
function
(
u
)
local
valid
=
FilterTable
(
nEnemysHeroesInCastRange
,
function
(
u
)
return
J
.
IsValid
(
u
)
and
J
.
CanCastOnNonMagicImmune
(
u
)
and
J
.
CanCastOnTargetAdvanced
(
u
)
...
...
FunLib/jmz_func.lua
View file @
753c7ce6
...
...
@@ -500,7 +500,7 @@ end
function
J
.
GetEnemiesNearLoc
(
vLoc
,
nRadius
)
local
enemies
=
GetUnitList
(
UNIT_LIST_ENEMY_HEROES
)
return
J
.
FilterGroup
(
enemies
,
function
(
u
)
return
FilterTable
(
enemies
,
function
(
u
)
return
GetUnitToLocationDistance
(
u
,
vLoc
)
<=
nRadius
end
)
...
...
@@ -3462,16 +3462,6 @@ 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
.
MergeGroup
(
nList
,
...
)
local
args
=
{
...
}
for
a
in
arg
do
...
...
@@ -3682,11 +3672,11 @@ function J.FindAoeLocationForLinearSkill(data)
local
filter
=
data
.
filter
or
J
.
FindAoeLocationForLinearSkillFilter
local
least
=
data
.
least
or
2
enemies
=
J
.
FilterGroup
(
enemies
,
function
(
u
)
enemies
=
FilterTable
(
enemies
,
function
(
u
)
return
J
.
IsValidHero
(
u
)
end
)
creeps
=
J
.
FilterGroup
(
creeps
,
function
(
u
)
creeps
=
FilterTable
(
creeps
,
function
(
u
)
return
J
.
IsValid
(
u
)
end
)
if
not
onlyHero
then
...
...
@@ -3699,7 +3689,7 @@ function J.FindAoeLocationForLinearSkill(data)
for
i
=
1
,
36
do
local
angle
=
10
*
i
local
unstablity
=
0
local
hitEnemy
=
J
.
FilterGroup
(
enemies
,
J
.
And
(
filter
,
function
(
u
)
local
hitEnemy
=
FilterTable
(
enemies
,
J
.
And
(
filter
,
function
(
u
)
local
distance
=
J
.
GetDistanceFromUnitToUnit
(
bot
,
u
)
local
uLoc
=
J
.
GetCorrectLoc
(
u
,
distance
/
projSpeed
+
castPoint
)
if
J
.
IsVectorInRectangle
(
uLoc
,
loc
,
angle
,
radius
,
range
)
then
...
...
rewrite_functions.lua
View file @
753c7ce6
...
...
@@ -275,7 +275,7 @@ end
local
gnh
=
CDOTA_Bot_Script
.
GetNearbyHeroes
CDOTA_Bot_Script
.
GetNearbyHeroes
=
function
(
u
,
nRadius
,
bEnemies
,
eBotMode
)
if
not
u
:
CanBeSeen
()
then
return
{}
end
if
nRadius
<=
1600
and
u
:
Is
Bot
()
then
return
gnh
(
u
,
nRadius
,
bEnemies
,
eBotMode
)
end
if
nRadius
<=
1600
and
u
:
Is
Ally
()
then
return
gnh
(
u
,
nRadius
,
bEnemies
,
eBotMode
)
end
local
list
if
bEnemies
then
list
=
GetUnitList
(
UNIT_LIST_ENEMY_HEROES
)
...
...
@@ -292,7 +292,7 @@ end
local
gnc
=
CDOTA_Bot_Script
.
GetNearbyCreeps
CDOTA_Bot_Script
.
GetNearbyCreeps
=
function
(
u
,
nRadius
,
bEnemies
)
if
not
u
:
CanBeSeen
()
then
return
{}
end
if
nRadius
<=
1600
and
u
:
Is
Bot
()
then
return
gnc
(
u
,
nRadius
,
bEnemies
)
end
if
nRadius
<=
1600
and
u
:
Is
Ally
()
then
return
gnc
(
u
,
nRadius
,
bEnemies
)
end
local
list
if
bEnemies
then
list
=
GetUnitList
(
UNIT_LIST_ENEMY_CREEPS
)
or
{}
...
...
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