This is my response to you. Stack overflow wont let my account answer and I just wanna help you out.
You should not set the monster\'s attack stat as a global integer