function Sh takes nothing returns nothing
if ( not (udg_SK_Sh_integer == 0 ) )then
call CameraSetEQNoiseForPlayer(GetEnumPlayer(),5)
endif
endfunction
function Special_Destroyy takes nothing returns nothing
local unit a = GetEnumUnit()
call RemoveUnit(a)
set a = null
call GroupRemoveUnit(udg_SK_Special[udg_SK_integer],a)
endfunction
function Damage_Destroyy takes nothing returns nothing
local unit a = GetEnumUnit()
call GroupRemoveUnit(udg_SK_Tek_Vurus[udg_SK_integer],a)
set a = null
endfunction
function ggr takes nothing returns nothing
local unit a = GetEnumUnit()
local integer q = udg_SK_integer
local real damage = 5.1*GetHeroStatBJ(bj_HEROSTAT_STR,udg_SK_Caster[q],true)
if ( IsUnitEnemy(a,udg_SK_Player[q])) then
if ( not ( IsUnitInGroup(a,udg_SK_Tek_Vurus[q]))) then
call UnitDamageTargetBJ(udg_SK_Caster[q],a,damage,ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL)
call GroupAddUnit(udg_SK_Tek_Vurus[q],a)
endif
endif
set a = null
endfunction
function Group takes nothing returns nothing
local unit a = GetEnumUnit()
local player pa = GetOwningPlayer(a)
local integer s = GetConvertedPlayerId(pa)
local location q = GetUnitLoc(a)
local real x = GetUnitX(a)
local real y = GetUnitY(a)
local real face = GetUnitFacing(a)
local real tx = x+31*Cos(face*bj_DEGTORAD)
local real ty = y+31*Sin(face*bj_DEGTORAD)
local unit dummy
local group g = GetUnitsInRangeOfLocAll(350,q)
local group gr = GetUnitsInRangeOfLocAll(800,q)
set udg_SK_integer = s
if ( IsUnitInRangeLoc(a,udg_SK_Point[s],400)) then
call KillUnit(a)
call GroupRemoveUnit(udg_SK,a)
set dummy = CreateUnit(pa,'e00F',x,y,face)
set udg_SK_Sh_integer = udg_SK_Sh_integer+1
call ForForce(GetPlayersAll(),function Sh)
call ForGroup(gr,function ggr)
call ForGroup(udg_SK_Special[s],function Special_Destroyy)
call ForGroup(udg_SK_Tek_Vurus[s],function Damage_Destroyy)
call PauseUnit(udg_SK_Caster[s],false)
set udg_SK_Caster[s] = null
call RemoveLocation(udg_SK_Point[s])
set dummy = CreateUnit(pa,'e00G',x,y,face)
call UnitApplyTimedLife(dummy,'BFTL',4)
set dummy = null
else
set dummy = CreateUnit(pa,'e00D',x,y,face)
call SetUnitPosition(a,tx,ty)
call GroupAddUnit(udg_SK_Special[s],dummy)
call ForGroup(g,function ggr)
endif
call RemoveLocation(q)
call DestroyGroup(g)
call DestroyGroup(gr)
endfunction
function Super_Kamehameha_loop_Actions takes nothing returns nothing
call ForGroup(udg_SK,function Group)
endfunction
//===========================================================================
function InitTrig_Super_Kamehameha_loop takes nothing returns nothing
set gg_trg_Super_Kamehameha_loop = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Super_Kamehameha_loop, 0.03 )
call TriggerAddAction( gg_trg_Super_Kamehameha_loop, function Super_Kamehameha_loop_Actions )
endfunction