Giving us the debug message would've helped, too. Which function returns null? stepify, wrap, move_state? Which function(s) stop working if you attack too much?
One thing I noticed from your code is that
AttackPoints never resets back to 3. I don't know if you left that piece out of this code or if you really forgot about it. It looks like it should go into the
Another thing that doesn't make much sense is the a b c. From the looks of it, you could've used
s on all 3 attack states without any problem or difference, unless the attacks queue up, each with their own direction.
isplaying is set to false, then true shortly afterwards, without any apparent check or use in between. Why? Also, why check if it's true when you literally set it to true on the line above it? (Protip, when dealing with boolean variables,
if varname: works better than
if varname == true)