…ば…ところだ(った)
If… (counterfactual condition), then would be ~
JLPT
Structure
Explain
The end of the sentence will take the form of V-るところだ, V-るところだった, V-ていたところだ, V-ていたところだった... The form ...ばV-るところだ is a hypothetical expression of an action that has not yet been done, but would be done immediately if circumstances changed, becoming X. The form ...ばV-ていたところだ is used to describe a situation in the past that could have happened, with the intention of saying "if circumstances had been different, it would definitely have been done like that / it would have become like that". The form ...ばV-ていたところだった is used in cases where you want to say that "a certain event that was sure to happen has been avoided at the last minute, if circumstances had been different", with the implication that "it's lucky to have avoided a bad outcome".
