//TESH.scrollpos=0
//TESH.alwaysfold=0
globals
hashtable hash = InitHashtable()
endglobals
//!==========================================================//
// Парабола
//!==========================================================//
function Parabola takes real h, real d, real x returns real
return (4 * h / d) * (d - x) * (x / d)
endfunction
//!==========================================================//
// Дистанция 2d
//!==========================================================//
function DistanceXY2D takes real X, real Y, real X2, real Y2 returns real
return SquareRoot((X2 - X) * (X2 - X) + (Y2 - Y) * (Y2 - Y))
endfunction
//!==========================================================//
// Фильтрация отряда
//!==========================================================//
function UnitCheck takes unit caster, unit u returns boolean
return IsUnitEnemy(u, GetOwningPlayer(caster)) and not (IsUnitType(u, UNIT_TYPE_DEAD) and GetUnitTypeId(u) != 0) and IsUnitType(u, UNIT_TYPE_GROUND) and not IsUnitType(u, UNIT_TYPE_STRUCTURE)
endfunction
//!==========================================================//
// Уничтожение деревьев
//!==========================================================//
function KillTrees takes nothing returns nothing
call KillDestructable(GetEnumDestructable())
endfunction
//!====================================================================================
// Rect
//!====================================================================================
function PS_KillTrees takes real x, real y, real radius returns nothing
local rect r=Rect(x-radius,y-radius,x+radius,y+radius)
call EnumDestructablesInRect(r,null,function KillTrees)
call RemoveRect(r)
set r=null
endfunction
//!====================================================================================
// Order для канальных способностей
//!====================================================================================
function String2OrderId takes string orderIdString returns integer
local integer orderId
// Check to see if it's a generic order.
set orderId = OrderId(orderIdString)
if (orderId != 0) then
return orderId
endif
// Check to see if it's a (train) unit order.
set orderId = UnitId(orderIdString)
if (orderId != 0) then
return orderId
endif
// Unrecognized - return 0
return 0
endfunction
//!====================================================================================
// Terrain Deformation Ripple
//!====================================================================================
function TerrainDeformationRippleXY takes real duration, boolean limitNeg, real x,real y, real startRadius, real endRadius, real depth, real wavePeriod, real waveWidth returns terraindeformation
local real spaceWave
local real timeWave
local real radiusRatio
if (endRadius <= 0 or waveWidth <= 0 or wavePeriod <= 0) then
return null
endif
set timeWave = 2.0 * duration / wavePeriod
set spaceWave = 2.0 * endRadius / waveWidth
set radiusRatio = startRadius / endRadius
set bj_lastCreatedTerrainDeformation = TerrainDeformRipple(x,y, endRadius, depth, R2I(duration * 1000), 1, spaceWave, timeWave, radiusRatio, limitNeg)
return bj_lastCreatedTerrainDeformation
endfunction
//!====================================================================================
// Плавающий текст
//!====================================================================================
function PercentInt takes real percentage, integer max returns integer
local integer result = R2I(percentage * I2R(max) * 0.01)
if (result < 0) then
set result = 0
elseif (result > max) then
set result = max
endif
return result
endfunction
function PercentTo takes real percentage returns integer
return PercentInt(percentage, 255)
endfunction
function SetTextTagVelocityR takes texttag tt, real speed, real angle returns nothing
local real vel = speed * 0.071 / 128
local real xvel = vel * Cos(angle * bj_DEGTORAD)
local real yvel = vel * Sin(angle * bj_DEGTORAD)
call SetTextTagVelocity(tt, xvel, yvel)
endfunction
function CreateTextTagUnit takes string s, unit whichUnit, real zOffset, real size, real red, real green, real blue, real transparency returns texttag
local texttag tt = CreateTextTag()
local real textHeight = size * 0.023 / 10
call SetTextTagText(tt, s, textHeight)
call SetTextTagPosUnit(tt, whichUnit, zOffset)
call SetTextTagColor(tt, PercentTo(red), PercentTo(green), PercentTo(blue), PercentTo(100.0-transparency))
call SetTextTagVelocityR( tt, 90.00,90 )
call SetTextTagPermanent(tt, false)
call SetTextTagLifespan(tt, 2.00)
set tt = null
return tt
endfunction
//!====================================================================================
// Массивный урон
//!====================================================================================
function MassiveDamage takes unit a, real x, real y, real damage,real radius returns nothing
local player p = GetOwningPlayer(a)
local group g = CreateGroup()
local unit n = GetEnumUnit()
call GroupEnumUnitsInRange(g,x,y,radius,null)
loop
set n = FirstOfGroup(g)
exitwhen n == null
if IsUnitEnemy(n, p) == true and UnitCheck(a, n) then
call UnitDamageTarget(a,n,damage,false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,null)
endif
call GroupRemoveUnit(g,n)
endloop
call DestroyGroup(g)
set a = null
set g = null
set n = null
set p = null
endfunction
Name | Type | is_array | initial_value |
D | real | No | |
HandleBoard | leaderboard | No |
//TESH.scrollpos=0
//TESH.alwaysfold=0
function HandleCounter_Update takes nothing returns nothing
local integer i = 0
local integer id
local location array P
local real result=0
loop
exitwhen i >= 50
set i = i + 1
set P[i] = Location(0,0)
set id = GetHandleId(P[i])
set result = result + (id-0x100000)
endloop
set result = result/i-i/2
loop
call RemoveLocation(P[i])
set P[i] = null
exitwhen i <= 1
set i = i - 1
endloop
call LeaderboardSetItemValue(udg_HandleBoard,0,R2I(result))
endfunction
function HandleCounter_Actions takes nothing returns nothing
set udg_HandleBoard = CreateLeaderboard()
call LeaderboardSetLabel(udg_HandleBoard, "Handle Counter")
call PlayerSetLeaderboard(GetLocalPlayer(),udg_HandleBoard)
call LeaderboardDisplay(udg_HandleBoard,true)
call LeaderboardAddItem(udg_HandleBoard,"Handles",0,Player(0))
call LeaderboardSetSizeByItemCount(udg_HandleBoard,1)
call HandleCounter_Update()
call TimerStart(GetExpiredTimer(),0.01,true,function HandleCounter_Update)
endfunction
function InitTrig_HandleCounter takes nothing returns nothing
call TimerStart(CreateTimer(),0,false,function HandleCounter_Actions)
endfunction
//TESH.scrollpos=24
//TESH.alwaysfold=0
globals
constant real speed = 40
constant real DamageBase = 100
constant real Damagelvl = 50
constant real Height = 200
constant real MinDistance = 250
constant real MaxDistance = 375
endglobals
function Trig_Hook_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A002'
endfunction
function Trig_Hook_Loop takes nothing returns nothing
local trigger t = GetTriggeringTrigger()
local integer id = GetHandleId(t)
local unit a = LoadUnitHandle(hash,id,200)
local unit b = LoadUnitHandle(hash,id,201)
local real angle = LoadReal(hash,id,202)
local real cur = LoadReal(hash,id,203)
local real distance= LoadReal(hash,id,204) - ( speed )
local lightning j = LoadLightningHandle(hash,id,205)
local real x = GetUnitX(a)
local real y = GetUnitY(a)
local real x1 = GetUnitX(b)
local real y1 = GetUnitY(b)
local real xx = x1+speed*Cos(angle*bj_DEGTORAD)
local real yy = y1+speed*Sin(angle*bj_DEGTORAD)
call PS_KillTrees(x1,y1,125)
if distance <=0.00 then
call DestroyTrigger(t)
call DestroyLightning(j)
call FlushChildHashtable(hash,id)
call SetUnitFlyHeight(b, GetUnitDefaultFlyHeight(b), 0.00)
call UnitDamageTarget(a,b,((DamageBase-Damagelvl)+( DamageLvl)*I2R(GetUnitAbilityLevel(a ,AbilID))),false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,null)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl",GetUnitX(b),GetUnitY(b)))
elseif IsTerrainPathable(xx, yy, PATHING_TYPE_WALKABILITY) == false then
call SetUnitX(b,xx)
call SetUnitY(b,yy)
call SetUnitFlyHeight(b,Parabola(Height,cur,distance),0.00)
call MoveLightningEx(j, true, x, y,GetUnitDefaultFlyHeight(a), x1, y1,Parabola(Height,cur,distance))
endif
call SaveReal(hash,id,204,distance)
set t = null
set a = null
set b = null
set j = null
endfunction
function Trig_Hook_Actions takes nothing returns nothing
local unit a = GetTriggerUnit()
local unit b = GetSpellTargetUnit()
local trigger t = CreateTrigger()
local integer id = GetHandleId(t)
local real x = GetUnitX(a)
local real y = GetUnitY(a)
local real x1 = GetUnitX(b)
local real y1 = GetUnitY(b)
local real rand = GetRandomReal(MinDistance,MaxDistance)
local real angle = bj_RADTODEG * Atan2(y - y1, x - x1)
local lightning j = AddLightning("LEAS",true,x,y,x1,y1)
call SaveUnitHandle(hash,id,200,a)
call SaveUnitHandle(hash,id,201,b)
call SaveReal(hash,id,202,angle)
call SaveReal(hash,id,203,DistanceXY2D(x,y,x1,y1)+rand)
call SaveReal(hash,id,204,DistanceXY2D(x,y,x1,y1)+rand)
call SaveLightningHandle(hash,id,205,j)
call UnitAddAbility(b, 'Arav')
call UnitRemoveAbility(b, 'Arav')
call TriggerRegisterTimerEvent(t,0.03125,true)
call TriggerAddAction(t,function Trig_Hook_Loop)
set t = null
set a = null
set b = null
set j = null
endfunction
//===========================================================================
function InitTrig_Hook takes nothing returns nothing
set gg_trg_Hook = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hook, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Hook, Condition( function Trig_Hook_Conditions ) )
call TriggerAddAction( gg_trg_Hook, function Trig_Hook_Actions )
endfunction
//TESH.scrollpos=71
//TESH.alwaysfold=0
globals
constant integer AbilityID = 'A001'
constant real Damage_Bas = 50
constant real Damage_lvl = 25
constant real Radius = 125
constant string Order = "clusterrockets"
endglobals
function Trig_Vystrely_Conditions takes nothing returns boolean
return GetSpellAbilityId() == AbilityID
endfunction
function Loop_2 takes nothing returns nothing
local timer t = GetExpiredTimer()
local integer id = GetHandleId(t)
local unit a = LoadUnitHandle(hash,id,257)
local real x = LoadReal(hash,id,259)
local real y = LoadReal(hash,id,260)
local real dis = LoadReal(hash,id,261)
local unit b = GetEnumUnit()
local real x1 = GetUnitX(b)
local real y1 = GetUnitY(b)
if DistanceXY2D(x,y,x1,y1) > dis then
call RemoveUnit(b)
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\WardenMissile\\WardenMissile.mdl",GetUnitX(b),GetUnitY(b)))
call MassiveDamage(a,x1,y1,((Damage_Bas-Damage_lvl)+( Damage_lvl)*I2R(GetUnitAbilityLevel(a ,AbilityID))),Radius)
else
call SetUnitFlyHeight(b,Parabola(((dis/3)+100),dis,DistanceXY2D(x,y,x1,y1)),0.00)
call SetUnitX(b,x1+(dis/40)*Cos(GetUnitFacing(b)*0.0174))
call SetUnitY(b,y1+(dis/40)*Sin(GetUnitFacing(b)*0.0174))
endif
call SaveReal(hash,id,261,dis)
set t = null
set a = null
set b = null
endfunction
function Trig_Vystrely_Loop takes nothing returns nothing
local timer t = GetExpiredTimer()
local integer id = GetHandleId(t)
local unit a = LoadUnitHandle(hash,id,257)
local integer dur = LoadInteger(hash,id,258) + ( 1 )
local integer count = LoadInteger(hash,id,262) - ( 1 )
local unit b
if count <=0 then
call PauseTimer(t)
call DestroyTimer(t)
call FlushChildHashtable(hash,id)
endif
if dur>2 and count>40 and GetUnitCurrentOrder(a) == String2OrderId(Order) and GetUnitState(a,UNIT_STATE_LIFE)>0.405 then
set b = CreateUnit(GetOwningPlayer(a),'h001',GetUnitX(a),GetUnitY(a),GetUnitFacing(a)+GetRandomReal(-10,10))
call GroupAddUnit(GroupEX, b)
set dur = 0
set b = null
endif
call ForGroup(GroupEX, function Loop_2)
call SaveInteger(hash,id,258,dur)
call SaveInteger(hash,id,262,count)
set t = null
set a = null
endfunction
function Trig_Vystrely_Actions takes nothing returns nothing
local unit a = GetTriggerUnit()
local timer t = CreateTimer()
local integer id = GetHandleId(t)
local real x = GetSpellTargetX()
local real y = GetSpellTargetY()
local real xx = GetUnitX(a)
local real yy = GetUnitY(a)
call SaveUnitHandle(hash,id,257,a)
call SaveInteger(hash,id,258,0)
call SaveReal(hash,id,259,xx)
call SaveReal(hash,id,260,yy)
call SaveReal(hash,id,261,DistanceXY2D(GetUnitX(a),GetUnitY(a),x,y))
call SaveInteger(hash,id,262,80)
call TimerStart(t,0.02,true,function Trig_Vystrely_Loop)
set a = null
set t = null
endfunction
//===========================================================================
function InitTrig_Vystrely takes nothing returns nothing
set gg_trg_Vystrely = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Vystrely, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Vystrely, Condition( function Trig_Vystrely_Conditions ) )
call TriggerAddAction( gg_trg_Vystrely, function Trig_Vystrely_Actions )
endfunction
globals
group GroupEX = CreateGroup()
endglobals
//TESH.scrollpos=123
//TESH.alwaysfold=0
globals
constant integer AbilID ='A003'
constant integer DamageMin = 100
constant integer DamageMax = 200
constant real DamageLvl = 75
constant real Speed = 40
constant real Height1 = 325
constant real KnockDis = 435
constant string OrderID = "magicleash"
endglobals
function Trig_Udar_Conditions takes nothing returns boolean
return GetSpellAbilityId() == AbilID
endfunction
function Target_Loop takes nothing returns nothing
local timer t = GetExpiredTimer()
local integer id = GetHandleId(t)
local unit a = LoadUnitHandle(hash,id,250)
local unit b = LoadUnitHandle(hash,id,251)
local real angle = LoadReal(hash,id,252)
local lightning j = LoadLightningHandle(hash,id,255)
local real distance= LoadReal(hash,id,256) - ( Speed/2.50)
local integer i
local integer d
local real x = GetUnitX(b)
local real y = GetUnitY(b)
local real x1 = x-Speed/2.50*Cos(angle*bj_DEGTORAD)
local real y1 = y-Speed/2.50*Sin(angle*bj_DEGTORAD)
call PS_KillTrees(x,y,125)
if distance <=0.00 then
set d = (GetRandomInt(DamageMin, DamageMax))
call PauseTimer(t)
call DestroyTimer(t)
call DestroyLightning(j)
call FlushChildHashtable(hash,id)
call IssueImmediateOrder(a,"stop")
call SetUnitFlyHeight(b, GetUnitDefaultFlyHeight(b), 0.00)
call UnitDamageTarget(a,b,I2R(d)+( DamageLvl)*I2R(GetUnitAbilityLevel(a ,AbilID)),false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,null)
call CreateTextTagUnit( I2S(d)+(" !"),(b), 0, 10.00,5.00,90.00,25.00,45.00 )
call TerrainDeformationRippleXY( 2.50, false, x,y, 200.00, 200.00, 64, 1, 512 )
set i = 0
loop
exitwhen i ==4
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",x+200*Cos((i*90)*bj_DEGTORAD),y+200*Sin((i*90))))
set i=i+1
endloop
elseif IsTerrainPathable(x1, y1, PATHING_TYPE_WALKABILITY) == false then
call SetUnitX(b,x1)
call SetUnitY(b,y1)
call SetUnitFlyHeight(b,Parabola(Height1,KnockDis,distance),0.00)
call MoveLightningEx(j, true, GetUnitX(a), GetUnitY(a),0, x, y,Parabola(Height1,KnockDis,distance))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\OrbOfDeath\\AnnihilationMissile.mdl",b,"chest"))
endif
call SaveReal(hash,id,256,distance)
set a = null
set b = null
set t = null
set j = null
endfunction
function Trig_Udar_Loop takes nothing returns nothing
local timer t = GetExpiredTimer()
local integer id = GetHandleId(t)
local unit a = LoadUnitHandle(hash,id,250)
local unit b = LoadUnitHandle(hash,id,251)
local real angle = LoadReal(hash,id,252)
local real cur = LoadReal(hash,id,253)
local real distance= LoadReal(hash,id,254) - (cur/Speed)
local lightning j = LoadLightningHandle(hash,id,255)
local integer i
local real x = GetUnitX(b)
local real y = GetUnitY(b)
local real x1 = x+cur/Speed*Cos(angle*bj_DEGTORAD)
local real y1 = y+cur/Speed*Sin(angle*bj_DEGTORAD)
if distance <=0.00 and GetUnitState(a,UNIT_STATE_LIFE)>0.405 then
call PauseTimer(t)
call SetUnitFlyHeight(b,GetUnitDefaultFlyHeight(b), 0.00)
call TerrainDeformationRippleXY( 2.50, false, x,y, 200.00, 200.00, 64, 1, 512 )
set i = 0
loop
exitwhen i ==4
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",x+200*Cos((i*90)*bj_DEGTORAD),y+200*Sin((i*90))))
set i=i+1
endloop
call TimerStart(t,0.03,true,function Target_Loop)
else
if GetUnitCurrentOrder(a) == String2OrderId(OrderID) and GetUnitState(b,UNIT_STATE_LIFE)>0.405 then
call SetUnitX(b,x1)
call SetUnitY(b,y1)
call SetUnitFlyHeight(b,Parabola(Height1,cur,distance),0.00)
call MoveLightningEx(j, true, GetUnitX(a), GetUnitY(a),GetUnitDefaultFlyHeight(a), x, y,Parabola(Height1,cur,distance))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\OrbOfDeath\\AnnihilationMissile.mdl",b,"chest"))
else
call PauseTimer(t)
call DestroyTimer(t)
call DestroyLightning(j)
call FlushChildHashtable(hash,id)
call SetUnitFlyHeight(b, GetUnitDefaultFlyHeight(b), 0.00)
endif
endif
call SaveReal(hash,id,254,distance)
set a = null
set b = null
set t = null
set j = null
endfunction
function Trig_Udar_Actions takes nothing returns nothing
local unit a = GetTriggerUnit()
local unit b = GetSpellTargetUnit()
local timer t = CreateTimer()
local integer id = GetHandleId(t)
local real x = GetUnitX(a)
local real y = GetUnitY(a)
local real x1 = GetUnitX(b)
local real y1 = GetUnitY(b)
local real angle = bj_RADTODEG * Atan2(y - y1, x - x1)
local lightning j = AddLightning("HWPB",true,x,y,x1,y1)
call SaveUnitHandle(hash,id,250,a)
call SaveUnitHandle(hash,id,251,b)
call SaveReal(hash,id,252,angle)
call SaveReal(hash,id,253,DistanceXY2D(x,y,x1,y1)-125)
call SaveReal(hash,id,254,DistanceXY2D(x,y,x1,y1)-125)
call SaveLightningHandle(hash,id,255,j)
call SaveReal(hash,id,256,KnockDis)
call SetLightningColor( j, 0.00, 1.00, 0.60, 80.00 )
call UnitAddAbility(b, 'Arav')
call UnitRemoveAbility(b, 'Arav')
call TimerStart(t,0.03125,true,function Trig_Udar_Loop)
set a = null
set b = null
set t = null
set j = null
endfunction
//===========================================================================
function InitTrig_Udar takes nothing returns nothing
set gg_trg_Udar = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Udar, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Udar, Condition( function Trig_Udar_Conditions ) )
call TriggerAddAction( gg_trg_Udar, function Trig_Udar_Actions )
endfunction
//TESH.scrollpos=33
//TESH.alwaysfold=0
globals
constant integer AbilRaw = 'A004'
constant integer DummyRaw = 'h002'
constant integer BoundsBase = 3
constant integer BoundsLevel = 1
constant real DamageBas = 150
constant real Damage_Lvl = 50
constant real Axe_Speed = 45
constant real RadiusDamage= 250
endglobals
function Trig_AxeBomber_Conditions takes nothing returns boolean
return GetSpellAbilityId() == AbilRaw
endfunction
function Trig_AxeBomber_Loop takes nothing returns nothing
local trigger t = GetTriggeringTrigger()
local integer id = GetHandleId(t)
local unit a = LoadUnitHandle(hash,id,261)
local unit b = LoadUnitHandle(hash,id,262)
local integer i = LoadInteger(hash,id,263)
local real Face = LoadReal(hash,id,264)
local real cur = LoadReal(hash,id,265)
local real distance= LoadReal(hash,id,266) - (cur/Axe_Speed)
local real x = GetUnitX(b)
local real y = GetUnitY(b)
local real x1 = x+cur/Axe_Speed*Cos(Face*0.0174)
local real y1 = y+cur/Axe_Speed*Sin(Face*0.0174)
local real r = cur
if distance <= 0.00 then
set r = GetRandomReal(275,600)
set Face = Face - GetRandomReal(-360,360)
set distance = r
set cur = r
set i = i - 1
call SetUnitFacingTimed(b, Face, 0.00)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl",GetUnitX(b),GetUnitY(b)))
call MassiveDamage(a,x,y,((DamageBas-Damage_Lvl)+( Damage_Lvl)*I2R(GetUnitAbilityLevel(a ,AbilRaw))),RadiusDamage)
set bj_lastCreatedTerrainDeformation = TerrainDeformCrater(x, y, RadiusDamage, 64.00, R2I(0.15 * 1000), false)
call SaveInteger(hash,id,263,i)
call SaveReal(hash,id,264,Face)
if i <= 0 then
call DestroyTrigger(t)
call RemoveUnit(b)
call FlushChildHashtable(hash,id)
endif
else
call SetUnitX(b,x1)
call SetUnitY(b,y1)
call SetUnitFlyHeight(b,Parabola((r+100),cur,distance),0.00)
call SetUnitTimeScale(b,((cur/9))* 0.01)
endif
call SaveReal(hash,id,265,cur)
call SaveReal(hash,id,266,distance)
set t = null
set a = null
set b = null
endfunction
function Trig_AxeBomber_Actions takes nothing returns nothing
local unit a = GetTriggerUnit()
local trigger t = CreateTrigger()
local integer id = GetHandleId(t)
local real x = GetSpellTargetX()
local real y = GetSpellTargetY()
local real d = bj_RADTODEG * Atan2(y - GetUnitY(a), x - GetUnitX(a))
local unit b = CreateUnit(GetOwningPlayer(a),DummyRaw,GetUnitX(a),GetUnitY(a),d)
local integer i = ((BoundsBase-BoundsLevel)+(BoundsLevel*GetUnitAbilityLevel(a,AbilRaw)))
call SaveUnitHandle(hash,id,261,a)
call SaveUnitHandle(hash,id,262,b)
call SaveInteger(hash,id,263,i)
call SaveReal(hash,id,264,GetUnitFacing(b))
call SaveReal(hash,id,265,DistanceXY2D(GetUnitX(a),GetUnitY(a),x,y))
call SaveReal(hash,id,266,DistanceXY2D(GetUnitX(a),GetUnitY(a),x,y))
call TriggerRegisterTimerEvent(t,0.03125,true)
call TriggerAddAction(t,function Trig_AxeBomber_Loop)
set t = null
set a = null
set b = null
endfunction
//===========================================================================
function InitTrig_AxeBomber takes nothing returns nothing
set gg_trg_AxeBomber = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_AxeBomber, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_AxeBomber, Condition( function Trig_AxeBomber_Conditions ) )
call TriggerAddAction( gg_trg_AxeBomber, function Trig_AxeBomber_Actions )
endfunction