elmstfreddie
The Finglonger
- Reaction score
- 203
Note - It may appear in the thread selection page to read Black Plaque. No, my spell is not a tooth decaying ability. Please keep in mind it's a PLAGUE with a G
Oh damn it's my second spell :O
It works, I like it.
Basically Black Plague is a permanent version of Locust Swarm, except you don't receive hp and the locusts' attack slows the enemies.
MUI: Yea
Leaks: No!
JESP: I think so
Import Difficulty: Medium, since there is 1 unit, 2 abilities, and 2 buffs, and 1 imported icon (a passive version of locust swarm)
Description:
lol
Screenshot:
Trigger:
Oh yeah and excuse the ugly testing environment
Let's face it, we all know I suck miserably at terraining.
Oh damn it's my second spell :O
It works, I like it.
Basically Black Plague is a permanent version of Locust Swarm, except you don't receive hp and the locusts' attack slows the enemies.
MUI: Yea
Leaks: No!
JESP: I think so
Import Difficulty: Medium, since there is 1 unit, 2 abilities, and 2 buffs, and 1 imported icon (a passive version of locust swarm)
Description:
Creates swarms of locusts around the hero which damages enemies and impares the enemy's movement.
Level 1 - 10 locusts and 10% slow
Level 2 - 15 locusts and 20% slow
Level 3 - 20 locusts and 30% slow
lol
Screenshot:
Trigger:
JASS:
function RandomPositionX takes real CurrentX returns real
return (CurrentX + (GetRandomReal(1.00,300.00)) * Cos((GetRandomReal(0.00,360.00)) * 180.00/3.14159))
endfunction
function RandomPositionY takes real CurrentY returns real
return (CurrentY + (GetRandomReal(1.00,300.00)) * Sin((GetRandomReal(0.00,360.00)) * 180.00/3.14159))
endfunction
function FacingOffsetX takes unit Owner returns real
return GetUnitX(Owner) + 200 * Cos(GetUnitFacing(Owner) * 3.14159/180.00)
endfunction
function FacingOffsetY takes unit Owner returns real
return GetUnitY(Owner) + 200 * Sin(GetUnitFacing(Owner) * 3.14159/180.00)
endfunction
constant function NumOfLocusts takes integer AbilLevel returns integer
return 5 + (5 * AbilLevel)
endfunction
constant function LocustId takes nothing returns integer
return 039;u000039;
endfunction
constant function AbilId takes nothing returns integer
return 039;A000039;
endfunction
constant function SlowId takes nothing returns integer
return 039;A001039;
endfunction
function Trig_AutoLocusts_Conditions takes nothing returns boolean
return GetLearnedSkill() == AbilId()
endfunction
function Trig_AutoLocusts_Actions takes nothing returns nothing
local unit Owner = GetTriggerUnit()
local ability LocustAbility
local unit array Locust
local integer index = 0
local group Locusts = CreateGroup()
local real dx
local real dy
if GetUnitAbilityLevel(Owner,AbilId()) != 1 then
return
endif
loop
set Locust[index] = CreateUnit(GetOwningPlayer(Owner),LocustId(),GetUnitX(Owner),GetUnitY(Owner),270.00)
call GroupAddUnit(Locusts,Locust[index])
exitwhen CountUnitsInGroup(Locusts) >= NumOfLocusts(GetUnitAbilityLevel(Owner,AbilId()))
set index = index + 1
endloop
set index = 0
loop
if GetUnitState(Owner,UNIT_STATE_LIFE) <= 0 then
set index = 0
loop
exitwhen index >= NumOfLocusts(GetUnitAbilityLevel(Owner,AbilId()))
call SetUnitExploded(Locust[index],true)
call KillUnit(Locust[index])
call GroupRemoveUnit(Locusts,Locust[index])
set Locust[index] = null
set index = index + 1
endloop
call DestroyGroup(Locusts)
loop
exitwhen GetUnitState(Owner,UNIT_STATE_LIFE) >= 1
call TriggerSleepAction(0.20)
endloop
set Locusts = CreateGroup()
set index = 0
loop
exitwhen (CountUnitsInGroup(Locusts) >= NumOfLocusts(GetUnitAbilityLevel(Owner,AbilId())))
set Locust[index] = CreateUnit(GetOwningPlayer(Owner),LocustId(),GetUnitX(Owner),GetUnitY(Owner),270.00)
call GroupAddUnit(Locusts,Locust[index])
call IssuePointOrder(Locust[index],"smart",RandomPositionX(GetUnitX(Owner)),RandomPositionY(GetUnitY(Owner)))
set index = index + 1
endloop
endif
set index = 0
loop
if CountUnitsInGroup(Locusts) < NumOfLocusts(GetUnitAbilityLevel(Owner,AbilId())) then
set Locust[CountUnitsInGroup(Locusts)] = CreateUnit(GetOwningPlayer(Owner),LocustId(),GetUnitX(Owner),GetUnitY(Owner),270)
call GroupAddUnit(Locusts,Locust[CountUnitsInGroup(Locusts)])
endif
exitwhen index > NumOfLocusts(GetUnitAbilityLevel(Owner,AbilId()))
set dx = GetUnitX(Owner) - GetUnitX(Locust[index])
set dy = GetUnitY(Owner) - GetUnitY(Locust[index])
if SquareRoot(dx * dx + dy * dy) > 250 then
call IssuePointOrder(Locust[index],"move",FacingOffsetX(Owner),FacingOffsetY(Owner))
else
call IssuePointOrder(Locust[index],"move",RandomPositionX(GetUnitX(Owner)),RandomPositionY(GetUnitY(Owner)))
endif
call SetUnitAbilityLevel(Locust[index],SlowId(),GetUnitAbilityLevel(Owner,AbilId()))
set index = index + 1
endloop
call TriggerSleepAction(0.80)
endloop
endfunction
function InitTrig_AutoLocusts takes nothing returns nothing
set gg_trg_AutoLocusts = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_AutoLocusts,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(gg_trg_AutoLocusts,Condition(function Trig_AutoLocusts_Conditions))
call TriggerAddAction(gg_trg_AutoLocusts,function Trig_AutoLocusts_Actions)
endfunction
Oh yeah and excuse the ugly testing environment
Let's face it, we all know I suck miserably at terraining.