Bug: Cannot cleave the Munchkins Harvest


#1

I have been looking at all the discussions regarding the Munchkins Harvest in the Backwoods Forrest, but have not been able to pass this level. I’ve been at it for about 5 days now. Here is my code:

loop {
    var enemy = this.findNearestEnemy();
    if (this.isReady("cleaver")); {
    this.cleave(enemy);
    } else {
    this.attack(enemy);
    }
}

Hoping I writing the correct code, but nothing seems to work. Perhaps it’s a bug.


#2

Please read the FAQ before you post again. It is important that you learn how to format your code. I’ve done it for you this time.

Two things:

  1. The semicolon in your third line is placed wrong.
  2. The technique is "cleave", not "cleaver".

#4

Even with the correct code and adequate armor, is it possible that only my session has a bug?


#5

You need to add:

this.findEnemies()

between the brackets of:

var enemy = this.findNearestEnemy();


#6

Thank you so much FuzzyCheese! Had to take this up with customer service and boy, it has been quite the learning experience.

Lessons learned:

  1. I need to always, Always, ALWAYS check FAQs first.
  2. I had loads of armor, but needed the specific sword for cleaving - just because it’s an expensive sword, doesn’t mean it can cleave.
  3. Just keep trying, even if I feel like an idiot.

:sparkles:


#7

Lessons 1 and 3 apply to many things outside of programming as well!

The “your weapon doesn’t have cleave” error is fairly common on that level, so don’t feel bad about it. I’ve made the mistake as well.


#8

You are absolutely right about lessons 1 and 3. Thanks Maka :dizzy: