Cover and Flanking (5e Variant Rule)
From D&D Wiki
When the path between a creature and a ranged attack or an effect which causes a Dexterity saving throw to avoid damage is obscured by obstacles, the creature is considered to be behind cover, making them more difficult to harm. There are three degrees of cover, and a creature only benefits from the greatest degree available; the effects do not stack. The degree of cover provided by an obstacle is determined by what proportion of the creature's body is obscured by the cover: a waist-high wall provides half cover for a standing human or total cover when prone.
Half Cover grants a +2 bonus to AC and Dexterity saving throws.
Three-Quarters Cover grants advantage on Dexterity saving throws and disadvantage on ranged attack rolls against you.
Total Cover prevents you from being targeted directly by ranged attacks and spells, and you automatically succeed on Dexterity saving throws.
When a creature and at least one of its allies are adjacent to an enemy and on opposite sides or corners of the enemy space, the enemy creature is considered to be flanked. All enemies of a flanked creature have a +2 bonus to melee attack rolls against it. When two pairs of creatures flank an enemy, the enemy creature is considered to be surrounded. All enemies of a surrounded creature have advantage on melee attack rolls against it. All creatures who flank or surround a creature must be allied to one another to enable the effect, but an enemy of a flanked or surrounded creature does not have to be allied to the flanking creatures to benefit from the effect.