Level: Peasant Protection

This is a definite step up in complexity from previous levels: we’re asking players to not just access object properties but to do a little comparison and logic based on the result of object property queries. Is this too much too fast? Just right? We’d love to know.

9 Likes

Too much, too… out of no where.

I got started, found myself without findNearest, scratched my head and came here. If there are any clues as to what is to be done I certainly missed them.

8 Likes

And one more thing: now that I wanted to give it another try the start button was grayed out and I had to redo “shield rush” before I could start again. Still no clue how to though :frowning:

9 Likes

This one is tough. I admit I’m having trouble here…

9 Likes

I think this one looks ok. The initial code that’s there at the start gives a run in to whats needed hopefully. But would be interesting to hear whats tough - is it the returning to the peasant after an attack?

9 Likes

It is a bit of a jump, but for me it won’t let me equip any glasses for this level. The first glasses you get are restricted and the glasses I got the level just before still say locked. This is not intended, correct?

EDIT:
Already posted in github https://github.com/codecombat/codecombat/issues/1746
I’ll be looking there instead.

11 Likes

It’d be good to highlight the new part in this level. As it is not repeated in the next level and needed.

loop:
    enemy = self.findNearestEnemy()
    distance = self.distanceTo(enemy.pos)

On this level I skimmed over it and just added what was needed but had to come back to it.

8 Likes

In retrospect, I think the level is fine. I was just being stupid and forgot that I didn’t need to attack twice since I had a more powerful sword.

Considering I have virtually zero experience with coding, I think the progressive challenge of the game is great!

6 Likes

hello is my first visit in your foum, I glad stay here.

6 Likes

I seem to have the same bug where I can’t get the new glasses to equip.

Do I have to log out and log back in to reset the level, or can I just reload the page?

[edit] when I try to equip the range glasses I get a warning, where it would usually say, “warrior only” with the cryptic message “only” - hope this helps.

6 Likes

Awesome Level :smiley: I like it :smiley:

Its definitley tough compared to the other levels, but if you compare this to the multiplayer levels its nothing.

It definitely a good level.It teaches you how to think in a very algorithmic way.

Looking forward to more of such levels.

6 Likes

I had no issues with this one. My son struggled with it on a couple of levels, but the biggest one was realizing the the say commands take time and were slowing things down and causing him to fail. Maybe something in the comments about “instead of talking, maybe I should do something!”

10 Likes

I get error “Lin2 : Undefine is not a function” I believe the cause of error is because I cannot equip the glasses causing the code “enemy = self.findNearestEnemy()”. I have both glasses and it say the wooden glasses is restricted. Is there a work around for this? Thanks

6 Likes

Are you sure the wooden glasses are restricted? It should be that the crude glasses are restricted, because you need the wooden ones–so it should be trying to get you to wear the wooden ones. Trying to get to the bottom of the unlocks not working…

6 Likes

Please see the pictures I uploaded.

6 Likes

@Enya Yes the Crude Glasses(Brown one) are restricted for me too.But I remember in one of the previous levels you unlock the Wooden Glasses(Blue One)

To unlcok the Wooden Glasses(the one in the above picture) you need to complete one of the previous levels,not sure which one though

5 Likes

I confirmed I’ve completed all levels , but it’s useless.The Wooden Glasses is still can’t be equiped .

5 Likes

The Wooden Glasses should have been unlocked after the level “Sheild Rush”,but in the Peasant Protection it’s still in the “LOCKED” list.
I looked for the Wooden Galsses in Item Shop and I can’t find it.Will that is the problem.
Picture is uploaded.
Hope this is helpful.

5 Likes

Hi, have you solved this? I have the same problem. and cannot go ahead.

5 Likes

This problem has been sovled !

5 Likes