Hi everyone. Can you please look at my triggers and tell me if something leaks. Thank you in advance.
-
Earth Shield Init
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


For each (Integer A) from 1 to 16, do (Actions)
-



Loop - Actions
-




Player - Disable Earth Shield Buff Holder (ivo) for (Player((Integer A)))
-
-
-
-
-
Earth Shield Start Units
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


Unit Group - Pick every unit in (Units in (Playable map area)) and do (Trigger - Add to Earth Shield <gen> the event (Unit - (Picked unit) Takes damage))
-
-
-
Earth Shield New Units
-

Events
-


Unit - A unit enters (Playable map area)
-
-

Conditions
-

Actions
-


Trigger - Add to Earth Shield <gen> the event (Unit - (Triggering unit) Takes damage)
-
-
-
Earth Shield Cast 1 Target
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Earth Shield (ivo)
-
-

Actions
-


For each (Integer A) from 1 to 16, do (Actions)
-



Loop - Actions
-




If ((Target unit of ability being cast) Equal to ES_Cast_Target[(Integer A)]) then do (Set ES_Cast_Target[(Integer A)] = No unit) else do (Do nothing)
-
-
-


For each (Integer A) from 1 to 16, do (Actions)
-



Loop - Actions
-




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





If - Conditions
-






(Owner of (Triggering unit)) Equal to (Player((Integer A)))
-
-





Then - Actions
-






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







If - Conditions
-








(Level of Earth Shield Buff (ivo) for ES_Cast_Target[(Integer A)]) Greater than or equal to 1
-
-







Then - Actions
-








Unit - Remove Earth Shield Buff Holder (ivo) from ES_Cast_Target[(Integer A)]
-








Unit - Remove Earth Shield (ivo) buff from ES_Cast_Target[(Integer A)]
-
-







Else - Actions
-








Do nothing
-
-
-






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







If - Conditions
-








(Level of Earth Shield Buff (ivo) for (Target unit of ability being cast)) Greater than or equal to 1
-
-







Then - Actions
-








Unit - Remove Earth Shield Buff Holder (ivo) from (Target unit of ability being cast)
-








Unit - Remove Earth Shield (ivo) buff from (Target unit of ability being cast)
-
-







Else - Actions
-








Do nothing
-
-
-






Set ES_Cast_Target[(Integer A)] = (Target unit of ability being cast)
-






Unit - Add Earth Shield Buff Holder (ivo) to ES_Cast_Target[(Integer A)]
-






Unit - Set level of Earth Shield Buff (ivo) for ES_Cast_Target[(Integer A)] to 10
-






Unit - Remove Earth Shield (ivo) buff from ES_Cast_Target[(Integer A)]
-
-





Else - Actions
-






Do nothing
-
-
-
-
-
-
-
Earth Shield
-

Events
-

Conditions
-


(Level of Earth Shield Buff (ivo) for (Triggering unit)) Greater than or equal to 1
-


(Damage taken) Greater than 0.00
-
-

Actions
-


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



If - Conditions
-




(Level of Earth Shield Buff (ivo) for (Triggering unit)) Greater than 1
-
-



Then - Actions
-




Set ES_Chance = (Random integer number between 1 and 5)
-




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





If - Conditions
-






ES_Chance Equal to 5
-
-





Then - Actions
-






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







If - Conditions
-








(Life of (Triggering unit)) Greater than (Damage taken)
-
-







Then - Actions
-








Set ES_Index = (ES_Index + 1)
-








Set ES_Heal_Target[ES_Index] = (Triggering unit)
-








If ((Earth Shield Timer <gen> is on) Equal to False) then do (Trigger - Turn on Earth Shield Timer <gen>) else do (Do nothing)
-
-







Else - Actions
-








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









If - Conditions
-










(Life of (Triggering unit)) Less than or equal to (Damage taken)
-
-









Then - Actions
-










Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Human\Heal\HealTarget.mdl
-










Set ES_Special_Effect_Index = (ES_Special_Effect_Index + 1)
-










Set ES_Special_Effect[ES_Special_Effect_Index] = (Last created special effect)
-










Set ES_Special_Effect_Timer[ES_Special_Effect_Index] = 4.00
-










If ((Earth Shield Special Effect Destroyer <gen> is on) Equal to False) then do (Trigger - Turn on Earth Shield Special Effect Destroyer <gen>) else do (Do nothing)
-










Unit - Set life of (Triggering unit) to ((Percentage life of (Triggering unit)) + 10.00)%
-










Unit - Decrease level of Earth Shield Buff (ivo) for (Triggering unit)
-










Unit - Remove Earth Shield (ivo) buff from (Triggering unit)
-
-









Else - Actions
-










Do nothing
-
-
-
-
-
-





Else - Actions
-






Do nothing
-
-
-
-



Else - Actions
-




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





If - Conditions
-






(Level of Earth Shield Buff (ivo) for (Triggering unit)) Equal to 1
-
-





Then - Actions
-






Set ES_Chance = (Random integer number between 1 and 5)
-






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







If - Conditions
-








ES_Chance Equal to 5
-
-







Then - Actions
-








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









If - Conditions
-










(Life of (Triggering unit)) Greater than (Damage taken)
-
-









Then - Actions
-










Set ES_Index = (ES_Index + 1)
-










Set ES_Heal_Target[ES_Index] = (Triggering unit)
-










If ((Earth Shield Timer <gen> is on) Equal to False) then do (Trigger - Turn on Earth Shield Timer <gen>) else do (Do nothing)
-
-









Else - Actions
-










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











If - Conditions
-












(Life of (Triggering unit)) Less than or equal to (Damage taken)
-
-











Then - Actions
-












Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Human\Heal\HealTarget.mdl
-












