久久国产av,国产激情欧美有码,亚洲国产综合精品2020,国产无套粉嫩白浆内精

losttemple3cai版 怎么開(kāi)ai(lost temple dota 3c ai怎么選英雄?。?/h1>
2023-03-16 21:13:46 趣味生活 3251次閱讀 投稿:淺涼

本篇文章給大家談?wù)刲osttemple3cai,以及l(fā)osttemple3cai版 怎么開(kāi)ai對(duì)應(yīng)的知識(shí)點(diǎn),希望對(duì)各位有所幫助,不要忘了收藏本站喔。

lost temple dota 3c ai怎么選英雄啊

我是地圖的作者,有什么疑問(wèn),可以問(wèn)我。

-RD模式就不用多作介紹了吧

-AP/-AS/-AA/-AI 模式就跟dota的選擇一樣咯

-random:隨機(jī)選擇一個(gè)英雄(只生效一次,rd模式下該命令是沒(méi)效的)

-reoick:重新選擇一個(gè)英雄(只生效一次,rd模式下該命令也是沒(méi)效的,游戲開(kāi)始前12秒該命令也是沒(méi)效的)

-AP/-AS/-AA/-AI /-RD:以上這些命令需要由主機(jī)(第一個(gè)非電腦控制的玩家)鍵入,而且互不兼容,也就是只能選擇一個(gè)模式。

雙方隊(duì)長(zhǎng)玩家:嗯,是不能選擇dota里面的任何一個(gè)英雄。隊(duì)長(zhǎng)雙方玩家的功能正在開(kāi)發(fā)中。目前正在更新中

lost temple 3c AI 怎么才能讓電腦自己選英雄啊?

2樓正解,但沒(méi)有說(shuō)明白。電腦不可以選英雄。AI緊緊針對(duì)隊(duì)長(zhǎng)的,哈,現(xiàn)在還沒(méi)有人能夠開(kāi)發(fā)隊(duì)員角色那種能力,估計(jì)比開(kāi)發(fā)能下國(guó)際象棋的深藍(lán)還要難。

理解,都希望能夠單機(jī)玩這個(gè)游戲。

對(duì)于你的問(wèn)題補(bǔ)充回答:那種lt我也玩過(guò),是類(lèi)似澄海的3C。還有,你不了解AI的制作過(guò)程,澄海3C類(lèi)似于CS的機(jī)器人,都有幾種套路的,而Lt3c很難設(shè)計(jì)幾套完整的練級(jí)路線(xiàn)。

這個(gè)回答是最合理,正確的!

lost temple 3c ai 怎么用

我是從這帖子轉(zhuǎn)來(lái)的 很詳細(xì),你可以看看.

★1★main程序

+ Shingo Jass Highlighter 0.41

function main takes nothing returns nothing

set ai_player=Player(GetAiPlayer())

set start_loc=GetStartLocationLoc(GetPlayerStartLocation(Player(GetAiPlayer()-10)))

if GetPlayerController(Player(GetAiPlayer()-10))==MAP_CONTROL_COMPUTER then

set ally=true

endif

call SetMeleeAI() //開(kāi)始對(duì)戰(zhàn)AI

call SetDefendPlayer(true) //設(shè)置單位攻擊時(shí)防御

call SetHeroesBuyItems(true) //設(shè)置英雄自動(dòng)買(mǎi)物品

call SetHeroesFlee(true) //設(shè)置英雄生命值少時(shí)自動(dòng)逃跑

call SetHeroesTakeItems(true) //設(shè)置英雄自動(dòng)撿物品

call SetIgnoreInjured(true) //設(shè)置單位忽視傷害(戰(zhàn)斗時(shí)紅血都不自動(dòng)跑)

call SetPeonsRepair(true) //設(shè)置農(nóng)民自動(dòng)維修

call SetRandomPaths(true) //設(shè)置隨機(jī)路線(xiàn)(估計(jì)在進(jìn)攻,逃跑隨機(jī)路線(xiàn))

call SetSmartArtillery(true) //設(shè) 置 炮 兵 巧 妙 攻 擊 。 (太 近 會(huì) 走 開(kāi) 點(diǎn) 去 攻 擊 ?)

call SetTargetHeroes(true) //設(shè) 置 英 雄 目 標(biāo) 。( 為 主 要 目 標(biāo) ?)

call SetUnitsFlee(true) //設(shè)置單位可以逃跑

call SetWatchMegaTargets(true) //開(kāi)始對(duì)戰(zhàn)AI

call SetCaptainChanges(true) // 設(shè) 置 監(jiān) 視 大 單 位 ( 主 要 的)。

