• 🏆 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!

Disable mana regeneration on specific unit

Status
Not open for further replies.
Level 2
Joined
Apr 13, 2022
Messages
3
Hello everyone!

My question is: Is there a way to disable the Mana Fountain's mana regeneration to work on specific units? I want to make a warrior who uses rage as resource for spells and obviously mana fountains don't regenerate rage, right?

I tried to ad a "Ancient" class to the unit and I add "Non-Ancient" to the "Mana regenetion (Neutral Hostile)"'s target allowed, didn't work.

I would appreciate any kind of help, thank you!
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,564
You can always trigger the Mana Fountain's mana regeneration. It's a fairly simple trigger that involves storing your fountains in a unit group and periodically searching for units near them. If a unit is found, check if it has > 0 max mana and if it's mana % is < 100, and if both are true proceed to restore it's mana using simple arithmetic.

Set percentage mana of picked unit = percentage mana of picked unit + 1.00
 
Level 2
Joined
Apr 13, 2022
Messages
3
Finally had the time and got it working, thank you! I was wondering how could I solve Tome of Intelligence but I guess everytime the warrior picks up a tome I just decrease it's int by the same amount.
I also have to make every item drop on pickup which gives mana bonus. I wish there was a way for this item ability to only give mana for non-warriors. I remember solving this somehow, but nevermind. Warriors will remain stupid. :)
 
Level 39
Joined
Feb 27, 2007
Messages
5,023
You might be able to set 'targets allowed' on all the mana regen passives to include "non-ancient" and then flag the warrior as an "ancient" type unit. Or use another of the classifications like critter/sapper/suicidal.
 
Level 2
Joined
Apr 13, 2022
Messages
3
You might be able to set 'targets allowed' on all the mana regen passives to include "non-ancient" and then flag the warrior as an "ancient" type unit. Or use another of the classifications like critter/sapper/suicidal.
Unfortunately it doesn't work. I tried it already. In an earlier patch it did work with "tauren" tho.
 
Status
Not open for further replies.
Top