Finally i finished with logic for realtime battles for my game. For sure there is a lot of work but it goes better each time