- There can be following cases:
- ship with land units on ocean: attacked is ship, if die, land units die - it is normal behavior.
- ship with air units on ocean: attacked is ship, but air units survive - it is weird behavior.
- ship with land units on river: is treated like a normal stack (best defender is attacked) but this stack is not visible for attacker. Moreover, loaded units can be fortified. Very weird and unfair behavior.
I also don't understand, where the third case is coded.
I found unit_attack_any_at_tile_result function in common/combat.c where transported units are excluded from being taken into attack consideration.