[Adventurer] Wise Moves

Wise Moves

A simple mid-game level that uses hero.move()(And maybe flags) to defeat the brawler.

In this level, you have 3 different moves, each that have different uses. Here’s a quick list:
Lightning Bolt
Cost: 50 Gold
Deals 500 damage and stuns the brawler for 1 second.
Cost: 75 Gold
Spawns behind the brawler, distracting it until it is destroyed.
Cost: 100 Gold
Spawns an archer that fights the brawler.

Note: To use the moves, you’ll need sufficient gold and you’ll have to move to the specific movement stones. The specific coordinates are in the hints book.

By using those three moves, you’ll have to defeat the brawler before it reaches the human base!
The link to the level: https://codecombat.com/play/level/wise-moves


Hi, I like the idea of this level, but it has an infinite loop after I put this code in:

while True:
    coin = hero.findNearestItem()
    if hero.gold >= 50:
        hero.moveXY(30, 50)
    elif coin:
        hero.moveXY(coin.pos.x, coin.pos.y)

Do you know why this might have happened?

Thanks for reporting! I had a funny(and stupid) typo in my referee code that broke the level. It should be fixed. :slight_smile:

1 Like

Stepping on the spots doesn’t seem to do anything.

You need to move to the exact coordinates. It’s in the hints.

Trust me, I did. I will try again anyway.

yes it doesnt work @Chaboi_3000

Nick beat this level before, and I haven’t changed anything so it must work. It’s something on your end that’s wrong.

ok i am going to try it again

rly u try it it doesnt work

I was able to defeat the brawler, but didn’t pass the level. I triggered the decoys anytime he passed x:65 and had the gold. I only used two of the three moves though. Wasn’t sure if using all three was a requirement.

1 Like

There is changed version - the trees are leafless and the level can be finished. I’m not sure if there still aren’t freezes with right code - i deleted my first version of the code i thought as correct.
There’s not a table with player achievements

to check my progress used this code:

            console.log("\nenemy name: " + enemy.id + 
                            "\nposition: " + enemy.pos +
                            "\nhealth: " + enemy.health + 
                            "\ntime passed: " +  hero.time );

enemy name: Grognar
position: {x: 53.74, y: 35.14, z: 2.00}
health: 0
time passed: 44.53333333333333

I think the level execution must end when the goals are achieved.

Same code completes the level now. :grinning:

can you send me link?

It’s the same one: https://codecombat.com/play/level/wise-moves

still doesnt work do you need to use firefox?

it really doesnt work here is my code

while True:
    coin = hero.findNearestItem()
    if hero.gold >= 50:
        hero.moveXY(30, 50)
    elif coin:
        hero.moveXY(coin.pos.x, coin.pos.y)

Your code works, it just doesn’t complete the level. You need to mix up your strategy by attacking with archers or distracting with decoys.

Thanks everyone! Nick is planning to add this level to the campaign! It might take a while because Nick still has other tasks to do. :slight_smile:

(20 characters and doritos i hope)