Secondary weapons and asteroids

By tiamat79, in X-Wing Rules Questions

I understand that when firing secondary weapons, the attacker and defender don't get bonuses based on range.

However, if firing through an obstacle, does the defender still get the bonus?

Yes