Hi
I am making a spell that curses an enemy. When my units attacks it, it is supposed to restore mana to them.
It is only supposed to be for a duration. So how do I delete the variable set for the unit, without leaking other targets.
It is available to be 2 of the same hero, which means another Hero can cast it as well. How do I make sure that when the first curse runs out, that the other curse variable is not removed as well? And if a unit has the curse and the other Hero curses another unit, will it overlap the other variable, removing it from the first 1?
Here are my triggers so far:
Trigger 1:
Leaks:
If you curse the enemy, select to attack and spam press Stop, it will generate mana very fast, without him hitting. How do you prevent that?
I am making a spell that curses an enemy. When my units attacks it, it is supposed to restore mana to them.
It is only supposed to be for a duration. So how do I delete the variable set for the unit, without leaking other targets.
It is available to be 2 of the same hero, which means another Hero can cast it as well. How do I make sure that when the first curse runs out, that the other curse variable is not removed as well? And if a unit has the curse and the other Hero curses another unit, will it overlap the other variable, removing it from the first 1?
Here are my triggers so far:
Trigger 1:
-
Unholy Shackles 1
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Monk Unholy Shackles
-
-
Actions
-
Set UnholyShackledUnit = (Target unit of ability being cast)
-
Wait 5.00 seconds
-
Set UnholyShackledUnit = No unit
-
-
-
Unholy Shackles 2
-
Events
-
Unit - A unit Is attacked
-
-
Conditions
-
(Attacked unit) Equal to UnholyShackledUnit
-
-
Actions
-
Unit - Set mana of (Attacking unit) to ((Percentage mana of (Attacking unit)) + 1.00)
-
-
Leaks:
If you curse the enemy, select to attack and spam press Stop, it will generate mana very fast, without him hitting. How do you prevent that?