Gavinmad
Mr. Poopybutthole
I'll answer this the best I can based on what I know of how cover worked in EU/EW, and near as I can tell very little or nothing changed with cover.Gavin, does cover not directly adjacent to you still have an effect?
The two examples I'd like clarified are:
|=|=|=| there's a long wall
X if you stand in the middle, are you protected by the cover on the square to the upper right, and upper left?
What if you are standing two tiles behind high cover? What if you're standing behind a low guard rail that's directly behind high cover? It shows you under low cover when you move to the square, but they have to shoot through high & low to hit you. Do you gain 60% 40% or 20% bonus defence?
For starters, if you are not directly adjacent to cover, you are exposed, which is the same as flanked. Certain aliens (Archons, Mecs, Andromedon Shells, Sectopods, Gatekeepers) have a special property that makes them incapable of being exposed. If you have this property, you can't take cover either.
High cover blocks line of sight, but by being in full cover you are granting line of sight to that square. Behold my peerless paint skills!
Red is an advent trooper, black is a full cover pillar, the other 4 are your troopers. Blue and Yellow are in high cover from red, although red gets a bonus to hit yellow due to the aiming angle being close to a flank. Orange is exposed, which is essentially the same as flanked (except for one specific situation in EU/EW that may not be present in XCom 2). Green and red theoretically do not have line of sight to one another.
If Red advanced directly forward to the cover, he would be flanking (and be flanked by) yellow, he would have LoS to green who would now be exposed, blue would still have high cover. If he was one square to our right, yellow would now be flanked, green would be exposed, blue would still be in high cover.
One fairly important aspect of the enemy AI with regards to cover: Enemies will never voluntarily leave themselves exposed, enemies will never knowingly move into a flank, and enemies will always attempt to move out of a flank.
As for your second question, whatever your trooper is directly adjacent to is the level of cover he is in. If you are in low cover directly behind high cover, the high cover blocks some LoS but does not provide any defense bonus.