Question about heroes and troops

If this question has been asked before, I apologize as I haven’t been able to find it.

When we use heroes of the same color in our offense team, and we use the tiles of these to attack. From which hero will the troops be used?

Example: I have Skittlehead and Carver both green heroes lined up in my team and each of them has a troop set. When I use the green tiles to attack, will the troop belonging to Carver or the troop belonging to Skittlehead be used.

I have tried to watch this process closely, but either the animation is to fast to see properly or either there seems to be no ‘rule’ here.

It’s random for each tile. Although this only affect crit and miss chances, the attack bonus of all troops apply always.