Sorry, I asked the wrong question. I'm actually trying to this in a consult script, not the Custom Combat tab. And I'm dumb, because the main() function required in consult scripts takes int round as a parameter already. I'd forgotten about that, since I've never used it.
So, I can use the...