In theory. In practice things will never ever go as planned and you're going to have to improvise. Stuff will break, wind will change direction rapidly, you may have to chop a sail, you may lose a mast.
The very best way to deal with heavy weather is to be on the shore.