魔兽编辑器。dota里黑鸟大招是怎么做的?

function M5D takes nothing returns boolean

return GetSpellAbilityId()=='A0OK' or GetSpellAbilityId()=='A1VW'

endfunction

function M2D takes nothing returns nothing

local unit TT7=GetEnumUnit()

local unit M_D=GetTriggerUnit()

local integer N4D=GetHeroInt(M_D,true)-GetHeroInt(TT7,true)

local integer array N7D

local integer Y17=GetUnitAbilityLevel(M_D,'A0OK')

local integer N8D=7+1*Y17

if Y17==0 then

set Y17=GetUnitAbilityLevel(M_D,'A1VW')

set N8D=7+1*Y17+1

endif

set N7D[1]=10

set N7D[2]=30

set N7D[3]=50

if(N4D>0)then

call UnitDamageTarget(M_D,TT7,N4D*N8D,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)

call VX7(I2S(R2I(N4D*N8D)),3,TT7,0.023,216,30,30,216)

if(N4D<N7D[Y17])then

call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Feedback\\SpellBreakerAttack.mdl",TT7,"overhead"))

call SetUnitState(TT7,UNIT_STATE_MANA,GetUnitState(TT7,UNIT_STATE_MANA)*.25)

endif

endif

set TT7=null

set M_D=null

endfunction

function N9D takes nothing returns boolean

if(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==true)then

if(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))then

return true

endif

endif

return false

endfunction

function NDD takes nothing returns nothing

local unit O49=GetTriggerUnit()

local integer RL9=GetUnitAbilityLevel(O49,'A0OK')

local real x=GetLocationX(GetSpellTargetLoc())

local real y=GetLocationY(GetSpellTargetLoc())

local group RS9=TN7()

local integer K09=0

local unit NED=(MG7(GetHandleId(O49),"748"))

if RL9==0 then

set RL9=GetUnitAbilityLevel(O49,'A1VW')

endif

call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl",x,y))

loop

exitwhen K09>=360

call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl",x+(200+RL9*50)*Cos(K09*bj_DEGTORAD),y+(200+RL9*50)*Sin(K09*bj_DEGTORAD)))

set K09=K09+45

endloop

call GroupEnumUnitsInRange(RS9,x,y,300+RL9*100,Condition(function N9D))

if NED!=null and IY7(x,y,GetUnitX(NED),GetUnitY(NED))<(300+RL9*100)then

call SetUnitInvulnerable(NED,false)

call GroupAddUnit(RS9,NED)

endif

call ForGroup(RS9,function M2D)

if NED!=null and UF7(NED)==false then

call SetUnitInvulnerable(NED,true)

endif

call TM7(RS9)

set O49=null

set RS9=null

endfunction

function GP8 takes nothing returns nothing

local trigger t=CreateTrigger()

call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)

call TriggerAddCondition(t,Condition(function M5D))

call TriggerAddAction(t,function NDD)

set t=null

endfunction

希望你能看懂,A0OK是大招神智之蚀,A1VW是A帐后的技能ID,剩下的对照着技能说明自己慢慢研究吧,大部分语句都是套话,后半部分做特效的,有用的就几句:选定300+RL9*100范围内的单位,并对选取单位做判定,马甲施法,单位伤害目标

UnitDamageTarget(M_D,TT7,N4D*N8D,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)

想学dota里技能就打开dota地图J文件看一看,写代码不容易,但读起来还是很简单的。

望采纳!