Commit f9c0f12d authored by JoyJ's avatar JoyJ

7.33 ites

parent d1cf3a7d
......@@ -91,7 +91,7 @@ end
--[[
npc_dota_hero_oracle
npc_dota_hero_abaddon
"Ability1" "abaddon_death_coil"
"Ability2" "abaddon_aphotic_shield"
......
......@@ -2169,7 +2169,7 @@ Chat['tItemNameList'] = {
},
[230] = {
[231] = {
['sRawName'] = 'item_apex',
['sShortName'] = 'itemNull',
['sCnName'] = '极',
......@@ -2464,7 +2464,7 @@ Chat['tItemNameList'] = {
[267] = {
['sRawName'] = 'item_black_powder_bag',
['sShortName'] = 'itemNull',
['sCnName'] = '炸雷服',
['sCnName'] = '雷火弹',
['sEnName'] = 0,
},
......@@ -2640,7 +2640,7 @@ Chat['tItemNameList'] = {
},
[288] = {
[289] = {
['sRawName'] = 'item_pavise',
['sShortName'] = 'itemNull',
['sCnName'] = '长盾',
......@@ -2648,6 +2648,54 @@ Chat['tItemNameList'] = {
},
[290] = {
['sRawName'] = 'item_spark_of_courage',
['sShortName'] = 'itemNull',
['sCnName'] = '勇气之光',
['sEnName'] = 0,
},
[291] = {
['sRawName'] = 'item_duelist_gloves',
['sShortName'] = 'itemNull',
['sCnName'] = '勇气之光',
['sEnName'] = 0,
},
[292] = {
['sRawName'] = 'item_gossamer_cape',
['sShortName'] = 'itemNull',
['sCnName'] = '蛛丝斗篷',
['sEnName'] = 0,
},
[293] = {
['sRawName'] = 'item_dandelion_amulet',
['sShortName'] = 'itemNull',
['sCnName'] = '蒲公英护符',
['sEnName'] = 0,
},
[294] = {
['sRawName'] = 'item_defiant_shell',
['sShortName'] = 'itemNull',
['sCnName'] = '不羁甲壳',
['sEnName'] = 0,
},
[295] = {
['sRawName'] = 'item_vindicators_axe',
['sShortName'] = 'itemNull',
['sCnName'] = '正义之斧',
['sEnName'] = 0,
},
}
......
......@@ -3723,6 +3723,16 @@ function J.GetVal(ability, name)
return f
end
function J.WontDie(unit)
if not unit:CanBeSeen() then return false end
for _,buff in J.Buff['enemy_is_undead'] do
if unit:HasModifier(buff) then
return true
end
end
return false
end
return J
--[[
......
......@@ -5376,7 +5376,7 @@ X.ConsiderItemDesire["item_demonicon"] = function( hItem )
end
--堕天斧
--天崩
X.ConsiderItemDesire["item_fallen_sky"] = function( hItem )
local nCastRange = 1600
......@@ -5507,6 +5507,7 @@ X.ConsiderItemDesire["item_book_of_shadows"] = function( hItem )
end
--[[
--风暴宝器
X.ConsiderItemDesire["item_stormcrafter"] = function( hItem )
......@@ -5539,6 +5540,7 @@ X.ConsiderItemDesire["item_stormcrafter"] = function( hItem )
return BOT_ACTION_DESIRE_NONE
end
]]--
--欺诈师斗篷
X.ConsiderItemDesire["item_trickster_cloak"] = function( hItem )
......@@ -6026,6 +6028,50 @@ end
--灵匣/item_phylactery,分散到各个脚本里单独处理
--浩劫巨锤
X.ConsiderItemDesire["item_havoc_hammer"] = function( hItem )
local nCastRange = hItem:GetVal('range')
local sCastType = 'none'
local hEffectTarget = nil
local sCastMotive = nil
local damage = hItem:GetVal('nuke_base_dmg') + hItem:GetVal('nuke_str_dmg') * bot:GetStrength()
local nInRangeEnmyList = bot:GetNearbyHeroes( nCastRange, true, BOT_MODE_NONE )
if #nInRangeEnmyList<1 then return BOT_ACTION_DESIRE_NONE end
if #nInRangeEnmyList>2 or bot:GetHealthPercent()<=50 then return BOT_ACTION_DESIRE_HIGH, nil, sCastType, "击退多个敌人或保命" end
for _,unit in pairs(nInRangeEnmyList) do
if J.WillMagicKillTarget(bot, unit, damage, 0) then
return BOT_ACTION_DESIRE_HIGH, nil, sCastType, "击杀"
end
end
return BOT_ACTION_DESIRE_NONE
end
--烈士鳞甲
X.ConsiderItemDesire["item_martyrs_plate"] = function( hItem )
local nCastRange = hItem:GetVal('aura_radius')
local sCastType = 'none'
local hEffectTarget = nil
local sCastMotive = nil
local allies = bot:GetNearbyHeroes( nCastRange, false, BOT_MODE_NONE )
FilterTable(allies, function(u)
return u~=bot and u:WasRecentlyDamagedByAnyHero(2.0)
and u:GetHealth() < bot:GetHealth()
end)
if J.IsInTeamFight(bot, nCastRange) and #allies > 0
and bot:GetHealthPercent() > 50 then
return BOT_ACTION_DESIRE_HIGH, hEffectTarget, sCastType, '烈士鳞甲'
end
end
--新物品
X.ConsiderItemDesire["item_new"] = function( hItem )
......
......@@ -989,7 +989,7 @@ function Think()
if not IsPlayerBot( id ) then sSelectHero = Chat['sAllHeroList'][RandomInt( 2, 121 )] end
end
if GetTeam() ~= TEAM_DIRE and i == 2 then sSelectHero = "npc_dota_hero_abaddon" end
--if GetTeam() ~= TEAM_DIRE and i == 2 then sSelectHero = "npc_dota_hero_abaddon" end
SelectHero( id, sSelectHero )
if Role["bLobbyGame"] == false then Role["bLobbyGame"] = true end
......
......@@ -1721,8 +1721,7 @@ end
function X.ShouldNotRetreat(bot)
if bot:HasModifier("modifier_item_satanic_unholy")
or bot:HasModifier("modifier_abaddon_borrowed_time")
or bot:HasModifier( 'modifier_abaddon_borrowed_time_immolate' )
or J.WontDie(bot)
or ( bot:GetCurrentMovementSpeed() < 240 and not bot:HasModifier("modifier_arc_warden_spark_wraith_purge") )
then
return true;
......@@ -1766,10 +1765,9 @@ function X.ShouldNotRetreat(bot)
if ( J.GetHP(ally) > 0.88 and ally:GetLevel() >= 12 and ally:GetActiveMode() ~= BOT_MODE_RETREAT)
or ( ally:HasModifier("modifier_black_king_bar_immune") or ally:IsMagicImmune() )
or ( ally:HasModifier("modifier_item_mask_of_madness_berserk") and ally:GetAttackTarget() ~= nil )
or ally:HasModifier("modifier_abaddon_borrowed_time")
or J.WontDie(ally)
or ally:HasModifier("modifier_item_satanic_unholy")
or ally:HasModifier("modifier_oracle_false_promise_timer")
then
or not ally:IsBot() then
return true;
end
end
......
......@@ -93,6 +93,21 @@ function CDOTA_Bot_Script.IsCanInvisible(unit)
end
return true
end
function CDOTA_Bot_Script.GetStrength(unit)
if not unit:CanBeSeen() or not unit:IsHero() then return 0 end
return unit:GetAttributeValue(ATTRIBUTE_STRENGTH)
end
function CDOTA_Bot_Script.GetAgility(unit)
if not unit:CanBeSeen() or not unit:IsHero() then return 0 end
return unit:GetAttributeValue(ATTRIBUTE_AGILITY)
end
function CDOTA_Bot_Script.GetIntellect(unit)
if not unit:CanBeSeen() or not unit:IsHero() then return 0 end
return unit:GetAttributeValue(ATTRIBUTE_INTELLECT)
end
function CDOTA_Bot_Script.GetAllAttributes(unit)
return unit:GetStrength() + unit:GetAgility() + unit:GetIntellect()
end
function CDOTABaseAbility_BotScript.GetVal(ability, name)
local f=ability:GetSpecialValueFloat(name)
if math.abs(f)<0.0001 then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment