Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

Useful competitors mistake?



YOUR written code hero.attack(enemy) - gives me a mistake. I added my own code and it doesn’t work.
The hero doesn’t attack enemies. Because hero.attack(enemy) is not functioning.

while True:
enemy = hero.findNearestEnemy()
if enemy:
if enemy.type != (“peon”):
item = hero.findNearestItem()
if item:
# Gather the item only if the type is NOT equal to “poison”.
if item.type == (“poison”):



Hi! Do you have sword?


I added the sword, thank you!


You are welcome!) When game says that something doesn’t work, often it means that you didn’t equip thing needed for this.