So I’m trying to beat the Swift Dagger level and I’m not sure what the issue is with my code:
enemy = hero.findNearestEnemy()
distance = hero.distanceTo(enemy)
if distance < hero.throwRange:
# Throw your dagger at the enemy.
# Attack the enemy with your bow.
This is how I have it entered and for the life of me I don’t know why, but once the enemy gets close enough my hero stops attacking in any way and subsequently I die. Any suggestions would be greatly appreciated.