Hey!
I resubmit my code 5k times and still nothing. It either defeats all of the ogres or gathers all of the coins. I use:
while True:
enemy = hero.findNearestEnemy()
if enemy:
if enemy.type != "peon":
hero.attack(enemy)
item = hero.findNearestItem()
if item:
# Gather the item only if the type is NOT equal to "poison".
if item.type != "poison":
hero.moveXY(item.pos.x, item.pos.y)
pass
Could you say your codecombat nickname? I’ll try to investigate your case. Also could you say which code (I see two - one in the first message and another one on the screenshot) you are using?
Thanks. I see. There are two problems were: you used really slow boots. I’ve changed them for the simple boots. However, there can be “bad seed” too. Sorry, I’ve completed the level with your account accidently.
I’ve added issues to prevent that case in future.
Hi,
It’s not that you should spend more time shopping (though, do that too! ) – it’s that you have to be aware of what you’re equipping.
If you put on slow boots, you might be too slow to complete something.
If you put on the speed ring, you might go too fast to do something else.
If you upgrade your sword, then your code that has two attacks in it might not work because your first attack defeats the enemy and the second one has nothing to hit.