Set ES_Special_Effect_Index = (ES_Special_Effect_Index + 1)
-












Set ES_Special_Effect[ES_Special_Effect_Index] = (Last created special effect)
-












Set ES_Special_Effect_Timer[ES_Special_Effect_Index] = 4.00
-












If ((Earth Shield Special Effect Destroyer <gen> is on) Equal to False) then do (Trigger - Turn on Earth Shield Special Effect Destroyer <gen>) else do (Do nothing)
-












Unit - Set life of (Triggering unit) to ((Percentage life of (Triggering unit)) + 10.00)%
-












Unit - Remove Earth Shield Buff Holder (ivo) from (Triggering unit)
-












Unit - Remove Earth Shield (ivo) buff from (Triggering unit)
-
-











Else - Actions
-












Do nothing
-
-
-
-
-
-







Else - Actions
-








Do nothing
-
-
-
-





Else - Actions
-






Do nothing
-
-
-
-
-
-
-
Earth Shield Timer
-

Events
-


Time - Every 0.00 seconds of game time
-
-

Conditions
-

Actions
-


For each (Integer ES_Integer) from 1 to ES_Index, do (Actions)
-



Loop - Actions
-




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





If - Conditions
-






(Level of Earth Shield Buff (ivo) for ES_Heal_Target[ES_Integer]) Greater than 1
-
-





Then - Actions
-






Special Effect - Create a special effect attached to the origin of ES_Heal_Target[ES_Integer] using Abilities\Spells\Human\Heal\HealTarget.mdl
-






Set ES_Special_Effect_Index = (ES_Special_Effect_Index + 1)
-






Set ES_Special_Effect[ES_Special_Effect_Index] = (Last created special effect)
-






Set ES_Special_Effect_Timer[ES_Special_Effect_Index] = 4.00
-






If ((Earth Shield Special Effect Destroyer <gen> is on) Equal to False) then do (Trigger - Turn on Earth Shield Special Effect Destroyer <gen>) else do (Do nothing)
-






Unit - Set life of ES_Heal_Target[ES_Integer] to ((Percentage life of ES_Heal_Target[ES_Integer]) + 10.00)%
-






Unit - Decrease level of Earth Shield Buff (ivo) for ES_Heal_Target[ES_Integer]
-






Unit - Remove Earth Shield (ivo) buff from ES_Heal_Target[ES_Integer]
-






Set ES_Heal_Target[ES_Integer] = ES_Heal_Target[ES_Index]
-






Set ES_Index = (ES_Index - 1)
-






Set ES_Integer = (ES_Integer - 1)
-






If (ES_Index Equal to 0) then do (Trigger - Turn off (This trigger)) else do (Do nothing)
-
-





Else - Actions
-






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







If - Conditions
-








(Level of Earth Shield Buff (ivo) for ES_Heal_Target[ES_Integer]) Equal to 1
-
-







Then - Actions
-








Special Effect - Create a special effect attached to the origin of ES_Heal_Target[ES_Integer] using Abilities\Spells\Human\Heal\HealTarget.mdl
-








Set ES_Special_Effect_Index = (ES_Special_Effect_Index + 1)
-








Set ES_Special_Effect[ES_Special_Effect_Index] = (Last created special effect)
-








Set ES_Special_Effect_Timer[ES_Special_Effect_Index] = 4.00
-








If ((Earth Shield Special Effect Destroyer <gen> is on) Equal to False) then do (Trigger - Turn on Earth Shield Special Effect Destroyer <gen>) else do (Do nothing)
-








Unit - Set life of ES_Heal_Target[ES_Integer] to ((Percentage life of ES_Heal_Target[ES_Integer]) + 10.00)%
-








Unit - Remove Earth Shield Buff Holder (ivo) from ES_Heal_Target[ES_Integer]
-








Unit - Remove Earth Shield (ivo) buff from ES_Heal_Target[ES_Integer]
-








Set ES_Heal_Target[ES_Integer] = ES_Heal_Target[ES_Index]
-








Set ES_Index = (ES_Index - 1)
-








Set ES_Integer = (ES_Integer - 1)
-








If (ES_Index Equal to 0) then do (Trigger - Turn off (This trigger)) else do (Do nothing)
-
-







Else - Actions
-








Do nothing
-
-
-
-
-
-
-
-
-
Earth Shield Special Effect Destroyer
-

Events
-


Time - Every 1.00 seconds of game time
-
-

Conditions
-

Actions
-


For each (Integer ES_Special_Effect_Integer) from 1 to ES_Special_Effect_Index, do (Actions)
-



Loop - Actions
-




Set ES_Special_Effect_Timer[ES_Special_Effect_Integer] = (ES_Special_Effect_Timer[ES_Special_Effect_Integer] - 1.00)
-




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





If - Conditions
-






ES_Special_Effect_Timer[ES_Special_Effect_Integer] Equal to 0.00
-
-





Then - Actions
-






Special Effect - Destroy ES_Special_Effect[ES_Special_Effect_Integer]
-






Set ES_Special_Effect[ES_Integer] = ES_Special_Effect[ES_Special_Effect_Index]
-






Set ES_Special_Effect_Timer[ES_Special_Effect_Integer] = ES_Special_Effect_Timer[ES_Special_Effect_Index]
-






Set ES_Special_Effect_Index = (ES_Special_Effect_Index - 1)
-






Set ES_Special_Effect_Integer = (ES_Special_Effect_Integer - 1)
-






If (ES_Special_Effect_Index Equal to 0) then do (Trigger - Turn off (This trigger)) else do (Do nothing)
-
-





Else - Actions
-






Do nothing
-
-
-
-
-
-


