- Joined
- Dec 1, 2010
- Messages
- 346
Hello all, So the system i'm working on is an item pasive. This pasive is supposed to give a 20% chance to restore the mana equal to the heroes agility.
I've succeeded with making most of the steps, however i'm not finding any trigger that finds the current mana the unit has.
The current trigger is wrong at the part where i set the mana to a percentage of it's mana + the agi. But i'm not finding any way to make this first value his current mana.
Does anyone have any idea for a workaround way i can make it so that i only add mana based on his agility?
I've looked a ton but so far could only find a way to set it to the heroes max mana wich i don't want. I need to be able to spot the current mana the hero has.
Thanks!
I've succeeded with making most of the steps, however i'm not finding any trigger that finds the current mana the unit has.
The current trigger is wrong at the part where i set the mana to a percentage of it's mana + the agi. But i'm not finding any way to make this first value his current mana.
Does anyone have any idea for a workaround way i can make it so that i only add mana based on his agility?
I've looked a ton but so far could only find a way to set it to the heroes max mana wich i don't want. I need to be able to spot the current mana the hero has.
Thanks!
-
pickup
-
Events
-
Unit - A unit Is attacked
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Attacking unit) has (Item carried by (Attacking unit) of type Amulet of the hunt)) Equal to True
-
-
Then - Actions
-
Set VariableSet RandomNumber = (Random integer number between 0 and 100)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
RandomNumber Greater than 80
-
-
Then - Actions
-
Unit - Set mana of (Attacking unit) to ((Percentage mana of (Attacking unit)) + (Real((Agility of (Attacking unit) (Include bonuses)))))
-
Special Effect - Create a special effect at (Position of (Attacking unit)) using Abilities\Spells\Undead\ReplenishMana\SpiritTouchTarget.mdl
-
Hero - Add 10000 experience to (Attacking unit), Show level-up graphics
-
-
Else - Actions
-
-
-
Else - Actions
-
Do nothing
-
-
-
-