KEY = Terrain for your ballista -- Intervening terrain -- City
Flat terrain -- Forest -- City = no line of sight, can't shoot.
Flat terrain -- Hill -- City = no line of sight, can't shoot.
Hill -- Forested Hill -- City = no line of sight, can't shoot
Forest -- Hill -- City = no line of sight, can't shoot.
Forest -- Forest -- City = no line of sight, can't shoot.
Hill -- Forest -- City = good line of sight, can shoot.
Hill -- Hill -- City = good line of sight, can shoot
Any terrain -- Flat terrain -- City = good line of sight, can shoot.