I’m pretty sure that my code is fine so maybe I’m just bad at dropping flags?
Here’s my code:
# You can use flags to choose different tactics. # In this level, the green flag will mean you want to move to the flag. # The black flag means you want to cleave at the flag. # The doctor will heal you at the Red X loop: green = self.findFlag("green") black = self.findFlag("black") nearest = self.findNearestEnemy() if green: self.pickUpFlag(green) elif black and self.isReady("cleave"): self.pickUpFlag(black) # Cleave! self.cleave(nearest) elif nearest and self.distanceTo(nearest) < 10: # Attack! self.attack(nearest) pass else: self.shield()