The general rule of guns vs knives is that it is best to run from a knife but attack a gun. This is mainly at relative close quarters but the logic is that a gun is really only deadly at one point extending out of the barrel and that point is actually pretty small. If you can keep it off of you then the gun is harmless. A knife on the other hand can do damage more easily, again in closeish quarters, and as such it is best to retreat and attempt to counter-attack from range. You are correct that the best way to deal with the bat would be to move in very close and if possible flatten the attacker. Interestingly, as I stated that's the same idea with the gun if you're already within range for such a move.
I'm going to counter your example by saying that yes you're right most rapes are committed by people known by the person raped. However, if you think a person who has a gun at hand isn't going to shoot someone they know who is in the process of trying to rape them you're smoking crack.
I realize that the plural of anecdote isn't data, however those I have personally known seriously regrets not having a gun at hand to shoot their rapist.
As to your second point that isn't logical. Responsibility for an external act does not transfer simply because someone didn't take a theoretical step to protect against that act.
One could argue that if hit in a car and I'm not wearing a safety belt that some responsibility for the extent of my injuries may be mine, but that does not transfer nor impact the responsibility of who caused the accident.