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 very first GUI spell. It's MUI and leakless*. *Hopefully ;P
|
| I always couldn't settle with one effect and therefor i made it highly customizeable so it can fit your idea of a perfect spell.
| I hope you enjoy the spell and remember to give me credit for the base code if you use it in your map.
| Descriptions and Customisation is within Trigger "Startup".
|
| I Want to thank Garfield1337, Adiktuz, ap0calypse, Maker, mckill2009 and Bribe for helping me when i got stuck.
| And an even bigger thank to Magtheridon96 for helping me make it MUI and Leakfree and also for inspiring me with new ideas.
| Credit to Callahan for the Lightning strike model (LightningWrath.mdx) and JetFangInferno for his !awesome! (FreezingRing.mdx)
| // Manasurge
|___________________________________________________________________________________________________________________
Tooltip:
The Hero unleashes his full power creating a manastorm which damages units within 300/350/400 distance and deals 100/200/300 damage per unit. It also ignites the mana of the units affected, burning 10%/15%/20% of the victims mana and leaves the victim with a debuff that slows movementspeed for 7/10/14 seconds. |nIf the mana burn effect depletes the mana of its victims the damage is doubled on that target.
This spell can be customised in many ways:
- Number of Lightnings
- Lightning type
- Damage amount
- Damage Range
- Effects
- Effects Range
- Mana Burned
- Targets Allowed
- Cooldown
- Duration of the Slow effect
Credits to Callahan for his amazing lightning model. (LightningWrath.mdx)
Credits to JetFangInferno for his equally amazing frozen wisp explosion model. (FreezingRing.mdx)
I Want to thank Garfield1337, Adiktuz, ap0calypse, Maker, mckill2009, Bribe and Magtheridon96 for helping me develop this spell
-------- Provides a base of triggers with multiple exchangeable values to maximize the different way to combine this spell --------
-------- --------
-------- Tooltip --------
-------- Manastorm --------
-------- Damages units within 300/350/400 yards and deals 100/200/300 damage per unit. It also ignites the mana of the units affected, burning 10%/15%/20% and leaves the victim with a debuff that slows movementspeed for 7/10/14 seconds. --------
-------- --------
-------- HOW TO IMPORT --------
-------- To get this spell to your map you need to copy and paste these: --------
-------- NOTE: Make sure your map has "Automatically create unknown variables while pasting trigger data" box checked, you find it under File > Preferences --------
-------- All Special Effects (except Lightning andLightning impact) is in the Object Editor spells. --------
-------- --------
-------- You can customise: --------
-------- --------
-------- Number of Lightnings --------
-------- Number of Levels (in the spell in object editor and Manastorm Cast trigger, change the lvl check on Mana Burn, DamageRange and Range --------
-------- Lightning type --------
-------- Damage --------
-------- End Damage --------
-------- Mana Burned --------
-------- Range of Damage --------
-------- Range of the Effects --------
-------- Mana Cost ( In object editor ) --------
-------- Cooldown (In the spell in Object Editor) --------
-------- Visual Effects (In the spells themselfes in Object Editor, 2 of the effects are units with a effect model: Dummy (Visual Monsoon) and Dummy (Visual Thunderclap)) --------
-------- Duration of the Slow (This is modified in the Object Editor) --------
Special Effect - Create a special effect at WS_Point3 using WS_Impact
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at WS_Point3 using Abilities\Spells\Human\ManaFlare\ManaFlareBoltImpact.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at WS_Point1 using war3mapImported\LightningWrath.mdx
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at WS_Point1 using Abilities\Spells\Human\ManaFlare\ManaFlareBoltImpact.mdl
Special Effect - Destroy (Last created special effect)
-------- Activates timed life of Lightning Effects --------
Unit - Create 1 WS_Dummy for WS_Owner at WS_Point1 facing Default building facing degrees
Custom script: set udg_lastunit = bj_lastCreatedUnit
Unit - Make lastunit Explode on death
Unit - Add a WS_LightningDuration second Generic expiration timer to lastunit
Unit Group - Add lastunit to WS_LightningGroup
Set WS_Group_Integer = (WS_Group_Integer + 1)
Hashtable - Save Handle Of(Last created lightning effect) as 0 of (Key (Last created unit)) in WS_Hashtable
Set WS_Point2 = (WS_Point1 offset by WS_Range towards WS_Real degrees)
-------- Creates Dummy For ability Effect --------
Unit - Create 1 WS_Dummy for WS_Owner at WS_Point3 facing Default building facing degrees
Unit - Add Manastorm (Dummy) to lastunit
Unit - Set level of Manastorm (Dummy) for lastunit to WS_Lvl
Unit - Order lastunit to Undead Dreadlord - Carrion Swarm WS_Point2
Unit - Add a 1.00 second Generic expiration timer to lastunit
Unit - Make lastunit Explode on death
Set WS_Real = (WS_Real + (360.00 / (Real(WS_Loops))))
-------- Clears location leaks --------
Custom script: call RemoveLocation(udg_WS_Point2)
Custom script: call RemoveLocation(udg_WS_Point3)
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within WS_DamageRange of WS_Point1 matching ((((Matching unit) belongs to an enemy of WS_Owner) Equal to True) and ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) is alive and do (Actions)
Loop - Actions
Set WS_PickedPos = (Position of (Picked unit))
Set WS_PickedUnit = (Picked unit)
Set WS_CurrentHp1 = (Life of WS_PickedUnit)
Unit - Cause WS_Caster to damage WS_PickedUnit, dealing WS_Damage damage of attack type Spells and damage type Magic
Unit - Create 1 WS_Dummy for WS_Owner at WS_Point1 facing Default building facing degrees
Custom script: set udg_lastunit = bj_lastCreatedUnit
Unit - Add Shocked (Dummy) to lastunit
Unit - Set level of Shocked (Dummy) for lastunit to WS_Lvl
Unit - Order lastunit to Orc Shaman - Purge WS_PickedUnit
Unit - Add a 1.00 second Generic expiration timer to lastunit
Unit - Make lastunit Explode on death
-------- Calculates mana that will be burned --------
Set WS_BurnedMana1 = ((Max mana of WS_PickedUnit) / 100.00)
Set WS_BurnedMana = ((Mana of WS_PickedUnit) - (WS_BurnedMana1 x (Real(WS_Manaburn))))
-------- Checking if any mana was burned and --------
-------- Applies the calculated burn --------
Unit - Set mana of WS_PickedUnit to WS_BurnedMana
Set WS_CurrentMana = (Mana of (Picked unit))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
WS_CurrentMana Greater than 0.00
Then - Actions
Set WS_BurnedmessageInteger = ((Integer(WS_BurnedMana1)) x WS_Manaburn)
Set WS_BurnedMessage = (- + (String(WS_BurnedmessageInteger)))
Else - Actions
Set WS_DisplayOverdrain = ((Integer(WS_Damage)) + (Integer(WS_EndDamage)))
Set WS_BurnedMessage = (- + (String(WS_DisplayOverdrain)))
-------- Creates the Floating Text effect reflecting the burned amount --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Integer(WS_BurnedMana1)) Greater than 0
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
WS_BurnedmessageInteger Greater than 0
WS_CurrentMana Less than or equal to 0.00
Then - Actions
Unit - Cause WS_Caster to damage WS_PickedUnit, dealing WS_EndDamage damage of attack type Chaos and damage type Normal
Set WS_AfterHp1 = (Life of WS_PickedUnit)
Set WS_DisplayOverdrain = ((Integer(WS_CurrentHp1)) - (Integer(WS_AfterHp1)))
Set WS_BurnedMessage = (- + (String(WS_DisplayOverdrain)))
Special Effect - Create a special effect at WS_PickedPos using Units\Undead\Abomination\AbominationExplosion.mdl
Special Effect - Destroy (Last created special effect)
Floating Text - Create floating text that reads WS_BurnedMessage above WS_PickedUnit with Z offset 0.00, using font size 10.00, color (100.00%, 10.00%, 10.00%), and 0.00% transparency
Else - Actions
Special Effect - Create a special effect at WS_PickedPos using Abilities\Spells\Human\DispelMagic\DispelMagicTarget.mdl
Special Effect - Destroy (Last created special effect)
Floating Text - Create floating text that reads WS_BurnedMessage above WS_PickedUnit with Z offset 0.00, using font size 8.00, color (50.00%, 50.00%, 100.00%), and 0.00% transparency
Custom script: set udg_lastfloating = bj_lastCreatedTextTag
Floating Text - Hide lastfloating for (All players)
Floating Text - Show lastfloating for WS_Force
Floating Text - Set the velocity of lastfloating to 64.00 towards 90.00 degrees
Floating Text - Change lastfloating: Disable permanence
Floating Text - Change the lifespan of lastfloating to 1.50 seconds
Floating Text - Change the fading age of lastfloating to 1.20 seconds
-------- Clear Lightning leak in Trigger "Lightning Clear" --------
-------- Clears some leaks --------
Custom script: call RemoveLocation(udg_WS_Point1)
Custom script: call DestroyForce(udg_WS_Force)
Lightning Clear
Events
Unit - A unit Dies
Conditions
((Triggering unit) is in WS_LightningGroup) Equal to True
Actions
Unit Group - Remove (Triggering unit) from WS_LightningGroup
Set WS_Group_Integer = (WS_Group_Integer - 1)
Lightning - Destroy (Load 0 of (Key (Triggering unit)) in WS_Hashtable)
Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in WS_Hashtable
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
WS_Group_Integer Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
Please rate and comment
If you have any suggestions feel free to pm me. Updated v1.4b
- added last created unit to a variable
- made the lightning in custom script
- fixed position leaks
- added picked unit to a variable
- owner of casting unit => triggering player
- improved overall preformance
- more accurate damage display if target got no mana remaining Updated v1.5
- GetLastCreatedUnit() is now bj_lastCreatedUnit
- Player Group (force) leak fixed
- point arrays made to 3 different variables to improve preformance Updated v1.5b
- Set WS_Force = players matching condition(Condition - Matching Player equal to (Triggering Player)) is now Set WS_Force = (Player group((Triggering player))) Updated v1.7
- Lightning Clear is now off when there are no lightnings alive.
Keywords:
Mana, Manasurge, Manastorm, Lightning, Effect, Thunderstorm, GUI, MUI, Leak, Leakless, Leakfree, Mana Burn, Burn, Damage, Slam
Manastorm 1.7 | Reviewed by Maker | 12th Oct 2013
APPROVED
Goodlooking, leakless and MUI spell
Use variables for abilities
You could create only one dummy, and make it cast Purge on all targets
[TR]...
You have WAAAAAAY too many BJs (Don't report this post! It's a real thing ! --
You'll know what it is when you start learning JASS .. Or I can tell you now )
A BJ is a function made by Blizzard, but strangely (to the fact that they're a large
corporation), those functions are EXTREMELY SLOW... most of the time
In most cases, you would find a BJ that calls another BJ that calls another BJ
that calls a native. Why not use the native?
BJs are colored Red when you convert GUI to text.
LastCreatedUnit() isn't that bad a BJ (relatively), but you're calling the function
repeatedly.
Just create a new unit variable and set it to bj_lastCreatedUnit in a Custom Script.
It would be something like set wtvr = bj_lastCreatedUnit
Then you can use that variable instead of repeating it.
Same thing goes for the Floating texts. For them, use bj_lastCreatedTextTag
(Position of (Picked unit))
^leaks
Store it in a variable before you use it, and yes: clearing leaks is very important.
Another thing:
Lightning - Create a WS_LightningType lightning effect from source WS_Point[1] to target WS_Point[3]
It would look much better if you use Custom Script for this action.
The custom script allows you to give the lightning height so it would have a greater
Awesome-factor
Unit Group - Remove (Triggering unit) from WS_LightningGroup
Lightning - Destroy (Load 0 of (Key (Triggering unit)) in WS_Hashtable)
Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in WS_Hashtable
Store Triggering Unit in a variable because you're repeatedly using it.
EDIT:
-----
One more thing:
Set WS_Unitgroup = (Units within WS_DamageRange of WS_Point[1] matching ((((Matching unit) belongs to an enemy of WS_Owner) Equal to True) and ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) is ali
Unit Group - Pick every unit in WS_Unitgroup and do (Actions)
Use set bj_wantDestroyGroup = true as a custom script right before
the Pick every unit action instead of storing a group, picking it, then destroying it.
It would be faster this way. In the Pick every unit action, you would use the value
of the group desired.
Thanks for the feedback Magtheridon96 and Narogog.
The leaks will be fixed on Monday when i get home to my real computer. Then im off for another week so if you have anything else tell me before Tuesday evening.
Didn't know that position of picked unit leaked
And there's instructions on how to import in the end of Startup trigger.
Last Created Unit acted like local variables, just like Triggering Unit...Magtheridon's
advice will work but you're repeating the Last Created Unit thing...
Storing in a variable has it's advantage though, particularly, when you're using Hashtables...
example:
Create 1 Unit footman
set udg_unit = bj_lastCreatedUnit
Create 1 Unit peasant
Add udg_unit to Unit Group (you cant add the footman as Last Created Unit here coz the peasant is the last created unit here)...
and so on...
Last Created Unit acted like local variables, just like Triggering Unit...Magtheridon's
advice will work but you're repeating the Last Created Unit thing..
I think that the last created unit is a function, like getlastcreatedunit() or something like that. So it slows things down but if you use it less then 3 times it won't make a difference. but i am not positive about this. I don't use jass other than a few custom scripts.
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.