call CreateCaptains() // 創(chuàng)建隊(duì)長(zhǎng)(好像是英雄帶領(lǐng)小兵)

call StartThread(function attack_loop) // 開(kāi)始線(xiàn)程,運(yùn)行 (function attack_loop)

call StartThread(function check_hp) // 開(kāi)始線(xiàn)程,運(yùn)行(function check_hp)

endfunction

★2★全局變量

+ Shingo Jass Highlighter 0.41

globals

unit array aihero //設(shè)置英雄單位

integer hero_num=0 //用于計(jì)算英雄數(shù)量

group udg_g=CreateGroup() //用于記錄AI玩家所有單位

boolean flee=false //設(shè)置是否逃跑

boolean finishMF=false //設(shè)置是否MF

boolean attack_enemy=false //設(shè)置是否攻擊敵人

boolean ally=false //設(shè)置是否攻擊盟友

real ratio=1 //radio是用于判斷生命比的整數(shù)

integer count=0 //記錄游戲開(kāi)始秒數(shù)

location start_loc //玩家開(kāi)始的地方

endglobals

★3★功能程序

+ Shingo Jass Highlighter 0.41

function setup_force takes nothing returns nothing //AI玩家開(kāi)始尋找生命大于15%可以攻擊的英雄進(jìn)入攻擊組

local unit u=null

local integer i=1

call RemoveInjuries()

call InitAssault() //初始化攻擊隊(duì)伍

if (GetPlayerState(ai_player,PLAYER_STATE_RESOURCE_FOOD_CAP)-80)!=hero_num then

call GroupEnumUnitsOfPlayer(udg_g,ai_player,null) //選取AI玩家的所有單位

loop

exitwhen ihero_num

call GroupRemoveUnit(udg_g,aiheroi)

set i=i+1

endloop

loop

set u=FirstOfGroup(udg_g)

exitwhen u==null

if IsUnitType(u,UNIT_TYPE_HERO)==true then

set hero_num=hero_num+1

set aihero[hero_num]=u //設(shè)置aihero[1~n]=u

endif

call GroupRemoveUnit(udg_g,u) //移除單位u

endloop

call GroupClear(udg_g) //清楚單位組

endif

set i=1

loop

exitwhen ihero_num

if GetUnitState(aiheroi,UNIT_STATE_LIFE)/GetUnitState(aiheroi,UNIT_STATE_MAX_LIFE)0.15 then //選取英雄生命百分比大于15%的(radio是用于判斷生命比的整數(shù))

call AddAssault(1,GetUnitTypeId(aiheroi)) //英雄加入攻擊組

endif

set i=i+1

endloop

endfunction

function start_attack takes unit target returns nothing //開(kāi)始攻擊

local integer index=0

loop

exitwhen CaptainRetreating() and flee //(如果隊(duì)長(zhǎng)逃跑 and 逃跑 是真的)就退出

exitwhen ratio==0

exitwhen not UnitAlive(target) //(如果target不是存活的)就退出

exitwhen UnitInvis(target) and not IsUnitDetected(target,ai_player) //(如果單位隱形 and 單位偵查)就退出

call AttackMoveKill(target) // 攻 擊 移 動(dòng) 直 到 殺 死 target

call Sleep(3) //停止3秒

if index=5 then

set index=0

call setup_force() //命令A(yù)I玩家開(kāi)始尋找生命大于15%可以攻擊的英雄進(jìn)入攻擊組

endif

set index=index+1

endloop //實(shí)際上此loop的功能是每3秒選取英雄去攻擊,逃跑的話(huà)就停止

set index=0

loop

exitwhen not CaptainInCombat(true) //當(dāng)隊(duì)長(zhǎng)不在戰(zhàn)斗時(shí)就退出

call Sleep(2) //停止3秒

if index=8 then

set index=0

call setup_force() //命令A(yù)I玩家開(kāi)始尋找生命大于15%可以攻擊的英雄進(jìn)入攻擊組

endif

set index=index+1

endloop //實(shí)際上此loop的功能是每2秒隊(duì)長(zhǎng)在戰(zhàn)斗時(shí)選取英雄進(jìn)入攻擊組

endfunction

function attack_sequence takes nothing returns nothing //戰(zhàn)斗順序(此函數(shù)實(shí)際是尋找敵人,先尋找敵人的分基地,沒(méi)有就主基地,找不到就去MF)

local unit target=null

local unit u=null

if ally then //如果ally是真的 ,就做下面動(dòng)作

set target=GetAllianceTarget() //設(shè)置target是同盟的主基地

