Need help with Marauder level


#1

So my problem is that i can’t get enough gold in time. Those robots pass through me and then I cant catch up. I have sword of forgotten but it takes quite some time to kill them.

while True:
    coin = hero.findNearest(hero.findItems())
    # While a coin exists:
    while coin:
        # Move to the coin.
        hero.moveXY(coin.pos.x, coin.pos.y)
        # Reassign the coin variable to the nearest item.
        coin = hero.findNearestItem()
        pass
    enemy = hero.findNearestEnemy()
    if enemy and enemy.health > 0:
        # While enemy's health is greater than 0.
        hero.attack(enemy) 
                
        pass

#2

There’s a bug with sword of forgotten. If you equip lower tier sword you pass the level.


#3

Or you can fix your code.

When your hero see coins s/he stops to attack enemies and collects coins.


#4
    if enemy :
        while enemy.health > 0:
            hero.attack(enemy) 
            pass

but still there is bug with sword of forgotten


#5

Hm, could you say you codecombat username? I’ll check your session. I tried to reproduce it with that sword and it worked.


#6

It’s satisfy. But I sign in with facebook [details=regular]

[/details]

forgotten


#7

I confirm that “sword of forgotten” is too slow. All robots run away before hero able to hit.


if I change a sword, level success


#8

Could you say your codecombat email (even with facebook it should be), I will search your username by the email. You could send it with the direct message or to team@codecombat.com.

I suppose it’s not only sword problem, because I easily pass this level with that sword.


#9

It depend on a seed, I had 1 secced game and three loses.
I record my screen but in not good quality.
sorry for that.

you can see how robots run away


#10

@Satisfy I think, I found the problem with that sword. The sword of Forgotten is too heavy and can push enemies back, it breaks all level logic. I made robots heavier. It should help.


#11

Thanks for your help :slight_smile: