I am trying to create an ability that gives a unit 25% bonus healing
It kinda worked, if i uses an item which heals for 400 my hero gains 500 health instead
But i suppose coding can be done much better
Any suggestions?
1.26a
p.s. please ignore the fact that this system will also do 25% bonus damage to any unit that loses hitpoints, this is easy to fix
It kinda worked, if i uses an item which heals for 400 my hero gains 500 health instead
But i suppose coding can be done much better
Any suggestions?
1.26a
p.s. please ignore the fact that this system will also do 25% bonus damage to any unit that loses hitpoints, this is easy to fix
-
usil heal
-
Events
- Time - Every 0.25 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) has an item of type Blood Key) Equal to True)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- usil_heal_1st[(Custom value of (Picked unit))] Equal to 0.00
-
Then - Actions
- Set usil_heal_1st[(Custom value of (Picked unit))] = (Life of (Picked unit))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- debug Equal to True
-
Then - Actions
- Game - Display to (All players) the text: (((Name of (Picked unit)) + ( + (String(usil_heal_1st[(Custom value of (Picked unit))])))) + 1st)
- Else - Actions
-
If - Conditions
- Skip remaining actions
-
Else - Actions
- Set usil_heal_2nd[(Custom value of (Picked unit))] = (Life of (Picked unit))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- debug Equal to True
-
Then - Actions
- Game - Display to (All players) the text: (((Name of (Picked unit)) + ( + (String(usil_heal_2nd[(Custom value of (Picked unit))])))) + 2nd)
- Else - Actions
-
If - Conditions
- Set usil_heal_bonus[(Custom value of (Picked unit))] = (((usil_heal_2nd[(Custom value of (Picked unit))] - usil_heal_1st[(Custom value of (Picked unit))]) x 0.50) + 0.00)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- debug Equal to True
-
Then - Actions
- Game - Display to (All players) the text: (((Name of (Picked unit)) + ( + (String(usil_heal_bonus[(Custom value of (Picked unit))])))) + bonus)
- Else - Actions
-
If - Conditions
- Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + usil_heal_bonus[(Custom value of (Picked unit))])
- Set usil_heal_1st[(Custom value of (Picked unit))] = 0.00
- Set usil_heal_2nd[(Custom value of (Picked unit))] = 0.00
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) has an item of type Blood Key) Equal to True)) and do (Actions)
-
Events