What i current got is
loop: enemy = self.findNearestEnemy() item = self.findNearestItem() if enemy: if enemy.type is 'sand-yak' or enemy.type is 'burl': # Don't fight Sand Yaks or Burls! Just keep collecting coins. pass if enemy: self.attack(enemy) # But if the enemy is a 'thrower' or an 'ogre', fight them. elif item: pos = item.pos a = pos.x b = pos.y self.moveXY(a, b)
My issue is that for
if enemy.type is 'sand-yak' or enemy.type is 'burl':
I don’t know how to not attack the sand-yak and the burl.
Any suggestions on how to fix this? thank you in advance.