Auto-translated
I partially solved the problem, but the solution is too clunky. Before attacking a stack, I delete all NCF files from the data folder, and after the battle, I put the files back. If the files are not returned, the game crashes during the AI's turn.