The spell is based on some AOE targeted spell (Blizzard, Cluster Rockets)
Then it turns the hero's animation speed to higher, plays it a few times, creates dummy units in front of the hero, creates a loop which moves those units and checks if there's enemy unit to those dummy units in range or if their distance from shooting point is X. If either of these is true, it destroys that dummy unit and damages the enemy hit.