Drunken_God
Hopes to get back into Mapmaking with SC2 :)
- Reaction score
- 106
Summon Darkness
Through some unknown property of matter Enemy units within 500 will take the distance in damage. The nearer the Units are the more they will get slowed.
Level 1 - 2 Seconds Slow
Level 2 - 4 Seconds Slow
Level 3 - 6 Seconds Slow
GUI\JASS: JASS (MY FIRST JASS SPELL )
Difficulty to import:Easy
MUI\MPI:Both and more (instant cast)
I know its not the best spell ever submitted here but its my first jass spell so pls dont flame me like "i can do this in 1 second"
JASS:
function Trig_Cast_Actions takes nothing returns nothing
local group ug
local unit u
local unit caster
local unit dum
local location p
local location up
local real r
local player play
set caster = GetTriggerUnit()
set p = GetUnitLoc(caster)
set ug = GetUnitsInRangeOfLocAll(500.00, p)
set play = GetOwningPlayer(caster)
call CreateUnitAtLoc(play , 039;e001039;, p, 0.00)
loop
set u = FirstOfGroup(ug)
exitwhen u==null
call GroupRemoveUnit(ug,u)
if IsUnitEnemy(u, play)==true then
set up = GetUnitLoc(u)
set dum = CreateUnitAtLoc(play, 039;e000039; , p, 0.00)
set r = DistanceBetweenPoints(p , up)
call SetUnitAbilityLevel( dum, 039;A001039;, ( ( R2I(r) / 50 ) + ( ( GetUnitAbilityLevel(caster, 039;A000039;) - 1 ) * 10 ) ) )
call IssueTargetOrder(dum, "slow" , u)
call UnitApplyTimedLife (dum, 039;BTLF039;, 0.30)
call UnitDamageTargetBJ( caster, u, r, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
set dum = null
call RemoveLocation(up)
endif
endloop
call DestroyGroup(ug)
set u = null
set caster = null
set play = null
call RemoveLocation(p)
endfunction
function Trig_Cast_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 039;A000039;
endfunction
//===========================================================================
function InitTrig_Cast takes nothing returns nothing
set gg_trg_Cast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Cast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Cast, Condition( function Trig_Cast_Conditions ) )
call TriggerAddAction( gg_trg_Cast, function Trig_Cast_Actions )
endfunction