This spell creates a big ball of incredibly dense matter which draws nearby units into it. After holding them there spinning around for some time, it explodes, dealing damage to every unit which has been pulled into it and sending them flying.
Requirements:
JassNewGenPack for vJass
Silvenon's Knockback function (many credits to him for that)
NOTE: the test map uses a custom model which I feel makes the spell look much better. Credits to RightField for that.
I believe it is fully MUI and leak-free but please let me know if you find a leak!
Read the "How to Import" trigger for detailed instructions on how to import the spell.
Please give credits to me (Element of Water) if you use it in your map. Oh, and please don't give stupid comments like "OMG WAY TOO IMBA" because you can make it less "IMBA" by configuring the constants...
UPDATE (v1.0.1):
Fixed a small leak in the trigger.
UPDATE (v1.1.0):
Kinda big update...
- Replaced Silvenon's Knockback with Rising_Dusk's Knockback which is approved as a resource on wc3c.net
- I now use Grim_001's ListModule for extra efficiency.
- Recoded the PullUnit library completely so it is now useable separately if you want. There is currently little documentation, however, so using it might be a pain
- Changed lots of little bits in the code to make it more efficient. It's still not as efficient as it could be, however.
UPDATE (v1.1.1)
- Fixed a bug that caused a thread crash when no units are affected by the spell.
- Now I use GetSpellTargetX/Y instead of locations.
UPDATE (v1.1.5)
- I merged the PullUnit library with the main spell library.
UPDATE (v1.2.0)
- The gravity ball now pulls in enemies which come close to it after the spell has started as long as the maximum hasn't already been reached.
- I now use Table to associate gravity balls with units so I can release the units from the ball when they die in mid-air.
- Due to Table being used a single unit may not be attracted by two separate gravity balls any longer.
- I now preload the effect so it doesn't lag the first time the spell ends.
- Probably lots of other stuff that I can't remember.
UPDATE (v1.2.5)
- I now take into account the height of the terrain when moving the units.
- Fixed a bug caused by using IMaxBJ when I should have used IMinBJ which meant 100 units could be affected by the spell no matter what level it was.
Keywords:
Gravity, Ball, Magnetism, Gravity Ball, Knockback, Explosion, Gravitational, Magnetic, Spring, Pull, Big Purple Orb