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
7b32f085
Commit
7b32f085
authored
Apr 03, 2023
by
JoyJ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more updates from jodyjmaulana/aba-update
parent
ddbb5b8a
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
3169 additions
and
15 deletions
+3169
-15
BotLib/hero_grimstroke.lua
BotLib/hero_grimstroke.lua
+313
-0
FunLib/aba_ability.lua
FunLib/aba_ability.lua
+2663
-0
FunLib/aba_role.lua
FunLib/aba_role.lua
+3
-0
FunLib/jmz_func.lua
FunLib/jmz_func.lua
+116
-6
ability_item_usage_generic.lua
ability_item_usage_generic.lua
+63
-4
hero_selection.lua
hero_selection.lua
+4
-0
mode_farm_generic.lua
mode_farm_generic.lua
+2
-1
mode_team_roam_generic.lua
mode_team_roam_generic.lua
+5
-4
No files found.
BotLib/hero_grimstroke.lua
0 → 100644
View file @
7b32f085
----------------------------------------------------------------------------------------------------
--- The Creation Come From: BOT EXPERIMENT Credit:FURIOUSPUPPY
--- BOT EXPERIMENT Author: Arizona Fauzie 2018.11.21
--- Link:http://steamcommunity.com/sharedfiles/filedetails/?id=837040016
--- Refactor: 决明子 Email: dota2jmz@163.com 微博@Dota2_决明子
--- Link:http://steamcommunity.com/sharedfiles/filedetails/?id=1573671599
--- Link:http://steamcommunity.com/sharedfiles/filedetails/?id=1627071163
--- Updated: Nikel
--- mid, mage, priest
----------------------------------------------------------------------------------------------------
local
X
=
{}
local
bDebugMode
=
(
10
==
10
)
local
bot
=
GetBot
()
local
J
=
require
(
GetScriptDirectory
()
..
'/FunLib/jmz_func'
)
local
A
=
dofile
(
GetScriptDirectory
()
..
'/FunLib/aba_ability'
)
local
Minion
=
dofile
(
GetScriptDirectory
()
..
'/FunLib/aba_minion'
)
local
sTalentList
=
J
.
Skill
.
GetTalentList
(
bot
)
local
sAbilityList
=
J
.
Skill
.
GetAbilityList
(
bot
)
local
sOutfitType
=
J
.
Item
.
GetOutfitType
(
bot
)
local
tTalentTreeList
=
{
[
'outfit_carry'
]
=
{
[
't25'
]
=
{
10
,
0
},
[
't20'
]
=
{
0
,
10
},
[
't15'
]
=
{
0
,
10
},
[
't10'
]
=
{
0
,
10
},
},
[
'outfit_mid'
]
=
{
[
't25'
]
=
{
10
,
0
},
[
't20'
]
=
{
0
,
10
},
[
't15'
]
=
{
0
,
10
},
[
't10'
]
=
{
0
,
10
},
},
[
'outfit_priest'
]
=
{
[
't25'
]
=
{
0
,
10
},
[
't20'
]
=
{
10
,
0
},
[
't15'
]
=
{
10
,
0
},
[
't10'
]
=
{
10
,
0
},
},
[
'outfit_mage'
]
=
{
[
't25'
]
=
{
0
,
10
},
[
't20'
]
=
{
10
,
0
},
[
't15'
]
=
{
10
,
0
},
[
't10'
]
=
{
10
,
0
},
},
[
'outfit_tank'
]
=
{
[
't25'
]
=
{
0
,
10
},
[
't20'
]
=
{
10
,
0
},
[
't15'
]
=
{
10
,
0
},
[
't10'
]
=
{
10
,
0
},
},
}
local
tAllAbilityBuildList
=
{
[
'outfit_carry'
]
=
{
{
1
,
2
,
1
,
2
,
1
,
6
,
2
,
3
,
1
,
2
,
6
,
3
,
3
,
3
,
6
}
},
[
'outfit_mid'
]
=
{
{
1
,
2
,
1
,
2
,
1
,
6
,
2
,
3
,
1
,
2
,
6
,
3
,
3
,
3
,
6
}
},
[
'outfit_priest'
]
=
{
{
1
,
3
,
1
,
3
,
2
,
6
,
3
,
3
,
1
,
1
,
6
,
2
,
2
,
2
,
6
}
},
[
'outfit_mage'
]
=
{
{
1
,
3
,
1
,
3
,
2
,
6
,
3
,
1
,
3
,
1
,
6
,
2
,
2
,
2
,
6
}
},
[
'outfit_tank'
]
=
{
{
1
,
3
,
1
,
3
,
2
,
6
,
3
,
1
,
3
,
1
,
6
,
2
,
2
,
2
,
6
}
},
}
local
nAbilityBuildList
=
J
.
Skill
.
GetRandomBuild
(
tAllAbilityBuildList
[
sOutfitType
]
)
local
nTalentBuildList
=
J
.
Skill
.
GetTalentBuild
(
tTalentTreeList
[
sOutfitType
]
)
local
sRandomItem
=
RandomInt
(
1
,
9
)
>
6
and
0
or
10
local
sRandomItem_1
=
sRandomItem
==
0
and
"item_aether_lens"
or
"item_orchid"
local
sRandomItem_2
=
sRandomItem
==
0
and
"item_octarine_core"
or
"item_bloodthorn"
local
tOutFitList
=
{}
tOutFitList
[
'outfit_carry'
]
=
{
"item_mid_skywrath_mage_outfit"
,
"item_dagon"
,
sRandomItem_1
,
"item_dagon_2"
,
"item_aghanims_shard"
,
"item_ultimate_scepter"
,
"item_dagon_3"
,
"item_sheepstick"
,
"item_dagon_4"
,
"item_blink"
,
"item_dagon_5"
,
"item_travel_boots"
,
sRandomItem_2
,
"item_ultimate_scepter_2"
,
"item_kaya"
,
"item_ethereal_blade"
,
"item_travel_boots_2"
,
"item_moon_shard"
,
}
tOutFitList
[
'outfit_mid'
]
=
tOutFitList
[
'outfit_carry'
]
tOutFitList
[
'outfit_priest'
]
=
{
"item_priest_2_outfit"
,
"item_aether_lens"
,
"item_glimmer_cape"
,
"item_force_staff"
,
"item_ultimate_scepter"
,
"item_aghanims_shard"
,
"item_aeon_disk"
,
"item_guardian_greaves"
,
"item_octarine_core"
,
"item_hurricane_pike"
,
"item_ultimate_scepter_2"
,
"item_sheepstick"
,
"item_moon_shard"
,
}
tOutFitList
[
'outfit_mage'
]
=
{
"item_mage_grimstroke_outfit"
,
"item_aether_lens"
,
"item_ancient_janggo"
,
"item_force_staff"
,
"item_ultimate_scepter"
,
"item_aghanims_shard"
,
"item_boots_of_bearing"
,
"item_aeon_disk"
,
"item_sheepstick"
,
"item_octarine_core"
,
"item_hurricane_pike"
,
"item_ultimate_scepter_2"
,
"item_cyclone"
,
"item_wind_waker"
,
"item_moon_shard"
,
}
tOutFitList
[
'outfit_tank'
]
=
tOutFitList
[
'outfit_carry'
]
X
[
'sBuyList'
]
=
tOutFitList
[
sOutfitType
]
X
[
'sSellList'
]
=
{
"item_sheepstick"
,
"item_bottle"
,
"item_blink"
,
"item_null_talisman"
,
"item_travel_boots"
,
"item_arcane_boots"
,
"item_aeon_disk"
,
"item_magic_wand"
,
"item_sheepstick"
,
"item_ring_of_basilius"
,
}
if
J
.
Role
.
IsPvNMode
()
or
J
.
Role
.
IsAllShadow
()
then
X
[
'sBuyList'
],
X
[
'sSellList'
]
=
{
'PvN_mage'
},
{}
end
nAbilityBuildList
,
nTalentBuildList
,
X
[
'sBuyList'
],
X
[
'sSellList'
]
=
J
.
SetUserHeroInit
(
nAbilityBuildList
,
nTalentBuildList
,
X
[
'sBuyList'
],
X
[
'sSellList'
]
)
X
[
'sSkillList'
]
=
J
.
Skill
.
GetSkillList
(
sAbilityList
,
nAbilityBuildList
,
sTalentList
,
nTalentBuildList
)
X
[
'bDeafaultAbility'
]
=
false
X
[
'bDeafaultItem'
]
=
false
function
X
.
MinionThink
(
hMinionUnit
)
if
Minion
.
IsValidUnit
(
hMinionUnit
)
then
Minion
.
IllusionThink
(
hMinionUnit
)
end
end
--[[
npc_dota_hero_grimstroke
"Ability1" "grimstroke_dark_artistry"
"Ability2" "grimstroke_ink_creature"
"Ability3" "grimstroke_spirit_walk"
"Ability4" "grimstroke_dark_portrait"
"Ability5" "generic_hidden"
"Ability6" "grimstroke_soul_chain"
"Ability10" "special_bonus_unique_grimstroke_8"
"Ability11" "special_bonus_unique_grimstroke_7"
"Ability12" "special_bonus_unique_grimstroke_soul_chain_reflect_damage"
"Ability13" "special_bonus_unique_grimstroke_6"
"Ability14" "special_bonus_unique_grimstroke_3"
"Ability15" "special_bonus_unique_grimstroke_4"
"Ability16" "special_bonus_unique_grimstroke_1"
"Ability17" "special_bonus_unique_grimstroke_2"
modifier_grimstroke_dark_artistry_slow
modifier_grimstroke_ink_creature_spawning
modifier_grimstroke_ink_creature
modifier_grimstroke_ink_creature_latched
modifier_grimstroke_ink_creature_debuff
modifier_grimstroke_spirit_walk_buff
modifier_grimstroke_scepter_buff
modifier_grimstroke_soul_chain_channel_check
modifier_grimstroke_soul_chain
--]]
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
abilityR
=
bot
:
GetAbilityByName
(
sAbilityList
[
6
]
)
local
castQDesire
,
castQLocation
local
castWDesire
,
castWTarget
local
castEDesire
,
castETarget
local
castDDesire
,
castDTarget
local
castRDesire
,
castRTarget
local
nKeepMana
,
nMP
,
nHP
,
nLV
,
botTarget
,
hEnemyList
,
hAllyList
,
sMotive
local
bonusRange
=
0
function
X
.
SkillsComplement
()
if
J
.
CanNotUseAbility
(
bot
)
or
bot
:
IsInvisible
()
then
return
end
nKeepMana
=
400
bonusRange
=
0
nLV
=
bot
:
GetLevel
()
nMP
=
bot
:
GetMana
()
/
bot
:
GetMaxMana
()
nHP
=
bot
:
GetHealth
()
/
bot
:
GetMaxHealth
()
botTarget
=
J
.
GetProperTarget
(
bot
)
hEnemyList
=
bot
:
GetNearbyHeroes
(
1600
,
true
,
BOT_MODE_NONE
)
hAllyList
=
J
.
GetAlliesNearLoc
(
bot
:
GetLocation
(),
1600
)
bonusRange
=
J
.
GetBonusCastRange
(
bot
)
castRDesire
,
castRTarget
,
sMotive
=
A
.
ConsiderGrimstrokeSoulbind
(
bot
)
if
castRDesire
>
0
then
J
.
SetReportMotive
(
bDebugMode
,
sMotive
)
J
.
SetQueuePtToINT
(
bot
,
true
)
bot
:
ActionQueue_UseAbilityOnEntity
(
abilityR
,
castRTarget
)
return
end
castWDesire
,
castWTarget
,
sMotive
=
A
.
ConsiderGrimstrokePhantomsEmbrace
(
bot
)
if
castWDesire
>
0
then
J
.
SetReportMotive
(
bDebugMode
,
sMotive
)
J
.
SetQueuePtToINT
(
bot
,
true
)
bot
:
ActionQueue_UseAbilityOnEntity
(
abilityW
,
castWTarget
)
return
end
castDDesire
,
castDTarget
,
sMotive
=
A
.
ConsiderGrimstrokeDarkPortrait
(
bot
)
if
castDDesire
>
0
then
J
.
SetReportMotive
(
bDebugMode
,
sMotive
)
J
.
SetQueuePtToINT
(
bot
,
true
)
bot
:
ActionQueue_UseAbilityOnEntity
(
abilityD
,
castDTarget
)
return
end
castEDesire
,
castETarget
,
sMotive
=
A
.
ConsiderGrimstrokeInkSwell
(
bot
)
if
castEDesire
>
0
then
J
.
SetReportMotive
(
bDebugMode
,
sMotive
)
J
.
SetQueuePtToINT
(
bot
,
true
)
bot
:
ActionQueue_UseAbilityOnEntity
(
abilityE
,
castETarget
)
return
end
castQDesire
,
castQLocation
,
sMotive
=
A
.
ConsiderGrimstrokeStrokeOfFate
(
bot
)
if
castQDesire
>
0
then
J
.
SetReportMotive
(
bDebugMode
,
sMotive
)
J
.
SetQueuePtToINT
(
bot
,
true
)
bot
:
ActionQueue_UseAbilityOnLocation
(
abilityQ
,
castQLocation
)
return
end
end
return
X
\ No newline at end of file
FunLib/aba_ability.lua
0 → 100644
View file @
7b32f085
This diff is collapsed.
Click to expand it.
FunLib/aba_role.lua
View file @
7b32f085
...
@@ -1521,6 +1521,7 @@ X["hero_roles"] = {
...
@@ -1521,6 +1521,7 @@ X["hero_roles"] = {
}
}
X
[
"bottle"
]
=
{
X
[
"bottle"
]
=
{
[
"npc_dota_hero_grimstroke"
]
=
1
,
[
"npc_dota_hero_tinker"
]
=
1
,
[
"npc_dota_hero_tinker"
]
=
1
,
[
"npc_dota_hero_storm_spirit"
]
=
1
,
[
"npc_dota_hero_storm_spirit"
]
=
1
,
[
"npc_dota_hero_pudge"
]
=
1
,
[
"npc_dota_hero_pudge"
]
=
1
,
...
@@ -1678,6 +1679,7 @@ X['off'] = {
...
@@ -1678,6 +1679,7 @@ X['off'] = {
}
}
X
[
'mid'
]
=
{
X
[
'mid'
]
=
{
'npc_dota_hero_grimstroke'
,
'npc_dota_hero_alchemist'
,
'npc_dota_hero_alchemist'
,
'npc_dota_hero_arc_warden'
,
'npc_dota_hero_arc_warden'
,
'npc_dota_hero_bloodseeker'
,
'npc_dota_hero_bloodseeker'
,
...
@@ -2157,6 +2159,7 @@ function X.IsABAHero()
...
@@ -2157,6 +2159,7 @@ function X.IsABAHero()
[
"npc_dota_hero_antimage"
]
=
true
,
[
"npc_dota_hero_antimage"
]
=
true
,
[
"npc_dota_hero_night_stalker"
]
=
true
,
[
"npc_dota_hero_night_stalker"
]
=
true
,
[
"npc_dota_hero_obsidian_destroyer"
]
=
true
,
[
"npc_dota_hero_obsidian_destroyer"
]
=
true
,
[
"npc_dota_hero_grimstroke"
]
=
true
,
[
"npc_dota_hero_arc_warden"
]
=
true
,
[
"npc_dota_hero_arc_warden"
]
=
true
,
[
"npc_dota_hero_bane"
]
=
true
,
[
"npc_dota_hero_bane"
]
=
true
,
[
"npc_dota_hero_bloodseeker"
]
=
true
,
[
"npc_dota_hero_bloodseeker"
]
=
true
,
...
...
FunLib/jmz_func.lua
View file @
7b32f085
...
@@ -274,6 +274,52 @@ function J.GetVulnerableWeakestUnit( bot, bHero, bEnemy, nRadius )
...
@@ -274,6 +274,52 @@ function J.GetVulnerableWeakestUnit( bot, bHero, bEnemy, nRadius )
end
end
function
J
.
GetVulnerableWeakestUnitMagicImmune
(
bot
,
bHero
,
bEnemy
,
nRadius
)
local
unitList
=
{}
local
weakest
=
nil
local
weakestHP
=
10000
if
bHero
then
unitList
=
bot
:
GetNearbyHeroes
(
nRadius
,
bEnemy
,
BOT_MODE_NONE
)
else
unitList
=
bot
:
GetNearbyLaneCreeps
(
nRadius
,
bEnemy
)
end
for
_
,
u
in
pairs
(
unitList
)
do
if
u
:
GetHealth
()
<
weakestHP
and
J
.
CanCastOnMagicImmune
(
u
)
then
weakest
=
u
weakestHP
=
u
:
GetHealth
()
end
end
return
weakest
end
function
J
.
GetVulnerableWeakestUnitWithLotusCheck
(
bot
,
bHero
,
bEnemy
,
nRadius
)
local
unitList
=
{}
local
weakest
=
nil
local
weakestHP
=
10000
if
bHero
then
unitList
=
bot
:
GetNearbyHeroes
(
nRadius
,
bEnemy
,
BOT_MODE_NONE
)
else
unitList
=
bot
:
GetNearbyLaneCreeps
(
nRadius
,
bEnemy
)
end
for
_
,
u
in
pairs
(
unitList
)
do
if
u
:
GetHealth
()
<
weakestHP
and
J
.
CanCastOnNonMagicImmune
(
u
)
and
J
.
CanCastOnTargetAdvanced
(
u
)
and
J
.
CanCastOnTargetAdvanced
(
u
)
then
weakest
=
u
weakestHP
=
u
:
GetHealth
()
end
end
return
weakest
end
function
J
.
GetVulnerableUnitNearLoc
(
bot
,
bHero
,
bEnemy
,
nCastRange
,
nRadius
,
vLoc
)
function
J
.
GetVulnerableUnitNearLoc
(
bot
,
bHero
,
bEnemy
,
nCastRange
,
nRadius
,
vLoc
)
...
@@ -323,7 +369,7 @@ function J.GetAoeEnemyHeroLocation( bot, nCastRange, nRadius, nCount )
...
@@ -323,7 +369,7 @@ function J.GetAoeEnemyHeroLocation( bot, nCastRange, nRadius, nCount )
if
nTrueCount
>=
nCount
if
nTrueCount
>=
nCount
then
then
return
nAoe
.
target
L
oc
return
nAoe
.
target
l
oc
end
end
end
end
...
@@ -992,6 +1038,52 @@ function J.GetBonusCastRange( bot )
...
@@ -992,6 +1038,52 @@ function J.GetBonusCastRange( bot )
end
end
function
J
.
IsHealing
(
bot
)
for
_
,
modifier
in
pairs
(
J
.
Buff
[
"hero_is_healing"
]
)
do
if
bot
:
HasModifier
(
modifier
)
then
return
true
end
end
return
false
end
function
J
.
ShouldInterrupt
(
bot
)
if
bot
:
IsChanneling
()
or
bot
:
IsCastingAbility
()
or
bot
:
HasModifier
(
'modifier_crystal_maiden_freezing_field'
)
then
return
true
end
return
false
end
function
J
.
GetMeleeAlly
(
bot
)
local
nMelee
=
nil
local
nMeleeAttackRange
=
1000
local
nAlliedHeroesInRange
=
bot
:
GetNearbyHeroes
(
1400
,
false
,
BOT_MODE_NONE
)
for
_
,
npcAlly
in
pairs
(
nAlliedHeroesInRange
)
do
npcAttackRange
=
npcAlly
:
GetAttackRange
()
if
nMeleeAttackRange
<
npcAttackRange
then
nMeleeAttackRange
=
npcAttackRange
nMelee
=
npcAlly
end
end
return
nMelee
end
function
J
.
ShouldEscape
(
bot
)
function
J
.
ShouldEscape
(
bot
)
local
tableNearbyAttackAllies
=
bot
:
GetNearbyHeroes
(
800
,
false
,
BOT_MODE_ATTACK
)
local
tableNearbyAttackAllies
=
bot
:
GetNearbyHeroes
(
800
,
false
,
BOT_MODE_ATTACK
)
...
@@ -1019,7 +1111,7 @@ function J.IsDisabled( npcTarget )
...
@@ -1019,7 +1111,7 @@ function J.IsDisabled( npcTarget )
or
J
.
IsTaunted
(
npcTarget
)
or
J
.
IsTaunted
(
npcTarget
)
else
else
if
npcTarget
:
IsStunned
()
and
J
.
GetRemainStunTime
(
npcTarget
)
>
0
.
8
if
npcTarget
:
IsStunned
()
and
J
.
GetRemainStunTime
(
npcTarget
)
>
0
.
3
then
then
return
true
return
true
end
end
...
@@ -1043,10 +1135,15 @@ end
...
@@ -1043,10 +1135,15 @@ end
function
J
.
IsTaunted
(
npcTarget
)
function
J
.
IsTaunted
(
npcTarget
)
return
npcTarget
:
HasModifier
(
"modifier_axe_berserkers_call"
)
for
_
,
modifier
in
pairs
(
J
.
Buff
[
"hero_is_taunted"
]
)
or
npcTarget
:
HasModifier
(
"modifier_legion_commander_duel"
)
do
or
npcTarget
:
HasModifier
(
"modifier_winter_wyvern_winters_curse"
)
if
npcTarget
:
HasModifier
(
modifier
)
or
npcTarget
:
HasModifier
(
"modifier_winter_wyvern_winters_curse_aura"
)
then
return
true
end
end
return
false
end
end
...
@@ -2494,6 +2591,19 @@ function J.ShouldDispelStrongDebuff( npcTarget )
...
@@ -2494,6 +2591,19 @@ function J.ShouldDispelStrongDebuff( npcTarget )
end
end
function
J
.
HasInvisibilityBuff
(
npcTarget
)
for
_
,
modifier
in
pairs
(
J
.
Buff
[
"invisible_buffs"
]
)
do
if
npcTarget
:
HasModifier
(
modifier
)
then
return
true
end
end
return
false
end
function
J
.
GetModifierTime
(
bot
,
sModifierName
)
function
J
.
GetModifierTime
(
bot
,
sModifierName
)
...
...
ability_item_usage_generic.lua
View file @
7b32f085
...
@@ -1021,10 +1021,11 @@ X.ConsiderItemDesire["item_black_king_bar"] = function( hItem )
...
@@ -1021,10 +1021,11 @@ X.ConsiderItemDesire["item_black_king_bar"] = function( hItem )
local
sCastType
=
'none'
local
sCastType
=
'none'
local
hEffectTarget
=
nil
local
hEffectTarget
=
nil
local
sCastMotive
=
nil
local
sCastMotive
=
nil
local
nInRangeEnmyList
=
bot
:
GetNearbyHeroes
(
nCastRange
,
true
,
BOT_MODE_NONE
)
local
nAlliedHeroesInRange
=
bot
:
GetNearbyHeroes
(
nCastRange
,
false
,
BOT_MODE_NONE
)
local
nEnemyHeroesInRange
=
bot
:
GetNearbyHeroes
(
nCastRange
,
true
,
BOT_MODE_NONE
)
if
#
n
InRangeEnmyList
>
0
if
#
n
EnemyHeroesInRange
>=
#
nAlliedHeroesInRange
and
not
bot
:
IsMagicImmune
()
and
not
bot
:
IsMagicImmune
()
and
not
bot
:
IsInvulnerable
()
and
not
bot
:
IsInvulnerable
()
and
not
bot
:
HasModifier
(
'modifier_item_lotus_orb_active'
)
and
not
bot
:
HasModifier
(
'modifier_item_lotus_orb_active'
)
...
@@ -2041,10 +2042,10 @@ X.ConsiderItemDesire["item_glimmer_cape"] = function( hItem )
...
@@ -2041,10 +2042,10 @@ X.ConsiderItemDesire["item_glimmer_cape"] = function( hItem )
and
not
bot
:
IsMagicImmune
()
and
not
bot
:
IsMagicImmune
()
then
then
if
bot
:
IsSilenced
()
or
bot
:
IsRooted
()
or
J
.
IsStunProjectileIncoming
(
bot
,
1000
)
if
bot
:
IsSilenced
()
or
J
.
IsStunProjectileIncoming
(
bot
,
1000
)
then
then
hEffectTarget
=
bot
hEffectTarget
=
bot
sCastMotive
=
'自己被
缠绕或
沉默了'
sCastMotive
=
'自己被沉默了'
return
BOT_ACTION_DESIRE_HIGH
,
hEffectTarget
,
sCastType
,
sCastMotive
return
BOT_ACTION_DESIRE_HIGH
,
hEffectTarget
,
sCastType
,
sCastMotive
end
end
...
@@ -2108,6 +2109,62 @@ X.ConsiderItemDesire["item_glimmer_cape"] = function( hItem )
...
@@ -2108,6 +2109,62 @@ X.ConsiderItemDesire["item_glimmer_cape"] = function( hItem )
end
end
X
.
ConsiderItemDesire
[
"item_mekansm"
]
=
function
(
hItem
)
local
nCastRange
=
1200
local
sCastType
=
'none'
local
hEffectTarget
=
nil
local
sCastMotive
=
nil
local
hAllyList
=
J
.
GetAllyList
(
bot
,
nCastRange
)
for
_
,
npcAlly
in
pairs
(
hAllyList
)
do
if
npcAlly
~=
nil
and
npcAlly
:
IsAlive
()
and
J
.
GetHP
(
npcAlly
)
<
0
.
45
and
#
hNearbyEnemyHeroList
>
0
then
hEffectTarget
=
npcAlly
sCastMotive
=
'治疗队友'
..
J
.
Chat
.
GetNormName
(
hEffectTarget
)
return
BOT_ACTION_DESIRE_HIGH
,
hEffectTarget
,
sCastType
,
sCastMotive
end
end
local
needHPCount
=
0
for
_
,
npcAlly
in
pairs
(
hAllyList
)
do
if
npcAlly
~=
nil
and
npcAlly
:
GetMaxHealth
()
-
npcAlly
:
GetHealth
()
>
325
then
needHPCount
=
needHPCount
+
1
if
needHPCount
>=
2
and
npcAlly
:
GetHealth
()
/
npcAlly
:
GetMaxHealth
()
<
0
.
55
then
hEffectTarget
=
npcAlly
sCastMotive
=
'治疗二队友:'
..
J
.
Chat
.
GetNormName
(
hEffectTarget
)
return
BOT_ACTION_DESIRE_HIGH
,
hEffectTarget
,
sCastType
,
sCastMotive
end
if
needHPCount
>=
3
then
hEffectTarget
=
npcAlly
sCastMotive
=
'治疗多个队友:'
..
J
.
Chat
.
GetNormName
(
hEffectTarget
)
return
BOT_ACTION_DESIRE_HIGH
,
hEffectTarget
,
sCastType
,
sCastMotive
end
end
end
if
bot
:
GetHealth
()
/
bot
:
GetMaxHealth
()
<
0
.
5
then
hEffectTarget
=
bot
sCastMotive
=
'治疗自己:'
..
J
.
Chat
.
GetNormName
(
hEffectTarget
)
return
BOT_ACTION_DESIRE_HIGH
,
hEffectTarget
,
sCastType
,
sCastMotive
end
return
BOT_ACTION_DESIRE_NONE
end
--大鞋
--大鞋
X
.
ConsiderItemDesire
[
"item_guardian_greaves"
]
=
function
(
hItem
)
X
.
ConsiderItemDesire
[
"item_guardian_greaves"
]
=
function
(
hItem
)
...
@@ -4937,10 +4994,12 @@ end
...
@@ -4937,10 +4994,12 @@ end
function
X
.
HasInvisibilityOrItem
(
npcEnemy
)
function
X
.
HasInvisibilityOrItem
(
npcEnemy
)
if
npcEnemy
:
HasInvisibility
(
false
)
if
npcEnemy
:
HasInvisibility
(
false
)
or
J
.
HasInvisibilityBuff
(
npcEnemy
)
or
J
.
HasItem
(
npcEnemy
,
"item_shadow_amulet"
)
or
J
.
HasItem
(
npcEnemy
,
"item_shadow_amulet"
)
or
J
.
HasItem
(
npcEnemy
,
"item_glimmer_cape"
)
or
J
.
HasItem
(
npcEnemy
,
"item_glimmer_cape"
)
or
J
.
HasItem
(
npcEnemy
,
"item_invis_sword"
)
or
J
.
HasItem
(
npcEnemy
,
"item_invis_sword"
)
or
J
.
HasItem
(
npcEnemy
,
"item_silver_edge"
)
or
J
.
HasItem
(
npcEnemy
,
"item_silver_edge"
)
or
J
.
HasItem
(
npcEnemy
,
"item_trickster_cloak"
)
then
then
return
true
return
true
end
end
...
...
hero_selection.lua
View file @
7b32f085
...
@@ -174,6 +174,7 @@ local sUserKeyDir = Chat.GetUserKeyDir()
...
@@ -174,6 +174,7 @@ local sUserKeyDir = Chat.GetUserKeyDir()
local
sHasDevelopmentHeroList
=
{
local
sHasDevelopmentHeroList
=
{
"npc_dota_hero_abaddon"
,
"npc_dota_hero_abaddon"
,
"npc_dota_hero_grimstroke"
,
"npc_dota_hero_night_stalker"
,
"npc_dota_hero_night_stalker"
,
"npc_dota_hero_obsidian_destroyer"
,
"npc_dota_hero_obsidian_destroyer"
,
"npc_dota_hero_abyssal_underlord"
,
"npc_dota_hero_abyssal_underlord"
,
...
@@ -243,6 +244,7 @@ local sHasDevelopmentHeroList = {
...
@@ -243,6 +244,7 @@ local sHasDevelopmentHeroList = {
local
sFirstList
=
{
local
sFirstList
=
{
"npc_dota_hero_grimstroke"
,
"npc_dota_hero_silencer"
,
"npc_dota_hero_silencer"
,
"npc_dota_hero_warlock"
,
"npc_dota_hero_warlock"
,
"npc_dota_hero_necrolyte"
,
"npc_dota_hero_necrolyte"
,
...
@@ -357,6 +359,7 @@ local sPriestList = {
...
@@ -357,6 +359,7 @@ local sPriestList = {
"npc_dota_hero_queenofpain"
,
"npc_dota_hero_queenofpain"
,
"npc_dota_hero_disruptor"
,
"npc_dota_hero_disruptor"
,
"npc_dota_hero_muerta"
,
"npc_dota_hero_muerta"
,
"npc_dota_hero_grimstroke"
,
}
}
local
sMageList
=
{
local
sMageList
=
{
...
@@ -385,6 +388,7 @@ local sMageList = {
...
@@ -385,6 +388,7 @@ local sMageList = {
"npc_dota_hero_disruptor"
,
"npc_dota_hero_disruptor"
,
'npc_dota_hero_venomancer'
,
'npc_dota_hero_venomancer'
,
"npc_dota_hero_obsidian_destroyer"
,
"npc_dota_hero_obsidian_destroyer"
,
"npc_dota_hero_grimstroke"
,
}
}
local
sCarryList
=
{
local
sCarryList
=
{
...
...
mode_farm_generic.lua
View file @
7b32f085
...
@@ -873,8 +873,9 @@ function X.ShouldRun(bot)
...
@@ -873,8 +873,9 @@ function X.ShouldRun(bot)
end
end
--
防止美杜莎石化
--
美杜莎石化/电棍吸
if
bot
:
HasModifier
(
'modifier_medusa_stone_gaze_facing'
)
if
bot
:
HasModifier
(
'modifier_medusa_stone_gaze_facing'
)
or
bot
:
HasModifier
(
'modifier_razor_link_vision'
)
then
then
return
3
.
33
return
3
.
33
end
end
...
...
mode_team_roam_generic.lua
View file @
7b32f085
...
@@ -1628,7 +1628,8 @@ function X.IsSpecialSupport(bot)
...
@@ -1628,7 +1628,8 @@ function X.IsSpecialSupport(bot)
[
"npc_dota_hero_bane"
]
=
true
,
[
"npc_dota_hero_bane"
]
=
true
,
[
"npc_dota_hero_crystal_maiden"
]
=
true
,
[
"npc_dota_hero_crystal_maiden"
]
=
true
,
[
"npc_dota_hero_dazzle"
]
=
true
,
[
"npc_dota_hero_dazzle"
]
=
true
,
[
"npc_dota_hero_death_prophet"
]
=
true
,
[
"npc_dota_hero_death_prophet"
]
=
true
,
[
"npc_dota_hero_grimstroke"
]
=
true
,
[
"npc_dota_hero_jakiro"
]
=
true
,
[
"npc_dota_hero_jakiro"
]
=
true
,
[
"npc_dota_hero_lich"
]
=
true
,
[
"npc_dota_hero_lich"
]
=
true
,
[
"npc_dota_hero_lina"
]
=
true
,
[
"npc_dota_hero_lina"
]
=
true
,
...
@@ -1640,9 +1641,9 @@ function X.IsSpecialSupport(bot)
...
@@ -1640,9 +1641,9 @@ function X.IsSpecialSupport(bot)
[
"npc_dota_hero_shadow_shaman"
]
=
true
,
[
"npc_dota_hero_shadow_shaman"
]
=
true
,
[
"npc_dota_hero_silencer"
]
=
true
,
[
"npc_dota_hero_silencer"
]
=
true
,
[
"npc_dota_hero_skywrath_mage"
]
=
true
,
[
"npc_dota_hero_skywrath_mage"
]
=
true
,
[
"npc_dota_hero_warlock"
]
=
true
,
[
"npc_dota_hero_warlock"
]
=
true
,
[
"npc_dota_hero_windrunner"
]
=
true
,
[
"npc_dota_hero_windrunner"
]
=
true
,
[
"npc_dota_hero_witch_doctor"
]
=
true
,
[
"npc_dota_hero_witch_doctor"
]
=
true
,
[
"npc_dota_hero_zuus"
]
=
true
,
[
"npc_dota_hero_zuus"
]
=
true
,
[
"npc_dota_hero_abaddon"
]
=
true
,
[
"npc_dota_hero_abaddon"
]
=
true
,
}
}
...
...
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