Name | Type | is_array | initial_value |
aura_group | group | No | |
cache | gamecache | No | |
creep1 | unitcode | Yes | |
creep2 | unitcode | Yes | |
Darklord_lvl | integer | No | |
Flame_sun | unit | Yes | |
Hero1 | unit | No | |
Hero10 | unit | No | |
Hero2 | unit | No | |
Hero3 | unit | No | |
Hero4 | unit | No | |
Hero5 | unit | No | |
Hero6 | unit | No | |
Hero7 | unit | No | |
Hero8 | unit | No | |
Hero9 | unit | No | |
I | integer | No | |
income | integer | Yes | 25 |
incometimer | timer | No | |
Massive_wave | unit | Yes | |
mode | integer | No | 0 |
modedialog | dialog | No | |
modedialogbutton | button | Yes | |
Prison_group | group | Yes | |
prison_light | lightning | Yes | |
teamdefeated | boolean | Yes | |
Wave_hero | unit | No | |
wavelevel | integer | Yes | |
waveleveltype | unitcode | Yes | |
wavetimer | timer | Yes |
function Trig_Push_strike_Conditions takes nothing returns boolean
if ( not ( IsUnitEnemy(GetTriggerUnit(), GetOwningPlayer(GetAttacker())) == true ) ) then
return false
endif
if( not ( GetUnitAbilityLevel(GetAttacker(), 'A00L' ) > 0 ) ) then
return false
endif
return GetRandomInt(1, 100) <= 25
endfunction
function Knockback takes nothing returns nothing
local timer t = GetExpiredTimer()
local unit cast = GetHandleUnit(t, "cast")
local unit targ = GetHandleUnit(t, "targ")
local real dist = GetHandleReal(t,"dist")
local real angle = GetHandleReal(t,"angle")
local location m = Location(GetUnitX(targ)+dist*CosBJ(angle),GetUnitY(targ)+dist*SinBJ(angle))
call SetUnitPositionLoc( targ, m )
call DestroyEffect(AddSpellEffectByIdLoc('A00L',EFFECT_TYPE_SPECIAL,m))
call SetHandleReal(t,"dist",dist*.98)
call UnitDamageTargetBJ( cast, targ, .33, ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL )
set t = null
set cast = null
set targ = null
call RemoveLocation(m)
set m = null
endfunction
function Trig_Push_strike_Actions takes nothing returns nothing
local timer t = CreateTimer()
local unit cast = GetAttacker()
local unit targ = GetTriggerUnit()
local real angle = AngleBetweenPoints(GetUnitLoc(cast), GetUnitLoc(targ))
local effect fx=AddSpecialEffectTargetUnitBJ("weapon",cast,"Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile_mini.mdl")
call DestroyEffect(fx)
call UnitDamageTargetBJ( cast, targ, 25 * GetUnitAbilityLevel(cast, 'A00L' ), ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL )
call SetHandleHandle(t, "cast", cast)
call SetHandleHandle(t, "targ", targ)
call SetHandleReal(t,"dist",4.00)
call SetHandleReal(t,"angle",angle)
call DisableTrigger(GetTriggeringTrigger())
call TimerStart(t, 0.01, true, function Knockback)
call TriggerSleepAction( 0.4+( .2* I2R(GetUnitAbilityLevel(cast, 'A00L'))))
call EnableTrigger(GetTriggeringTrigger())
call FlushHandleLocals(t)
set fx = null
call PauseTimer(t)
call DestroyTimer(t)
set t = null
set cast = null
set targ = null
call RemoveLocation(GetUnitLoc(cast))
call RemoveLocation(GetUnitLoc(targ))
endfunction
//===========================================================================
function InitTrig_Push_strike takes nothing returns nothing
set gg_trg_Push_strike = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Push_strike, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Push_strike, Condition( function Trig_Push_strike_Conditions ) )
call TriggerAddAction( gg_trg_Push_strike, function Trig_Push_strike_Actions )
endfunction
function Trig_DestroyFX_Actions takes nothing returns nothing
local effect f=bj_lastCreatedEffect
call TriggerSleepAction( 1.00 )
call DestroyEffect(f)
set f=null
endfunction
//===========================================================================
function InitTrig_Destroy_FX takes nothing returns nothing
set gg_trg_Destroy_FX = CreateTrigger( )
call TriggerAddAction( gg_trg_Destroy_FX, function Trig_DestroyFX_Actions )
endfunction