Empowerment
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Empowerment
Actions
Set empowermenttreewallinteger = (Number of units in (Units within 700.00 of (Position of (Triggering unit)) matching ((Destructible-type of (Matching destructible)) Equal to Felwood Tree Wall)))
Set empowermentcanopytreeinteger = (Number of units in (Units within 700.00 of (Position of (Triggering unit)) matching ((Destructible-type of (Matching destructible)) Equal to Felwood Canopy Tree)))
Set empowermenttotalinteger = (empowermentcanopytreeinteger + empowermenttreewallinteger)
Unit - Add Damage Bonus (multiple levels) to (Triggering unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
empowermenttotalinteger Less than or equal to 100
Then - Actions
Unit - Set level of Damage Bonus (multiple levels) for (Triggering unit) to (empowermenttotalinteger x (2 + (Level of Empowerment for (Triggering unit))))
Else - Actions
Unit - Set level of Damage Bonus (multiple levels) for (Triggering unit) to 100
Wait (10.00 + (2.00 x (Real((Level of Empowerment for (Triggering unit)))))) seconds
Unit - Remove Damage Bonus (multiple levels) from (Triggering unit)
It is supposed to count all of the trees in a 700 AOE around the casting hero (I only have Felwood tree walls and Felwood canopy trees in my map) and give my hero bonus damage based on the amount of the trees. It is supposed to give 3/4/5/6 bonus damage per tree for 12/14/16/18 seconds and I did this by creating the ability "Damage Bonus (multiple levels)" which has 100 levels, +1 damage per level and setting the level of the ability to the amount of trees (times 3/4/5/6). The problem is when I cast it my damage always goes up by +1 no matter how many trees are around. Can anyone see the problem?
Oh yeah and I made a +100 damage cap also
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Empowerment
Actions
Set empowermenttreewallinteger = (Number of units in (Units within 700.00 of (Position of (Triggering unit)) matching ((Destructible-type of (Matching destructible)) Equal to Felwood Tree Wall)))
Set empowermentcanopytreeinteger = (Number of units in (Units within 700.00 of (Position of (Triggering unit)) matching ((Destructible-type of (Matching destructible)) Equal to Felwood Canopy Tree)))
Set empowermenttotalinteger = (empowermentcanopytreeinteger + empowermenttreewallinteger)
Unit - Add Damage Bonus (multiple levels) to (Triggering unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
empowermenttotalinteger Less than or equal to 100
Then - Actions
Unit - Set level of Damage Bonus (multiple levels) for (Triggering unit) to (empowermenttotalinteger x (2 + (Level of Empowerment for (Triggering unit))))
Else - Actions
Unit - Set level of Damage Bonus (multiple levels) for (Triggering unit) to 100
Wait (10.00 + (2.00 x (Real((Level of Empowerment for (Triggering unit)))))) seconds
Unit - Remove Damage Bonus (multiple levels) from (Triggering unit)
It is supposed to count all of the trees in a 700 AOE around the casting hero (I only have Felwood tree walls and Felwood canopy trees in my map) and give my hero bonus damage based on the amount of the trees. It is supposed to give 3/4/5/6 bonus damage per tree for 12/14/16/18 seconds and I did this by creating the ability "Damage Bonus (multiple levels)" which has 100 levels, +1 damage per level and setting the level of the ability to the amount of trees (times 3/4/5/6). The problem is when I cast it my damage always goes up by +1 no matter how many trees are around. Can anyone see the problem?
Oh yeah and I made a +100 damage cap also