Copied code below. Defeat the enemies and pick up mushrooms at first oasis easy enough but not sure how to get my character to progress to next couple of oasis’s. Any help is appreciated.
loop:
enemies = self.findEnemies()
enemy = self.findNearest(enemies)
if enemy:
if self.isReady("bash"):
self.bash(enemy)
self.attack(enemy)
self.attack(enemy)
if self.isReady("power-up"):
self.powerUp()
self.attack(enemy)
self.attack(enemy)
else:
self.attack(enemy)
self.attack(enemy)
if not enemy:
mushrooms = self.findItems()
mushroom = self.findNearest(mushrooms)
if mushroom:
mx = mushroom.pos.x
my = mushroom.pos.y
self.moveXY(mx, my)