X字斩技能触发器
//X字斩技能触发器
function XZiZhan_actions takes nothing returns nothing
local unit XZiZhan_x1 = null
local unit XZiZhan_x2 = null
local location xzizhan2=GetUnitLoc(GetSpellTargetUnit())
local location xzizhan1=PolarProjectionBJ(xzizhan2,300.00,(GetUnitFacing(GetTriggerUnit())+135.00))
local location xzizhan3=PolarProjectionBJ(xzizhan2,300.00,(GetUnitFacing(GetTriggerUnit())-135.00))
local location xzizhan4= null
local location xzizhan5= null
local location xzizhan6= null
local location xzizhan7= null
call CreateNUnitsAtLocFacingLocBJ(1,'e007',GetTriggerPlayer() ,xzizhan1,xzizhan2)
set XZiZhan_x1=GetLastCreatedUnit()
set xzizhan4=GetUnitLoc(XZiZhan_x1)
set xzizhan5=PolarProjectionBJ(xzizhan4,500.00,GetUnitFacing(XZiZhan_x1))
call SetUnitVertexColor(XZiZhan_x1,100,100,100,50)
call AddSpecialEffectTargetUnitBJ("weapon",GetLastCreatedUnit(),"Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile.mdl")
call DestroyEffect(GetLastCreatedEffectBJ())
call SetUnitAnimation(XZiZhan_x1,"attack slam")
call CreateNUnitsAtLocFacingLocBJ(1,'e007',GetTriggerPlayer() ,xzizhan3,xzizhan2)
set XZiZhan_x2=GetLastCreatedUnit()
set xzizhan6=GetUnitLoc(XZiZhan_x2)
set xzizhan7=PolarProjectionBJ(xzizhan6,500.00,GetUnitFacing(XZiZhan_x2))
call SetUnitVertexColor(XZiZhan_x2,100,100,100,50)
call AddSpecialEffectTargetUnitBJ("weapon",GetLastCreatedUnit(),"Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile.mdl")
call DestroyEffect(GetLastCreatedEffectBJ())
call SetUnitAnimation(XZiZhan_x2,"attack slam")
call TriggerSleepAction(0.85)
call SetUnitPositionLoc(XZiZhan_x1,xzizhan5)
call SetUnitPositionLoc(XZiZhan_x2,xzizhan7)
call TriggerSleepAction(0.25)
call RemoveUnit(XZiZhan_x1)
call RemoveUnit(XZiZhan_x2)
call RemoveLocation(xzizhan1)
call RemoveLocation(xzizhan2)
call RemoveLocation(xzizhan3)
call RemoveLocation(xzizhan4)
call RemoveLocation(xzizhan5)
call RemoveLocation(xzizhan6)
call RemoveLocation(xzizhan7)
endfunction
//判断是否是发动了X字斩技能
function XZiZhan_Conditions takes nothing returns boolean
if(GetSpellAbilityId()=='A011')then
return true
endif
return false
endfunction