Best known for fantastical thrillers that doubled as political allegories, he also wrote hundreds of martial arts films for Bruce Lee and others.