This is an old-school problem in mapmaking. There is no native event to detect a ground attack all by itself, people create workarounds but these are not perfect. Your best option here is to remove ground attack from these units while keeping their area damage by using 'missile splash'. There is other stuff you could do to mimic a true ground attack detection, but they could require reasonable effort and the results might not match exactly what you would like.