The solution to this bug is easy. Everywhere else we check TWO conditions, e.g. line 2313
if (pplayers_at_war(pvictor, vplayer)
&& is_unit_reachable_at(vunit, pkiller, deftile))
But on line 2283 we only check if pplayers_at_war and not if the unit is reachable.
Not surprisingly then, any unreachable units on the tile get counted as killed when it is reported "You killed the whatever and x other units".
x is wrongly inflated by exactly how many unreachable units were on that tile.
this bug is in unittools.c line 2283: https://github.com/freeciv/freeciv/blob/c638e472ea3e99c08e22caf7e6abae89649618ee/server/unittools.c#L2283
The solution to this bug is easy. Everywhere else we check TWO conditions, e.g. line 2313
But on line 2283 we only check if pplayers_at_war and not if the unit is reachable. Not surprisingly then, any unreachable units on the tile get counted as killed when it is reported "You killed the whatever and x other units". x is wrongly inflated by exactly how many unreachable units were on that tile.