Stuck on Mega-Munchkin Attacks

Are you still on? I still cannot on that one reply so I have to edit still.

No. An else to that if.

Ok. We’ll move there if you want to. But anyway this restriction will disapear when you will become a basic user ( just wait for it because you completed all the tasks to achieve it).

Done. I created the topic that you asked for.

Hey I’m stuck too. Do you know what the range of the munchkin’s attack is?

I belive that it is 3 meters, as of the most meele heroes and vilans.

Andrei

Thanks a lot.

1 Like

I’m still stuck.

# That's a big'un! With some clever thinking, Ivy should be able to take care of this situation single-handedly.
while True:
    # Find the archer.
    friend = hero.findNearest(hero.findFriends())
    enemy = hero.findNearest(hero.findEnemies())
    
    # Tell the archer to attack the enemy!
    if friend and enemy:
        hero.command(friend, "attack", enemy)
    
    # Wait, no, that doesn't work that well. Maybe try something else?
    # The munchkin is awfully slow...
    if friend.distanceTo(enemy) < 5:
        hero.command(friend, "move", {"x": 18, "y": 21})

How do you find the distance of Ivy to the munchkin? It brings up an error on line 13.

2 Likes

replace with

20 charecters(quotes don’t count as characters)

1 Like

You also need the equipment

@FalconX11_312 did you complete the level?

@FalconX11_312 did you complete the level?

What equipment do I need? And it doesn’t work.

Doesn’t matter. Its solved even with the error.

pls help i am stuck (20 chars)

Hi cheddarcheese,

Please post your current code, and we’ll see if we can work out what the problem is.

Jenny

1 Like
# That's a big'un! With some clever thinking, Ivy should be able to take care of this situation single-handedly.
while True:
    # Find the archer.
    friend = hero.findNearest(hero.findFriends())
    enemy = hero.findNearest(hero.findEnemies())
    
    # Tell the archer to attack the enemy!
    if friend and enemy:
        hero.command(friend, "attack", enemy)
    
    # Wait, no, that doesn't work that well. Maybe try something else?
    # The munchkin is awfully slow...
    if enemy.Distance <= 7:
        hero.command(friend, "move", {"x": 24, "y": 35})

she ignores me and is oofed bye the fat munchkin

Is anything wrong with this line?

Andrei

AnSeDraDecryption Contestant

2m

Is anything wrong with this line?

Andrei
yeah she ignores that piece of code