loop:
healingThreshold = self.maxHealth / 2
# If your current health is less than the threshold,
# move to the healing point and say, "heal me".
# Otherwise, attack. You'll need to fight
enemy = self.findNearestEnemy()
if enemy:
distance = self.distanceTo(enemy)
if distance:
self.attack(enemy)
self.attack(enemy)
else:
if self.isReady("cleave"):
self.cleave(enemy)
else:
self.attack(enemy)