I am trying to create an ability, based off Command Aura, which increases the attack damage of all other units, who carry the same ability, by [(+2 attack damage) x (number of units with ability)] - 2.
So my wolves have the Pack Aura ability which increases their attack damage based on the number of other wolves with Pack Aura nearby. (If there is only one wolf, he should not get any attack damage bonus).
I have done a quick test to see if it the attack damage increase is possible.
I picked all units on the map, at map initialisation, then edited the ability’s Real Level Field to increase the damage by the number of wolves on the map.
Please help!
Edit: Had a go, the current trigger is a little jankey but does work. Only issue is that it will briefly remove the buff from all units when the number of wolves changes, and subsequently, remove the bonus attack damage. I would rather it did not do that.
Edit Edit: Ok, looks like I have someone working with what appears to be no unintended effects!
So my wolves have the Pack Aura ability which increases their attack damage based on the number of other wolves with Pack Aura nearby. (If there is only one wolf, he should not get any attack damage bonus).
I have done a quick test to see if it the attack damage increase is possible.
I picked all units on the map, at map initialisation, then edited the ability’s Real Level Field to increase the damage by the number of wolves on the map.
-
PackAuraTimer
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in (Units in (Playable map area) matching ((Level of Pack Aura (Wolf) for (Matching unit)) Greater than or equal to 1)) and do (Actions)
-
Loop - Actions
-
Ability - Set Ability: (Unit: (Picked unit)'s Ability with Ability Code: Pack Aura (Wolf))'s Real Level Field: Attack Damage Increase ('Cac1') of Level: 0 to ((2.00 x (Real((Number of units in (Units in (Playable map area) matching ((Level of Pack Aura (Wolf) for (Matching unit)) Greater than or equal to 1)))))) - 2.00)
-
Unit - Increase level of Pack Aura (Wolf) for (Picked unit)
-
Unit - Decrease level of Pack Aura (Wolf) for (Picked unit)
-
-
-
-
Please help!
Edit: Had a go, the current trigger is a little jankey but does work. Only issue is that it will briefly remove the buff from all units when the number of wolves changes, and subsequently, remove the bonus attack damage. I would rather it did not do that.
-
PackAuraTimer
-
Events
-
Time - Every 0.10 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in (Units in (Playable map area) matching ((Level of Pack Aura (Wolf) for (Matching unit)) Greater than or equal to 1)) and do (Actions)
-
Loop - Actions
-
Ability - Set Ability: (Unit: (Picked unit)'s Ability with Ability Code: Pack Aura (Wolf))'s Real Level Field: Attack Damage Increase ('Cac1') of Level: 0 to ((2.00 x (Real((Number of units in (Units within 600.00 of (Position of (Picked unit)) matching ((((Matching unit) belongs to an ally of (Owner of (Picked unit)).) Equal to True) and ((Level of Pack Aura (Wolf) for (Matching unit)) Greater than or equal to 1)
-
Unit - Increase level of Pack Aura (Wolf) for (Picked unit)
-
Unit - Decrease level of Pack Aura (Wolf) for (Picked unit)
-
-
-
-
Edit Edit: Ok, looks like I have someone working with what appears to be no unintended effects!
-
PackAuraTimer
-
Events
-
Time - Every 0.10 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) has buff Pack Aura (Wolf)) Equal to True)) and do (Actions)
-
Loop - Actions
-
-------- Add AttackDamageBonus (Pack Aura) --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Attack Damage Bonus (Pack Aura) for (Picked unit)) Less than or equal to 0
-
-
Then - Actions
-
Unit - Add Attack Damage Bonus (Pack Aura) to (Picked unit)
-
-
Else - Actions
-
-
-------- - --------
-
-------- Edit units attack damage --------
-
Ability - Set Ability: (Unit: (Picked unit)'s Ability with Ability Code: Attack Damage Bonus (Pack Aura))'s Integer Level Field: Attack Bonus ('Iatt') of Level: 0 to ((2 x (Number of units in (Units within 600.00 of (Position of (Picked unit)) matching ((((Matching unit) belongs to an ally of (Owner of (Picked unit)).) Equal to True) and (((Matching unit) has buff Pack Aura (Wolf)) Equal to True)).))) - 2)
-
Unit - Increase level of Attack Damage Bonus (Pack Aura) for (Picked unit)
-
Unit - Decrease level of Attack Damage Bonus (Pack Aura) for (Picked unit)
-
-
-
-
Last edited: