nothing stops you from having your betweenbattle or beforebattle scripts call the counter checker
It's actually a bit tricky to do this. Winterbay is bullying Razoroup by tossing it out as if this was no big deal.
Unlike some other triggered scripts, a counter script is called with the name of the counter and the number of turns left. That means a script which calls the counter script will need to acquire that information to pass on to the counterScript. I can get the name of all coming counters with
get_counters("Fortune Cookie", 0, 200), but that won't tell me how many turns are left. I suppose I can narrow it down to the counters that are going to be up right now by using
get_counters("Fortune Cookie", 0, 0), but what if the player is adventuring in the shore or underwater? In those cases we'd need to know about the next 2 or 3 turns.
This is a non-trivial exercise and I'm not entirely certain how to solve it, so I certainly wouldn't expect Razorsoup to know the answer. Perhaps Winterbay could explain his solution so that Razorsoup and I both could learn from him.