Well first, you define elif enemy 3 times. Is that necessary? Another thing, you start off with an elif statement. what are you saying else/if to? along with defining elif enemy 3 times, you have 2 with the same exact command. If you wanted to perform those statements for elif enemy, you could do something like this:
if enemy:
if self.isReady("cleave"):
self.cleave(enemy)
else:
self.attack(enemy)
#rest of your code here
something like that would prevent the 3 elif enemy statements. your other code, it seems like it would work. And if you wanted to, you could add a certain distance you would have to be for cleave. Cleave isn’t 100% necessary, but you should be able to use it.
We already told you one of the problems you chose to ignore it. (FYI those “fix your code” aren’t always accurate, most the time they are a bit obscure, as with most programming)
You have this code for starters…
if enemy:
if self.isReady("cleave"):
that right there is just wrong. don’t ask for help if you aren’t going to listen.
EVERY time you have an if the lines below it must be indented forward. (unless you complete the whole statement on the same line)
There’s even more glaring stuff wrong for instance.
elif flag: self.pickUpFlag(flag)
elif item:
wheres the initial if? you cant have a else if without a starting if.
I had 1700 gems and I was saving up for the 215.55 damaging sword thing. But in order to pass Rich Forager, I had to sacrifice somewhere like 730 - 790 gems
I really don’t think you didn’t realize this in a year, but the error is in the last few lines. You can’t put an “elif” statement as a reply to an “else” statement, as by the time you reach the “else,” there are no other possibilities for the “elif” statement to address. Perhaps you’ve gotten the “else” and “elif” statements switched?
Actually, you also need to attack the enemy IN the if enemy statement. Instead of attacking the enemy when there is an enemy, you attack the enemy when there ISN’T an enemy, hence the freezing of your hero when any enemies appear.