If you construct a path from a ladder to an end card with a blue or green door in the path, the end card is flipped. If the card is the gold, all dwarves on that colored team (blue or green) win, as does the boss and profiteer.
What happens if you construct a path from a ladder to an end card while both doors are in the path?