True. And accidentally only external walls are objects. So, if the method would also search for walls, it would also create explosions on internal walls.
It is possible to define radius.
Yeah, and only north and west walls are objects, because of original engine limitations. So for now, this is only a "hack". Too bad.
A different approach: do you think it would be possible to check for floor tile types? Creating (random) pre-battle explosions on non-UFO-floor tiles of the map segment that contains a UFO?