if .mtime>=.ctime and GetUnitState(.caster,UNIT_STATE_LIFE)>0.00 then
set cx=GetUnitX(.caster)
set cy=GetUnitY(.caster)
set angle=A2PXY(x,y,cx,cy)
set curv=GetFlyParabel(.x,.y,.z,0.,.mtime,.ctime,.endz,TargetSpeed,x,y,.tx,.ty)
set .ctime=.ctime+Motion_periodic
set x=x+TargetSpeed*Cos(angle*3.14159/180)
set y=y+TargetSpeed*Sin(angle*3.14159/180)

if z>=.z or .distance>=MaxMissileDistance or not RectContainsCoords(MaxArea,.x,.y) or GetUnitState(.caster,UNIT_STATE_LIFE)<=0.00 or CountDestructableInRangeOfXY(.x,.y,MissileCollision)>0 then

//Miss Init
set Mdat =MNdat_Miss.create()

set Mdat.dummy =.dummy
set Mdat.gfx =AddSpecialEffectTarget(MissGFXPath,.dummy,MissGFXAttach)
set Mdat.rope =.rope

set Mdat.x =x
set Mdat.y =y
set Mdat.mx =MissileSpeed*Cos(angle*3.14159/180)
set Mdat.my =MissileSpeed*Sin(angle*3.14159/180)
set Mdat.tx =.x
set Mdat.ty =.y
set Mdat.mz =.z
set Mdat.distance=D2PXY(x,y,.x,.y)

set Hdat.target=t
set Hdat.caster=.caster
set Hdat.ctime =0.
set Hdat.rope =.rope
set Hdat.mtime =.distance/TargetSpeed*Motion_periodic
set Hdat.dmg =DamagePerLevel(I2R(GetUnitAbilityLevel(.caster,SpellId)))
set Hdat.x =GetUnitX(t)
set Hdat.y =GetUnitY(t)
set Hdat.z =GetUnitDefaultFlyHeight(t)
set Hdat.tx =x+StopTargetRange*Cos(angle*3.14159/180)
set Hdat.ty =y+StopTargetRange*Sin(angle*3.14159/180)
set Hdat.endz =MaxFlyHeight(D2PXY(Hdat.x,Hdat.y,Hdat.tx,Hdat.ty))
set Hdat.gfx =AddSpecialEffectTarget(HitGFXPath,t,HitGFXAttach)

set dat.caster =GetTriggerUnit()
set x =GetUnitX(dat.caster)
set y =GetUnitY(dat.caster)
set angle =A2PXY(x,y,lx,ly)
set dat.x =x+MissileSpeed*Cos(angle*3.14159/180)
set dat.y =y+MissileSpeed*Sin(angle*3.14159/180)
set z =GetZ(dat.x,dat.y)
set dat.z =MissileFlyHeight+z
set dat.distance=0.
set dat.rope =AddLightningEx(LightningType,true,dat.x,dat.y,dat.z,dat.x,dat.y,dat.z)
set dat.dummy =CreateUnit(Player(14),DummyId,dat.x,dat.y,A2PXY(dat.x,dat.y,lx,ly))
set dat.gfx =AddSpecialEffectTarget(MissileGFXPath,dat.dummy,MissileGFXAttach)