# Our wizards teleport ogres from their camp here. # They appear for a short period and they are stunned. # Attack only weak and near ogres. while True: enemy = hero.findNearestEnemy() if enemy: distance = hero.distanceTo(enemy) if enemy.type=="munchkin" and distance<20: hero.attack(enemy) # If enemy.type is "munchkin" # AND the distance to it is less than 20m