You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the code I put into the console while playing the "Usual Day" level:
// Defeat munchkins, collect coins. Everything as usual.// Use AND to check existence and type in one statement.while(true){varenemy=hero.findNearestEnemy();// With AND, the type is only checked if enemy exists.if(enemy&&enemy.type==="munchkin"){hero.attack(enemy);}// Find the nearest item.varitem=hero.findNearestItem();// Collect item if it exists and its type is "coin".if(item&&item.type==="coin"){hero.attack(item);}}
The loop wont continue and my hero only iterates through the two commands and then stops. I cant get past this level. Is it my code or is this a bug?
Activity
[-]USUAL DAY bug[/-][+]"Attack" item bug[/+]Bryukh commentedon Mar 1, 2018
Thanks. That's not a problem of the level. We will add a custom error for the case when you're attacking an item.