Taiwan has long prepared for a Chinese military invasion but wars in Iran and Ukraine expose new potential threats.