Hey CodeCombat supporters! I’m struggling with the cursed valley, and in general Sarven Desert
The other levels leading up to this were manageable, but I feel like it’s a lot harder now. I think I’m really struggling with the idea or concept of arrays. If anyone has a cool analogy, I’d love to hear it.
Your help and insight would be appreciated, my guy doesn’t pick up the potion
while True:
item = hero.findNearestItem()
# Take only the items with a "potion" type AND only when your health is less than a quarter of the maxHealth.
if item and hero.health < max.health/4 and item.type == "potion":
hero.moveXY(item.pos.x, item.pos.y)