I’m really embarrassed to be asking this, but I don’t know what’s wrong with my code. Please help!
while True:
# Find the nearest enemy.
enemy = hero.findNearestEnemy()
# Attack it only if its type is "thrower" or "munchkin".
if enemy.type == "thrower" or "munchkin":
hero.attack(enemy)
# Find the nearest item.
item = hero.findNearestItem()
# Collect it only if its type is "gem" or "coin".
if item.type == "gem" or "coin":
hero.moveXY(item.pos.x, item.pos.y)
pass