• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

How to make a passive skill that gives mana per hit?

Status
Not open for further replies.
A GUI trigger will suffice. Gimme a sec and I'll see what I can do.
Firstly, Do you want the amount of mana regenerated increase as the damage increases or as the mana pool increases?
e.g. Steals 5 mana per hit and has 100 damage,
Steals 10 mana per hit and has 200 damage.
OR
Steals 10 mana per hit with a mana pool of 1000
Steals 20 mana per hit with a mana pool of 2000

Understand? :PP
 
search for DDS (i recommend bribes) and then do whenever a unit damaged, check whether the unit has ability level 1 or higher then do add X mana (X can also be calculated by damage ; for example (dealt damage/10))
 
Can you add % mana? That makes it much more practical, Like gaining a fixed amount of mana, like 5 per hit, would suck if you have a mana pool of 10000. Or it would be IMBA if you gain 50 per hit with a mana pool of 500
IMO
 
its not hard to do..^^

if you wanna add percentage mana you just have to change the action after the trigger runs (the event the DDS uses)

just do :
set percentage mana of 'DamageSource' to (current percentage mana of 'DamageSource' + X)

or if you want it to be percentage mana of the target added to the attacker just change DamageSource to 'DamagedUnit' in the equation.

(i just used understandable variable names they will be different in the system)
 
Actually, this way the unit wold gain mana everytime it deals damage with anything: hit, ability, etc, which wouldn't actually work as a "Mana steal" thing or something.

You have to detect the damage source actually hit the target unit.

What I would do?

On event "A unit is attacked" save "True" on the attacked unit index or id. That works for detecting the unit began the attack animation of a unit. To add the mana only when the unit hits, you need this boolean to be "True". If the unit is given any order (target, no target, point), and boolean is "True" you set the boolean to False, just in case a player tries to spam the small time gap between the "Attack" and the Damage. When damage is received the boolean is also set to false.

It's a pain in the ass tough for ranged unit, which could receive an order while the missile is still on the air, or could have more than 1 missile in the air.

You could also do the ooposite: Set "True" when the unit is casting to prevent attack bonuses apply, and set to false when the unit is not casting anymore.
 
Event: Damage Event Happens
Condition: Level of PassiveManaRegain for DamageSource is > 0
Action: Set mana of DamageSource = (Mana of DamageSource + 10)
 
I have a DDS but I still can't figure out how to do it.
Did you, at least, read how the DDS works?

DAMAGE DETECTION SYSTEM creates a Real Variable used to detect when damage is dealt, and by whom, and to who. You have to use "Game - Value of Real Variable" event and follow the selected DDS Instructions to use it.

Yes, you set the mana with that action "Unit - Set mana (To value)". To make it scale with levels you can base it on the Level of the Ability like

"Set mana of DamageSource = (MAna of Damage Source + (Level of PassiveManaGain for (Triggering Unit) * 2.5)))"
 
Mana Steal
Events
Game - GDD_Damage becomes Equal to 0.00
Conditions
(Level of Mana Steal for GDD_DamageSource) Greater than 0
Actions
Unit - Set mana of GDD_DamageSource to ((Mana of GDD_DamageSource) + ((Real((Level of Mana Steal for (Triggering unit)))) x 5.00))

I made this trigger but when I try it ingame it doesn't work. Maybe I'm doing something wrong since I'm new to triggers.
 
If it has the buff, then it works.

Razwerd, i'm not sure, but I've heard around that if the gained mana is higher than the maximum mana, it does nothing. So you have to check if the current mana + restored mana is higher than maximum mana, set mana to max, else, set mana to current mana + restored mana.

Try to display a message (Game - Display message) to test if the event and conditions are working.
 
Ooooh.. I've spot the problem.

Have you seen the event you're using? "GDD_Damage".

Check the instructions. You have to use "GDD_Event" in the Event :)
 
Status
Not open for further replies.
Back
Top