Add script hook onNewTurn to the end of AfterSwitchHedgehog. This should signal the very start of a new turn, immediately after CurrentTeam is switched.
0aba28eb8e34
more button updates, wait for hogs in infinite attack mode stop moving before clearing their damage (just used an arbitrary small interval)