Long story short, I wanted a sort of "gas station mechanic" that restores mana to units with autocast. Wasn't quite okay with solutions like Spirit touch, though I might to have to dig that out again if this cannot be fixed.
Anyway, I was really happy with my solution based on Faerie Fire, unfortunately, it comes with the tiny drawback that the trigger leaks like hell and crashes my map after one hour or so, as it cannot handle more than a little above 1 GB.
(800 MB after 30min, 1GB+ after one hour -> Crash; Without this trigger, it's 700 MBs after 30min, then relatively stable at maximum 900 MB or so even after 2 hours).
Here is the trigger in question:
Original version which did exactly what I wanted
Anyway, I was really happy with my solution based on Faerie Fire, unfortunately, it comes with the tiny drawback that the trigger leaks like hell and crashes my map after one hour or so, as it cannot handle more than a little above 1 GB.
(800 MB after 30min, 1GB+ after one hour -> Crash; Without this trigger, it's 700 MBs after 30min, then relatively stable at maximum 900 MB or so even after 2 hours).
Here is the trigger in question:
Original version which did exactly what I wanted
-
Refuel working
-

Events
-


Unit - A unit Begins casting an ability
-
-

Conditions
-


(Ability being cast) Equal to Replenish Faeriefire (Neutral Hostile)
-
-

Actions
-


Animation - Change (Target unit of ability being cast)'s vertex coloring to (0.00%, 100.00%, 0.00%) with 0.00% transparency
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




Or - Any (Conditions) are true
-





Conditions
-






(Life of (Target unit of ability being cast)) Less than (Max life of (Target unit of ability being cast))
-






(Mana of (Target unit of ability being cast)) Less than (Max mana of (Target unit of ability being cast))
-
-
-
-



Then - Actions
-




Set DifferenzLife = ((Max life of (Target unit of ability being cast)) - (Life of (Target unit of ability being cast)))
-




Set DifferenzMana = ((Max mana of (Target unit of ability being cast)) - (Mana of (Target unit of ability being cast)))
-




Set DifferenzSumTarget = (DifferenzLife + DifferenzMana)
-




Set DifferenzStock = (Mana of (Casting unit))
-




-------- Totality --------
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






DifferenzStock Greater than DifferenzSumTarget
-
-





Then - Actions
-






Unit - Set mana of (Target unit of ability being cast) to 100.00%
-






Unit - Set life of (Target unit of ability being cast) to 100.00%
-






Unit - Set mana of (Casting unit) to ((DifferenzStock - DifferenzSumTarget) + 8.00)
-
-





Else - Actions
-






-------- Help with Mana --------
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








(Mana of (Target unit of ability being cast)) Less than (Max mana of (Target unit of ability being cast))
-
-







Then - Actions
-








Unit - Set mana of (Target unit of ability being cast) to ((Mana of (Target unit of ability being cast)) + 8.00)
-
-







Else - Actions
-
-






-------- Help with Life --------
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








(Life of (Target unit of ability being cast)) Less than (Max life of (Target unit of ability being cast))
-
-







Then - Actions
-








Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + 4.00)
-
-







Else - Actions
-
-
-
-
-



Else - Actions
-




Unit - Order (Casting unit) to Stop
-




Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) + 8.00)
-
-
-
-
-
Refuel Now Hopefully no Leak
-

Events
-


Unit - A unit Begins casting an ability
-
-

Conditions
-


And - All (Conditions) are true
-



Conditions
-




(Ability being cast) Equal to Replenish Faeriefire (Neutral Hostile)
-




((Target unit of ability being cast) has buff Refuel ) Equal to False
-
-
-
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(Mana of (Target unit of ability being cast)) Less than (Max mana of (Target unit of ability being cast))
-
-



Then - Actions
-




Unit - Set mana of (Target unit of ability being cast) to ((Mana of (Target unit of ability being cast)) + 10.00)
-
-



Else - Actions
-




Unit - Order (Casting unit) to Stop
-




Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) + 10.00)
-
-
-
-
Last edited:
