Try not to use too many variables or switches either because:
battle system uses (so far) variables: 1-74 and for some reason 145-146. also it uses switches 1-27. Please remember this while making your game.. I am sorry but I can't change those switches or variables now, it is too late and would ultimately slow down progress of the battle..
Battle system is being worked on still.