Does this mean that i would be more likely to hit a unit from 2 tiles away (which I guess is pretty standard for attacking melee units)?
Yes, definitely.
I just tried it with a random gal and osiron security standing next to each other in quick battle... nobody hit each other for 2 whole turns
New best cover: right in front of your enemy
Also, does it take into account ctrl-clicking past the unit?
Yes, any enemy unit in your vicinity can disrupt your shot... not only the target unit (there doesn't even have to be a target unit).
Even if they have no TUs left lol.
Other things I noticed:
- melee dodge is used too... why? isn't the new "close combat dodge" enough?
- doesn't work with stairs (i.e. when the disrupting unit's Z-level is +1 compared to your unit)
- turning 45 degrees is not enough... if you turn 45 degrees when facing a 2x2 unit, you can/will still hit it
- 2x2 units in general should probably be completely excluded from this... I can't imagine a universe in which a puny G.O. dodges/disrupts my mutated reaper's acid spit
- disrupting a shot in close combat
doesn't cost any TUs... it should at least cost TUs... just like reaction fire for example... the unit didn't have time to run away or to shoot at you, but can magically still disrupt your shots? That's BS. (And yes, I know melee dodge doesn't cost anything either... in my opinion it should too).
In general, I have to say I'm not impressed by the idea.
Forgetting the idea itself, the implementation is fine, I'll merge it later today.
One question tho: why is finding a nearby unit around you done in such a complicated way? (start in front, check twice, go clockwise and counter-clockwise in parallel checking once; and then check your back, twice again). Is this order necessary/by design, or can we just check let's say clockwise, each tile once in a single loop ( facing + 0..7 % 8 )?