moved some elements of battle system to back layer so that animations can be played smoothly in battle. fixed math calculation for resistance calculation for single spell damage. I forgot to floor the result of the calculation as well.
applied fix to battle so that levelup only works when you win and make the branch for different action on loss.