• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Mana regeneration

Status
Not open for further replies.
Level 4
Joined
Jul 30, 2010
Messages
57
I want to create an unit which has mana but no mana regeneration. It's ok but when the unit is close to some unit with brilhance aura or something like, it starts to regenerate the mana. Is there some way to prevent it?
I want the unit can't regenerate mana of anyway.
 
Level 14
Joined
Dec 12, 2009
Messages
1,027
A possible solution would be to edit the aura and the unit.

If your map has no Ancients, give the unit the Ancient classification under Stats - Targeted as in the Object Editor, change the Combat-targeted as to Ancient, and change Brilliance Aura's targets allowed to include Non-Ancient.

If you're not using any flying units, you can do what I mentioned above, but set the unit to be targeted as Flying, nothing else, and unselect Air in the ability's targets allowed. You will have to change the other units (all of them) Combat-targets allowed to include air however, alot of work...

//\\oo//\\
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
change the mana regeneration to 0

It is still affected with Intelligence Mana Regeneration
Might change the Gameplay Constants Mana Regeneration Bonus to 0

EDIT:
Trigger is the way
Test map attached.
I used 0.99 seconds reload because Normal Mana Regeneration (without items/skills) occurs once every second
You can change it from 0.90~0.99 per reload/reset
Try before and after leveling the Brilliance Aura from that Horse Dude
The Mana Regen occurs from that skill, not from standard mana regen
 

Attachments

  • Mana 0.w3x
    12.6 KB · Views: 38
Last edited:

fladdermasken

Off-Topic Moderator
Level 39
Joined
Dec 27, 2006
Messages
3,688
Wouldn't it be incredibly simple to just issue a loop that constantly sets the unit's mana to 0%?
Also, mana regeneration from intellect can be disabled in Advanced, Gameplay Constants.
Search for Hero Attributes - Mana Regen. Bonus per Intelligence Point and set the value to 0.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Wouldn't it be incredibly simple to just issue a loop that constantly sets the unit's mana to 0%?
Also, mana regeneration from intellect can be disabled in Advanced, Gameplay Constants. Search for Hero Stats.

He wants 0 (ZERO) Mana REGENERATION, not Mana set to 0
Otherwise, how did the unit will get Mana Regen ?
We're talking about REGENERATION, not DEPLETION
 

fladdermasken

Off-Topic Moderator
Level 39
Joined
Dec 27, 2006
Messages
3,688
He wants 0 (ZERO) Mana REGENERATION, not Mana set to 0
Otherwise, how did the unit will get Mana Regen ?
We're talking about REGENERATION, not DEPLETION
Apologies, I'm off the radar today.
Refer to this part, it will solve one issue at the least.
Mana regeneration from intellect can be disabled in Advanced, Gameplay Constants.
Search for Hero Attributes - Mana Regen. Bonus per Intelligence Point and set the value to 0.
 
Level 20
Joined
Oct 21, 2006
Messages
3,231
Its unbeliveable how you cant understand a simple question....

To disable mana regen completely for a unit, even while affected by Brilliance Aura, do this:
Events - Every 1.00 seconds
Conditions - None
Actions - Pick every unit matching condition matching unit has buff Brilliance Aura equal to true.
Set the current mana of the picked unit to current mana of the picked unit - 1.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
To elaborate Super-Sheep's answer, you can apply counter-regeneration, which can be tricky.

To counter natural mana regen and brilliance regen, you can do like this:

  • Untitled Trigger 001
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Mana_Group and do (Actions)
        • Loop - Actions
          • Set u1 = (Picked unit)
          • Custom script: set udg_r1 = (I2R(GetHeroInt(udg_u1 , true )) * 0.05) * (1 + GetUnitAbilityLevel(udg_u1 , 'BHab') * 0.75 )
          • Unit - Set mana of u1 to ((Mana of u1) - r1)
You could also calculate the non-int modifier first based on all mana regen abilities you have in your map, and then apply it to the natural regen, and reduce the mana.

With this solution, you may see your mana go from x to x + y and back to x during every second, since the mana gain and mana reduction are very unlikely to be synchronized.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
First of all.
You MUST specify your needs, my friend
Tell us WHAT is actually the specific thing we should know
Like the unit is NOT a Hero or something
This, will make both our time spent will be less on the issues
Good Luck in creating next thread, keep improving !
 
Level 5
Joined
Oct 14, 2010
Messages
100
If all else fails, a trigger like this may solve the problem:

  • Events
    • Every 0.03 seconds
  • Actions
    • If
      • Current mana of <unit> less than manaVariable
    • Then
      • Set manaVariable = Current mana of <unit>
    • Else
      • Set <unit>'s mana equal to manaVariable
 
Status
Not open for further replies.
Top