An artist's depiction of an Extended Unit Death
So if you're going for damage based on the length of time the unit is in the flames, you can easily do this with part of what I posted above with a unit group that contains the units in front of the casting unit.
If you recall my
flashlight system, I used a series of points going in the direction a unit was facing and revealing that area. You could use this system, but rather than revealing the area, add all units in that area to some global unit group. Then you'd have a trigger running periodically that gives a small amount of damage to all units in that unit group. Using the custom value, you can keep track of how much damage each unit has taken, and if you wanted to cap it at say 50 hp, you would have a conditional to not damage the unit in the group if their custom value was 50.
Flamethrower
Events
Unit - Any Unit uses Flamethrower at Generic1 - Any stage (Ignore shared abilities)
Local Variables
allHitUnits = (Empty unit group) <Unit Group>
targetUnits = (Empty unit group) <Unit Group>
Conditions
Actions
General - Pick each integer from 1 to 50, and do (Actions)
Actions
Variable - Set targetUnits = (Empty unit group)
Unit Group - Add all units in (Any units in (Region(((Position of (Triggering unit)) offset by 1.0 towards (Facing of (Triggering unit)) degrees), 0.5)) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) to targetUnits
Unit Group - Add all units in (Any units in (Region(((Position of (Triggering unit)) offset by 1.5 towards (Facing of (Triggering unit)) degrees), 0.5)) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) to targetUnits
Unit Group - Add all units in (Any units in (Region(((Position of (Triggering unit)) offset by 2.0 towards (Facing of (Triggering unit)) degrees), 0.5)) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) to targetUnits
Unit Group - Add all units in targetUnits to allHitUnits
Unit Group - Pick each unit in targetUnits and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Custom value 0 of (Picked unit)) < 50.0
Then
Environment - Deal damage using Dummy_Effect on (Picked unit) from (Triggering unit) with 1.0 extra damage
Unit - Set (Picked unit) custom value 0 to ((Custom value 0 of (Picked unit)) + 1.0)
Else
General - Wait 0.04 Game Time seconds
Unit Group - Pick each unit in allHitUnits and do (Actions)
Actions
Unit - Set (Picked unit) custom value 0 to 0.0
So it basically goes through a loop of 1 to 50, doing 1 damage to each unit in front of the caster each iteration. It pauses .04 seconds on each iteration, making this loop last a total of 2 seconds. Then, it takes all affected units and resets their custom value back to 0.
Of course, the If/Then/Else isn't needed for these numbers, because the max damage would be 50 no matter what. If you had it loop 100 times with a .02 pause on each iteration, though, it would cap the damage at 50, and the targeted unit would not take further damage (even though the loop would run for another second).
So yeah, that's how you would approach it using a dummy effect.