I'm making a spells that increase damage (increase level) when you attack/approach enemy units within limited ranges and when he leaves in specific range it will auto-decrease back to default lvl (1 or 2). I was wandering if there is any leak here ( I'm not experienced enough to find any solution of this leak). Im glad if there is anyone help me.
-
Damage Stack Active 1
-
Events
- Unit - A unit Learns a skill
-
Conditions
- (Learned Hero Skill) Equal to Damage Stack
-
Actions
- Set DamageStack_LearnedUnits = (Learning Hero)
- Trigger - Turn on Damage Stack Active 2 Copy <gen>
-
Events
-
Damage Stack Active 2 Copy
-
Events
- Unit - A unit Is attacked
-
Conditions
- (Unit-type of (Attacking unit)) Equal to Thief
-
Actions
- Unit - Set level of Damage Stack for (Attacking unit) to (Random integer number between 1 and 3)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Attacking unit) Equal to DamageStack_LearnedUnits
- ((Attacking unit) is in (Units within (Random real number between 85.00 and 105.00) of (Position of (Attacked unit)))) Equal to True
-
Then - Actions
- Unit - Set level of Damage Stack for (Attacking unit) to (Random integer number between 2 and 10)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (((Attacking unit) is in (Units within 350.00 of (Position of (Attacked unit)))) Equal to True) and ((Current order of (Attacking unit)) Equal to (Order(move)))
- (Attacking unit) Equal to DamageStack_LearnedUnits
-
Then - Actions
- Unit - Set level of Damage Stack for (Attacking unit) to (Random integer number between 1 and 2)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Events