I tried to make a trigger under the idea that a hero has a non-hero ability with multiple levels that places a buff on them, and when they are damaged by an attack while this buff is active, they will restore mana. At level 4, it will also damage the attacker.
Unfortunately, this is easier said than done. Sadly, there is no trigger event function that runs specifically on a damage event, and "Is attacked" is an exploitable function. Here is how it currently looks:
Unfortunately, this is easier said than done. Sadly, there is no trigger event function that runs specifically on a damage event, and "Is attacked" is an exploitable function. Here is how it currently looks:
-
Barkskin Attacked
-
Events
-
Unit - A unit Is attacked
-
-
Conditions
-
(Attacked unit) Equal to Hero
-
(Hero has buff Barkskin (Hero)) Equal to True
-
((Attacking unit) belongs to an enemy of (Owner of Hero)) Equal to True
-
-
Actions
-
Unit - Set mana of Hero to ((Mana of Hero) + 2.00)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Barkskin for Hero) Equal to 4
-
-
Then - Actions
-
Unit - Cause Hero to damage (Attacking unit), dealing 5.00 damage of attack type Spells and damage type Normal
-
Special Effect - Create a special effect attached to the origin of (Attacking unit) using Abilities\Weapons\TreantMissile\TreantMissile.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
Else - Actions
-
-
-