What attack is used against the Colossus?

The Colossus is unique in that it can be attacked by both ground attacks and air attacks. Some units, however, can attack both air and ground, and use a different attack for each - for example the Thor has completely different ground and air attacks.

When attacking a Colossus, which attack does the attacking unit use? Ground or air? And why does it use that attack?

I think I actually already have an answer which I will post below, but I would love to hear more insight as to how it is determined and why.


So the secret to this conundrum can be found by examining the Goliath, and the Goliath merc.

The Goliath Merc uses ground while the Goliath uses Air. alt textalt text

So why doe the Thor use ground?

If we actually look at the Thor we see that the Thor actually acquires with its weapons based on angle.
alt text
On the Goliath and Goliath merc, these values are set to distance. Since the Thor can use angle to prioritize (Colossus and Goliath are both ground), it does. Since the Goliath can't (distance is identical), it defaults to the order its weapons occur.

Finally, this explains the Scout:
alt text


After doing some brief experimentation, it looks to me as if the attack type actually depends on the attacking unit. The Thor, for example, will always use its ground attack. Here's a table of what attack is used for each unit (I've only listed units that have different ground and air attack):

Unit             Attack type
==============================
     --- Melee units ---
Battlecruiser    Ground
Queen            Air
Thor             Ground
 --- Campaign-only units ---
Goliath          Air
Scout            Ground
Wraith           Air

It seems to me that this was designed so that the unit will use its more "powerful attack". The Battlecruiser's ground attack is stronger than its air attack, and the Wraith's air attack is stronger than its ground. My theory breaks down when it comes to the Scout, but I believe this is just a mistake on Blizzard's part, since Scouts can never face off Colossi in the campaign, as far as I can remember.

The Thor is unique here since its attack can be said to be weaker vs ground because of the shorter range, but the ground damage is definitely higher, so I guess that's why it was chosen. On the other hand it may be more complicated than that, as tzenes revealed in his answer.