Dark Lightning 2.32

This bundle is marked as approved. It works and satisfies the submission rules.
Ok guys, this is another one of my spell for the spell Olympics. Although I am totally sure I can't win against Anitarf nor Griffen (my freaking Nemesis) I still think this is a spell people should see and I believe some of you may even like it.
The code is well commented, and I feel a system can be explored from the code. Unlike many other spells, I prepared this code for the user, this means the user is not limited only to the SETUP part, I also want the user to enter the code's core so he can also learn from my code and mainly make even better lightning spells. This is mainly why my code has many methods and why it is so divided, so people can actually use an easy and efficient "Divide and Conquer" strategy. This makes sections of the code easier to change.
I would really like to see this spell approved, it is my first working lightning spell, and it passed nearly through hell to make it work for Olympics.
I just feel bad I actually delivered a not perfect version of this spell... The Math formula is not what I exactly pretended, but it was what I could do with the time I had.
Please enjoy and be nice on comments, I put a lot of effort into making this spell for you, the user.

This spell belongs to my project
Castle vs Castle Flame Edition and I hope you all enjoy it.


Credits:
This time I feel forced to tell explicitly the people who helped me making this spell. Note that without them this spell would have not been possible to make. Thx to Anitarf and Pyrogasm, both of them wasted many hours seeing my code, I can never thank them enough for what they did. I would also like to thank Daelin for his outdated, but useful math formulas and to Deaod as well.

Description:
A JESP spell that allows the user to create lightning spells with any model he desires. In this sample, the caster sends a dark projectile which will damage enemy units and heal the caster by the amount of damage they received. If an enemy unit dies due this ability, it will return as an Undead to aid the caster, unless it is a summon or a hero.

Requirements:
- Jass NewGen Pack (uses vJASS)
- TimerUtils

History:

History
Versions 1.0, 1.2, 1.3, 1.4:
- This versions all had different approaches to try solving the same problem "How to make a lightning spell ?" but they all proved either to be inefficient or to fail
- Yes, I actually remade from zero the spell 3 times (without counting with version 1.0)

Version 1.5:
- First release to the spell Olympics
- Math formula improved
- Removed a useless timer
- Cleaned and commented the code

Version 1.6:
- The Math formula for damage reduction was still, wrong, so now it is corrected and now most things work as they should

Version 1.7:
- Code optimizations
- Fixed a glitch with the dummy unit, now it actually dies

Version 1.8:
- Made the function Targets easier to use
- Now the code has its own algorithm and re uses groups
- Added new function SetProjectile
- Many other minor code fixes and updates were done
- Added Anitarf to the credits

Version 1.9
- Changed the model of the missile to make it look better and now it works with flying units by changing its flying height properly
- Now the missile always faces the direction of the victim
- Improved the map and the terrain
- Changed the algorithm for picking units, now he picks close units to the target
- Now the effects appear on the units
- Now I also preload the units missile and the dummy

Version 2.0
- Now the abilities for the dummy unit are also preloaded
- Replaced SetUnitPosition with SetUnitX and SetUnitY, now the spell is faster!


Version 2.1
- Replaced some variables in order to make the preloading of the dummy unit faster.
- Cleaned the code and deleted old comments and code fragments as well as eliminated the "data = this" laziness

Version 2.2
- Now the code really works well with 1 single timer. Thx Pyrogasm and Anitarf!
- This spell would have not been possible without the people on the credits, Anitarf, Daelin, Deaod and Pyrogasm, thx to you all!

Version 2.3:
- Fixed a leak in method NextTarget
- Moved the timer code to the struct
- Transformed some of the SETUP functions into constants
- Fixed a spelling mistake , replaced TIMER_CICLE, by TIMER_CYCLE
- Added JESP document

Version 2.31:
- Fixed the tooltips of the spell

Version 2.32:
- Updated for patch 1.24


Keywords:
Lightning, Dark Lightning, chain, undead, life steal, summon target, CCFE
Contents

Dark Lightning (Map)

Reviews
21:08, 9th Feb 2009 Hanky: Advice: 5 points are the highest rating and 1 point is the lowest rating. Documentation: 5 Visual Effects: 5 Triggering: 5 Idea: 5 Total: Well a really well done spell, I like the idea that died units...

Moderator

M

Moderator

21:08, 9th Feb 2009
Hanky:
Evaluation

Rating Points
Advice: 5 points are the highest rating and 1 point is the lowest rating.

Documentation: 5
Visual Effects: 5
Triggering: 5
Idea: 5

Total:
thumbsup.gif
thumbsup.gif
thumbsup.gif
thumbsup.gif
thumbsup.gif

Rating Comment

Well a really well done spell, I like the idea that died units get revived as undead. The script seems to be neat I don't see any flaws there. The documentation is as always well done. Well I see no reason to not approve this. I just can highly recommend to use this spell if you are searching something like this.
Advice: If you didn't understood my rating or if you maybe have questions because you don't know how to fix bugs or leaks etc. You can always send a private message to me. I will answer as soon I got time.
 
This is quite a good spell. But many can't relate to Jass.
This would be great for me if it was GUI.
Unfortunately I don't have the attention span to learn from this. xD

Anyways 4.5/5 for the spell. ^^
HA, even yo if you are a newb GUIer, do not worry !
This spell has a SETUP section. This means that you don't need to know JASS to change it !
Btw, this deserves 5/5 =P
Thx for rep+ and comment =)
 
Can you make one like this in GUI? I was gonna try but then I got lazy. xD
The reason why I moved out to JASS, and then vJASS; it's because spells like this are not possible to make in GUI.
In the other hand, even when possible, they are not feasible or lose a lot of details.
I am sorry, I can't make this in GUI.
However if you need help implementing this spell, I will be happy to help you.
 
Top