• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Manasurge] Manastorm 1.7

  • Like
Reactions: msongyboi
_____________________________________________________________________________________________________________________
| 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



  • Startup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ======================================================================= --------
      • -------- DON'T TOUCH THIS --------
      • -------- ======================================================================= --------
      • Hashtable - Create a hashtable
      • Set WS_Hashtable = (Last created hashtable)
      • -------- WS_DummyMonsoon --------
      • Set WS_DummyMonsoon = Lightning Dummy (Visual Monsoon)
      • -------- WS_Dummy --------
      • Set WS_Dummy = Dummy
      • -------- ======================================================================= --------
      • -------- CUSTOMISE THIS --------
      • -------- You can customise the rest of the ability in Trigger "Manastorm Cast" --------
      • -------- Some visual effects are in the object editor (spells, buffs, units) --------
      • -------- ======================================================================= --------
      • -------- Number of Lightnings / Number of times Loop is repeated --------
      • Set WS_Loops = 5
      • -------- Lightning Type --------
      • Set WS_LightningType = Chain Lightning - Primary
      • -------- Specifies the effect which appears at the lightning strike point --------
      • -------- Target - FreezingRing.mdx --------
      • Set WS_Impact = (Art path of Manastorm (Dummy) Target Art (index 0))
      • -------- Lightning Duration in seconds --------
      • Set WS_LightningDuration = 0.80
      • -------- --------
      • -------- Base Range --------
      • -------- WS_BaseDamageRange + (WS_Lvl x WS_BonusDamageRange) --------
      • -------- WS_BaseDamageRange: 200 + (50 x 3) = 350 --------
      • Set WS_BaseDamageRange = 200.00
      • -------- Bonus Range (This is added to the base range each new level) --------
      • Set WS_BonusDamageRange = 50.00
      • -------- Base Range Visual Effect --------
      • -------- WS_BaseEffectRange + (WS_Lvl x WS_BonusEffectRange) --------
      • -------- WS_BaseEffectRange: 200 + (50 x 3) = 350 --------
      • Set WS_BaseEffectRange = 200.00
      • -------- Bonus Range Visual Effect (This is added to the base range each new level) --------
      • Set WS_BonusEffectRange = 50.00
      • -------- Base Damage --------
      • -------- WS_BaseDamage x WS_Lvl = WS_Damage --------
      • -------- WS_Damage: 100 x 3 = 300 --------
      • Set WS_BaseDamage = 100.00
      • -------- --------
      • -------- Base Damage Dealt when a unit with mana gets burned to 0 --------
      • -------- WS_BaseEnddamage x WS_Lvl = WS_EndDamage --------
      • -------- WS_EndDamage: 100 x 3 = 300 --------
      • Set WS_BaseEnddamage = 100.00
      • -------- --------
      • -------- Base Mana Burned ( IN PERCENT(%)) --------
      • -------- Mana Burned: WS_BaseManaBurn x WS_Lvl + WS_BonusManaBurn --------
      • -------- Mana Burned: 5 + (5 x 3) = 20% --------
      • Set WS_BaseManaBurn = 5.00
      • -------- Bonus Mana Burned ( IN PERCENT(%)) --------
      • Set WS_BonusManaBurn = 5.00
      • -------- --------
      • -------- Cooldown can be customised in the Object Editor --------
      • -------- Default Cooldown is 10 seconds at all levels --------
      • -------- Mana Cost can be customised in the Object Editor --------
      • -------- Default Mana Cost 120/160/180 --------
      • -------- =================================================================== --------
      • -------- =================================================================== --------
      • -------- READ ME! --------
      • -------- --------
      • -------- Manasurge's Manastorm! --------
      • -------- 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 --------
      • -------- --------
      • -------- Units: Dummy, Lightning Dummy (Visual Monsoon), Lightning Dummy (Visual Thunderclap) --------
      • -------- Models: LightningWrath.mdx, FreezingRing.mdx (You find them in import manager on this map) --------
      • -------- Spells: Shock (Dummy), Manastorm (Dummy), Manastorm --------
      • -------- Buffs: Mana Residue --------
      • -------- Triggers: Startup, Manastorm Cast, Lightning Clear --------
      • -------- 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) --------



  • Manastorm Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Manastorm
    • Actions
      • -------- ======================================================================= --------
      • -------- ======================================================================= --------
      • -------- ///////////////// DO NOT CHANGE ANYTHING IN THIS TRIGGER! //////////////////// --------
      • -------- ///////////////// DO NOT CHANGE ANYTHING IN THIS TRIGGER! //////////////////// --------
      • -------- ///////////////// DO NOT CHANGE ANYTHING IN THIS TRIGGER! //////////////////// --------
      • -------- ======================================================================= --------
      • -------- ======================================================================= --------
      • -------- --------
      • -------- Determins who is the triggering unit, (Caster) --------
      • Set WS_Caster = (Triggering unit)
      • -------- Adds the triggering player to WS_MessageGroup --------
      • Set WS_Force = (Player group((Triggering player)))
      • -------- Determins who owns the triggering unit, (Triggering Player) --------
      • Set WS_Owner = (Triggering player)
      • -------- Determins what level the ability cast is. (Thunderstorm) --------
      • Set WS_Lvl = (Level of (Ability being cast) for WS_Caster)
      • -------- Fixates the position of the caster to originate all effects --------
      • Set WS_Point1 = (Position of WS_Caster)
      • -------- Recycle WS_Real --------
      • Set WS_Real = 0.00
      • Set WS_DamageRange = (WS_BaseDamageRange + (WS_BonusDamageRange x (Real(WS_Lvl))))
      • Set WS_Range = (WS_BaseEffectRange + (WS_BonusEffectRange x (Real(WS_Lvl))))
      • Set WS_Damage = ((Real(WS_Lvl)) x WS_BaseDamage)
      • Set WS_EndDamage = ((Real(WS_Lvl)) x WS_BaseEnddamage)
      • -------- Default slow duration is 7/10/14 seconds --------
      • Set WS_Manaburn = ((Integer(WS_BaseManaBurn)) + ((Integer(WS_BonusManaBurn)) x WS_Lvl))
      • -------- Creates Visual Dummy --------
      • Unit - Create 1 WS_DummyMonsoon 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 0.50 second Generic expiration timer to lastunit
      • -------- Creates Visual Dummy --------
      • Unit - Create 1 WS_DummyMonsoon 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 0.50 second Generic expiration timer to lastunit
      • Trigger - Turn on Lightning Clear <gen>
      • -------- Starts Integer Loop to create lightnings and effects --------
      • For each (Integer WS_Integer) from 1 to WS_Loops, do (Actions)
        • Loop - Actions
          • -------- Determins the point where the lightning starts and targets --------
          • Set WS_Point3 = (WS_Point1 offset by WS_DamageRange towards WS_Real degrees)
          • -------- Creates the Lightning Effect and a small impact effect --------
          • Custom script: call AddLightningLoc( udg_WS_LightningType, udg_WS_Point1, udg_WS_Point3 )
          • 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
            • Else - Actions
          • Custom script: call RemoveLocation(udg_WS_PickedPos)
      • -------- 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
