Respawn? For what? For exp? Then the easiest way would be to work only on the Pirates, since they do not attack. Make the game check the hero strength (the game does that anyway when determining if the enemy army is 'weak' or 'overwhelming'), then roll a dice (slightly weaker to impossible) and spawn the pirate ship. After some time, there will be only 'impossible' pirates left, forcing you to actually employ your brain instead of going after easy battles only. Hey could be interesting, and the game would last longer. I can already visualise some of the oh-so bragging topics on the forum, with screenshots included

To avoid 'before-endgame' leveling up and after that battling only weak armies, the 'mod' could be accessible only after say, the final battle (unlock), since after that, there is nothing to do for the hero anyway.