if target!=null then //如果同盟的主基地存在 ,就做下面動(dòng)作

set attack_enemy=true //設(shè)置攻擊敵人開(kāi)始

call setup_force() //命令A(yù)I玩家開(kāi)始尋找生命大于15%可以攻擊的英雄進(jìn)入攻擊組

call start_attack(target) //調(diào)用開(kāi)始攻擊target的函數(shù)

call SetAllianceTarget(null) //

set attack_enemy=false //設(shè)置攻擊敵人關(guān)閉

return //跳過(guò)下列動(dòng)作

endif

endif

if count100 and GetRandomInt(0,200+count)300 then //如果count大于100 and 隨機(jī)整數(shù)0或200+count大于300 就做下列動(dòng)作

set u=CreateUnitAtLoc(ai_player,'h000',start_loc,270) //設(shè)置u是新建的單位在開(kāi)始點(diǎn)

set target=GetEnemyExpansion() //設(shè)置target是敵人的分基地

if target!=null then //*如果target存在就做下面動(dòng)作

call KillUnit(u) //殺死u

call SetAllianceTarget(target) //

call setup_force() //命令A(yù)I玩家開(kāi)始尋找生命大于15%可以攻擊的英雄進(jìn)入攻擊組

call start_attack(target) //調(diào)用開(kāi)始攻擊target的函數(shù)

return //跳過(guò)下列動(dòng)作

else //*如果target不存在就做下面動(dòng)作

call StartGetEnemyBase() //開(kāi)始尋找敵人基地

loop

exitwhen not WaitGetEnemyBase() //當(dāng)不尋找敵人的時(shí)候就退出循環(huán)

call Sleep(1)

endloop //實(shí)際上是每一秒都判斷是否尋找的英雄

set target=GetEnemyBase() //設(shè)置target時(shí)敵人的主基地

call KillUnit(u) //殺死u

endif

set u=null

if target != null then //如果target不等于沒(méi)有,就做下列動(dòng)作

set attack_enemy=true //設(shè)置攻擊敵人開(kāi)始

call SetAllianceTarget(target) //

call setup_force() //命令A(yù)I玩家開(kāi)始尋找生命大于15%可以攻擊的英雄進(jìn)入攻擊組

call start_attack(target) //調(diào)用開(kāi)始攻擊target的函數(shù)

set attack_enemy=false //設(shè)置攻擊敵人關(guān)閉

return //跳過(guò)下列動(dòng)作

endif

endif

set target=GetCreepCamp(0,R2I(5*hero_num*ratio),false) //設(shè)置target是中立敵對(duì)單位的營(yíng)地(中立單位最小的等級(jí)為 0,最大為5*英雄總數(shù)量*ratio,沒(méi)有飛行單位)

if target!=null then //如果target存在,就做下列動(dòng)作

call SetAllianceTarget(target) //

call setup_force() //命令A(yù)I玩家開(kāi)始尋找生命大于15%可以攻擊的英雄進(jìn)入攻擊組

call start_attack(target) //調(diào)用開(kāi)始攻擊target的函數(shù)

set finishMF=true //設(shè)置正在MF 為 真(MF是指打中立怪升級(jí))

return //跳過(guò)下列動(dòng)作

endif

if GetRandomInt(1,2)==1 then //隨機(jī)整數(shù)1或2等于1就做下列動(dòng)作

set target=GetCreepCamp(0,R2I(8*hero_num*ratio),false) //設(shè)置target是中立敵對(duì)單位的營(yíng)地

if target!=null then //如果target存在,就做下列動(dòng)作

call SetAllianceTarget(target) //

call setup_force() //命令A(yù)I玩家開(kāi)始尋找生命大于15%可以攻擊的英雄進(jìn)入攻擊組

call start_attack(target) //調(diào)用開(kāi)始攻擊target的函數(shù)

set finishMF=true //設(shè)置正在MF 為 真(MF是指打中立怪升級(jí))

endif

endif

call Sleep(10) //停止10秒

endfunction

function attack_loop takes nothing returns nothing

local integer index=0

call SetCaptainHome(0,GetLocationX(start_loc),GetLocationY(start_loc)) //設(shè)置組在家的點(diǎn)組,x坐標(biāo),y坐標(biāo)

call SetCaptainHome(1,GetLocationX(start_loc),GetLocationY(start_loc)) //設(shè)置組在家的點(diǎn)組,x坐標(biāo),y坐標(biāo), 組的參數(shù): ATTACK_CAPTAIN = 1; 攻擊組 DEFENSE_CAPTAIN = 2; 防御組 BOTH_CAPTAINS = 3 攻擊和防御組;

