loop:
enemy = self.findNearest(self.findEnemies())
munchkin = self.findNearest(self.findByType("munchkin"))
if enemy:
if munchkin:
distance = self.distanceTo(self.findByType("munchkin"))
if distance < 10:
if self.isReady("cleave"):
self.cleave(munchkin)
elif self.isReady("bash") and distance <5:
self.bash(munchkin)
else:
self.attack(munchkin)
else enemy:
self.attack(enemy)
else:
self.shield()
Trying to get a handle on some new glasses… not sure about whether or not I’ve properly figured out how to find and attack a specific type of enemy. I keep getting a distance to target unit error. I appreciate any comments which can help. Sorry in advance for possible noob mistake of posting in an incorrect category. I’m in Cavern Survival if that makes a difference.