Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
This is my second spell.
it's extremely simple.
i just made it because i think it looks cool and i was bored :O
Uniqueness is the crit and accurate heal display.
highly customiseable.
Thanks to hive for great inspiration.
Thanks to Blizzard Entertainment for the spell icon and to Adiktuz for helping me make the spell better.
Mostly everything can be customised in Startup trigger, the rest is in the object editor spell.
The map got a fun test system try it and you'll see what it is.
Heals units in a cone from the caster to the target unit. Heals X dmg and has a Y range and a Z radius. Heals Q nr of units and has a W crit chance and a V small crit chance.
Set SS_Level = (Level of (Ability being cast) for SS_Caster)
Set SS_Point1 = (Position of SS_Caster)
Set SS_LastHit = (Target unit of ability being cast)
Set SS_LastHitPos = (Position of SS_LastHit)
Set Actual_CritAmount = (SS_CritAmount + (SS_CritBonus x (Real(SS_Level))))
Set Actual_CritAmountSmall = (SS_CritAmountSmall + (SS_CritBonus x (Real(SS_Level))))
Set Actual_CritChance = (SS_CritChance + (SS_CritChanceBonus x SS_Level))
Set Actual_SmallCritChance = (SS_SmallCritChance + (SS_SmallCritChanceBonus x SS_Level))
Set Actual_HealAmount = (SS_HealAmount + (SS_HealAmountBonus x (Real(SS_Level))))
Set Actual_NrHitUnits = (SS_NrHitUnits + (SS_NrHitUnitsBonus x SS_Level))
Set Actual_Range = (SS_Range + (SS_RangeBonus x (Real(SS_Level))))
Set SS_FirstGroup = (Units within Actual_Range of SS_LastHitPos matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an ally of (Triggering player)) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((Percentage life of (
Set SS_LightningGroup = (Random (Actual_NrHitUnits - 1) units from SS_FirstGroup)
Unit Group - Add SS_LastHit to SS_LightningGroup
Set SS_Group_Integer = (SS_Group_Integer + 1)
Custom script: set udg_x1 = GetLocationX(udg_SS_Point1)
Custom script: set udg_y1 = GetLocationY(udg_SS_Point1)
Custom script: set udg_z1 = GetLocationZ(udg_SS_Point1) + (GetUnitFlyHeight(udg_SS_Caster) + udg_SS_LightningHeight)
Trigger - Turn on Lightning Clear <gen>
Unit Group - Pick every unit in SS_LightningGroup and do (Actions)
Loop - Actions
Set SS_RandomInteger = (Random integer number between 1 and 100)
Set SS_RandomUnit = (Picked unit)
Set SS_Point2 = (Position of SS_RandomUnit)
Set SS_Life = (Life of SS_RandomUnit)
Custom script: set udg_x2 = GetLocationX(udg_SS_Point2)
Custom script: set udg_y2 = GetLocationY(udg_SS_Point2)
Custom script: set udg_z2 = GetLocationZ(udg_SS_Point2) + (GetUnitFlyHeight(udg_SS_RandomUnit) + udg_SS_LightningHeight)
Unit - Create 1 Dummy for Neutral Passive at SS_LastHitPos facing Default building facing degrees
Set SS_Dummy = (Last created unit)
Unit - Add a 0.70 second Generic expiration timer to SS_Dummy
Unit - Make SS_Dummy Explode on death
Unit Group - Add SS_Dummy to SS_RemoveLightningGroup
Custom script: set bj_lastCreatedLightning = AddLightningEx(udg_SS_LightningType,true,udg_x1,udg_y1,udg_z1,udg_x2,udg_y2,udg_z2)
Hashtable - Save Handle Of(Last created lightning effect) as 0 of (Key (Last created unit)) in SS_Hashtable
Special Effect - Create a special effect attached to the origin of SS_RandomUnit using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation(udg_SS_Point2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_RandomInteger Less than or equal to Actual_CritChance
Then - Actions
Unit - Set life of SS_RandomUnit to ((Life of SS_RandomUnit) + Actual_CritAmount)
Set SS_AfterLife = (Life of SS_RandomUnit)
Set SS_HealText = (+ + (String(((Integer(SS_AfterLife)) - (Integer(SS_Life))))))
Set SS_HealTextSize = 20.00
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_RandomInteger Less than or equal to Actual_SmallCritChance
Then - Actions
Unit - Set life of SS_RandomUnit to ((Life of SS_RandomUnit) + Actual_CritAmountSmall)
Set SS_AfterLife = (Life of SS_RandomUnit)
Set SS_HealText = (+ + (String(((Integer(SS_AfterLife)) - (Integer(SS_Life))))))
Set SS_HealTextSize = 15.00
Else - Actions
Unit - Set life of SS_RandomUnit to ((Life of SS_RandomUnit) + Actual_HealAmount)
Set SS_AfterLife = (Life of SS_RandomUnit)
Set SS_HealText = (+ + (String(((Integer(SS_AfterLife)) - (Integer(SS_Life))))))
Set SS_HealTextSize = 10.00
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
St_FloatingText Equal to True
Then - Actions
Set SS_ShowGroup = (Player group((Triggering player)))
Floating Text - Create floating text that reads (String(SS_HealText) as Upper case) above SS_RandomUnit with Z offset 0.00, using font size SS_HealTextSize, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
Set SS_TextTag = (Last created floating text)
Floating Text - Set the velocity of SS_TextTag to 64.00 towards 90.00 degrees
Floating Text - Hide SS_TextTag for (All players)
Floating Text - Show SS_TextTag for SS_ShowGroup
Floating Text - Change SS_TextTag: Disable permanence
Floating Text - Change the fading age of SS_TextTag to 1.20 seconds
Floating Text - Change the lifespan of SS_TextTag to 2.00 seconds
Else - Actions
Unit Group - Remove SS_RandomUnit from SS_LightningGroup
((Triggering unit) is in SS_RemoveLightningGroup) Equal to True
Actions
Unit Group - Remove (Triggering unit) from SS_RemoveLightningGroup
Lightning - Destroy (Load 0 of (Key (Triggering unit)) in SS_Hashtable)
Set SS_Group_Integer = (SS_Group_Integer - 1)
Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in SS_Hashtable
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SS_Group_Integer Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
Updated 1.1
- leaks cleared. Updated 1.2
- New Icon, Tooltip and the spell now only hits Ground units. Updated 1.2b
- Spell hits air and lightning is at proper height. Updated 1.3
- Spell loop made more efficient. Updated 1.3b
- Spell loop made more efficient. (no, really) Updated 1.4
- Cleared leak, improved tooltip, fixed efficiency, added another customizeable variable for height Updated 1.5
- Fixed leak.
Keywords:
light, dawn, sun, holy, Light of Dawn, cone, forked, healing, heal, crit, crit heal, manasurge, test map, fun, ground, target, multi, multi target
Light of Dawn v1.5 | Reviewed by Maker | 12th Oct 2013
APPROVED
Approved
Use a variable for the ability
DestroyForce is in a wrong place
[TR]
11:59, 3rd Jun 2011
Maker:
Causes leaks in the cast...
My second spell, nothing amazing but still pretty usefull i'd say.
Update: Fixed leak and tooltip (slightly)
Update: Fixed Spell to hit air properly and use lightnings in a much better way.
Update: More efficient loop
Update: Minor value change and lightning effect
Well, by taking a quick look in the triggers, i couldn't see anything wrong with them, though you've got a unit group leaking, if i didn't miss something
But maybe you should change the "heals X dmg" to "heals X hp/hit points/health", or whatever pleases you
I loled x)
You should use SS_Caster instead of Triggering Unit in the second line.
Overall, you did a pretty good job
Just use AddLightningEx to give the lightnings height so that the effect
would be nicer ^^
5/5
EDIT: One more thing,
For efficiency, in the following block, store Triggering Unit in a variable and use it
instead of calling "GetTriggerUnit()" every time (Jass thing ;p)
Unit Group - Remove (Triggering unit) from SS_RemoveLightningGroup
Lightning - Destroy (Load 0 of (Key (Triggering unit)) in SS_Hashtable)
Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in SS_Hashtable
but you might change the for each integer to a pick every unit, that way you don't have to remove the unit from the unit group, and you are doing a pick every unit. save the handle of triggering unit as an integer so
set handint = key(triggering unit)
and use that instead of key(triggering unit)
it has to do with what mag said, efficiency.
you do a good job making spell keep up the good work
Set SS_LightningGroup = (Random Actual_NrHitUnits units from (Units within Actual_Range of SS_LastHitPos matching
- This actually creates two unit groups, not just one. You need to store "(Units within Actual_Range of SS_LastHitPos matching..." into a unit group and destroy it seperately.
Actually, if I understand correctly, you want to pick a minimum of Actual_NrHitUnits compared to the actual count of SS_NrUnits, there is an easier way. You just count the units in "(Units within Actual_Range of SS_LastHitPos matching..." and loop through whichever count is smaller. There is also "Custom script: set udg_SS_RandomUnit = FirstOfGroup(udg_SS_LightningGroup)".
I think you may be better off doing a "pick all units in unit group" and keeping a counter that just ignores all actions after the limit is reached.
You used picked every unit, but still uses the set unit = random unit from group???
you just made it more inefficient...
what you need to do is:
1) remove the SS_NrUnits --> this would be useless
2) remove all lines using the SS_NrUnits variable
3) instead of SS_RandomUnit = (Random unit from SS_LightningGroup), make it: SS_RandomUnit = PickedUnit
Uploaded abilities don't need imported icons.
The learn tooltip coild mention the hotkey, and you could add level stats like standard Blizz abilities have. Also use colour codes.
Lightning Clear shouldn't be on all the time, only when dummies exist.
You could set these in reversed order and use the unit variable in the level thingy:
Set SS_Level = (Level of (Ability being cast) for (Triggering unit))
Set SS_Caster = (Triggering unit)
The lightning height could be set to a variable that one can configure. The default 35 is too low IMO.
You could use
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units withi Actual range...)
Then you don't need a variable and don't need to use call DestroyGroup() line.
Instead of creating the lightning and then moving it, just create it like this and you don't have to move it:
Custom script: set bj_lastCreatedLightning = AddLightningEx(udg_SS_LightningType,true,udg_x1,udg_y1,udg_z1,udg_x2,udg_y2,udg_z2)
Then you can use (last created lightning effect) GUI function to deal with the lightning and you don't need a separate variable for that.
Leaks the player group:
Floating Text - Show SS_TextTag for (Player group((Triggering player)))
Uploaded abilities don't need imported icons.
The learn tooltip coild mention the hotkey, and you could add level stats like standard Blizz abilities have. Also use colour codes.
Lightning Clear shouldn't be on all the time, only when dummies exist.
You could set these in reversed order and use the unit variable in the level thingy:
Set SS_Level = (Level of (Ability being cast) for (Triggering unit))
Set SS_Caster = (Triggering unit)
The lightning height could be set to a variable that one can configure. The default 35 is too low IMO.
You could use
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units withi Actual range...)
Then you don't need a variable and don't need to use call DestroyGroup() line.
Instead of creating the lightning and then moving it, just create it like this and you don't have to move it:
Custom script: set bj_lastCreatedLightning = AddLightningEx(udg_SS_LightningType,true,udg_x1,udg_y1,udg_z1,udg_x2,udg_y2,udg_z2)
Then you can use (last created lightning effect) GUI function to deal with the lightning and you don't need a separate variable for that.
Leaks the player group:
Floating Text - Show SS_TextTag for (Player group((Triggering player)))
Will fix.
set bj_wantDestroyGroup = true is often a good way of doing it, but i want to keep it a group so i can add SS_LastHit to the group outside the loop itself. and i can't add SS_LastHit to a group that doesn't exist.
35 height? now a variable, change it if you don't like 35 after you download it
EDIT: Noticed i hadn't implemented that change so your set bj_wantDestroyGroup = true would work.
But not now x) added the function.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.