loop

call Sleep(3) //停止3秒(實(shí)際上是進(jìn)入循環(huán)每3秒做下列動(dòng)作一次)

exitwhen GetPlayerState(ai_player,PLAYER_STATE_RESOURCE_FOOD_CAP)80 //當(dāng)AI玩家食物多于80就退出循環(huán)

endloop

call Sleep(2) //停止2秒

call setup_force() //命令A(yù)I玩家開(kāi)始尋找生命大于15%可以攻擊的英雄進(jìn)入攻擊組

loop

set index=1

loop

call Sleep(1) //停止1秒

exitwhen finishMF and not flee //當(dāng)正在MF的時(shí)候 and 不逃跑為真的時(shí)候 退出 循環(huán)

call Sleep(1) //停止1秒

exitwhen not CaptainRetreating() and ratio0 //當(dāng)隊(duì)長(zhǎng)不逃跑的時(shí)候 and ratio大于0的時(shí)候退出循環(huán)

exitwhen index=10

set index=index+1

endloop

if finishMF then //如果正在MF,就做下列動(dòng)作

set finishMF=false //設(shè)置不MF

endif

if flee then //如果正在逃跑,就做下列動(dòng)作

call Sleep(25-ratio*20) //停止25-ratio*20秒 (radio是用于判斷生命比的整數(shù))

endif

call attack_sequence() //調(diào)用攻擊函數(shù)

endloop

endfunction

function check_hp takes nothing returns nothing //檢測(cè)Hp

local integer i=0

local real x=0

local real y=0

local real z=0

local real r1=0

local real r2=0

local unit u=null

loop

call Sleep(3) //停止3秒(實(shí)際上是進(jìn)入循環(huán)每3秒做下列動(dòng)作一次)

set u=GetCreepCamp(0,0,false) //設(shè)置u是中立敵對(duì)的目標(biāo)

set i=1

set x=0

set y=0

set z=0

loop

exitwhen ihero_num //當(dāng)i大于總英雄人數(shù)是就退出循環(huán)

set r1=GetUnitState(aiheroi,UNIT_STATE_LIFE) //設(shè)置r1是英雄i號(hào)的現(xiàn)在生命值 (i=1,2.3,......)

set r2=GetUnitState(aiheroi,UNIT_STATE_MAX_LIFE) //設(shè)置r2是英雄i號(hào)的最大生命值 (i=1,2.3,......)

set x=x+r1 //設(shè)置x等于x+r1,即循環(huán)后所有英雄總的生命值

set y=y+r2 //設(shè)置y等于x+r2,即循環(huán)后所有英雄總的最大生命值

if r10 then //如果英雄的生命值大于0,就做下列動(dòng)作

set z=z+r2 //設(shè)置z等于z+r2,即循環(huán)后所有活著的英雄總的最大生命值

endif

set i=i+1

endloop

if z0 then //如果Z大于0做下列動(dòng)作

set ratio=x/y //設(shè)置ratio等于x/y,即所有英雄現(xiàn)在生命值和最大生命值的比

if x/z0.5 then //如果所有英雄現(xiàn)在生命值和最大生命值的比 小于 0.5,就做下列動(dòng)作

call SetGroupsFlee(true) //設(shè)置隊(duì)伍可以逃跑

set flee=true //設(shè)置隊(duì)伍可以逃跑

else

call SetGroupsFlee(false) //如果不是的話(huà),就 設(shè)置隊(duì)伍不能逃跑

set flee=false //設(shè)置隊(duì)伍現(xiàn)在不逃跑

endif

else //如果Z小于0做下列動(dòng)作

set ratio=0 //設(shè)置radio為0

call SetGroupsFlee(true) //設(shè)置隊(duì)伍可以逃跑

set flee=true //設(shè)置隊(duì)伍現(xiàn)在正在逃跑

endif //實(shí)際上每三秒就判斷生命值

if attack_enemy then

call SetGroupsFlee(true) //如果攻擊敵人的話(huà)

set flee=true //設(shè)置隊(duì)伍可以逃跑

endif

if count200 then

set count=count+1

endif //實(shí)際上每三秒就設(shè)置count+1

endloop

endfunction

收藏 分享 11 0 魚(yú)妹 莫魚(yú)

聲明:各百科所有作品(圖文、音視頻)均由用戶(hù)自行上傳分享,僅供網(wǎng)友學(xué)習(xí)交流。若您的權(quán)利被侵害,請(qǐng)聯(lián)系: [email protected]