Ayanami
칼리
- Reaction score
- 288
Introduction
After playing The Dark Lady from Heroes of Newerth, I was inspired by her cool spells. Thus, I decided to recreate her spells in Warcraft. The spells may not be exactly the same, but it should be very similar. Here's the actual information on The Dark Lady's spells.
The spells:
Details
- The spells are vJASS.
- The spells should be leakless. Feedback will be appreciated if otherwise.
- It is MUI, meaning that the spell can run multiple times at the same instance.
- A hero from Heroes of Newerth
Requirements
Other Trigger
Caster Dummy
Spells
Dark Blades
Description:
The Dark Lady activates the malicious energy in her Wrath Blades, causing her attacks to silence foes for 2.5 seconds, preventing them from using spells and abilities. The malicious energy in her blades also increase her base damage temporarily.
Level 1 - Increases base damage by 50%. Lasts 3 seconds.
Level 2 - Increases base damage by 70%. Lasts 4 seconds.
Level 3 - Increases base damage by 90%. Lasts 5 seconds.
Level 4 - Increases base damage by 110%. Lasts 6 seconds.
Cast Range - Self
Target Type - Instant
Cooldown - 22/18/14/10 seconds
Screenshot:
Code:
Taint Soul
Description:
The Dark Lady forces her influence onto an enemy unit's soul, tainting it. The target enemy is weakened, taking damage and having intitial 60% reduced movement speed for a brief duration.
Level 1 - Deals 60 damage and slow wears off over 2 seconds.
Level 2 - Deals 90 damage and slow wears off over 3 seconds.
Level 3 - Deals 120 damage and slow wears off over 4 seconds.
Level 4 - Deals 150 damage and slow wears off over 5 seconds.
Cast Range - 1200
Target Type - Unit
Cooldown - 12 seconds
Screenshot:
Code:
Charging Strikes
Description:
The Dark Lady launches herself toward a target location at incredible speed, attacking enemies as she passes by them. Charges toward target location, dealing base damage once to every enemy. Each consecutive attack during the charge will deal 15% less damage than the previous. If Dark Blades is activated, the damage increases and it will silence the enemies when hit. Once the charge is completed, The Dark Lady gains attack speed for 6 seconds.
Level 1 - 600 cast range. 30% increased attack speed.
Level 2 - 700 cast range. 45% increased attack speed.
Level 3 - 800 cast range. 60% increased attack speed.
Level 4 - 900 cast range. 75% increased attack speed.
Cast Range - 600/700/800/900
Target Type - Point
Cooldown - 21/17/13/9 seconds
Note - In Heroes of Newerth, when hit by Charging Strikes, it will place any orb effects that The Dark Lady possesses. In this version, it doesn't do that.
Screenshot:
Code:
Cover of Darkness
Description:
Using the depths of her Dark Powers, The Dark Lady poisons the minds of all enemy heroes in an area. For the duration, affected enemy heroes move slower by 15%, lose all allied vision and have a reduced sight range.
Level 1 - 1000 reduced sight range. Lasts 4 seconds.
Level 2 - 1200 reduced sight range. Lasts 6 seconds.
Level 3 - 1400 reduced sight range. Lasts 8 seconds.
Cast Range - Global
Target Type - AoE, 1000
Cooldown - 120 seconds
Screenshot:
Code:
Credits
Changelogs
Any type of feedback will be appreciated. Please post constructive criticisms if you're intending to criticize this spell pack. Thank you.
After playing The Dark Lady from Heroes of Newerth, I was inspired by her cool spells. Thus, I decided to recreate her spells in Warcraft. The spells may not be exactly the same, but it should be very similar. Here's the actual information on The Dark Lady's spells.
The spells:
- Dark Blades [Active]
- Taint Soul [Active]
- Charging Strikes [Active]
- Cover of Darkness [Active]
Details
- The spells are vJASS.
- The spells should be leakless. Feedback will be appreciated if otherwise.
- It is MUI, meaning that the spell can run multiple times at the same instance.
- A hero from Heroes of Newerth
Requirements
Other Trigger
Caster Dummy
JASS:
library CasterDummy initializer InitTrig
//=====================================================================//
// CONFIGURATION //
//=====================================================================//
globals
private constant integer DUMMY_ID = 039;dDCD039; // raw code of Caster Dummy
endglobals
//=====================================================================//
// END CONFIGURATION //
//=====================================================================//
globals
private unit dummy
endglobals
public function TargetUnit takes unit owner, unit target, integer abil, integer level, string order returns nothing
call UnitAddAbility(dummy, abil)
call SetUnitAbilityLevel(dummy, abil, level)
call SetUnitOwner(dummy, GetOwningPlayer(owner), false)
call IssueTargetOrder(dummy, order, target)
call UnitRemoveAbility(dummy, abil)
endfunction
public function TargetPoint takes unit owner, real x, real y, integer abil, integer level, string order returns nothing
call UnitAddAbility(dummy, abil)
call SetUnitAbilityLevel(dummy, abil, level)
call SetUnitOwner(dummy, GetOwningPlayer(owner), false)
call IssuePointOrder(dummy, order, x, y)
call UnitRemoveAbility(dummy, abil)
endfunction
private function InitTrig takes nothing returns nothing
local trigger t = CreateTrigger()
set dummy = CreateUnit(Player(0), DUMMY_ID, 0.00, 0.00, 0.00)
endfunction
endlibrary
Spells
Dark Blades
Description:
The Dark Lady activates the malicious energy in her Wrath Blades, causing her attacks to silence foes for 2.5 seconds, preventing them from using spells and abilities. The malicious energy in her blades also increase her base damage temporarily.
Level 1 - Increases base damage by 50%. Lasts 3 seconds.
Level 2 - Increases base damage by 70%. Lasts 4 seconds.
Level 3 - Increases base damage by 90%. Lasts 5 seconds.
Level 4 - Increases base damage by 110%. Lasts 6 seconds.
Cast Range - Self
Target Type - Instant
Cooldown - 22/18/14/10 seconds
Screenshot:
Code:
JASS:
library DarkBlades initializer InitTrig uses Damage
//=====================================================================//
// Dark Blades //
// by iAyanami aka Glenphir //
//=====================================================================//
// //
//=====================================================================//
// Implementation Instructions //
//---------------------------------------------------------------------//
// Copy these objects into your map //
// [Abilities] //
// 1) Dark Blades //
// 2) Dark Blades (Spell Book) //
// 3) Dark Blades (Damage - Level 1) //
// 4) Dark Blades (Damage - Level 2) //
// 5) Dark Blades (Damage - Level 3) //
// 6) Dark Blades (Damage - Level 4) //
// 7) Dark Blades (Silence) //
// Ensure that 3), 4), 5), and 6) are inside the Spell Book, 2) //
// //
// [Buffs] //
// 1) Dark Blades (Caster) //
// 2) Dark Blades (Target) //
// //
//=====================================================================//
//=====================================================================//
// CONFIGURATION //
//=====================================================================//
globals
private constant integer ABIL_ID1 = 039;ABDB039; // raw code of Ability "Dark Blades"
private constant integer ABIL_ID2 = 039;ADB5039; // raw code of Ability "Dark Blades (Spell Book)"
private constant integer ABIL_ID3 = 039;ADB6039; // raw code of Ability "Dark Blades (Silence)"
private constant integer BUFF_ID = 039;BDB1039; // raw code of Buff "Dark Blades (Caster)"
private constant boolean PLAYSOUND = true // true if sound is played upon casting
endglobals
private function GetDuration takes unit caster returns real
return 2.00 + (GetUnitAbilityLevel(caster, ABIL_ID1)) // duration of the spell
endfunction
//=====================================================================//
// END CONFIGURATION //
//=====================================================================//
private struct db
unit u
real r
endstruct
public function GetDarkBlades takes unit u returns integer
return GetUnitAbilityLevel(u, ABIL_ID1)
endfunction
public function GetSilenceAbil takes nothing returns integer
return ABIL_ID3
endfunction
public function GetSilence takes unit u returns integer
return GetUnitAbilityLevel(u, ABIL_ID1)
endfunction
private function Expire takes nothing returns boolean
local db d = KT_GetData()
set d.r = d.r - 0.10
if d.r <= 0.00 then
call UnitRemoveAbility(d.u, ABIL_ID2)
call UnitRemoveAbility(d.u, BUFF_ID)
call d.destroy()
return true
elseif GetUnitAbilityLevel(d.u, ABIL_ID2) == 0 then
call UnitAddAbility(d.u, ABIL_ID2)
call SetUnitAbilityLevel(d.u, ABIL_ID2, GetUnitAbilityLevel(d.u, ABIL_ID1))
endif
return false
endfunction
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == ABIL_ID1
endfunction
private function Actions takes nothing returns nothing
local db d = db.create()
set d.u = GetTriggerUnit()
set d.r = GetDuration(d.u)
if PLAYSOUND then
call StartSound(gg_snd_DarkBlades)
endif
call UnitAddAbility(d.u, ABIL_ID2)
call SetUnitAbilityLevel(d.u, ABIL_ID2, GetUnitAbilityLevel(d.u, ABIL_ID1))
call KT_Add(function Expire, d, 0.10)
endfunction
private function Silence takes nothing returns boolean
local unit c = GetEventDamageSource()
local unit t = GetTriggerUnit()
if Damage_IsAttack() and GetUnitAbilityLevel(c, BUFF_ID) > 0 then
call CasterDummy_TargetPoint(c, GetUnitX(t), GetUnitY(t), ABIL_ID3, GetUnitAbilityLevel(c, ABIL_ID1), "silence")
endif
set c = null
set t = null
return false
endfunction
private function InitTrig takes nothing returns nothing
local trigger t = CreateTrigger()
local trigger t2 = CreateTrigger()
local integer i = 0
loop
exitwhen i == 12
call SetPlayerAbilityAvailable(Player(i), ABIL_ID2, false)
set i = i + 1
endloop
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t, Condition(function Conditions))
call TriggerAddAction(t, function Actions)
call TriggerAddCondition(t2, Condition(function Silence))
call Damage_RegisterEvent(t2)
endfunction
endlibrary
Taint Soul
Description:
The Dark Lady forces her influence onto an enemy unit's soul, tainting it. The target enemy is weakened, taking damage and having intitial 60% reduced movement speed for a brief duration.
Level 1 - Deals 60 damage and slow wears off over 2 seconds.
Level 2 - Deals 90 damage and slow wears off over 3 seconds.
Level 3 - Deals 120 damage and slow wears off over 4 seconds.
Level 4 - Deals 150 damage and slow wears off over 5 seconds.
Cast Range - 1200
Target Type - Unit
Cooldown - 12 seconds
Screenshot:
Code:
JASS:
scope TaintSoul initializer InitTrig
//=====================================================================//
// Taint Soul //
// by iAyanami aka Glenphir //
//=====================================================================//
// //
//=====================================================================//
// Implementation Instructions //
//---------------------------------------------------------------------//
// Copy these objects into your map //
// [Abilities] //
// 1) Taint Soul //
// //
// [Buffs] //
// 1) Taint Soul //
// //
//=====================================================================//
//=====================================================================//
// CONFIGURATION //
//=====================================================================//
globals
private constant integer ABIL_ID1 = 039;ABTS039; // raw code of ability "Taint Soul"
private constant string EFFECT = "Abilities//Spells//Undead//AnimateDead//AnimateDeadTarget.mdl" // special effect on target
endglobals
private function GetDamage takes unit u returns real
return 30.00 + (30.00 * GetUnitAbilityLevel(u, ABIL_ID1)) // damage dealt
endfunction
//=====================================================================//
// END CONFIGURATION //
//=====================================================================//
private function Actions takes nothing returns boolean
local unit c = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
if GetSpellAbilityId() == ABIL_ID1 then
call UnitDamageTargetEx(c, t, GetDamage(c), true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_WHOKNOWS)
call AddSpecialEffectTarget(EFFECT, t, "origin")
endif
set c = null
set t = null
return false
endfunction
private function InitTrig takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t, Condition(function Actions))
endfunction
endscope
Charging Strikes
Description:
The Dark Lady launches herself toward a target location at incredible speed, attacking enemies as she passes by them. Charges toward target location, dealing base damage once to every enemy. Each consecutive attack during the charge will deal 15% less damage than the previous. If Dark Blades is activated, the damage increases and it will silence the enemies when hit. Once the charge is completed, The Dark Lady gains attack speed for 6 seconds.
Level 1 - 600 cast range. 30% increased attack speed.
Level 2 - 700 cast range. 45% increased attack speed.
Level 3 - 800 cast range. 60% increased attack speed.
Level 4 - 900 cast range. 75% increased attack speed.
Cast Range - 600/700/800/900
Target Type - Point
Cooldown - 21/17/13/9 seconds
Note - In Heroes of Newerth, when hit by Charging Strikes, it will place any orb effects that The Dark Lady possesses. In this version, it doesn't do that.
Screenshot:
JASS:
scope ChargingStrikes initializer InitTrig
//=====================================================================//
// Charging Strikes //
// by iAyanami aka Glenphir //
//=====================================================================//
// //
//=====================================================================//
// Implementation Instructions //
//---------------------------------------------------------------------//
// Copy these objects into your map //
// [Abilities] //
// 1) Charging Strikes //
// 2) Charging Strikes (Attack Speed) //
// //
//=====================================================================//
//=====================================================================//
// CONFIGURATION //
//=====================================================================//
globals
private constant integer ABIL_ID1 = 039;ABCS039; // raw code of Ability "Charging Strikes"
private constant integer ABIL_ID2 = 039;ACS1039; // raw code of Ability "Charging Strikes (Attack Speed)"
private constant real MINDMG = 23.00 // minimum damage dealt
private constant real MAXDMG = 25.00 // maximum damage dealt
private constant real TIME = 0.25 // time taken for charge
private constant real AOE = 150.00 // area of effect of the damage
private constant string SLIDE_EFFECT = "Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl" // special effect of the charge. set to "none.mdl" if no effects are desired
private constant string HIT_EFFECT = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl" // special effect on the targets when they are hit. set to "none.mdl" if no effects are desired.
private constant string HIT_ATTACH = "chest" // attachment point of HIT_EFFECT
private constant boolean STR = false // true if the hero's primary attribute is strength
private constant boolean AGI = true // true if the hero's primary attribute is agility
private constant boolean INT = false // true if the hero's primary attribute is intelligence
// if all is set to false, damage dealt will be random number between MINDMG and MAXDMG
endglobals
private function GetDuration takes unit caster returns real
return 6.00 // duration of attack speed bonus
endfunction
globals
private constant boolean EXTRADMG = true // set to true to deal extra damage and silence enemies if dark blades are activated
endglobals
private function GetExtraDamage takes unit caster, real damage returns real
local integer i = DarkBlades_GetDarkBlades(caster)
if i == 0 then
return damage
endif
return damage * (1.30 + (0.20 * DarkBlades_GetDarkBlades(caster))) // new damage dealt
endfunction
//=====================================================================//
// END CONFIGURATION //
//=====================================================================//
private struct cs
real offsetx
real offsety
real dist
real speed
real damage
real r
group g
unit u
endstruct
private function GetDamage takes unit caster returns real
if STR then
return GetRandomReal(MINDMG, MAXDMG) + I2R(GetHeroStr(caster, true))
elseif AGI then
return GetRandomReal(MINDMG, MAXDMG) + I2R(GetHeroAgi(caster, true))
elseif INT then
return GetRandomReal(MINDMG, MAXDMG) + I2R(GetHeroInt(caster, true))
endif
return GetRandomReal(MINDMG, MAXDMG)
endfunction
private function AttackSpeed takes nothing returns boolean
local cs d = KT_GetData()
set d.r = d.r - 0.10
if d.r <= 0 then
call UnitRemoveAbility(d.u, ABIL_ID2)
call d.destroy()
return true
elseif GetUnitAbilityLevel(d.u, ABIL_ID2) == 0 then
call UnitAddAbility(d.u, ABIL_ID2)
call SetUnitAbilityLevel(d.u, ABIL_ID2, GetUnitAbilityLevel(d.u, ABIL_ID1))
endif
return false
endfunction
private function Slide takes nothing returns boolean
local cs d = KT_GetData()
local group g = Group.get()
local real x = GetUnitX(d.u) + d.offsetx
local real y = GetUnitY(d.u) + d.offsety
local real damage
local unit u
if d.dist <= 0 then
call SetUnitPathing(d.u, true)
call UnitAddAbility(d.u, ABIL_ID2)
call SetUnitAbilityLevel(d.u, ABIL_ID2, GetUnitAbilityLevel(d.u, ABIL_ID1))
call KT_Add(function AttackSpeed, d, 0.10)
call Group.release(d.g)
return true
elseif not IsTerrainPathable(x, y, PATHING_TYPE_WALKABILITY) then
call SetUnitPathing(d.u, false)
call SetUnitX(d.u, x)
call SetUnitY(d.u, y)
endif
call AddSpecialEffect(SLIDE_EFFECT, x, y)
call DestroyEffect(bj_lastCreatedEffect)
set d.dist = d.dist - d.speed
call GroupEnumUnitsInRange(g, x, y, AOE, null)
loop
set u = FirstOfGroup(g)
exitwhen u == null
if not IsUnitType(u, UNIT_TYPE_STRUCTURE) and IsUnitEnemy(u, GetOwningPlayer(d.u)) and not IsUnitType(u, UNIT_TYPE_DEAD) and not IsUnitInGroup(u, d.g) then
if EXTRADMG then
call CasterDummy_TargetPoint(d.u, GetUnitX(u), GetUnitY(u), DarkBlades_GetSilenceAbil(), DarkBlades_GetDarkBlades(d.u), "silence")
endif
call UnitDamageTargetEx(d.u, u, d.damage, true, false, ATTACK_TYPE_MELEE, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS)
call AddSpecialEffectTarget(HIT_EFFECT, u, HIT_ATTACH)
call GroupAddUnit(d.g, u)
set d.damage = d.damage * 0.85
endif
call GroupRemoveUnit(g, u)
endloop
call Group.release(g)
set g = null
set u = null
return false
endfunction
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == ABIL_ID1
endfunction
private function Actions takes nothing returns nothing
local cs d = cs.create()
local real dx = GetSpellTargetX()
local real dy = GetSpellTargetY()
local real angle
local real x
local real y
set d.damage = GetDamage(d.u)
if EXTRADMG then
set d.damage = GetExtraDamage(d.u, d.damage)
endif
set d.g = Group.get()
set d.u = GetTriggerUnit()
set x = GetUnitX(d.u)
set y = GetUnitY(d.u)
set angle = Atan2(dy - y, dx - x)
set d.dist = SquareRoot(((x - dx) * (x - dx)) + ((y - dy) * (y - dy)))
set d.speed = d.dist / TIME * 0.03
set d.offsetx = d.speed * Cos(angle)
set d.offsety = d.speed * Sin(angle)
set d.r = GetDuration(d.u)
call KT_Add(function Slide, d, 0.03)
endfunction
private function InitTrig takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t, Condition(function Conditions))
call TriggerAddAction(t, function Actions)
endfunction
endscope
Cover of Darkness
Description:
Using the depths of her Dark Powers, The Dark Lady poisons the minds of all enemy heroes in an area. For the duration, affected enemy heroes move slower by 15%, lose all allied vision and have a reduced sight range.
Level 1 - 1000 reduced sight range. Lasts 4 seconds.
Level 2 - 1200 reduced sight range. Lasts 6 seconds.
Level 3 - 1400 reduced sight range. Lasts 8 seconds.
Cast Range - Global
Target Type - AoE, 1000
Cooldown - 120 seconds
Screenshot:
Code:
JASS:
scope CoverofDarkness initializer InitTrig
//=====================================================================//
// Cover of Darkness //
// by iAyanami aka Glenphir //
//=====================================================================//
// //
//=====================================================================//
// Implementation Instructions //
//---------------------------------------------------------------------//
// Copy these objects into your map //
// [Abilities] //
// 1) Cover of Darkness //
// 2) Cover of Darkness (Movement Speed) //
// 3) Cover of Darkness (Sight - Level 1) //
// 4) Cover of Darkness (Sight - Level 2) //
// 5) Cover of Darkness (Sight - Level 3) //
// //
// [Buffs] //
// 1) Cover of Darkness //
// //
//=====================================================================//
//=====================================================================//
// CONFIGURATION //
//=====================================================================//
globals
private constant integer ABIL_ID1 = 039;ABCD039; // raw code of Ability "Cover of Darkness"
private constant integer ABIL_ID2 = 039;ACD4039; // raw code of Ability "Charging Strikes (Movement Speed)"
private constant integer ABIL_ID3 = 039;ACD1039; // raw code of Ability "Charging Strikes (Sight - Level 1)"
private constant integer ABIL_ID4 = 039;ACD2039; // raw code of Ability "Charging Strikes (Sight - Level 2)"
private constant integer ABIL_ID5 = 039;ACD3039; // raw code of Ability "Charging Strikes (Sight - Level 3)"
private constant real AOE = 1000.00 // area of effect
private constant boolean HERO = true // set to true to only affect enemy heroes
endglobals
private function GetDuration takes unit caster returns real
return 2.00 + (2.00 * GetUnitAbilityLevel(caster, ABIL_ID1)) // duration of blind
endfunction
//=====================================================================//
// END CONFIGURATION //
//=====================================================================//
globals
private player PLAYER
private unit UNIT
endglobals
private struct cod
real r
group g
unit u
endstruct
private function RemoveVision takes nothing returns nothing
local unit u = GetEnumUnit()
local player ou = GetOwningPlayer(u)
local integer i = 0
if GetUnitAbilityLevel(UNIT, ABIL_ID2) == 0 then
call UnitAddAbility(u, ABIL_ID2)
if GetUnitAbilityLevel(UNIT, ABIL_ID1) == 1 then
call UnitAddAbility(u, ABIL_ID3)
elseif GetUnitAbilityLevel(UNIT, ABIL_ID1) == 2 then
call UnitAddAbility(u, ABIL_ID4)
elseif GetUnitAbilityLevel(UNIT, ABIL_ID1) == 3 then
call UnitAddAbility(u, ABIL_ID4)
endif
endif
loop
if GetPlayerAlliance(Player(i), ou, ALLIANCE_SHARED_VISION) then
call SetPlayerAlliance(Player(i), ou, ALLIANCE_SHARED_VISION, false)
endif
exitwhen i == 15
set i = i + 1
endloop
set u = null
set ou = null
endfunction
private function Restore takes nothing returns nothing
local unit u = GetEnumUnit()
local player ou = GetOwningPlayer(u)
local integer i = 0
call UnitRemoveAbility(GetEnumUnit(), ABIL_ID2)
call UnitRemoveAbility(GetEnumUnit(), ABIL_ID3)
call UnitRemoveAbility(GetEnumUnit(), ABIL_ID4)
call UnitRemoveAbility(GetEnumUnit(), ABIL_ID5)
loop
if IsPlayerAlly(ou, Player(i)) and not GetPlayerAlliance(Player(i), ou, ALLIANCE_SHARED_VISION) then
call SetPlayerAlliance(Player(i), ou, ALLIANCE_SHARED_VISION, true)
endif
exitwhen i == 15
set i = i + 1
endloop
set u = null
set ou = null
endfunction
private function Periodic takes nothing returns boolean
local cod d = KT_GetData()
local integer i
set d.r = d.r - 0.10
if d.r <= 0 then
call ForGroup(d.g, function Restore)
call Group.release(d.g)
call d.destroy()
return true
endif
set PLAYER = GetOwningPlayer(d.u)
set UNIT = d.u
call ForGroup(d.g, function RemoveVision)
return false
endfunction
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == ABIL_ID1
endfunction
private function Actions takes nothing returns nothing
local cod d = cod.create()
local real x = GetSpellTargetX()
local real y = GetSpellTargetY()
local boolean check
local integer i
local unit u
set d.g = Group.get()
set d.u = GetTriggerUnit()
set d.r = GetDuration(d.u)
set i = CountUnitsInGroup(d.g)
call GroupEnumUnitsInRange(d.g, x, y, AOE, null)
loop
exitwhen i == 0
set u = FirstOfGroup(d.g)
set i = i - 1
if HERO then
set check = not IsUnitType(u, UNIT_TYPE_STRUCTURE) and IsUnitEnemy(u, GetOwningPlayer(d.u)) and IsUnitType(u, UNIT_TYPE_HERO)
else
set check = not IsUnitType(u, UNIT_TYPE_STRUCTURE) and IsUnitEnemy(u, GetOwningPlayer(d.u))
endif
if check then
if GetUnitAbilityLevel(d.u, ABIL_ID1) == 1 then
call UnitAddAbility(u, ABIL_ID3)
elseif GetUnitAbilityLevel(d.u, ABIL_ID1) == 2 then
call UnitAddAbility(u, ABIL_ID4)
elseif GetUnitAbilityLevel(d.u, ABIL_ID1) == 3 then
call UnitAddAbility(u, ABIL_ID4)
endif
else
call GroupRemoveUnit(d.g, u)
endif
endloop
call KT_Add(function Periodic, d, 0.10)
set u = null
endfunction
private function InitTrig takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t, Condition(function Conditions))
call TriggerAddAction(t, function Actions)
endfunction
endscope
Credits
Code:
[COLOR="Red"]Event, AIDS, Key Timers 2, Damage[/COLOR] - [URL="http://www.thehelper.net/forums/member.php?u=15813"]Jesus4Lyf[/URL]
[COLOR="Red"]Recycle[/COLOR] - [URL="http://www.thehelper.net/forums/member.php?u=9767"]Nestharus[/URL]
[COLOR="Red"]GDD[/COLOR] - [URL="http://www.thehelper.net/forums/member.php?u=26460"]Weep[/URL]
[COLOR="Red"]Dark Blades Model[/COLOR] - shamanyouranus @ [url]www.hiveworkshop.com[/url]
[COLOR="Red"]Taint Soul Model[/COLOR] - WILL THE ALMIGHTY @ [url]www.hiveworkshop.com[/url]
[COLOR="Red"]Cover of Darkness Model[/COLOR] - shamanyouranus @ [url]www.hiveworkshop.com[/url]
[COLOR="Red"]Spell Icons[/COLOR] - [url]www.heroesofnewerth.com[/url]
Changelogs
Code:
[B]Version 1.0[/B]
- Initial release
[B]Version 1.1[/B]
- Fixed the problem of Cover of Darkness (Spell Book) from showing up
[B]Version 1.2[/B]
- Changed Dark Blades to a Buff Placer to improve performance.
- Changed Taint Soul's base spell from Chain Lightning to Shadow Strike to remove unecessary triggers.
- Removed the IsUnitGroupEmptyBJ function from the trigger "Charging Strikes Periodic" and used an integer to check the units instead.
- Fixed a lag issue in charging strikes where dummies were spawning for every enemy unit hit.
- Changed Cover of Darkness' slow aura to Slow Aura (Tornado) from Endurance Aura so that a Spell Book will not be needed.
- Slightly reworked Cover of Darkness' trigger.
[B]Version 1.3[/B]
- Fixed Taint Soul's lag issues.
[B]Version 1.4[/B]
- Added the actual Dark Lady's soundset.
[B]Version 1.5[/B]
- Rewrote the spell triggers into vJASS
Any type of feedback will be appreciated. Please post constructive criticisms if you're intending to criticize this spell pack. Thank you.