Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
turn off trigger

Events


Unit - A unit Finishes casting an ability

Conditions


(Ability being cast) Equal to YOURABILITY

Actions


Trigger - Turn off (YourManaRestorationTrigger)
well i think i always want to use 1 trigger and i'm common to jass, that's why i always want to use the complicated thingsWhy complicate things? 3 Triggers:
long wait may cause your trigger to leak.
turn off trigger
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to YOURABILITY
Actions
Trigger - Turn off (YourManaRestorationTrigger)
Initial

Events


Unit - A Unit Begins channeling an ability

Conditions


(Ability Being Cast) Equal to Feed

Actions


Unit - Set mana of casting unit to mana of casting unit + 3.00
Untitled Trigger 001

Events


Unit - A unit Begins casting an ability

Conditions


(Ability being cast) Equal to Cannibalize

Actions


Set unit[1] = (Casting unit)


Trigger - Turn on Untitled Trigger 002 <gen>
Untitled Trigger 002

Events


Time - Every 1.00 seconds of game time

Conditions

Actions


Unit - Set mana of unit[1] to ((Mana of unit[1]) + 20.00)


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



If - Conditions




(Mana of unit[1]) Equal to (Max mana of unit[1])



Then - Actions




Unit - Order unit[1] to Stop




Trigger - Turn off (This trigger)



Else - Actions
Untitled Trigger 003

Events


Unit - A unit Stops casting an ability

Conditions


(Ability being cast) Equal to Cannibalize

Actions


Trigger - Turn off Untitled Trigger 002 <gen>
Untitled Trigger 001

Events


Unit - A unit Begins casting an ability

Conditions


(Ability being cast) Equal to Sleep

Actions


Set unit[1] = (Target unit of ability being cast)


Trigger - Turn on Untitled Trigger 002 <gen>
Untitled Trigger 002

Events


Time - Every 1.00 seconds of game time

Conditions

Actions


Wait until ((unit[1] has buff Sleep) Equal to True), checking every 0.10 seconds


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



If - Conditions




(Integer((Max life of unit[1]))) Not equal to (Integer((Life of unit[1])))



Then - Actions




Unit - Set mana of unit[1] to ((Mana of unit[1]) - 40.00)




Unit - Set life of unit[1] to ((Life of unit[1]) + 40.00)



Else - Actions




Unit - Order unit[1] to Stop




Trigger - Turn off (This trigger)


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



If - Conditions




Or - Any (Conditions) are true





Conditions






(Integer((Mana of unit[1]))) Equal to 0






(unit[1] has buff Sleep) Equal to False



Then - Actions




Unit - Order unit[1] to Stop




Trigger - Turn off (This trigger)



Else - Actions
