compute turn penalties in lua profiles