Ability Info
Targets allowed : enemy (creep , hero , even air mobs)
Summon the shade allow target.
After 5 second deal dmg depend number of unit target meet.
Bug (Question):
In the wait of first casting , if i use this skill again on other target . The first skill will deal damage of second skill.
Srry 4 my bad english >.<
Targets allowed : enemy (creep , hero , even air mobs)
Summon the shade allow target.
After 5 second deal dmg depend number of unit target meet.
Bug (Question):
In the wait of first casting , if i use this skill again on other target . The first skill will deal damage of second skill.
Code:
function Trig_ShadowArrows_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A04U'
endfunction
function Trig_ShadowArrows_Func012002003 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != GetUnitTypeId(udg_SDDummy) )
endfunction
function Trig_ShadowArrows_Actions takes nothing returns nothing
local unit u = GetSpellTargetUnit()
local unit c = GetSpellAbilityUnit()
local group g
local unit i
set udg_SDLevel = GetUnitAbilityLevelSwapped('A04U', c)
call CreateNUnitsAtLoc( 1, 'n00U', GetOwningPlayer(c), GetUnitLoc(u), bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( ( I2R(udg_SDLevel) + 2.10 ), 'BTLF', GetLastCreatedUnit() )
set i = GetLastCreatedUnit()
call IssueTargetOrderBJ( i, "move", u )
set udg_SDGroup = GetUnitsInRangeOfLocMatching(600.00, GetUnitLoc(udg_SDDummy), Condition(function Trig_ShadowArrows_Func012002003))
set g = udg_SDGroup
call EnableTrigger( gg_trg_ShadowLink )
call TriggerSleepAction( ( I2R(udg_SDLevel) + 2.00 ) )
set g = udg_SDGroup
call DisableTrigger( gg_trg_ShadowLink )
call AddSpecialEffectTargetUnitBJ( "origin", u, "Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl" )
call UnitDamageTargetBJ( i, u, ( ( 10.00 * ( I2R(udg_SDLevel) + 2.00 ) ) * ( ( ( 30.00 - ( I2R(udg_SDLevel) * 5.00 ) ) * 0.01 ) * I2R(udg_SDNumber) ) ), ATTACK_TYPE_MELEE, DAMAGE_TYPE_NORMAL )
call UnitDamageTargetBJ( i, u, ( ( 10.00 * ( I2R(udg_SDLevel) + 2.00 ) ) * ( ( ( 30.00 - ( I2R(udg_SDLevel) * 5.00 ) ) * 0.01 ) * I2R(udg_SDNumber) ) ), ATTACK_TYPE_PIERCE, DAMAGE_TYPE_NORMAL )
call UnitDamageTargetBJ( i, u, ( ( 10.00 * ( I2R(udg_SDLevel) + 2.00 ) ) * ( ( ( 30.00 - ( I2R(udg_SDLevel) * 5.00 ) ) * 0.01 ) * I2R(udg_SDNumber) ) ), ATTACK_TYPE_MAGIC, DAMAGE_TYPE_NORMAL )
call UnitDamageTargetBJ( i, u, ( ( 10.00 * ( I2R(udg_SDLevel) + 2.00 ) ) * ( ( ( 10.00 + ( I2R(udg_SDLevel) * 15.00 ) ) * 0.01 ) * I2R(udg_SDNumber) ) ), ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
set u = null
set g = null
endfunction
//===========================================================================
function InitTrig_ShadowArrows takes nothing returns nothing
set gg_trg_ShadowArrows = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ShadowArrows, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ShadowArrows, Condition( function Trig_ShadowArrows_Conditions ) )
call TriggerAddAction( gg_trg_ShadowArrows, function Trig_ShadowArrows_Actions )
endfunction
Code:
ShadowLink
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between (Position of SDTarget) and (Position of (Picked unit))) Less than or equal to 600.00
Then - Actions
Unit Group - Add (Picked unit) to SDGroup
Set SDNumber = (Number of units in SDGroup)
Else - Actions
Srry 4 my bad english >.<