The Doctor needs to stop Adric from siding with Monarch and get Bigon quietly restored (who was mechanically lobotomized for previously siding with the Doctor). The ship then gets turned into one big multi-cultural dance party so the Doctor can make a desperate leap for the TARDIS, floating just outside the spaceship, and stop Monarch's plans for Earth.
Did You Know?
It was originally decided that after Castrovalva, the Doctor would only have two companions, Adric and Tegan. As a result, the character of Nyssa was to be written out of the series at the end of this story. However, Peter Davison
strongly opposed this move because he felt that Nyssa was the companion who was "most suited to his vision of the Doctor". Given this, John Nathan-Turner
and the rest of the production team relented and Nyssa was retained. The story for the following serial Kinda was already developed with two companions and Nyssa was not featured in that narrative as written. Rather than a complete rewrite of Kinda to include Nyssa in the narrative, she remains absent much of that serial, said to be resting in the TARDIS. This was set up with Nyssa's collapse at the end of this story. See more