Trigger:
- Earthquake War Stomp
- Events
- Unit - A unit Finishes casting an ability
- Conditions
- Or - Any (Conditions) are true
- Conditions
- (Ability being cast) Equal to Earthquake
- (Ability being cast) Equal to War Stomp
- Conditions
- Or - Any (Conditions) are true
- Actions
- Set SA_Int = (Player number of (Owner of (Triggering unit)))
- Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- And - All (Conditions) are true
- Conditions
- ((Picked unit) belongs to an ally of (Owner of (Triggering unit))) Equal to False
- Or - Any (Conditions) are true
- Conditions
- ((Picked unit) has buff Earthquake (TC)) Equal to True
- ((Picked unit) has buff Earthquake (TC)) Equal to True
- ((Picked unit) has buff War Stomp (TC)) Equal to True
- Conditions
- Conditions
- And - All (Conditions) are true
- Then - Actions
- Unit Group - Add (Picked unit) to SA_Units[SA_Int]
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Events
Trigger:
- Shock Absorber
- Events
- Unit - A unit Finishes casting an ability
- Conditions
- (Ability being cast) Equal to Shock Absorber
- Actions
- Set SA_Int = (Player number of (Owner of (Triggering unit)))
- Set SA_Caster[SA_Int] = (Casting unit)
- Unit - Add Disable to SA_Caster[SA_Int]
- Unit - Set level of Shock Absorber (Buff) for SA_Caster[SA_Int] to (Number of units in SA_Units[SA_Int])
- Wait (5.00 x (Real((Level of Shock Absorber for SA_Caster[SA_Int])))) seconds
- Unit - Remove Disable from SA_Caster[SA_Int]
- Events
the first trigger is supposed to pick every unit effected by War Stomp or Earthquake and adds them to a unit group.
the second trigger is supposed to give +2 damage for each unit in the unit group (each level of "Shock Absorber (Buff)" gives +2 damage.
the problem is, the unit group doesn't add every unit it's supposed to... when there's no nearby units, my hero still gets +2 damage. and sometimes the math doesn't work right and i get +8 for 2 units.
can anyone shed some light onto me on how to fix this?