did a quick test.
it is indeed that if you download the demo than you will get a stack to deep error when you start a battle
next i loaded the script in a new project and I got an error of undefined method at the end of the battle
edit:
tried some stuff but can't fix it. the bug seems to be when the script starts handling the end of the battle