Reading through some more responses, I'm starting to think that there are two distinct responses that need to be developed: a) Thinking ahead, and b) Being able to function under stress. In this case, the combination is much more powerful than the individual parts.
Actually, when it comes to dealing with novel situations that you've never particularly prepared for, I guess maybe a third element--thinking creatively or "laterally"--could be a third skill necessary to do well in the kind of situation I'm describing. I suppose that this is where "What if?" practice comes into play. We all have information, which is generally learned within a certain context. To be able to quickly take that information and mentally utilize it in a novel situation isn't something that necessarily comes naturally, I think. That's why it could help to regularly think of new situations and then consider the best way to respond to each, which is something above and beyond just mentally rehearsing set responses.
For example, maybe you've regularly thought about what to do if you're confronted by an attacking bear while on the trail or while sleeping in your tent. You've planned for it and mentally rehearse your reponse. But when the attack really happens, you're taking a shower at some campground and you're mentally paralyzed because you've never considered that particular possibility before. Maybe your reponses have always depended on having a weapon but you have none with you. Or you've always considered the best way to escape, except this shower has you boxed in. Your set responses don't fit this situation.