Contents

Manasurge's Manastorm Spellbase (Map)

Reviews
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]...

Moderator

M

Moderator


Manastorm 1.7 | Reviewed by Maker | 12th Oct 2013
APPROVED


126248-albums6177-picture66521.png


  • Goodlooking, leakless and MUI spell
126248-albums6177-picture66523.png


  • Use variables for abilities
  • You could create only one dummy, and make it cast Purge on all targets
[tr]


Bribe

Set WS_Force = (All players matching ((Triggering player) Equal to (Matching player)))

-> There is a "Convert Player to Player Group" function which could simplify this to just use (Player Group((Triggering player))) instead.

The rest looks good! This should see an approval once I give it a test run.

Maker, v1.6:
The unit dies trigger should be turned off when there are no dummies alive.
 
Level 7
Joined
Apr 1, 2010
Messages
289
Cool spell, but you need to
get rid of the point array, Ws_point and create 3 point vars. arrays use a lot more memory then a none arrayed vars.

and remove this and the other one
  • Special Effect - Create a special effect at (Position of (Picked unit)) using Units\Undead\Abomination\AbominationExplosion.md
it leaks and is repeated for every unit in range. use a point and then clear it in the loop.
using
  • Custom script: call RemoveLocation(udg_Point_Var)
Keep up the Good work!

Edit: it might be a good idea to set picked unit to a var, to reduce memory consumed.
 
You have WAAAAAAY too many BJs (Don't report this post! It's a real thing :p! --
You'll know what it is when you start learning JASS .. Or I can tell you now :D)

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 :p

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.

----------
That's all ... for now ;)
 
Level 7
Joined
Apr 12, 2011
Messages
124
Thanks for the feedback Magtheridon96 and Narogog. :goblin_yeah:

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. :grin:

Didn't know that position of picked unit leaked :)

And there's instructions on how to import in the end of Startup trigger.

EDIT: Monday 18th of April UPDATED
 
Last edited:
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...
 
Level 7
Joined
Apr 1, 2010
Messages
289
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.
 
Top