DrinkSlurm
Eat Bachelor Chow!
- Reaction score
- 50
last updated: January 24, 2008
version 1.00: original submission
version 1.01: changed the missile art for Light Lance
version 1.02: changed the missile art for Light Lance; tooltip fixes; added more info in implementation instructions
version 1.03: JASS version; consolidated all 3 spells onto 1 hero
version 1.04: new JASS version with coding optimizations--Snow Storm consolidated into 1 trigger; preloading; configuration
My first Spells submission.
These are three different spells that are really based on the same concept: projectiles continuously fire outward in the direction of the current facing angle of the hero automatically, and the hero is able to move and aim the spell during the duration of the spell. (It may be hard to explain; just try it out and see.)
Flame Fury
Spell type: instant cast
Description: Sprays a constant wide cone of fire to burn enemy units. The flames always shoot in the direction of the facing angle of the Hero. For the duration of the spell, the Hero is able to move and aim the blasts of fire albeit very slowly. [100 mana cost; 10 second cooldown]
Level 1 - up to 80 damage per second for 5 seconds; 250 distance and 150 width AoE cone area; the Hero is slowed by 95%.
Level 2 - up to 100 damage per second for 6 seconds; 300 distance and 200 width AoE cone area; the Hero is slowed by 90%.
Level 3 - up to 120 damage per second for 7 seconds; 350 distance and 250 width AoE cone area; the Hero is slowed by 85%.
Coding: JASS; requires vJASS
Leaks: Leakless
Multi Instanceability: MUI
Lag-susceptibility: low
Import Difficulty: easy (instructions included)
Trigger:
Snow Storm
Spell type: instant cast
Description: Launches a constant barrage of ice to damage and slow enemy units. The snow storm always shoots in the direction of the facing angle of the Hero. For the duration of the spell, the Hero is able to move and aim the blasts of fire albeit very slowly. [75 mana cost; 10 second cooldown]
Level 1 - up to 60 damage per second for 5 seconds; 200 area of effect; the Hero is slowed by 95%.
Level 2 - up to 90 damage per second for 6 seconds; 250 area of effect; the Hero is slowed by 90%.
Level 3 - up to 120 damage per second for 7 seconds; 300 area of effect; the Hero is slowed by 85%.
Coding: JASS; requires vJASS
Leaks: Leakless
Multi Instanceability: MUI
Lag-susceptibility: low
Import Difficulty: easy (instructions included)
Trigger:
Light Lance
Spell type: instant cast
Description: Emits a constant narrow stream of light to damage enemy units. The light lance always shoots in the direction of the facing angle of the Hero. For the duration of the spell, the Hero is able to move and aim the light albeit very slowly. [100 mana cost; 10 second cooldown]
Level 1 - up to 120 damage per second for 5 seconds; 300 distance line damage; the Hero is slowed by 95%.
Level 2 - up to 160 damage per second for 6 seconds; 450 distance line damage; the Hero is slowed by 90%.
Level 3 - up to 200 damage per second for 7 seconds; 600 distance line damage; the Hero is slowed by 85%.
Coding: JASS; requires vJASS
Leaks: Leakless
Multi Instanceability: MUI
Lag-susceptibility: low
Import Difficulty: easy (instructions included)
Trigger:
Obsolete
One screenshot for all three spells:
version 1.00: original submission
version 1.01: changed the missile art for Light Lance
version 1.02: changed the missile art for Light Lance; tooltip fixes; added more info in implementation instructions
version 1.03: JASS version; consolidated all 3 spells onto 1 hero
version 1.04: new JASS version with coding optimizations--Snow Storm consolidated into 1 trigger; preloading; configuration
My first Spells submission.
These are three different spells that are really based on the same concept: projectiles continuously fire outward in the direction of the current facing angle of the hero automatically, and the hero is able to move and aim the spell during the duration of the spell. (It may be hard to explain; just try it out and see.)
Flame Fury
Spell type: instant cast
Description: Sprays a constant wide cone of fire to burn enemy units. The flames always shoot in the direction of the facing angle of the Hero. For the duration of the spell, the Hero is able to move and aim the blasts of fire albeit very slowly. [100 mana cost; 10 second cooldown]
Level 1 - up to 80 damage per second for 5 seconds; 250 distance and 150 width AoE cone area; the Hero is slowed by 95%.
Level 2 - up to 100 damage per second for 6 seconds; 300 distance and 200 width AoE cone area; the Hero is slowed by 90%.
Level 3 - up to 120 damage per second for 7 seconds; 350 distance and 250 width AoE cone area; the Hero is slowed by 85%.
Coding: JASS; requires vJASS
Leaks: Leakless
Multi Instanceability: MUI
Lag-susceptibility: low
Import Difficulty: easy (instructions included)
Trigger:
JASS:
//===========================================================================
//========================== Flame Fury v1.04 ===============================
//============================ Instructions =================================
//===========================================================================
// MUI; requires vJASS
//===========================================================================
// 1. Go to the Object Editor, and copy + paste the following:
// Units
// * Dummy Caster
// Abilities
// * Flame Fury: Add this ability to the Hero; make sure the Base Order ID
// does not conflict with any other spell on the Hero.
// * Slow (for Flame Fury): make sure that the buff is set to the custom
// "Flame Fury (Caster)" buff. This is the buff that will show on the
// Hero and that is used in this trigger.
// * Breath of Fire (for Flame Fury)
// Buffs
// * Flame Fury (Caster)
// 2. Copy the following triggers:
// * this trigger: "FlameFury"
// 3. Other options:
// Custom Gameplay Constants (this is what allows the Hero to move around and
// aim the spell, albeit very slowly):
// * Movement - Unit Speed - Maximum: 522
// * Movement - Unit Speed - Minimum: 1
// Hero
// * Movement - Turn Rate: 0.20 (this is part of the balance of the skill;
// a slower turning rate makes it harder to aim)
// 4. To adjust the balance of the skill, you can change some of the following
// values:
// Abilities
// * Flame Fury: Cooldown, Mana Cost
// * Breath of Fire (for Flame Fury): Damages, Distances, Areas, etc.
// * Slow (for Flame Fury): Attack Speed Factor, Movement Speed Factor
// 5. Make sure that the rawcodes specified below reference the to proper units,
// abilities, or buffs.
scope FlameFury
globals
private constant integer FFURY = 039;A003039; //Ability ID of "Flame Fury"
private constant integer DUMMY = 039;h000039; //Unit ID of "Dummy Caster"
private constant integer SLOW = 039;A009039; //Ability ID of "Slow (for Flame Fury)"
private constant integer BOFIRE = 039;A001039; //Ability ID of "Breath of Fire (for Flame Fury)"
private constant integer BUFF = 039;B003039; //Buff ID of "Flame Fury (Caster)"
// 6. More configuration options:
private constant real INTERVAL = 0.10 //timer interval; default 0.10 seconds
private constant real ATKDIST = 100.00 //attack distance; adjust only if necessary--if distance specified in Object Editor is less than 100.00
private constant real DURFACTOR = 1.00 //this and DURBASE determine the duration of the spell; default 1.00
private constant real DURBASE = 4.00 //this and DURFACTOR determine the duration of the spell; default 4.00
private constant real SIZEFACTOR = 0.15 //this and SIZEBASE determine the size (graphical only) of the Breath of Fire projectile; default 0.15
private constant real SIZEBASE = 0.30 //this and SIZEFACTOR determine the size (graphical only) of the Breath of Fire projectile; default 0.30
endglobals
//=========================== End of Instructions ===========================
//===========================================================================
private struct FF
unit hero
integer lvl
integer ticks
endstruct
globals
private FF array ALLDATA
private timer ALLTIMER = CreateTimer()
private integer TOTAL = 0
endglobals
//===========================================================================
private function Cond takes nothing returns boolean
return GetSpellAbilityId() == FFURY
endfunction
//===========================================================================
private function TimerActions takes nothing returns nothing
local FF data
local real face_rad
local real x1
local real y1
local real x2
local real y2
local real size
local unit u
local integer i = 1
loop
exitwhen i > TOTAL
set data = ALLDATA<i>
set face_rad = GetUnitFacing(data.hero) * bj_PI/180
set x1 = GetUnitX(data.hero)
set y1 = GetUnitY(data.hero)
set x2 = x1 + ATKDIST * Cos(face_rad)
set y2 = y1 + ATKDIST * Sin(face_rad)
set size = data.lvl * SIZEFACTOR + SIZEBASE
set u = CreateUnit(GetOwningPlayer(data.hero), DUMMY, x1, y1, face_rad)
call SetUnitScale(u, size, size, size)
call UnitApplyTimedLife(u, 039;BTLF039;, 1.00)
call UnitAddAbility(u, BOFIRE)
call SetUnitAbilityLevel(u, BOFIRE, data.lvl)
call IssuePointOrder(u, "breathoffire", x2, y2)
set data.ticks = data.ticks - 1
if data.ticks <= 0 or GetWidgetLife(data.hero) < 0.406 then
call UnitRemoveAbility(data.hero, BUFF)
call data.destroy()
set ALLDATA<i> = ALLDATA[TOTAL]
set TOTAL = TOTAL - 1
set i = i - 1
if TOTAL == 0 then
call PauseTimer(ALLTIMER)
endif
endif
set i = i + 1
endloop
set u = null
endfunction
private function Actions takes nothing returns nothing
local FF data = FF.create()
local unit u
set data.hero = GetTriggerUnit()
set data.lvl = GetUnitAbilityLevel(data.hero, FFURY)
set data.ticks = R2I((data.lvl * DURFACTOR + DURBASE) / INTERVAL)
set u = CreateUnit(GetOwningPlayer(data.hero), DUMMY, GetUnitX(data.hero), GetUnitY(data.hero), 0)
call UnitApplyTimedLife(u, 039;BTLF039;, 1.00)
call UnitAddAbility(u, SLOW)
call SetUnitAbilityLevel(u, SLOW, data.lvl)
call IssueTargetOrder(u, "slow", data.hero)
set TOTAL = TOTAL + 1
set ALLDATA[TOTAL] = data
if TOTAL == 1 then
call TimerStart(ALLTIMER, INTERVAL, true, function TimerActions)
endif
set u = null
endfunction
//===========================================================================
public function InitTrig takes nothing returns nothing
local unit u = CreateUnit(Player(0), DUMMY, 0, 0, 0)
call UnitAddAbility(u, SLOW)
call UnitAddAbility(u, BOFIRE)
call RemoveUnit(u)
set gg_trg_FlameFury = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_FlameFury, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_FlameFury, Condition(function Cond))
call TriggerAddAction(gg_trg_FlameFury, function Actions)
set u = null
endfunction
endscope</i></i>
Snow Storm
Spell type: instant cast
Description: Launches a constant barrage of ice to damage and slow enemy units. The snow storm always shoots in the direction of the facing angle of the Hero. For the duration of the spell, the Hero is able to move and aim the blasts of fire albeit very slowly. [75 mana cost; 10 second cooldown]
Level 1 - up to 60 damage per second for 5 seconds; 200 area of effect; the Hero is slowed by 95%.
Level 2 - up to 90 damage per second for 6 seconds; 250 area of effect; the Hero is slowed by 90%.
Level 3 - up to 120 damage per second for 7 seconds; 300 area of effect; the Hero is slowed by 85%.
Coding: JASS; requires vJASS
Leaks: Leakless
Multi Instanceability: MUI
Lag-susceptibility: low
Import Difficulty: easy (instructions included)
Trigger:
JASS:
//===========================================================================
//========================== Snow Storm v1.04 ===============================
//============================ Instructions =================================
//===========================================================================
// MUI; requires vJASS
//===========================================================================
// 1. Go to the Object Editor, and copy + paste the following:
// Units
// * Dummy Caster
// * Dummy Attacker 1
// * Dummy Attacker 2
// * Dummy Attacker 3
// Abilities
// * Snow Storm: Add this ability to the Hero; make sure the Base Order ID
// does not conflict with any other spell on the Hero.
// * Slow (for Snow Storm): make sure that the buff is set to the custom
// "Snow Storm (Caster)" buff. This is the buff that will show on the
// Hero and that is used in this trigger.
// * Frost Attack (no missile art)
// Buffs
// * Snow Storm (Caster)
// 2. Copy the following triggers:
// * this trigger: "SnowStorm"
// 3. Other options:
// Custom Gameplay Constants (this is what allows the Hero to move around and aim the spell, albeit very slowly:
// * Movement - Unit Speed - Maximum: 522
// * Movement - Unit Speed - Minimum: 1
// Hero
// * Movement - Turn Rate: 0.20 (this is part of the balance of the skill; a slower turning rate makes it harder to aim)
// 4. To adjust the balance of the skill, you can change some of the following values:
// Units
// * Dummy Attacker 1/2/3: Damages, Range, Area of Effect
// Abilities
// * Snow Storm: Cooldown, Mana Cost
// * Slow (for Snow Storm): Attack Speed Factor, Movement Speed Factor
// 5. Make sure that the rawcodes specified here reference the to proper units,
// abilities, or buffs.
scope SnowStorm
globals
private constant integer SSTORM = 039;A005039; //Ability ID of "Snow Storm"
private constant integer DUMMY = 039;h000039; //Unit ID of "Dummy Caster"
private constant integer SLOW = 039;A000039; //Ability ID of "Slow (for Snow Storm)"
private constant integer DUMATK1 = 039;h001039; //Unit ID of "Dummy Attacker 1"
private constant integer DUMATK2 = 039;h002039; //Unit ID of "Dummy Attacker 2"
private constant integer DUMATK3 = 039;h003039; //Unit ID of "Dummy Attacker 3"
private constant integer FROST = 039;A007039; //Ability ID of "Frost Attack (no missile art)"
private constant integer BUFF = 039;B000039; //Buff ID of "Snow Storm (Caster)"
// 6. More configuration options:
private constant real INTERVAL = 0.33 //timer interval; default 0.33
private constant real ATKDIST = 400.00 //attack distance; default 400.00
private constant real DURFACTOR = 1.00 //this and DURBASE determine the duration of the spell; default 1.00
private constant real DURBASE = 4.00 //this and DURFACTOR determine the duration of the spell; default 4.00
private constant real SIZEFACTOR = 0.50 //this and SIZEBASE determine the size (graphical only) of the Snow Storm projectile; default 0.50
private constant real SIZEBASE = 0.00 //this and SIZEFACTOR determine the size (graphical only) of the Snow Storm projectile; default 0.00
endglobals
//=========================== End of Instructions ===========================
//===========================================================================
private struct SS
unit hero
integer lvl
integer ticks
endstruct
globals
private SS array ALLDATA
private timer ALLTIMER = CreateTimer()
private integer TOTAL = 0
private integer array DUMATK
endglobals
//===========================================================================
private function Cond takes nothing returns boolean
return GetSpellAbilityId() == SSTORM
endfunction
//===========================================================================
private function TimerActions takes nothing returns nothing
local SS data
local real face_rad
local real x1
local real y1
local real x2
local real y2
local real size
local unit u
local integer i = 1
loop
exitwhen i > TOTAL
set data = ALLDATA<i>
set face_rad = GetUnitFacing(data.hero) * bj_PI/180
set x1 = GetUnitX(data.hero)
set y1 = GetUnitY(data.hero)
set x2 = x1 + ATKDIST * Cos(face_rad)
set y2 = y1 + ATKDIST * Sin(face_rad)
set size = data.lvl * SIZEFACTOR + SIZEBASE
set u = CreateUnit(GetOwningPlayer(data.hero), DUMATK[data.lvl], x1, y1, face_rad)
call SetUnitScale(u, size, size, size)
call UnitApplyTimedLife(u, 039;BTLF039;, 1.00)
call UnitAddAbility(u, FROST)
call IssuePointOrder(u, "attackground", x2, y2)
set data.ticks = data.ticks - 1
if data.ticks <= 0 or GetWidgetLife(data.hero) < 0.406 then
call UnitRemoveAbility(data.hero, BUFF)
call data.destroy()
set ALLDATA<i> = ALLDATA[TOTAL]
set TOTAL = TOTAL - 1
set i = i - 1
if TOTAL == 0 then
call PauseTimer(ALLTIMER)
endif
endif
set i = i + 1
endloop
set u = null
endfunction
private function Actions takes nothing returns nothing
local SS data = SS.create()
local unit u
set data.hero = GetTriggerUnit()
set data.lvl = GetUnitAbilityLevel(data.hero, SSTORM)
set data.ticks = R2I((data.lvl * DURFACTOR + DURBASE) / INTERVAL)
set u = CreateUnit(GetOwningPlayer(data.hero), DUMMY, GetUnitX(data.hero), GetUnitY(data.hero), 0)
call UnitApplyTimedLife(u, 039;BTLF039;, 1.00)
call UnitAddAbility(u, SLOW)
call SetUnitAbilityLevel(u, SLOW, data.lvl)
call IssueTargetOrder(u, "slow", data.hero)
set TOTAL = TOTAL + 1
set ALLDATA[TOTAL] = data
if TOTAL == 1 then
call TimerStart(ALLTIMER, INTERVAL, true, function TimerActions)
endif
set u = null
endfunction
//===========================================================================
public function InitTrig takes nothing returns nothing
local unit u = CreateUnit(Player(0), DUMMY, 0, 0, 0)
call UnitAddAbility(u, SLOW)
call UnitAddAbility(u, FROST)
call RemoveUnit(u)
call RemoveUnit(CreateUnit(Player(0), DUMATK1, 0, 0, 0))
call RemoveUnit(CreateUnit(Player(0), DUMATK2, 0, 0, 0))
call RemoveUnit(CreateUnit(Player(0), DUMATK3, 0, 0, 0))
set gg_trg_SnowStorm = CreateTrigger()
set DUMATK[1] = DUMATK1
set DUMATK[2] = DUMATK2
set DUMATK[3] = DUMATK3
call TriggerRegisterAnyUnitEventBJ(gg_trg_SnowStorm, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_SnowStorm, Condition(function Cond))
call TriggerAddAction(gg_trg_SnowStorm, function Actions)
set u = null
endfunction
endscope</i></i>
Light Lance
Spell type: instant cast
Description: Emits a constant narrow stream of light to damage enemy units. The light lance always shoots in the direction of the facing angle of the Hero. For the duration of the spell, the Hero is able to move and aim the light albeit very slowly. [100 mana cost; 10 second cooldown]
Level 1 - up to 120 damage per second for 5 seconds; 300 distance line damage; the Hero is slowed by 95%.
Level 2 - up to 160 damage per second for 6 seconds; 450 distance line damage; the Hero is slowed by 90%.
Level 3 - up to 200 damage per second for 7 seconds; 600 distance line damage; the Hero is slowed by 85%.
Coding: JASS; requires vJASS
Leaks: Leakless
Multi Instanceability: MUI
Lag-susceptibility: low
Import Difficulty: easy (instructions included)
Trigger:
JASS:
//===========================================================================
//========================== Light Lance v1.04 ==============================
//============================ Instructions =================================
//===========================================================================
// MUI; requires vJASS
//===========================================================================
// 1. Go to the Object Editor, and copy + paste the following:
// Units
// * Dummy Caster
// Abilities
// * Light Lance: Add this ability to the Hero; make sure the Base Order ID
// does not conflict with any other spell on the Hero.
// * Slow (for Light Lance): make sure that the buff is set to the custom
// "Light Lance (Caster)" buff. This is the buff that will show on the
// Hero and that is used in this trigger.
// * Carrion Swarm (for Light Lance)
// Buffs
// * Light Lance (Caster)
// 2. Copy the following triggers:
// * this trigger: "LightLance"
// 3. Other options:
// Custom Imports: created by th15 (<a href="http://www.hiveworkshop.com/resources_new/models/907/" target="_blank" class="link link--external" rel="nofollow ugc noopener">http://www.hiveworkshop.com/resources_new/models/907/</a>)
// * laseryellow.mdx
// * laseryellow.blp
// Custom Gameplay Constants (this is what allows the Hero to move around and
// aim the spell, albeit very slowly:
// * Movement - Unit Speed - Maximum: 522
// * Movement - Unit Speed - Minimum: 1
// Hero
// * Movement - Turn Rate: 0.20 (this is part of the balance of the skill;
// a slower turning rate makes it harder to aim)
// 4. To adjust the balance of the skill, you can change some of the following values:
// Abilities
// * Light Lance: Cooldown, Mana Cost
// * Carrion Swarm (for Light Lance): Damages, Distances, Areas, etc.
// * Slow (for Light Lance): Attack Speed Factor, Movement Speed Factor
// 5. Make sure that the rawcodes specified here reference the to proper units,
// abilities, or buffs.
scope LightLance
globals
private constant integer LLIGHT = 039;A004039; //Ability ID of "Flame Fury"
private constant integer DUMMY = 039;h000039; //Unit ID of "Dummy Caster"
private constant integer SLOW = 039;A002039; //Ability ID of "Slow (for Flame Fury)"
private constant integer CSWARM = 039;A008039; //Ability ID of "Carrion Swarm (for Light Lance)"
private constant integer BUFF = 039;B001039; //Buff ID of "Flame Fury (Caster)"
// 6. More configuration options:
private constant real INTERVAL = 0.10 //timer interval; default 0.10 seconds
private constant real ATKDIST = 100.00 //attack distance; adjust only if necessary--if distance specified in Object Editor is less than 100.00
private constant real DURFACTOR = 1.00 //this and DURBASE determine the duration of the spell; default 1.00
private constant real DURBASE = 4.00 //this and DURFACTOR determine the duration of the spell; default 4.00
private constant real SIZEFACTOR = 0.10 //this and SIZEBASE determine the size (graphical only) of the Breath of Fire projectile; default 0.10
private constant real SIZEBASE = 0.30 //this and SIZEFACTOR determine the size (graphical only) of the Breath of Fire projectile; default 0.30
endglobals
//=========================== End of Instructions ===========================
//===========================================================================
private struct LL
unit hero
integer lvl
integer ticks
endstruct
globals
private LL array ALLDATA
private timer ALLTIMER = CreateTimer()
private integer TOTAL = 0
endglobals
//===========================================================================
private function Cond takes nothing returns boolean
return GetSpellAbilityId() == LLIGHT
endfunction
//===========================================================================
private function TimerActions takes nothing returns nothing
local LL data
local real face_rad
local real x1
local real y1
local real x2
local real y2
local real size
local unit u
local integer i = 1
loop
exitwhen i > TOTAL
set data = ALLDATA<i>
set face_rad = GetUnitFacing(data.hero) * bj_PI/180
set x1 = GetUnitX(data.hero)
set y1 = GetUnitY(data.hero)
set x2 = x1 + ATKDIST * Cos(face_rad)
set y2 = y1 + ATKDIST * Sin(face_rad)
set size = data.lvl * SIZEFACTOR + SIZEBASE
set u = CreateUnit(GetOwningPlayer(data.hero), DUMMY, x1, y1, face_rad)
call SetUnitScale(u, size, size, size)
call UnitApplyTimedLife(u, 039;BTLF039;, 1.00)
call UnitAddAbility(u, CSWARM)
call SetUnitAbilityLevel(u, CSWARM, data.lvl)
call IssuePointOrder(u, "carrionswarm", x2, y2)
set data.ticks = data.ticks - 1
if data.ticks <= 0 or GetWidgetLife(data.hero) < 0.406 then
call UnitRemoveAbility(data.hero, BUFF)
call data.destroy()
set ALLDATA<i> = ALLDATA[TOTAL]
set TOTAL = TOTAL - 1
set i = i - 1
if TOTAL == 0 then
call PauseTimer(ALLTIMER)
endif
endif
set i = i + 1
endloop
set u = null
endfunction
private function Actions takes nothing returns nothing
local LL data = LL.create()
local unit u
set data.hero = GetTriggerUnit()
set data.lvl = GetUnitAbilityLevel(data.hero, LLIGHT)
set data.ticks = R2I((data.lvl * DURFACTOR + DURBASE) / INTERVAL)
set u = CreateUnit(GetOwningPlayer(data.hero), DUMMY, GetUnitX(data.hero), GetUnitY(data.hero), 0)
call UnitApplyTimedLife(u, 039;BTLF039;, 1.00)
call UnitAddAbility(u, SLOW)
call SetUnitAbilityLevel(u, SLOW, data.lvl)
call IssueTargetOrder(u, "slow", data.hero)
set TOTAL = TOTAL + 1
set ALLDATA[TOTAL] = data
if TOTAL == 1 then
call TimerStart(ALLTIMER, INTERVAL, true, function TimerActions)
endif
set u = null
endfunction
//===========================================================================
public function InitTrig takes nothing returns nothing
local unit u = CreateUnit(Player(0), DUMMY, 0, 0, 0)
call UnitAddAbility(u, SLOW)
call UnitAddAbility(u, CSWARM)
call RemoveUnit(u)
set gg_trg_LightLance = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_LightLance, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_LightLance, Condition(function Cond))
call TriggerAddAction(gg_trg_LightLance, function Actions)
set u = null
endfunction
endscope</i></i>
Obsolete
Improvements
- I'm not completely satisfied with the look of Light Lance because...sometimes it looks like the Hero is urinating. But out of all the different Missile Arts I tried, this was the closest thing I could find to what I had in mind. (I was looking for something that looks like a thin continuous laser beam shooting outwards at high speed.)
- The triggers "Flame Fury Cast," "Snow Storm Cast," and "Light Lance Cast" all have a Wait 0.00 in them. I'd like to get rid of those Waits, but I couldn't figure out how to debug a certain thing without using the Waits. (The bug is that sometimes the periodic triggers would not detect the casting unit with the buff, and the periodic trigger would turn itself off too soon. Presumably, this is because it takes a certain amount of time for a buff to appear on a unit before it can be reliably detected.)
One screenshot for all three spells: