Commit d1cf3a7d authored by JoyJ's avatar JoyJ

remove wraith_pact

parent bc4a2df1
......@@ -51,7 +51,7 @@ tOutFitList['outfit_tank'] = {
"item_holy_locket",
"item_guardian_greaves",
"item_spirit_vessel",
"item_wraith_pact",
"item_assault",
"item_shivas_guard",
-- "item_sheepstick",
"item_moon_shard",
......
......@@ -65,7 +65,7 @@ tOutFitList['outfit_priest'] = {
"item_guardian_greaves",
"item_spirit_vessel",
"item_glimmer_cape",
"item_wraith_pact",
"item_ultimate_scepter",
"item_shivas_guard",
"item_mystic_staff",
"item_ultimate_scepter_2",
......
......@@ -30,9 +30,8 @@ tOutFitList['outfit_tank'] = {
"item_bristleback_outfit",
"item_vanguard",
"item_aghanims_shard",
"item_hood_of_defiance",
"item_blink",
"item_crimson_guard",
"item_blink",
"item_pipe",
"item_heart",
"item_overwhelming_blink",
......
......@@ -58,7 +58,7 @@ tOutFitList['outfit_priest'] = {
"item_glimmer_cape",
"item_guardian_greaves",
"item_spirit_vessel",
"item_wraith_pact",
"item_octarine_core",
"item_shivas_guard",
"item_sheepstick",
"item_moon_shard",
......
......@@ -61,7 +61,6 @@ tOutFitList['outfit_priest'] = {
"item_aghanims_shard",
"item_guardian_greaves",
"item_spirit_vessel",
"item_wraith_pact",
"item_ultimate_scepter",
"item_shivas_guard",
"item_moon_shard",
......
......@@ -62,7 +62,6 @@ tOutFitList['outfit_priest'] = {
"item_aghanims_shard",
"item_guardian_greaves",
"item_spirit_vessel",
"item_wraith_pact",
"item_ultimate_scepter",
"item_shivas_guard",
"item_moon_shard",
......
......@@ -61,7 +61,7 @@ tOutFitList['outfit_priest'] = {
"item_aghanims_shard",
"item_guardian_greaves",
"item_spirit_vessel",
"item_wraith_pact",
"item_ultimate_scepter",
"item_shivas_guard",
"item_sheepstick",
"item_moon_shard",
......
......@@ -61,12 +61,13 @@ tOutFitList['outfit_priest'] = {
"item_aghanims_shard",
"item_guardian_greaves",
"item_spirit_vessel",
"item_wraith_pact",
"item_cyclone",
-- "item_ultimate_scepter",
"item_shivas_guard",
"item_moon_shard",
-- "item_ultimate_scepter_2",
"item_sheepstick",
"item_wind_waker",
}
......
......@@ -62,10 +62,9 @@ tOutFitList['outfit_priest'] = {
"item_guardian_greaves",
"item_spirit_vessel",
"item_ultimate_scepter",
"item_wraith_pact",
"item_shivas_guard",
"item_moon_shard",
"item_octarine_core",
"item_moon_shard",
"item_shivas_guard",
"item_ultimate_scepter_2",
}
......
......@@ -54,8 +54,9 @@ tOutFitList['outfit_priest'] = {
"item_shadow_amulet",
"item_guardian_greaves",
"item_spirit_vessel",
"item_cyclone",
"item_wind_waker",
"item_glimmer_cape",
"item_wraith_pact",
"item_shivas_guard",
"item_mystic_staff",
"item_sheepstick",
......
......@@ -61,9 +61,10 @@ tOutFitList['outfit_priest'] = {
"item_holy_locket",
"item_guardian_greaves",
"item_spirit_vessel",
"item_wraith_pact",
"item_cyclone",
"item_shivas_guard",
-- "item_sheepstick",
"item_sheepstick",
"item_wind_waker",
"item_moon_shard",
}
......
......@@ -59,10 +59,11 @@ tOutFitList['outfit_priest'] = {
"item_aghanims_shard",
"item_guardian_greaves",
"item_spirit_vessel",
"item_wraith_pact",
"item_cyclone",
"item_shivas_guard",
"item_sheepstick",
"item_moon_shard",
"item_wind_waker",
}
......
......@@ -58,10 +58,11 @@ tOutFitList['outfit_priest'] = {
-- "item_aghanims_shard",
"item_guardian_greaves",
"item_spirit_vessel",
"item_wraith_pact",
"item_cyclone",
"item_shivas_guard",
"item_sheepstick",
"item_moon_shard",
"item_wind_waker",
}
......
......@@ -59,12 +59,12 @@ tOutFitList['outfit_priest'] = {
"item_aghanims_shard",
"item_guardian_greaves",
"item_spirit_vessel",
"item_wraith_pact",
"item_ultimate_scepter",
"item_shivas_guard",
"item_moon_shard",
"item_ultimate_scepter_2",
"item_refresher",
"item_wind_waker",
}
......
......@@ -60,10 +60,11 @@ tOutFitList['outfit_priest'] = {
"item_aghanims_shard",
"item_guardian_greaves",
"item_spirit_vessel",
"item_wraith_pact",
"item_cyclone",
"item_shivas_guard",
"item_sheepstick",
"item_moon_shard",
"item_wind_waker",
}
......
......@@ -60,12 +60,13 @@ tOutFitList['outfit_priest'] = {
"item_aghanims_shard",
"item_guardian_greaves",
"item_spirit_vessel",
"item_wraith_pact",
"item_cyclone",
"item_ultimate_scepter",
"item_shivas_guard",
"item_moon_shard",
"item_ultimate_scepter_2",
"item_sheepstick",
"item_wind_waker",
}
......
......@@ -62,11 +62,12 @@ tOutFitList['outfit_priest'] = {
-- "item_aghanims_shard",
"item_guardian_greaves",
"item_spirit_vessel",
"item_wraith_pact",
"item_cyclone",
"item_ultimate_scepter",
"item_refresher",
"item_ultimate_scepter_2",
"item_shivas_guard",
"item_wind_waker",
"item_moon_shard",
}
......
......@@ -62,12 +62,13 @@ tOutFitList['outfit_priest'] = {
-- "item_aghanims_shard",
"item_guardian_greaves",
"item_spirit_vessel",
"item_wraith_pact",
"item_cyclone",
-- "item_ultimate_scepter",
"item_shivas_guard",
"item_moon_shard",
-- "item_ultimate_scepter_2",
"item_sheepstick",
"item_wind_waker",
}
......
......@@ -59,11 +59,12 @@ tOutFitList['outfit_priest'] = {
"item_aghanims_shard",
"item_guardian_greaves",
"item_spirit_vessel",
"item_wraith_pact",
"item_cyclone",
"item_ultimate_scepter",
"item_shivas_guard",
"item_ultimate_scepter_2",
"item_sheepstick",
"item_wind_waker",
"item_moon_shard",
}
......
......@@ -61,11 +61,12 @@ tOutFitList['outfit_priest'] = {
"item_aghanims_shard",
"item_guardian_greaves",
"item_spirit_vessel",
"item_wraith_pact",
"item_cyclone",
"item_ultimate_scepter",
"item_shivas_guard",
"item_ultimate_scepter_2",
"item_sheepstick",
"item_wind_waker",
"item_moon_shard",
}
......
......@@ -133,6 +133,7 @@ Chat['sAllHeroList'] = {
'npc_dota_hero_dawnbreaker',
'npc_dota_hero_marci',
'npc_dota_hero_primal_beast',
'npc_dota_hero_muerta',
}
......@@ -2515,7 +2516,7 @@ Chat['tItemNameList'] = {
['sCnName'] = '怨灵之契',
['sEnName'] = 0,
},
},
--内部自定义新物品
[274] = {
......@@ -2565,7 +2566,88 @@ Chat['tItemNameList'] = {
['sEnName'] = 0,
},
--7.33
[280] = {
['sRawName'] = 'item_disperser',
['sShortName'] = '大散失',
['sCnName'] = '散魂剑',
['sEnName'] = 0,
},
[281] = {
['sRawName'] = 'item_harpoon',
['sShortName'] = 'itemNull',
['sCnName'] = '鱼叉',
['sEnName'] = 0,
},
[282] = {
['sRawName'] = 'item_blood_grenade',
['sShortName'] = 'itemNull',
['sCnName'] = '血腥榴弹',
['sEnName'] = 0,
},
[283] = {
['sRawName'] = 'item_phylactery',
['sShortName'] = 'itemNull',
['sCnName'] = '灵匣',
['sEnName'] = 0,
},
[284] = {
['sRawName'] = 'item_famango',
['sShortName'] = 'itemNull',
['sCnName'] = '疗伤莲花',
['sEnName'] = 0,
},
[285] = {
['sRawName'] = 'item_great_famango',
['sShortName'] = 'itemNull',
['sCnName'] = '大疗伤莲花',
['sEnName'] = 0,
},
[286] = {
['sRawName'] = 'item_greater_famango',
['sShortName'] = 'itemNull',
['sCnName'] = '巨大疗伤莲花',
['sEnName'] = 0,
},
[287] = {
['sRawName'] = 'item_diadem',
['sShortName'] = 'itemNull',
['sCnName'] = '宝冕',
['sEnName'] = 0,
},
[288] = {
['sRawName'] = 'item_cornucopia',
['sShortName'] = 'itemNull',
['sCnName'] = '丰饶之环',
['sEnName'] = 0,
},
[288] = {
['sRawName'] = 'item_pavise',
['sShortName'] = 'itemNull',
['sCnName'] = '长盾',
['sEnName'] = 0,
},
}
......@@ -3670,7 +3752,7 @@ Chat['tHeroNameList'] = {
-- 120
['npc_dota_hero_hoodwink'] = {
['sNormName'] = '松鼠',
['sNormName'] = '松鼠',
['sShortName'] = 'hoodwink',
['sCnName'] = '森海飞霞',
['sEnName'] = 0,
......@@ -3688,7 +3770,7 @@ Chat['tHeroNameList'] = {
-- 122
['npc_dota_hero_marci'] = {
['sNormName'] = '拳妹',
['sNormName'] = '玛西',
['sShortName'] = 'marci',
['sCnName'] = '玛西',
['sEnName'] = 0,
......@@ -3706,7 +3788,7 @@ Chat['tHeroNameList'] = {
-- 123
['npc_dota_hero_muerta'] = {
['sNormName'] = '琼碧',
['sNormName'] = '奶绿',
['sShortName'] = 'muerta',
['sCnName'] = '琼英碧灵',
['sEnName'] = 0,
......
......@@ -197,6 +197,8 @@ Item['sBasicItems'] = {
'item_voodoo_mask', --巫毒面具
'item_fluffy_hat', --毛毛帽
'item_aghanims_shard',
'item_diadem', --宝冕
'item_cornucopia', --丰饶之环
}
Item['sSeniorItems'] = {
......@@ -232,7 +234,10 @@ Item['sSeniorItems'] = {
'item_blink',
'item_cyclone',
'item_helm_of_the_dominator',
'item_rod_of_atos',
--7.33
'item_diffusal_blade',
'item_echo_sabre',
}
......@@ -263,8 +268,6 @@ Item['sTopItems'] = {
'item_crimson_guard',
'item_dagon_5',
'item_desolator',
'item_diffusal_blade',
'item_echo_sabre',
'item_ethereal_blade',
'item_gem',
'item_glimmer_cape',
......@@ -313,7 +316,10 @@ Item['sTopItems'] = {
'item_revenants_brooch',
'item_boots_of_bearing',
'item_wraith_pact',
'item_pavise',
'item_harpoon',
'item_disperser',
......@@ -342,6 +348,7 @@ Item['tEarlyItem'] = {
'item_magic_wand',
'item_falcon_blade',
'item_orb_of_corrosion',
'item_blood_grenade',
-- 'item_ancient_janggo',
-- 'item_refresher_shard',
-- 'item_cheese',
......@@ -352,7 +359,7 @@ Item['tEarlyBoots'] = {
'item_phase_boots',
'item_power_treads',
'item_tranquil_boots',
'item_arcane_boots'
'item_arcane_boots',
}
Item['sCanNotSwitchItems'] = {
......@@ -387,6 +394,7 @@ local sConsumableList = {
'item_refresher_shard',
'item_aegis',
'item_ultimate_scepter_roshan',
'item_blood_grenade',
}
local tConsumableItemList = {}
......@@ -433,6 +441,8 @@ local sNotSellItemList = {
'item_travel_boots',
'item_travel_boots_2',
'item_ward_observer',
'item_harpoon',
'item_disperser',
}
local tNotSellItemList = {}
for _, sItem in pairs( sNotSellItemList )
......@@ -703,6 +713,15 @@ Item['item_boots_of_bearing'] = GetItemComponents( 'item_boots_of_bearing' )[1]
Item['item_wraith_pact'] = GetItemComponents( 'item_wraith_pact' )[1]
--7.33
Item['item_harpoon'] = GetItemComponents( 'item_harpoon' )[1]
Item['item_disperser'] = GetItemComponents( 'item_disperser' )[1]
Item['item_phylactery'] = GetItemComponents( 'item_phylactery' )[1]
Item['item_pavise'] = GetItemComponents( 'item_pavise' )[1]
--新自定义物品
Item['item_new_1'] = GetItemComponents( 'item_new_1' )[1]
......@@ -1383,7 +1402,7 @@ function Item.GetOutfitType( bot )
end
function Item.GetItemWardSolt()
function Item.GetItemWardSlot()
local bot = GetBot()
......
......@@ -2104,26 +2104,26 @@ X.ConsiderItemDesire["item_glimmer_cape"] = function( hItem )
if bot:DistanceFromFountain() > 600
and #hNearbyEnemyTowerList == 0
and not bot:HasModifier( 'modifier_item_dustofappearance' )
and not bot:HasModifier( 'modifier_slardar_amplify_damage' )
and not bot:HasModifier( 'modifier_item_glimmer_cape' )
and not bot:IsInvulnerable()
and not bot:IsMagicImmune()
then
if bot:IsSilenced() or J.IsStunProjectileIncoming( bot, 1000 )
then
and not bot:HasModifier( 'modifier_item_glimmer_cape' )
and bot:IsCanInvisible() then
hEffectTarget = bot
sCastMotive = '自己被沉默了'
return BOT_ACTION_DESIRE_HIGH, hEffectTarget, sCastType, sCastMotive
end
if ( J.IsRetreating( bot )
if (( J.IsRetreating( bot )
and bot:GetActiveModeDesire() >= BOT_MODE_DESIRE_VERYHIGH
and not bot:HasModifier("modifier_fountain_aura") )
or ( botTarget == nil
and #hNearbyEnemyHeroList > 0
and J.GetHP( bot ) < 0.36 + ( 0.09 * #hNearbyEnemyHeroList ) )
and J.GetHP( bot ) < 0.36 + ( 0.09 * #hNearbyEnemyHeroList ) ))
and not bot:HasModifier( 'modifier_item_glimmer_cape' )
and bot:IsCanInvisible()
then
hEffectTarget = bot
sCastMotive = '自己撤退'
......@@ -2143,9 +2143,7 @@ X.ConsiderItemDesire["item_glimmer_cape"] = function( hItem )
and not npcAlly:IsInvisible()
and npcAlly:DistanceFromFountain() > 600
and not npcAlly:HasModifier( 'modifier_item_glimmer_cape' )
and not npcAlly:HasModifier( 'modifier_item_dustofappearance' )
and not npcAlly:HasModifier( 'modifier_slardar_amplify_damage' )
and not npcAlly:HasModifier( 'modifier_arc_warden_tempest_double' )
and npcAlly:IsCanInvisible()
then
local nNearbyAllyEnemyTowers = npcAlly:GetNearbyTowers( 888, true )
if #nNearbyAllyEnemyTowers == 0
......@@ -5875,6 +5873,158 @@ X.ConsiderItemDesire["item_boots_of_bearing"] = function( hItem )
end
--疗伤莲花
X.ConsiderItemDesire["item_famango"] = function(hItem)
local hp=bot:GetMaxHealth() - bot:GetHealth()
local mp=bot:GetMaxMana() - bot:GetMana()
local regen=hItem:GetVal('replenish_amount')
if (hp>regen + 100 and mp > regen + 100) or bot:GetHealthPercent()<30 or bot:GetManaPercent()<30 then
return BOT_ACTION_DESIRE_HIGH, nil, 'none', "恢复"
end
end
X.ConsiderItemDesire["item_great_famango"]=X.ConsiderItemDesire["item_famango"]
X.ConsiderItemDesire["item_greater_famango"]=X.ConsiderItemDesire["item_famango"]
--血腥榴弹
X.ConsiderItemDesire["item_blood_grenade"] = function( hItem )
local nCastRange = 600 + aetherRange
local sCastType = 'ground'
local hEffectTarget = nil
local sCastMotive = nil
local nInRangeEnmyList = bot:GetNearbyHeroes( nCastRange, true, BOT_MODE_NONE )
if J.IsGoingOnSomeone( bot ) and J.IsValidHero( botTarget ) then
hEffectTarget = botTarget:GetLocation()
if not hEffectTarget then return BOT_ACTION_DESIRE_NONE end
sCastMotive = "进攻:"..J.Chat.GetNormName( botTarget )
return BOT_ACTION_DESIRE_HIGH, hEffectTarget, sCastType, sCastMotive
end
return BOT_ACTION_DESIRE_NONE
end
--散魂剑
X.ConsiderItemDesire["item_disperser"]=function(hItem)
local a,b,c,d = X.ConsiderItemDesire["item_diffusal_blade"](hItem)
if a>0 then return a,b,c,d end
local nCastRange = 630 + aetherRange
local sCastType = 'unit'
local hEffectTarget = nil
local sCastMotive = nil
local nInRangeAllies = bot:GetNearbyHeroes( nCastRange, false, BOT_MODE_NONE )
--追击加速
if J.IsGoingOnSomeone( bot ) then
if J.IsValidHero( botTarget )
and not J.IsDisabled( botTarget )
and J.IsChasingTarget( bot, botTarget )
then
return BOT_ACTION_DESIRE_HIGH, bot, 'unit', "追击加速:"..J.Chat.GetNormName( botTarget )
end
end
if J.ShouldDispelDebuff(bot) then
return BOT_ACTION_DESIRE_HIGH, bot, 'unit', '解状态'
end
for _,unit in nInRangeAllies do
if J.ShouldDispelDebuff(npcAlly) or npcAlly:GetCurrentMovementSpeed() < 240 then
return BOT_ACTION_DESIRE_HIGH, npcAlly, 'unit', '解状态'
end
end
end
--鱼叉
X.ConsiderItemDesire["item_harpoon"] = function( hItem )
local nCastRange = 700 + aetherRange
local sCastType = 'unit'
local hEffectTarget = nil
local sCastMotive = nil
local nInRangeEnmyList = bot:GetNearbyHeroes( nCastRange, true, BOT_MODE_NONE )
if J.IsGoingOnSomeone( bot ) then
if J.IsValidHero( botTarget ) and bot:GetDistanceToUnit(botTarget) > bot:GetAttackRange() + 200 then
hEffectTarget = botTarget
sCastMotive = "进攻:"..J.Chat.GetNormName( botTarget )
return BOT_ACTION_DESIRE_HIGH, hEffectTarget, sCastType, sCastMotive
end
end
return BOT_ACTION_DESIRE_NONE
end
--长盾
X.ConsiderItemDesire["item_pavise"] = function( hItem )
local nCastRange = 1000 + aetherRange
local sCastType = 'unit'
local hEffectTarget = nil
local sCastMotive = nil
if ( J.IsRetreating( bot )
and bot:GetActiveModeDesire() >= BOT_MODE_DESIRE_VERYHIGH
and not bot:HasModifier("modifier_fountain_aura") )
or ( botTarget == nil
and #hNearbyEnemyHeroList > 0
and J.GetHP( bot ) < 0.36 + ( 0.09 * #hNearbyEnemyHeroList ) ) then
hEffectTarget = bot
sCastMotive = '自己撤退'
return BOT_ACTION_DESIRE_HIGH, hEffectTarget, sCastType, sCastMotive
end
if bot:IsSilenced() or J.IsStunProjectileIncoming( bot, 1000 )
then
hEffectTarget = bot
sCastMotive = '自己被沉默了'
return BOT_ACTION_DESIRE_HIGH, hEffectTarget, sCastType, sCastMotive
end
local hAllyList = bot:GetNearbyHeroes( nCastRange, false, BOT_MODE_NONE )
for _, npcAlly in pairs( hAllyList ) do
if J.IsValidHero( npcAlly )
and not npcAlly:IsIllusion()
and not npcAlly:IsMagicImmune()
and not npcAlly:IsInvulnerable()
and not npcAlly:IsInvisible()
and npcAlly:DistanceFromFountain() > 600
then
local nNearbyAllyEnemyTowers = npcAlly:GetNearbyTowers( 888, true )
if #nNearbyAllyEnemyTowers == 0
then
--retreat
if J.GetHP( npcAlly ) < 0.35 + ( 0.05 * #hNearbyEnemyHeroList )
and J.IsRetreating( npcAlly )
and npcAlly:WasRecentlyDamagedByAnyHero( 4.0 )
then
hEffectTarget = npcAlly
sCastMotive = '保护队友撤退:'..J.Chat.GetNormName( hEffectTarget )
return BOT_ACTION_DESIRE_HIGH, hEffectTarget, sCastType, sCastMotive
end
--Disable
if J.IsDisabled( npcAlly ) --debug
or J.IsStunProjectileIncoming( npcAlly, 1000 )
then
hEffectTarget = npcAlly
sCastMotive = '保护被控队友:'..J.Chat.GetNormName( hEffectTarget )
return BOT_ACTION_DESIRE_HIGH, hEffectTarget, sCastType, sCastMotive
end
end
end
end
return BOT_ACTION_DESIRE_NONE
end
--灵匣/item_phylactery,分散到各个脚本里单独处理
--新物品
X.ConsiderItemDesire["item_new"] = function( hItem )
......@@ -5966,9 +6116,9 @@ local function UseGlyph()
local tower = GetTower( GetTeam(), t )
if tower and (X.IsTargetedByEnemy(tower)
or #tower:GetNearbyCreeps(1200,true)>3
or tower:GetHealthPercent() < 0.1)
or tower:GetHealthPercent() < 10)
and not tower:HasModifier('modifier_backdoor_protection')
and tower:GetHealthPercent() < 0.3 then
and tower:GetHealthPercent() < 30 then
bot:ActionImmediate_Glyph()
return
end
......@@ -5990,9 +6140,9 @@ local function UseGlyph()
local tower = GetTower( GetTeam(), t )
if tower and (X.IsTargetedByEnemy(tower)
or #tower:GetNearbyCreeps(1200,true)>3
or tower:GetHealthPercent() < 0.1)
or tower:GetHealthPercent() < 10)
and not tower:HasModifier('modifier_backdoor_protection')
and tower:GetHealthPercent() < 0.5 then
and tower:GetHealthPercent() < 50 then
bot:ActionImmediate_Glyph()
return
end
......@@ -6004,9 +6154,9 @@ local function UseGlyph()
local tower = GetTower( GetTeam(), t )
if tower and (X.IsTargetedByEnemy(tower)
or #tower:GetNearbyCreeps(1200,true)>3
or tower:GetHealthPercent() < 0.1)
or tower:GetHealthPercent() < 10)
and not tower:HasModifier('modifier_backdoor_protection')
and tower:GetHealthPercent() < 0.5 then
and tower:GetHealthPercent() < 50 then
bot:ActionImmediate_Glyph()
return
end
......@@ -6017,9 +6167,9 @@ local function UseGlyph()
local barrack = GetBarracks( GetTeam(), b )
if barrack and (X.IsTargetedByEnemy(barrack)
or #barrack:GetNearbyCreeps(1200,true)>3
or barrack:GetHealthPercent() < 0.1)
or barrack:GetHealthPercent() < 10)
and not barrack:HasModifier('modifier_backdoor_protection')
and barrack:GetHealthPercent() < 0.5 then
and barrack:GetHealthPercent() < 50 then
bot:ActionImmediate_Glyph()
return
end
......@@ -6028,9 +6178,9 @@ local function UseGlyph()
local Ancient = GetAncient( GetTeam() )
if Ancient and (X.IsTargetedByEnemy(Ancient)
or #Ancient:GetNearbyCreeps(1200,true)>3
or Ancient:GetHealthPercent() < 0.1)
or Ancient:GetHealthPercent() < 10)
and not Ancient:HasModifier('modifier_backdoor_protection')
and Ancient:GetHealthPercent() < 0.5 then
and Ancient:GetHealthPercent() < 50 then
bot:ActionImmediate_Glyph()
return
end
......
......@@ -487,6 +487,7 @@ function ItemPurchaseThink()
--死前如果会损失金钱则购买知识书
--[[
if currentTime > 10 * 60
and bot:IsAlive()
and botGold >= GetItemCost( "item_tome_of_knowledge" )
......@@ -503,7 +504,7 @@ function ItemPurchaseThink()
buyBookTime = currentTime
return
end
]]--
--交换魂泪的位置避免过早被破坏
if currentTime > 180
......@@ -532,7 +533,7 @@ function ItemPurchaseThink()
check_time = currentTime
--把眼换上去
local wardSlot = Item.GetItemWardSolt( bot )
local wardSlot = Item.GetItemWardSlot( bot )
if wardSlot >= 6 and wardSlot <= 8
then
for i = 0, 5
......
......@@ -48,13 +48,6 @@ function GetDesire()
return BOT_MODE_DESIRE_NONE
end
-- local wardSlot = X.GetItemWardSolt()
-- if wardSlot <= -1
-- or wardSlot >= 6
-- then
-- return BOT_MODE_DESIRE_NONE
-- end
if itemWard ~= nil then
AvailableSpots = Site.GetAvailableSpot(bot);
......@@ -73,7 +66,7 @@ end
function OnStart()
if itemWard ~= nil then
local wardSlot = X.GetItemWardSolt()
local wardSlot = X.GetItemWardSlot()
if bot:GetItemSlotType(wardSlot) == ITEM_SLOT_TYPE_BACKPACK
then
local leastCostItem = X.FindLeastItemSlot();
......@@ -188,7 +181,7 @@ function X.IsIBecameTheTarget(units)
end
function X.GetItemWardSolt()
function X.GetItemWardSlot()
local sWardTypeList = {
'item_ward_observer',
......
......@@ -60,10 +60,10 @@ function CDOTA_Bot_Script.IsAlly(unit)
return GetBot():GetTeam() == unit:GetTeam()
end
function CDOTA_Bot_Script.GetHealthPercent(unit)
return unit:GetHealth() / unit:GetMaxHealth()
return unit:GetHealth() / unit:GetMaxHealth() * 100.0
end
function CDOTA_Bot_Script.GetManaPercent(unit)
return unit:GetMana() / unit:GetMaxMana()
return unit:GetMana() / unit:GetMaxMana() * 100.0
end
function CDOTA_Bot_Script.IsEnemy(unit)
return GetBot():GetTeam() ~= unit:GetTeam()
......@@ -83,6 +83,16 @@ function CDOTA_Bot_Script.WasRecentlyDamagedByAnyUnit(unit,time)
return unit:WasRecentlyDamagedByAnyHero(time)
or unit:WasRecentlyDamagedByCreep(time)
end
function CDOTA_Bot_Script.IsCanInvisible(unit)
if not unit:CanBeSeen() then return false end
local buffs = require( GetScriptDirectory()..'/FunLib/aba_buff' )
for _,buff in buffs['truesight_buffs'] do
if unit:HasModifier(buff) then
return false
end
end
return true
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