Flanking: be situated on each side of or on one side of (someone or something).
In XCom world flanking is a gameplay mechanic where you position your soldier in such a way that you deal bonus damage or get bonus aim or negate enemy cover.
I propose to include a simple flanking mechanism to OpenXCom. Since OpenXCom doesn't employ cover as a gameplay mechanic I propose this simple and elegant solution.
First Flanking should be an optional setting from Advanced settings.
Flanking grants +10 AIM and +50% bonus damage. This bonuses do not apply to area damage weapons like HE, smoke, grenades, rockets etc.
Let's say we have 2 units . Our soldier Bob. And Alien JIM.
Flaking happens when Bob is positioned behind on the same X
OR Y axis as JIM and JIM is facing away from Bob. Facing away means JIM has to look same way as Bob or to the sides. JIM can't be looking at Bob or to the left or to the right of Bob that negates flanking.
The points to note is it has to be on the same X or Y axis, behind, and enemy must be looking away.
Have a look at the following picture
Two sectoids are looking away from my soldier but only #2 is on the same axis as the soldier so only #2 is flanked. If i move my soldier one square to the side then #3 will be flanked but #2 will no longer be flankd.
Flanking is denoted as a yellow pulsating marker instead of regular red.
Flanking works on 4 tile units (like HWP or sectopods etc). If any one tile of a 4 tile unit is flanked then the whole unit is flanked.
The calculations to be done is check each enemy that unit can see and check for flanking. When shooting same thing check for flanking before shooting. Flanking is checked once for displaying the enemy markers and again before taking an action (shooting).
Good/bad?