• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Crave Mana v. 1.04

[Spell Description]
When the ability is cast the hero lets out a ball of energy. This ball moves towards the targeted location - when in range of enemy units it absorbs their manaif they have any and damaging them. When the spell is finished the mana absorbed is returned to you.

This ability should be MUI and leakless. The spell is 1.24 compatible. If you encounter any leaks or bugs please let me know. The spell is done in GUI with dynamic indexing. The dynamic index is a template created by Hanky.

The spell should be pretty straight forward, but if you have any questions about or want to learn more about the spell please let me know. Just pm me :).
I hope you enjoy it.

Changelog:

Version 1.02
Changed the periodic event of (Crave Mana Loop) to 0.05 seconds of Game Time.
Changed some variables to addres the change of the periodic event.
Changed the description of Crave Mana - by request of Aspard
Added Documentation.

Version 1.03
Changed the periodic event of (Crave Mana Loop) to 0.03 seconds of Game Time.
Changed some variables to addres the change of the periodic event.
Added a special effect timer.

Version 1.04
Deuterium lended a holy hand and fixed the SFX's.
added a "Thanks to list".

Thanks to Hanky for his template. Thanks to Deuteriumfor helping ever so gently.

Keywords:
Energy, mana, gui, CraveMana, Crave, Foopad
Contents

Crave Mana 1.04 (Map)

Reviews
17:17, 22th Sep 2009 Hanky: The spell looks nice, the documentation is fine and the coding is ok too. You just could add a condition where you prove if the moving missile is still in the playable area. But still this spell is good enough for an...

Moderator

M

Moderator

17:17, 22th Sep 2009
Hanky:
The spell looks nice, the documentation is fine and the coding is ok too. You just could add a condition where you prove if the moving missile is still in the playable area. But still this spell is good enough for an approval. So I'll rate this spell as recommended since everyone who's using GUI in his maps should give this spell a try and maybe use it in his/her project.
 
Level 17
Joined
Mar 17, 2009
Messages
1,349

Deuterium's Brief Review


1. This:
  • (Life of (Picked unit)) Greater than 0.46
Should be:
  • (Life of (Picked unit)) Greater than 0.41

2. Adjust the damage and special effects to occur once per enemy unit instead of having it occurring at 0.03 intervals and thus decreasing efficiency. If you don't want to make damage occur only once, make it occur at least at 0.5 second intervals (although I dislike that ide).



Spell uses a decent indexing method and works fine. Idea is also nice and could be useful. Just adjust the two just mentioned flaws and this spell is good to go!

Deuterium
 
Level 11
Joined
Jul 2, 2008
Messages
601
Ehm... what should I do to get this "damage based mana" back? Casted the spell about ten times and didn't get such an effect, wtf?

EDIT: Well, I looked at triggering and got the point. You should mention asap in the spell tooltip, that the mana is back only from units which has it at all!
 
Level 6
Joined
Jun 15, 2008
Messages
175

Deuterium's Brief Review


1. This:
  • (Life of (Picked unit)) Greater than 0.46
Should be:
  • (Life of (Picked unit)) Greater than 0.41
2. Adjust the damage and special effects to occur once per enemy unit instead of having it occurring at 0.03 intervals and thus decreasing efficiency. If you don't want to make damage occur only once, make it occur at least at 0.5 second intervals (although I dislike that ide).
Deuterium

Thanks for the life tip :)

I would agree on the special effects part - I disagree on the damage part, the damage is essentiel for the mana stolen. Therefore if someone moves out of range or goes invurnable or anything the mana and damage done would not be correct.

I personally like the idea to do damage on intervals alot better. I've made it easy to see how much damage per level is actually done - I could have improved description.
@Aspard You should probably hit a unit with mana :)
I should change the description - I will.
Sincerely Foopad
 
Last edited:
Level 6
Joined
Jun 15, 2008
Messages
175
Well I've changed the interval to 0.05 seconds - doesen't really make much of a difference, the ball is a little less smoother, nothing noticable though. The preformance is improved a bit though :). Thanks for the tip.
I've also changed the description abit and added a changelog.
Sincerely Foopad
 
Level 17
Joined
Mar 17, 2009
Messages
1,349
Foopad :p no i didn't request to change periodic time... I asked to change damage intervals. Periodic time SHOULD stay .03 for the missile to move smoothly.

What you have to do is (this goes inside the trigger which is running at 0.03):
  • Set DAMAGETIMER[Index] = (DAMAGETIMER[Index] + 0.03)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • DAMAGETIMER[Index] Greater than or equal to DamageIntervalTime
    • Then - Actions
      • // Do the damage & create SFX
      • Set DAMAGETIMER[Index] = 0.00
    • Else - Actions
That way you'd have increased efficiency and less SFX spam... and preserve missile smoothness

Sorry for the misunderstanding :s
 
Level 6
Joined
Jun 15, 2008
Messages
175
Don't be sorry :).
That would make the spell rather odd? It would damage once or twice and the effects would come once or twice. The range of the spell would be ruined in my opinion - The range when done my way is a constant 500 around the orb, while in your way it's a point or two. C---0---0, where mine is a moving 00000000. Well I am going to keep it at that for the moment. I hope it is still approveable
Illustrations ftw!
 
Level 17
Joined
Mar 17, 2009
Messages
1,349
Yes what you say make sense too :p
Well that at least make the SFX appear at lesser intervals:
  • Set SFXTimer[Index] = (SFXTimer[Index] + 0.03)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • SFXTimer[Index] Greater than or equal to SFXIntervalTime
    • Then - Actions
      • // create SFX
      • Set SFXTimer[Index] = 0.00
    • Else - Actions
That way you'd still have your smooth damage, and no SFX spam... and you can put the periodic time back to 0.03

Just do that and you're good to go =)
 
Top