I use the sample code to define the thief
but it can’t steal runner or merger fruit
def collectHandler_th(data) :
unit = data.target
while True:
if unit.item:
unit.bring()
else:
nearest = unit.findNearestEnemy()
if nearest and nearest.item:
if unit.distanceTo(nearest) < 5:
unit.special(nearest)
else:
unit.move(nearest.pos)
Hello and welcome to the Code Combat discourse. We have some amazing people who would LOVE to help you with bugs, creating levels, and getting through levels. Don’t forget though, when you need help, create a new level, and format your code correctly Or, you can just chat with others in topics. Please go to this topic: here to see more details. We would be happy to just chat with you to! And I don’t think this is a bug so I have changed it to #level-help.