move wml [end_turn] impl to lua