I am having issues again with the my code. The code below should work for this unless there is something that I am not seeing. @dedreous helped me before when I ran into this type of situation.
What am doing wrong? https://drive.google.com/file/d/1MZWwfmQ3ITaZK0MiUt-CyTV63bwnaKXf/view?usp=sharing (video might take a minute to render. )
while True: enemy = hero.findNearestEnemy() if enemy.type == "munchkin" or enemy.type == "thrower": hero.attack(enemy) item = hero.findNearestItem() # Check the item type to make sure the hero doesn't pick up poison! # If the item's type is "gem" or "coin": if item.type == "coin" or item.type == "gem": # hero.moveXY(item.pos.x, item.pos.y)